From 24e48019554ac8cf40b97dfbda6de1e03d24c3f1 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 25 Dec 2014 12:50:26 +0900 Subject: [PATCH 1/2] Bind function to switch sessions to ^z^o --- tmux.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tmux.conf b/tmux.conf index 9704cb5..bcfed9c 100644 --- a/tmux.conf +++ b/tmux.conf @@ -5,12 +5,15 @@ if "test -f $HOME/.tmux.conf.local" "source-file $HOME/.tmux.conf.local" \ unbind C-b set -g prefix C-z + bind C-z send-prefix bind C-c command-prompt "new-window '%%'" bind C-r source-file ~/.tmux.conf \; display-message "Reloaded config !" # new-session: -A: "behaves like attach-session if session-name already exists" # -d: do not attach the created session -bind C-s command-prompt -p "session name:" \ +bind C-s command-prompt -p "session name to switch to:" \ + "new-session -Ad -s '%1'\; switch-client -t '%1'" +bind C-o command-prompt -p "session name to switch to:" \ "new-session -Ad -s '%1'\; switch-client -t '%1'" set -g base-index 1 From 588c3b465c9bb51ef11bcb82205d551d15169823 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 25 Dec 2014 15:27:05 +0900 Subject: [PATCH 2/2] Update tmux status line --- tmux.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tmux.conf b/tmux.conf index bcfed9c..ae4c6f0 100644 --- a/tmux.conf +++ b/tmux.conf @@ -28,8 +28,10 @@ setw -g mode-mouse off # try to set title of terminal tmux is running on # set -g set-titles off set -g display-panes-time 5000 -set -g window-status-current-format "#I|#W:#T#F" -set -g window-status-format "#I|#W:#T#F" +# |:<Window flag> +# Example: `1|emacs:.dotfiles*` +set -g window-status-current-format "#I|#{pane_current_command}:#T#F" +set -g window-status-format "#I|#{pane_current_command}:#T#F" # set window name automatically from command currently running set -g automatic-rename on