Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

my tmux status bar has disappeared

Tags:

session

tmux

While writing code inside a tmux session, I inadvertently pressed a sequence of keys that has made my status bar disappear.

I haven't touched my tmux config file, and I verified the status bar is visible in new tmux sessions. Disconnecting and reconnecting to this session didn't help.

Read through the man page and searched through Google, no luck so far.

Running the following commands from inside the session didn't help: ^B :set-option -g status-bg default ^B :set-option -g status on

I have many windows open and would prefer not to have to destroy this session. Any help would be appreciated.

like image 565
user1522091 Avatar asked Mar 14 '14 14:03

user1522091


2 Answers

From the tmux command line, issue:

:set status on

to turn the status bar on. You can simplify this by adding a line to your .tmux.conf:

# toggle statusbar
bind-key b set-option status

and then reload your config.

like image 156
jasonwryan Avatar answered Sep 19 '22 21:09

jasonwryan


Not quite a solution, but a possible workaround.

I'll assume your old session is number 0; adjust the argument to -t as necessary.

tmux new-session -t 0

This creates a new session which has all the same windows as session 0. If you create a new window in one session, it appears in the other as well. If you delete a window from one, it is removed from the other. More importantly, the new session should have a status bar. Then, you can try removing the old status-free session:

tmux kill-session -t 0

This should not affect the windows in session 0, since they are all part of your new session as well.

like image 28
chepner Avatar answered Sep 20 '22 21:09

chepner