Re: [dev] Good Morning, and a question about st (italic mode switches color).
> Hey suckless developers, Hi Ingo, > first let me thank you for your great work. Thanks! > But today a bug in st burned some hours. Well, this wasn't really a bug but rather a not best choice. This has been “fixed” by the last commit about a month ago, could you confirm that?
Re: [dev] Good Morning, and a question about st (italic mode switches color).
Actually I neither undestand the joke, nor the setting. For my usage it seems best to set both values to 0. What do you want to achieve with these defaults? For me it just makes unmodified manual pages without the described manpager, or LESS_TERMCAP_* exports unreadable. > On Wed, Oct 5, 2016 at 2:19 PM, Lucas Gabriel Vuotto >wrote: >> $ echo '140,146p' | ed config.def.h >> 20475 >> /* >> * Colors used, when the specific fg == defaultfg. So in reverse mode this >> * will reverse too. Another logic would only make the simple feature too >> * complex. >> */ >> static unsigned int defaultitalic = 11; >> static unsigned int defaultunderline = 7; > > > Have a look at xmakeglyphfontspecs and xdrawglyphfontspecs. The > functions are a mess and too complicated to let me have a better idea, > so this is clearly a joke. > Hahahahahahahahahahahahahahaha. > > cheers! > mar77i
Re: [dev] Good Morning, and a question about st (italic mode switches color).
On Wed, Oct 5, 2016 at 2:19 PM, Lucas Gabriel Vuottowrote: > $ echo '140,146p' | ed config.def.h > 20475 > /* > * Colors used, when the specific fg == defaultfg. So in reverse mode this > * will reverse too. Another logic would only make the simple feature too > * complex. > */ > static unsigned int defaultitalic = 11; > static unsigned int defaultunderline = 7; Have a look at xmakeglyphfontspecs and xdrawglyphfontspecs. The functions are a mess and too complicated to let me have a better idea, so this is clearly a joke. Hahahahahahahahahahahahahahaha. cheers! mar77i
Re: [dev] Good Morning, and a question about st (italic mode switches color).
$ echo '140,146p' | ed config.def.h 20475 /* * Colors used, when the specific fg == defaultfg. So in reverse mode this * will reverse too. Another logic would only make the simple feature too * complex. */ static unsigned int defaultitalic = 11; static unsigned int defaultunderline = 7; On 05/10/16 08:37, Ingo Krabbe wrote: Hey suckless developers, first let me thank you for your great work. dwm and st have become my main linux tools as a base to control nearly everything, as long I don't switch to my plan9 virtual machine and do things in rc terminals or acme windows. But today a bug in st burned some hours. So let me tell you the short story: The main systems I use have a plain gentoo installed, because that's a good way to keep a system up-to-date, once you got familiar with gentoo at all. I'm not sure yet if OpenRC is really much better than systemd, though, so if I would need to choose today I might switch to a plain debian, that I often use on servers. Gentoo has a little trick to display manual pages, using a `MANPAGER=/usr/bin/manpager` command, that is a simple command compiled from the attached manpager.c command, which does nothing more then the shell script LESS_TERMCAP_mb='[5;31m' # BLINK[0m [5;31m LESS_TERMCAP_md='[1;34m' # BOLD[0m [1;34m LESS_TERMCAP_me='[0;0m' LESS_TERMCAP_us='[4;36m' # UNDERLINE[0m [4;36m LESS_TERMCAP_ue='[0;0m' LESS_TERMCAP_so='[3;90m' # ITALIC[0m [3;90m LESS_TERMCAP_se='[0;0m' #export LESS_TERMCAP_{mb,md,me,us,ue,so,se} exec less without the _so and _se lines. But I like this italic setup, so I added the standout mode. To do such switches in a more readable, suckless way one should actually use tput, imho, to switch the modes and select the colors: ITALIC_BLACK=`tput sitm; tput setaf 0` That works with xterm, but with st it selects a yellow color, which is a bit disturbing, as I use a light background and I cannot read yellow. So the basic bug is, that "sitm" (start italic mode) also affects the color. Actually it only affects "setaf 0". Most other colors aren't affected, which you can quick check with: for i in `seq 0 255` do tput setaf $i tput sitm echo -n "Test it!" tput ritm echo "Test it!" done Maybe thats a problem of the terminfo file. I didn't checked that yet, but maybe someone else already had such a problem too, so I wanted to ask first if that is considered a bug and if someone might already have a handy solution to it. Actually "tput ncf" says "3", which means that the italic attribute cannot be used with colors. But that is a lie. I would say, the italic attribute can only be used with colors. Best Regards, Ingo -- lv.
Re: [dev] Good Morning, and a question about st (italic mode switches color).
> Actually "tput ncf" says "3", which means that the italic attribute cannot be > used with colors. But that is a lie. I would say, the italic attribute can > only be used with colors. I just found out that ncv=3 (sorry ncv, not ncf) means STANDOUT and REVERSE cannot be combined with colors, but that is a lie, too. STANDOUT and REVERSE do combine with colors! For the italic mode, only "setaf 0" fails, so actually the yellow bug should be fixed and ncv should be equal 0, I think. > Best Regards, > > Ingo
Re: [dev] Good Morning, and a question about st (italic mode switches color).
Hi Try to keep things short. > I'm not sure yet if OpenRC is really much better than systemd, though, so if > I would need to choose today I might switch to a plain debian, that I often > use on servers. We don't need to discuss these things here [0]. > Gentoo has a little trick... As a matter of fact, Gentoo ha(ck)s a few tricks to the system, which brought a lot of confusion onto me as well. I don't approve of that part of Gentoo in particular. ls colors where green is not associated with an executable bit is really confusing to work with. > to display manual pages, using a `MANPAGER=/usr/bin/manpager` command, that > is a simple command compiled from the attached manpager.c command, which does > nothing more then the shell script > LESS_TERMCAP_mb=' [5;31m' # BLINK [0m [5;31m > LESS_TERMCAP_md=' [1;34m' # BOLD [0m [1;34m > LESS_TERMCAP_me=' [0;0m' > LESS_TERMCAP_us=' [4;36m' # UNDERLINE [0m [4;36m > LESS_TERMCAP_ue=' [0;0m' > LESS_TERMCAP_so=' [3;90m' # ITALIC [0m [3;90m > LESS_TERMCAP_se=' [0;0m' > #export LESS_TERMCAP_{mb,md,me,us,ue,so,se} > exec less > without the _so and _se lines. But I like this italic setup, so I added the > standout mode. So that's how gentoo gets these colorful manpages. I've been asking myself that. Good to know Gentoo is really reliable by being unsurprising. > To do such switches in a more readable, suckless way one should actually use > tput, imho, to switch the modes and select the colors: > ITALIC_BLACK=`tput sitm; tput setaf 0` > That works with xterm, but with st it selects a yellow color, which is a bit > disturbing, as I use a light background and I cannot read yellow. So the > basic bug is, that "sitm" (start italic mode) also affects the color. > Actually it only affects "setaf 0". Most other colors aren't affected, which > you can quick check with: > for i in `seq 0 255` > do tput setaf $i > tput sitm > echo -n "Test it!" > tput ritm > echo "Test it!" > done > Maybe thats a problem of the terminfo file. I didn't checked that yet, but > maybe someone else already had such a problem too, so I wanted to ask first > if that is considered a bug and if someone might already have a handy > solution to it. Actually "tput ncf" says "3", which means that the italic > attribute cannot be used with colors. But that is a lie. I would say, the > italic attribute can only be used with colors. Best Regards, Ingo That the italic attribute sets the color itself for not being able to make itself noticeable in any other way means it can't be used with a color setting diverging from the color that is used to make it italic. cheers! mar77i [0] https://www.agwa.name/blog/post/how_to_crash_systemd_in_one_tweet
Re: [dev] Good Morning, and a question about st (italic mode switches color).
I can confirm that on my system (Debian stable) with the latest st (just ran a git pull and rebuilt), that when i is 7, the color changes. for i in `seq 0 255` do tput setaf $i tput sitm echo -n $i ": Test it!" tput ritm echo "Test it!" done