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 <ewfa...@gmail.com> wrote:

> On Sun, Mar 05, 2023 at 04:48:41AM +0000, fam...@rawtext.club 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
>

Reply via email to