screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [screen-devel] Hardstatus string is not working properly in master b


From: Amadeusz Sławiński
Subject: Re: [screen-devel] Hardstatus string is not working properly in master branch
Date: Sun, 24 Jun 2018 16:28:18 +0200

On Sat, 23 Jun 2018 22:42:43 +0200
Maarten van Malland <address@hidden> wrote:

> I've compiled the latest Git code to get true color working (which it
> did, after some fiddling around; I got caught with the latest ncurses
> bug as well). However, that's all working now, but the hardstatus
> string I'm using isn't working at all anymore with this screen
> version:
> 
> hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=
> kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}
> %m-%d %{W}%c %{g}]'
> ("Borrowed" from the Arch Wiki)
> 
> In the latest stable screen v4 this is working beautifully, but not
> anymore. Is there something wrong in my config file/terminal
> somewhere, or is there really something going wrong here?
> 

Hi,

yes escapes on master differ from those in older versions,

the biggest thing that changed compared to screen-v4 are color escapes.
Now that it is possible to use truecolor, they were modified a bit.
 *              d - dim                                                         
 *              u - underscore                                                  
 *              b - bold                                                        
 *              r - reverse                                                     
 *              s - standout                                                    
 *              l - blinking   
 *              0-255;0-255 - foreground;background                             
 *              xABCDEF;xABCDEF - truecolor foreground;background               
 *              #ABCDEF;#ABCDEF - truecolor foreground;background               
 *              xABC;xABC - truecolor foreground;background                     
 *              #ABC;#ABC - truecolor foreground;background 

so for example you can do:
hardstatus alwayslastline '%{#00ff00;0}[ %{#ff0000;b}%H %{#00ff00}]'
(don't forget to add "truecolor on" to your config)

Also for date you will want to use backtick and 'date' command as escape 
commands for getting date were removed.

So something approximating the line you provided (using truecolor escapes):
truecolor on                                                                    
                                        
backtick 0 5 5 "/bin/date" '+%m-%d'                                             
                                        
backtick 1 5 5 "/bin/date" '+%H:%m'                                             
                                        
hardstatus alwayslastline '%{#00ff00;0}[ %{#ff0000;b}%H %{#00ff00}][%= 
%{7}%?%-Lw%?%{1}(%{15}%n*%f%t%?(%u)%?%{1})%{7}%?%+Lw%?%? %=%{#00ff00}][ %{6}%0` 
%{7}%1` ]'              


Amadeusz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]