Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-24 Thread Roberto E. Vargas Caballero
Hi,

On Tue, Jan 19, 2016 at 01:56:56PM -0200, Brad Luther wrote:
> Roberto Vargas - it works in a perfect way! I have one question. Why
> didn't it work by default on ash? Is ash a sucky shell? Should I file
> a bug? Because by what I understand this is a hack, right? Not the
> ideal way. But so far it works really well!

I already answered this question a few mails ago. I am going to
quote my own mail:

- You can read the thread in [1], and you will understand why I am not
- going to change this behaviour in the git version. Again the patch is
- very simple, you only have to modify the values in the array Key located
- in config.def.h. You can see that there are two rows for XK_KP_Delete and
- XK_Delete for XK_ANY_MOD. If you join them in only one row them you will
- be able to run suck programs inside of a suckless terminal. If you do
- it you can add the patch to the wiki and we can add a link in the FAQ,
- but again, my suggestion is send a patch to the programs that are
- wrong.

I can see you didn't read the FAQ, so I'm going to quote the FAQ to:

- ## Why doesn't the Del key work in some programs?
- 
- Taken from the terminfo manpage:
- 
- If the terminal has a keypad that transmits codes when the keys
- are pressed, this information can be given. Note that it is not
- possible to handle terminals where the keypad only works in
- local (this applies, for example, to the unshifted HP 2621 keys).
- If the keypad can be set to transmit or not transmit, give these
- codes as smkx and rmkx. Otherwise the keypad is assumed to
- always transmit.
- 
- In the st case smkx=E[?1hE= and rmkx=E[?1lE>, so it is mandatory that
- applications which want to test against keypad keys send these
- sequences.
- 
- But buggy applications (like bash and irssi, for example) don't do this. A 
fast
- solution for them is to use the following command:
- 
- $ printf '\033[?1h\033=' >/dev/tty
- 
- or
- $ tput smkx
- 
- In the case of bash, readline is used. Readline has a different note in its
- manpage about this issue:
- 
- enable-keypad (Off)
- When set to On, readline will try to enable the
- application keypad when it is called. Some systems
- need this to enable arrow keys.
- 
- Adding this option to your .inputrc will fix the keypad problem for all
- applications using readline.
- 
- If you are using zsh, then read the zsh FAQ
- :
- 
- It should be noted that the O / [ confusion can occur with other keys
- such as Home and End. Some systems let you query the key sequences
- sent by these keys from the system's terminal database, terminfo.
- Unfortunately, the key sequences given there typically apply to the
- mode that is not the one zsh uses by default (it's the "application"
- mode rather than the "raw" mode). Explaining the use of terminfo is
- outside of the scope of this FAQ, but if you wish to use the key
- sequences given there you can tell the line editor to turn on
- "application" mode when it starts and turn it off when it stops:
- 
- function zle-line-init () { echoti smkx }
- function zle-line-finish () { echoti rmkx }
- zle -N zle-line-init
- zle -N zle-line-finish
- 
- Putting these lines into your .zshrc will fix the problems.

The problem with ash is they don't use the smkx sequence as they should.
You can send a mail to them and see if they want to fix their bug.

Regards,

[1] http://comments.gmane.org/gmane.comp.misc.suckless/20370



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-19 Thread famfop

On 18/01/16 23:59, Brad Luther wrote:

Will try to get my head around getting the Delete key to work on st now.

Hi,
what 'sh are you using? E.g. using mksh it worked out of the box (for 
me). As I'm using zsh I followed [0]. I suppose thats the cleanest way 
of doing it. _My_ problem now is, that some applications, e.g. ipython, 
don't recognize the del key. But I guess this has not to do with st.
As I don't use bash I can't tell for sure, but you may find something 
interesting here [1].


[0] http://zshwiki.org/home/zle/bindkeys#reading_terminfo
[1] 
http://unix.stackexchange.com/questions/36186/change-terminfo-in-bashrc-script




Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-19 Thread Martti Kühne
On Tue, Jan 19, 2016 at 11:36 AM, famfop  wrote:
>
> Hi,
> what 'sh are you using? E.g. using mksh it worked out of the box (for me).
> As I'm using zsh I followed [0]. I suppose thats the cleanest way of doing
> it. _My_ problem now is, that some applications, e.g. ipython, don't
> recognize the del key. But I guess this has not to do with st.
> As I don't use bash I can't tell for sure, but you may find something
> interesting here [1].
>

Bash inherits the settings in $HOME/.inputrc which holds the settings
for all software that depend on readline.

cheers!
mar77i



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-19 Thread Brad Luther
I'm using ash and it's not working out of the box.
I'll see if I can find a patch or then I'll try using mksh, but I
really like ash.
Thanks for the tips.


On Tue, Jan 19, 2016 at 8:36 AM, famfop  wrote:
> On 18/01/16 23:59, Brad Luther wrote:
>>
>> Will try to get my head around getting the Delete key to work on st now.
>
> Hi,
> what 'sh are you using? E.g. using mksh it worked out of the box (for me).
> As I'm using zsh I followed [0]. I suppose thats the cleanest way of doing
> it. _My_ problem now is, that some applications, e.g. ipython, don't
> recognize the del key. But I guess this has not to do with st.
> As I don't use bash I can't tell for sure, but you may find something
> interesting here [1].
>
> [0] http://zshwiki.org/home/zle/bindkeys#reading_terminfo
> [1]
> http://unix.stackexchange.com/questions/36186/change-terminfo-in-bashrc-script
>



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-19 Thread Roberto E. Vargas Caballero
On Tue, Jan 19, 2016 at 10:02:01AM -0200, Brad Luther wrote:
> I'm using ash and it's not working out of the box.
> I'll see if I can find a patch or then I'll try using mksh, but I
> really like ash.
> Thanks for the tips.


The patch is not so complex ...
Can someone put it in the wiki?

diff --git a/config.def.h b/config.def.h
index fd09d72..8450f42 100644
--- a/config.def.h
+++ b/config.def.h
@@ -245,8 +245,7 @@ static Key key[] = {
{ XK_KP_Delete, ControlMask,"\033[3;5~",+1,0,0},
{ XK_KP_Delete, ShiftMask,  "\033[2K",  -1,0,0},
{ XK_KP_Delete, ShiftMask,  "\033[3;2~",+1,0,0},
-   { XK_KP_Delete, XK_ANY_MOD, "\033[P",   -1,0,0},
-   { XK_KP_Delete, XK_ANY_MOD, "\033[3~",  +1,0,0},
+   { XK_KP_Delete, XK_ANY_MOD, "\033[3~",   0,0,0},
{ XK_KP_Multiply,   XK_ANY_MOD, "\033Oj",   +2,0,0},
{ XK_KP_Add,XK_ANY_MOD, "\033Ok",   +2,0,0},
{ XK_KP_Enter,  XK_ANY_MOD, "\033OM",   +2,0,0},
@@ -300,8 +299,7 @@ static Key key[] = {
{ XK_Delete,ControlMask,"\033[3;5~",+1,0,0},
{ XK_Delete,ShiftMask,  "\033[2K",  -1,0,0},
{ XK_Delete,ShiftMask,  "\033[3;2~",+1,0,0},
-   { XK_Delete,XK_ANY_MOD, "\033[P",   -1,0,0},
-   { XK_Delete,XK_ANY_MOD, "\033[3~",  +1,0,0},
+   { XK_Delete,XK_ANY_MOD, "\033[3~",   0,0,0},
{ XK_BackSpace, XK_NO_MOD,  "\177",  0,0,0},
{ XK_Home,  ShiftMask,  "\033[2J",   0,   -1,0},
{ XK_Home,  ShiftMask,  "\033[1;2H", 0,   +1,0},



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-19 Thread Brad Luther
Roberto Vargas - it works in a perfect way! I have one question. Why
didn't it work by default on ash? Is ash a sucky shell? Should I file
a bug? Because by what I understand this is a hack, right? Not the
ideal way. But so far it works really well!

On Tue, Jan 19, 2016 at 12:33 PM, Roberto E. Vargas Caballero
 wrote:
> On Tue, Jan 19, 2016 at 10:02:01AM -0200, Brad Luther wrote:
>> I'm using ash and it's not working out of the box.
>> I'll see if I can find a patch or then I'll try using mksh, but I
>> really like ash.
>> Thanks for the tips.
>
>
> The patch is not so complex ...
> Can someone put it in the wiki?
>
> diff --git a/config.def.h b/config.def.h
> index fd09d72..8450f42 100644
> --- a/config.def.h
> +++ b/config.def.h
> @@ -245,8 +245,7 @@ static Key key[] = {
> { XK_KP_Delete, ControlMask,"\033[3;5~",+1,0,0},
> { XK_KP_Delete, ShiftMask,  "\033[2K",  -1,0,0},
> { XK_KP_Delete, ShiftMask,  "\033[3;2~",+1,0,0},
> -   { XK_KP_Delete, XK_ANY_MOD, "\033[P",   -1,0,0},
> -   { XK_KP_Delete, XK_ANY_MOD, "\033[3~",  +1,0,0},
> +   { XK_KP_Delete, XK_ANY_MOD, "\033[3~",   0,0,0},
> { XK_KP_Multiply,   XK_ANY_MOD, "\033Oj",   +2,0,0},
> { XK_KP_Add,XK_ANY_MOD, "\033Ok",   +2,0,0},
> { XK_KP_Enter,  XK_ANY_MOD, "\033OM",   +2,0,0},
> @@ -300,8 +299,7 @@ static Key key[] = {
> { XK_Delete,ControlMask,"\033[3;5~",+1,0,0},
> { XK_Delete,ShiftMask,  "\033[2K",  -1,0,0},
> { XK_Delete,ShiftMask,  "\033[3;2~",+1,0,0},
> -   { XK_Delete,XK_ANY_MOD, "\033[P",   -1,0,0},
> -   { XK_Delete,XK_ANY_MOD, "\033[3~",  +1,0,0},
> +   { XK_Delete,XK_ANY_MOD, "\033[3~",   0,0,0},
> { XK_BackSpace, XK_NO_MOD,  "\177",  0,0,0},
> { XK_Home,  ShiftMask,  "\033[2J",   0,   -1,0},
> { XK_Home,  ShiftMask,  "\033[1;2H", 0,   +1,0},
>



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-18 Thread Brad Luther
Markus - Setting it to 0 worked very well.
Will try to get my head around getting the Delete key to work on st now.
Thanks.



On Sun, Jan 17, 2016 at 7:32 PM, Markus Teich
 wrote:
> Brad Luther wrote:
>> On the geometry being a multiple of the font, you say that "In the
>> past there was some work to avoid this situation adding pagging pixel
>> lines, and it generated a lot of problems". But ACE said there's still
>> a way touse it like that, by setting resizehints = False in config.h.
>> Would this bring problems?
>
> Heyho Brad,
>
> Just set it to 0 in dwm's config.h. It just enforces the client to use more
> space than requested and st handles it fine. I've used it for years now.
>
> --Markus
>



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-17 Thread Roberto E. Vargas Caballero
Hello,

On Sun, Jan 17, 2016 at 12:20:11PM -0200, Brad Luther wrote:
> Roberto Caballero

The short form of my name is Roberto Vargas. Read [1].

> so I understand that the behavior that makes
> content be lost is because it is less hungry on memory? If that's the
> case, I think this is acceptable. It's a good reason.

If you want to change it you can modify tresize() and call to realloc
only if the new size is bigger than some variable where you store
the maximum until now. It is very simple patch and it can be a place
in the wiki.

> On the geometry being a multiple of the font, you say that "In the
> past there was some work to avoid this situation adding pagging pixel
> lines, and it generated a lot of problems". But ACE said there's still
> a way touse it like that, by setting resizehints = False in config.h.
> Would this bring problems?

Uhmmm. I didn't know this part. You should ask to Christoph Lohmann
because he is who maintains this part.

> Matthew of Boswell - thanks for the explanation and zsh patch. Too bad
> I use ash. It's a pain in the ass not to be able to use Delete on st.
> I'll see if I can adapt your zsh patch. Also, by what I understand,
> this will never be provided by default because it's a fundamental
> problem outside st?

You can read the thread in [2], and you will understand why I am not
going to change this behaviour in the git version. Again the patch is
very simple, you only have to modify the values in the array Key located
in config.def.h. You can see that there are two rows for XK_KP_Delete and
XK_Delete for XK_ANY_MOD. If you join them in only one row them you will
be able to run suck programs inside of a suckless terminal. If you do
it you can add the patch to the wiki and we can add a link in the FAQ,
but again, my suggestion is send a patch to the programs that are
wrong.

Regards,

[1] http://perez.cs.vt.edu/twolastnames
[2] http://comments.gmane.org/gmane.comp.misc.suckless/20370 




Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-17 Thread Markus Teich
Brad Luther wrote:
> On the geometry being a multiple of the font, you say that "In the
> past there was some work to avoid this situation adding pagging pixel
> lines, and it generated a lot of problems". But ACE said there's still
> a way touse it like that, by setting resizehints = False in config.h.
> Would this bring problems?

Heyho Brad,

Just set it to 0 in dwm's config.h. It just enforces the client to use more
space than requested and st handles it fine. I've used it for years now.

--Markus



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-17 Thread Roberto E. Vargas Caballero
Hi,

On Fri, Jan 15, 2016 at 10:53:30AM -0200, Brad Luther wrote:
> 1 - when you open st and some strings printed (try 'ls' for example),
> upon resizing it down and resizing it back up, the content is lost.
> Shouldn't the printed stuff remain there? This is an annoyance for
> when I, for example, 'ls' a folder, open an image that I found inside
> so dwm automatically tile st and the image, and then I close the
> image. Now the st window will not show all the content of the folder
> from when I did 'ls'. The files/folders previously printed that upon
> resize were covered are now gone and I have to 'ls' again.

St resizes the line buffers each time that the geometry of the terminal
change, then the content of the space out of the new size is lost.
It is done by a design decision. In fact it is easier the another
behaviour and not resize anything and hungry memory that you are not
using. If you really want this behaviour you can get with any terminal
session manager (dvtm, tmux, screen ...).


> 2- st is the only program on dwm that doesn't cover the entire screen
> when opening it in fullscreen tile mode. There's always a line on the
> bottom of the screen to which st refuses to expand.

This kind of situations can happen because the geometry of st must be
a multiply of the size of your font. In the past there was some work
to avoid this situation adding pagging pixel lines, and it generated
a lot of problems. Keep it simple.

> 3- the delkey patch[0] isn't working for me. As I understand it should
> make 'Delete' erase the current the highlighted character, but it does
> nothing. All I did was clone the repo and apply the patch (which is
> simple enough). Are there any users successfully using this patch?
> What could I have done wrong?

No, the objective of that patch is to change the ascii value generated
when you press backspace and delete, because at this moment, for some
very stupid historic problems, the majority of terminals generate
a DEL when you press backspace, instead of generating a BACKSPACE.
All this stuff is really well explained in the FAQ. The problem you
are haaving is that you are using bad programs that don't follow the
POSIX standard. You should send a patch to them.

Terminal keyboard have two modes, keypad mode and ascii mode. When you
are in ascii mode the terminal generates the correct ASCII code which
will generate the function labelled in the key. In the case of St it
generates ^[P, which is the sequence that st understands to delete the
current character. When the keyboard is in keypad mode it generates
a sequence thought to be an unique identifier of the key. In the
terminfo definition of the terminals you can find which is the
sequence for every special key when they are in keypad mode, and it
means that a program that wants to check against these code must to
change the mode of the terminal to keypad before reading. There is a
terminfo definition to do this. Again everything is explain in the
FAQ.

You can try to fix the problems of the other programs, or write
a patch of st that make it to send the same key in both modes and
upload it to the wiki. I will not do it because is giving the reason
to the bad written programs, instead of fixing them. But if you want
to do it and upload it to the wiki we can put the link to the patch
in the FAQ.

Regards,



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-17 Thread Brad Luther
Hello.

Roberto Caballero - so I understand that the behavior that makes
content be lost is because it is less hungry on memory? If that's the
case, I think this is acceptable. It's a good reason.
On the geometry being a multiple of the font, you say that "In the
past there was some work to avoid this situation adding pagging pixel
lines, and it generated a lot of problems". But ACE said there's still
a way touse it like that, by setting resizehints = False in config.h.
Would this bring problems?

Matthew of Boswell - thanks for the explanation and zsh patch. Too bad
I use ash. It's a pain in the ass not to be able to use Delete on st.
I'll see if I can adapt your zsh patch. Also, by what I understand,
this will never be provided by default because it's a fundamental
problem outside st?

Thanks.


On Sun, Jan 17, 2016 at 10:09 AM, Roberto E. Vargas Caballero
 wrote:
> Hi,
>
> On Fri, Jan 15, 2016 at 10:53:30AM -0200, Brad Luther wrote:
>> 1 - when you open st and some strings printed (try 'ls' for example),
>> upon resizing it down and resizing it back up, the content is lost.
>> Shouldn't the printed stuff remain there? This is an annoyance for
>> when I, for example, 'ls' a folder, open an image that I found inside
>> so dwm automatically tile st and the image, and then I close the
>> image. Now the st window will not show all the content of the folder
>> from when I did 'ls'. The files/folders previously printed that upon
>> resize were covered are now gone and I have to 'ls' again.
>
> St resizes the line buffers each time that the geometry of the terminal
> change, then the content of the space out of the new size is lost.
> It is done by a design decision. In fact it is easier the another
> behaviour and not resize anything and hungry memory that you are not
> using. If you really want this behaviour you can get with any terminal
> session manager (dvtm, tmux, screen ...).
>
>
>> 2- st is the only program on dwm that doesn't cover the entire screen
>> when opening it in fullscreen tile mode. There's always a line on the
>> bottom of the screen to which st refuses to expand.
>
> This kind of situations can happen because the geometry of st must be
> a multiply of the size of your font. In the past there was some work
> to avoid this situation adding pagging pixel lines, and it generated
> a lot of problems. Keep it simple.
>
>> 3- the delkey patch[0] isn't working for me. As I understand it should
>> make 'Delete' erase the current the highlighted character, but it does
>> nothing. All I did was clone the repo and apply the patch (which is
>> simple enough). Are there any users successfully using this patch?
>> What could I have done wrong?
>
> No, the objective of that patch is to change the ascii value generated
> when you press backspace and delete, because at this moment, for some
> very stupid historic problems, the majority of terminals generate
> a DEL when you press backspace, instead of generating a BACKSPACE.
> All this stuff is really well explained in the FAQ. The problem you
> are haaving is that you are using bad programs that don't follow the
> POSIX standard. You should send a patch to them.
>
> Terminal keyboard have two modes, keypad mode and ascii mode. When you
> are in ascii mode the terminal generates the correct ASCII code which
> will generate the function labelled in the key. In the case of St it
> generates ^[P, which is the sequence that st understands to delete the
> current character. When the keyboard is in keypad mode it generates
> a sequence thought to be an unique identifier of the key. In the
> terminfo definition of the terminals you can find which is the
> sequence for every special key when they are in keypad mode, and it
> means that a program that wants to check against these code must to
> change the mode of the terminal to keypad before reading. There is a
> terminfo definition to do this. Again everything is explain in the
> FAQ.
>
> You can try to fix the problems of the other programs, or write
> a patch of st that make it to send the same key in both modes and
> upload it to the wiki. I will not do it because is giving the reason
> to the bad written programs, instead of fixing them. But if you want
> to do it and upload it to the wiki we can put the link to the patch
> in the FAQ.
>
> Regards,
>



[dev] [bugs] st clears up upon resize and other little things

2016-01-15 Thread Brad Luther
Hello.

I found 3 behaviors on st that I believe to be bugs and not intended

1 - when you open st and some strings printed (try 'ls' for example),
upon resizing it down and resizing it back up, the content is lost.
Shouldn't the printed stuff remain there? This is an annoyance for
when I, for example, 'ls' a folder, open an image that I found inside
so dwm automatically tile st and the image, and then I close the
image. Now the st window will not show all the content of the folder
from when I did 'ls'. The files/folders previously printed that upon
resize were covered are now gone and I have to 'ls' again.

2- st is the only program on dwm that doesn't cover the entire screen
when opening it in fullscreen tile mode. There's always a line on the
bottom of the screen to which st refuses to expand.

3- the delkey patch[0] isn't working for me. As I understand it should
make 'Delete' erase the current the highlighted character, but it does
nothing. All I did was clone the repo and apply the patch (which is
simple enough). Are there any users successfully using this patch?
What could I have done wrong?

Thanks.


[0] http://st.suckless.org/patches/delkey



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-15 Thread Kamil Cholewiński
> 1 - when you open st and some strings printed (try 'ls' for example),
> upon resizing it down and resizing it back up, the content is lost.
> Shouldn't the printed stuff remain there? This is an annoyance for
> when I, for example, 'ls' a folder, open an image that I found inside
> so dwm automatically tile st and the image, and then I close the
> image. Now the st window will not show all the content of the folder
> from when I did 'ls'. The files/folders previously printed that upon
> resize were covered are now gone and I have to 'ls' again.

tmux

> 2- st is the only program on dwm that doesn't cover the entire screen
> when opening it in fullscreen tile mode. There's always a line on the
> bottom of the screen to which st refuses to expand.

Since a fixed-width font is used, it's a choice between showing useless
black background or a part of your desktop. I guess you can hack st
and/or dwm to expand the window completely.



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-15 Thread ACE
Hello.

1. This hasn't been implemented in st. It is by design. It's not
   impossible to implement. If someone has a patch for this I'd be
   interested.

2. That is by design no need to rephrase it here look at dwm's project
   page. There's a patch for that.

3. Not using the latest st at the moment, therefore I can't comment on
   this. However I recall there being a huge discussion on this list
   regarding the delete key -- if that helps...



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-15 Thread Pickfire

1 - when you open st and some strings printed (try 'ls' for example),
upon resizing it down and resizing it back up, the content is lost.
Shouldn't the printed stuff remain there? This is an annoyance for
when I, for example, 'ls' a folder, open an image that I found inside
so dwm automatically tile st and the image, and then I close the
image. Now the st window will not show all the content of the folder
from when I did 'ls'. The files/folders previously printed that upon
resize were covered are now gone and I have to 'ls' again.


This is the default, you can look more into Term.scr in st.

--
_
< Do what you like, like what you do. >
-
   \   ^__^
\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-15 Thread ACE
>Hello.
>
>You said there is a patch for this, but looking at all dwm patches, I
>couldn't find it. I went through all the patches under
>http://dwm.suckless.org/patches/ without success.
>Maybe it's written using different terminology and I'm not seeing it?
>Could you please send the name of the patch?
>
>Thanks.

There's no need to mail me personally about this.

Here's the link and explanation:

http://dwm.suckless.org/faq

It is the first question you're interested in. I guess I remembered it
incorrectly.

TL;DR: static const Bool resizehints = False; in config.h



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-15 Thread Brad Luther
Oh, that's explains it.
I was banging my head reading and rereading all patches, but it's
actually a configuration.
Thanks a lot.


On Fri, Jan 15, 2016 at 2:47 PM, ACE  wrote:
>>Hello.
>>
>>You said there is a patch for this, but looking at all dwm patches, I
>>couldn't find it. I went through all the patches under
>>http://dwm.suckless.org/patches/ without success.
>>Maybe it's written using different terminology and I'm not seeing it?
>>Could you please send the name of the patch?
>>
>>Thanks.
>
> There's no need to mail me personally about this.
>
> Here's the link and explanation:
>
> http://dwm.suckless.org/faq
>
> It is the first question you're interested in. I guess I remembered it
> incorrectly.
>
> TL;DR: static const Bool resizehints = False; in config.h
>



Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-15 Thread Matthew of Boswell
On Fri, 15 Jan 2016 10:53:30 -0200
Brad Luther  wrote:

> Hello.
> 
> I found 3 behaviors on st that I believe to be bugs and not intended
> 
> 1 - when you open st and some strings printed (try 'ls' for example),
> upon resizing it down and resizing it back up, the content is lost.
> Shouldn't the printed stuff remain there? This is an annoyance for
> when I, for example, 'ls' a folder, open an image that I found inside
> so dwm automatically tile st and the image, and then I close the
> image. Now the st window will not show all the content of the folder
> from when I did 'ls'. The files/folders previously printed that upon
> resize were covered are now gone and I have to 'ls' again.

I think xterm does this as well. Your best bet is probably to use tmux
or something similar. You could make a dwm hotkey to run "st -e tmux" or
something.

> 3- the delkey patch[0] isn't working for me. As I understand it should
> make 'Delete' erase the current the highlighted character, but it does
> nothing. All I did was clone the repo and apply the patch (which is
> simple enough). Are there any users successfully using this patch?
> What could I have done wrong?

I use the delkey patch as well. It does not make the DEL key magically
work; it just changes the keysyms of backspace and DEL, so backspace
is ^H instead of ^?, etc. You have to setup your shell to properly
handle the delete key. In my .zshrc, I use this snippet:

case $TERM in
*xterm*|rxvt|(dt|k|E)term) bindkey '^[[3~' delete-char
;;
st*) bindkey '^?' delete-char
;;
esac

#make DEL key work
case $TERM in
  *xterm*|rxvt|(dt|k|E)term|st*)
function zle-line-init () { echoti smkx }
function zle-line-finish () { echoti rmkx }
zle -N zle-line-init
zle -N zle-line-finish
  ;;
esac

#---end-

I don't know exactly how this works... I just lifted it from the net
somewhere and tweaked it a bit. Something about putting the terminal
into application mode? I try to understand virtual terminal emulation,
but in the end I just rely on other people who are better at it than I.

If you use a non-zsh shell, you'll probably have to do something
similar.

> Thanks.
> 
> 
> [0] http://st.suckless.org/patches/delkey
> 



-- 
Matt Boswell