In tmux how to set pane specific variable to display in the pane status bar for that pane only
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
In tmux, how do I create a function that will set a variable that will then be available to use within tmux pane border status:
set -g pane-border-format
so I can then run that function and have the value set but only for that pane and nowhere else so that the border status displays something different for that pane and if I run that function in another pane, the pane border status will display something else but only for the pane that the function was runin
so if I run the function in pane 1
to say 'hello world'
then in pane 2
to say 'goodby world'
I expect pane 1
border status
to say 'hello world'
and pane 2
border status
to say 'goodby world'
.
shell-script zsh tmux
add a comment |Â
up vote
0
down vote
favorite
In tmux, how do I create a function that will set a variable that will then be available to use within tmux pane border status:
set -g pane-border-format
so I can then run that function and have the value set but only for that pane and nowhere else so that the border status displays something different for that pane and if I run that function in another pane, the pane border status will display something else but only for the pane that the function was runin
so if I run the function in pane 1
to say 'hello world'
then in pane 2
to say 'goodby world'
I expect pane 1
border status
to say 'hello world'
and pane 2
border status
to say 'goodby world'
.
shell-script zsh tmux
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
In tmux, how do I create a function that will set a variable that will then be available to use within tmux pane border status:
set -g pane-border-format
so I can then run that function and have the value set but only for that pane and nowhere else so that the border status displays something different for that pane and if I run that function in another pane, the pane border status will display something else but only for the pane that the function was runin
so if I run the function in pane 1
to say 'hello world'
then in pane 2
to say 'goodby world'
I expect pane 1
border status
to say 'hello world'
and pane 2
border status
to say 'goodby world'
.
shell-script zsh tmux
In tmux, how do I create a function that will set a variable that will then be available to use within tmux pane border status:
set -g pane-border-format
so I can then run that function and have the value set but only for that pane and nowhere else so that the border status displays something different for that pane and if I run that function in another pane, the pane border status will display something else but only for the pane that the function was runin
so if I run the function in pane 1
to say 'hello world'
then in pane 2
to say 'goodby world'
I expect pane 1
border status
to say 'hello world'
and pane 2
border status
to say 'goodby world'
.
shell-script zsh tmux
shell-script zsh tmux
edited Aug 7 at 12:05
asked Aug 7 at 11:25
Thermatix
19918
19918
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
I found out how to set user options, so I created a function to automate this:
if [ -n "$TMUX" ]; then
function set_tmux_opt
tmux set -q "@$1_$TMUX_PANE" "$2"
fi
and it's used like this:
set_tmux_opt 'some_variable' '1'
and I get it like this:
function get_tmux_opt
tmux show -v "@$1_$2"
and used like this:
$pane_id="$1
get_tmux_opt 'some_variable' $pane_id
and then passed into the script using pane_id
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I found out how to set user options, so I created a function to automate this:
if [ -n "$TMUX" ]; then
function set_tmux_opt
tmux set -q "@$1_$TMUX_PANE" "$2"
fi
and it's used like this:
set_tmux_opt 'some_variable' '1'
and I get it like this:
function get_tmux_opt
tmux show -v "@$1_$2"
and used like this:
$pane_id="$1
get_tmux_opt 'some_variable' $pane_id
and then passed into the script using pane_id
add a comment |Â
up vote
1
down vote
I found out how to set user options, so I created a function to automate this:
if [ -n "$TMUX" ]; then
function set_tmux_opt
tmux set -q "@$1_$TMUX_PANE" "$2"
fi
and it's used like this:
set_tmux_opt 'some_variable' '1'
and I get it like this:
function get_tmux_opt
tmux show -v "@$1_$2"
and used like this:
$pane_id="$1
get_tmux_opt 'some_variable' $pane_id
and then passed into the script using pane_id
add a comment |Â
up vote
1
down vote
up vote
1
down vote
I found out how to set user options, so I created a function to automate this:
if [ -n "$TMUX" ]; then
function set_tmux_opt
tmux set -q "@$1_$TMUX_PANE" "$2"
fi
and it's used like this:
set_tmux_opt 'some_variable' '1'
and I get it like this:
function get_tmux_opt
tmux show -v "@$1_$2"
and used like this:
$pane_id="$1
get_tmux_opt 'some_variable' $pane_id
and then passed into the script using pane_id
I found out how to set user options, so I created a function to automate this:
if [ -n "$TMUX" ]; then
function set_tmux_opt
tmux set -q "@$1_$TMUX_PANE" "$2"
fi
and it's used like this:
set_tmux_opt 'some_variable' '1'
and I get it like this:
function get_tmux_opt
tmux show -v "@$1_$2"
and used like this:
$pane_id="$1
get_tmux_opt 'some_variable' $pane_id
and then passed into the script using pane_id
answered Aug 7 at 13:05
Thermatix
19918
19918
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461047%2fin-tmux-how-to-set-pane-specific-variable-to-display-in-the-pane-status-bar-for%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password