Re: How to unhide 'status-bar'?
joshebosh <[email protected]> Sun, 5 Mar 2023 21:26:15 -0600
| Newsgroups | gmane.comp.gnu.screen.user |
|---|---|
| Message-ID | <CAAQhn7k_jsDqfi_jp6BiQjxcC3qR6Fs=7eR1NGQszBT9ObJgXw@mail.gmail.com> |
--0000000000003572f405f632dc69
Content-Type: text/plain; charset="UTF-8"
try something like this for assigning "Alt+Shift+C" and "Alt+Shift+H" in
your config
bindkey ^[C caption always "%{= kW}%=%{= kW}%-w%{+b Yk} %n %t %{-}%+w %="
bindkey ^[H eval 'hardstatus alwayslastline' 'hardstatus string "%= nothing
here yet %="
you'll have to learns how to use the "backtick" commands and scripts to
build toggles for enable/disable of things...
I'd imagine you got a ways to go before you get there...
took me years to learn this screen stuff, and it wasnt easy... but stick
with it, it'll be rewarding...
---------------------------------------------
an example from my config
basically the gist for building a toggle to like [ Ctrl + Alt +B ] or
"^[^B" is this, have a backtick at end of config file to kick off a script
you need to have a *%3`* in the hardstatus to see the output of backtick
caption always "%{= kW}%=%{= kW}%-w%{+b Yk} %n %t %{-}%+w %="
eval 'hardstatus alwayslastline' 'hardstatus string "%= (B)link toggle: %3`
%="
# |---default
on startup
# |
# |
|---default when no check file found
# | |
# V V
backtick 3 0 0 bash /root/.screenrc.d/backticks.sh bt3 $STY auto off #
region focus blink toggle: on, off, auto
and then a "backticks.sh" to handle things
#!/bin/bash
if [ ${1} ]; then bt_func=${1}; shift; fi
if [ ${1} ]; then session=${1}; shift; fi
if [ ${1} ]; then arg1=${1}; shift; fi
if [ ${1} ]; then arg2=${1}; shift; fi
if [[ ${session} == NULL || ! ${session} ]]; then printf "NULL\n"; exit; fi
bt3 () {
case ${arg1} in
(auto) check_blink_toggle; if [[ ! "${arg1}" == auto ]]; then ${0}
bt3 ${session} ${arg1}; fi ;;
(on) screen -S ${session} -X bindkey "^[^B" eval "backtick 3 0 0
bash /root/.screenrc.d/backticks.sh bt3 ${session} off"; printf "%s"
${arg1} > /tmp/blink_toggle; printf "on\\n"; ;;
(off) screen -S ${session} -X bindkey "^[^B" eval "backtick 3 0 0
bash /root/.screenrc.d/backticks.sh bt3 ${session} on"; printf "%s" ${arg1}
> /tmp/blink_toggle; printf "off\\n"; ;;
(*) printf "error\\n" ;;
esac
}
check_blink_toggle () {
if [[ -f /tmp/blink_toggle ]]; then
arg1=$(cat /tmp/blink_toggle)
else
arg1=${arg2}
fi
}
# Function Execution Statement
${bt_func} ${session} ${arg1} ${arg2}
==============================================================================
hope that helps... took years for me to learn this
On Sun, Mar 5, 2023 at 12:11 PM Erik Falor <[email protected]> wrote:
> On Sun, Mar 05, 2023 at 04:48:41AM +0000, [email protected] wrote:
> > Hi.
> >
> > I was trying to figure out a way to hide/unhide the 'status bar' (not
> sure if
> > that's the term) showing the names of the windows. The one that shows up
> at the
> > bottom of the screen session by default.
> >
> > So I did `prefix : hardstatus ignore` and the status bar went away.
> >
> > But how can I get it back?
> >
> > Any idea?
>
> I believe the "status-bar" you are referring to is controlled by the
> 'caption' command.
>
> `prefix :caption splitonly` will hide it unless the screen has been
> split.
>
> `prefix :caption always` brings it back.
>
> As an aside, the manual suggests that the caption can be placed at the
> top or bottom of the screen by giving `:caption` an extra argument.
>
> When I run `prefix :caption top always`, I am greeted with this error
> message:
>
> usage: caption always|splitonly|string <string>
>
>
> This is in Screen version 4.09.00 (GNU) 30-Jan-22.
>
> --
> Erik Falor
> Registered Linux User #445632 http://unnovative.net
>
--0000000000003572f405f632dc69
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>try something like this for assigning "Alt+Shift=
+C" and "Alt+Shift+H" in your config<br></div><div><div clas=
s=3D"gmail_quote"><div class=3D"gmail_attr"><br></div><div class=3D"gmail_a=
ttr">bindkey ^[C caption always "%{=3D kW}%=3D%{=3D kW}%-w%{+b Yk} %n =
%t %{-}%+w %=3D"<br>bindkey ^[H eval 'hardstatus alwayslastline=
9; 'hardstatus string "%=3D nothing here yet %=3D"<br><br></d=
iv><div class=3D"gmail_attr"><br></div><div class=3D"gmail_attr">you'll=
have to learns how to use the "backtick" commands and scripts to=
build toggles for enable/disable of things...</div><div class=3D"gmail_att=
r">I'd imagine you got a ways to go before you get there...</div><div c=
lass=3D"gmail_attr">=C2=A0took me years to learn this screen stuff, and it =
wasnt easy... but stick with it, it'll be rewarding...</div><div class=
=3D"gmail_attr">---------------------------------------------</div><div cla=
ss=3D"gmail_attr">an example from my config</div><div class=3D"gmail_attr">=
basically the gist for building a toggle to like [ Ctrl=C2=A0+ Alt=C2=A0+B =
] or "^[^B"=C2=A0is this, have a backtick at end of config file t=
o kick off a script</div><div class=3D"gmail_attr">you need to have a <b st=
yle=3D"background-color:rgb(255,255,0)">%3`</b>=C2=A0in the hardstatus to s=
ee the output of backtick</div><div class=3D"gmail_attr"><br></div><div cla=
ss=3D"gmail_attr"><span style=3D"background-color:rgb(238,238,238)">caption=
always "%{=3D kW}%=3D%{=3D kW}%-w%{+b Yk} %n %t %{-}%+w %=3D"<br=
>eval 'hardstatus alwayslastline' 'hardstatus string "%=3D=
(B)link toggle: %3` %=3D"<br><br></span></div><div class=3D"gmail_att=
r"><font face=3D"monospace"><span style=3D"background-color:rgb(238,238,238=
)"># =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |---defa=
ult on startup<br># =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A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2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<br>backtick 3 0 0 bash /root/.scr=
eenrc.d/backticks.sh bt3 $STY auto off =C2=A0 =C2=A0 =C2=A0# region focus b=
link toggle: on, off, auto=C2=A0</span></font><br></div><div class=3D"gmail=
_attr"><br></div><div class=3D"gmail_attr"><br></div><div class=3D"gmail_at=
tr">and then a "backticks.sh" to handle things</div><div class=3D=
"gmail_attr"><br></div><div class=3D"gmail_attr"><br></div><div class=3D"gm=
ail_attr"><font face=3D"monospace" style=3D"background-color:rgb(238,238,23=
8)">#!/bin/bash<br>if [ ${1} ]; then bt_func=3D${1}; shift; fi<br>if [ ${1}=
]; then session=3D${1}; shift; fi<br>if [ ${1} ]; then arg1=3D${1}; shift;=
fi<br>if [ ${1} ]; then arg2=3D${1}; shift; fi<br><br>if [[ ${session} =3D=
=3D NULL || ! ${session} ]]; then printf "NULL\n"; exit; fi<br><b=
r>bt3 () {<br>=C2=A0 =C2=A0 case ${arg1} in<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
(auto) check_blink_toggle; if [[ ! "${arg1}" =3D=3D auto ]]; then=
${0} bt3 ${session} ${arg1}; fi ;;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (on) scr=
een -S ${session} -X bindkey "^[^B" eval "backtick 3 0 0 bas=
h /root/.screenrc.d/backticks.sh bt3 ${session} off"; printf "%s&=
quot; ${arg1} > /tmp/blink_toggle; printf "on\\n"; ;;<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 (off) screen -S ${session} -X bindkey "^[^B&q=
uot; eval "backtick 3 0 0 bash /root/.screenrc.d/backticks.sh bt3 ${se=
ssion} on"; printf "%s" ${arg1} > /tmp/blink_toggle; prin=
tf "off\\n"; ;;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (*) printf "e=
rror\\n" ;;<br>=C2=A0 =C2=A0 esac<br>}<br><br>check_blink_toggle () {<=
br>=C2=A0 =C2=A0 if [[ -f /tmp/blink_toggle ]]; then<br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 arg1=3D$(cat /tmp/blink_toggle)<br>=C2=A0 =C2=A0 else<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 arg1=3D${arg2}<br>=C2=A0 =C2=A0 fi<br>}<br><br># Funct=
ion Execution Statement<br>${bt_func} ${session} ${arg1} ${arg2}</font><br>=
</div><div class=3D"gmail_attr"><br></div><div class=3D"gmail_attr"><br></d=
iv><div class=3D"gmail_attr"><br></div><div class=3D"gmail_attr">=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
<br></div><div dir=3D"ltr" class=3D"gmail_attr"><br>hope that helps...=C2=
=A0 took years for me to learn this=C2=A0<br><br><br><br></div><div dir=3D"=
ltr" class=3D"gmail_attr"><br></div><div dir=3D"ltr" class=3D"gmail_attr"><=
br></div><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Mar 5, 2023 at 12:11=
PM Erik Falor <<a href=3D"mailto:[email protected]">[email protected]</=
a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0p=
x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On=
Sun, Mar 05, 2023 at 04:48:41AM +0000, [email protected] wrote:<br>
> Hi.<br>
> <br>
> I was trying to figure out a way to hide/unhide the 'status bar=
9; (not sure if<br>
> that's the term) showing the names of the windows. The one that sh=
ows up at the<br>
> bottom of the screen session by default.<br>
> <br>
> So I did `prefix : hardstatus ignore` and the status bar went away.<br=
>
> <br>
> But how can I get it back?<br>
> <br>
> Any idea?<br>
<br>
I believe the "status-bar" you are referring to is controlled by =
the<br>
'caption' command.<br>
<br>
`prefix :caption splitonly` will hide it unless the screen has been<br>
split.<br>
<br>
`prefix :caption always` brings it back.<br>
<br>
As an aside, the manual suggests that the caption can be placed at the<br>
top or bottom of the screen by giving `:caption` an extra argument.<br>
<br>
When I run `prefix :caption top always`, I am greeted with this error<br>
message:<br>
<br>
=C2=A0 =C2=A0 usage: caption always|splitonly|string <string><br>
<br>
<br>
This is in Screen version 4.09.00 (GNU) 30-Jan-22.<br>
<br>
-- <br>
Erik Falor<br>
Registered Linux User #445632=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"http://unnovative.net" rel=3D"noreferre=
r" target=3D"_blank">http://unnovative.net</a><br>
</blockquote></div></div></div>
--0000000000003572f405f632dc69--