Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have tmux prompt me for the status-left text to display?

Tags:

tmux

I want to change status bar left message to anything I type.
Just like when I press Ctrl+B F I have this prompt in status bar :

(find-window)

I'd like to press, say Ctrl+B E and have a prompt like :

(status-left)

Then on Enter the text I've typed would be assigned to status-left.

I DON'T want to have to call a shell script that would print the prompt in the shell window and print entered value (is that even possible?), I want the prompt to happen in the status bar itself.

How should I go with that? If i put in my .tmux.conf :

unbind e
bin e set status-left

It quite understandably prints Empty value message when I press Ctrl+B E

like image 614
kraymer Avatar asked Nov 20 '25 14:11

kraymer


1 Answers

command-prompt is probably what you are looking for.

bind-key S command-prompt -p "New Status: " "set -g status-left '%1'"
like image 180
Brian Tiffin Avatar answered Nov 22 '25 10:11

Brian Tiffin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!