Closed Nicholas-Autio-Mitchell closed 2 months ago
Hello @Nicholas-Autio-Mitchell 👋,
You can try the following, ⚠️ pretty much untested and very specific to you needs...
Edit your .local
customization file and so that it contains the following:
...
bind : run-shell "cut -c3- $TMUX_CONF_LOCAL | sh -s command_prompt"
# -- tpm -----------------------------------------------------------------------
...
# # /!\ do not remove the following line
# EOF
#
# # /!\ do not "uncomment" the functions: the leading "# " characters are needed
#
# command_prompt() {
# _status=$(tmux show -v 'status')
# _status_format_0=$(tmux show -v 'status-format[0]')
# _status_format_1=$(tmux show -v 'status-format[1]')
# tmux set 'status-format[1]' "$_status_format_0"
# tmux set status 2
# tmux command-prompt
# tmux set status "$_status"
# tmux set 'status-format[1]' "$_status_format_1"
# }
...
Thanks for the quick reply!
That did open a new line for the command prompt, but at the same time made the status line disappear (and it never comes back).
Hmm,
# command_prompt() {
# _status_format_0=$(tmux show -gv 'status-format[0]')
# tmux set 'status-format[0]' "$_status_format_0"
# tmux set 'status-format[1]' "$_status_format_0"
# tmux set status 2
# tmux command-prompt
# tmux set -u 'status-format'
# tmux set -u status
# }
Is it better?
That works - thanks a bunch!
I would like to enter tmux commands (using
prefix-:
and the for the command prompt line itself to appear on a new line just above/below the status line. I don't want to hide the status line underneath.This is useful because sometimes I want to include arguments in the prompt that I read from the status line e.g. the name of a tab.
I have tried adding the following to my user config, but it had no effect:
I can't find related issues/docs on this -- is it possible as a config change?