From eb7feb543e5e6bb7c02947922b185ede44a4468a Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 8 Feb 2023 13:40:17 +0100 Subject: [PATCH] tmux renaming is now cooler --- home/.tmux-server.conf | 6 ++++-- home/.tmux.conf | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/home/.tmux-server.conf b/home/.tmux-server.conf index 963005b..be93246 100644 --- a/home/.tmux-server.conf +++ b/home/.tmux-server.conf @@ -42,9 +42,11 @@ bind C-J swap-pane -D # rotate panels with prefix+ctrl+o and prefix+ctrl+shift+o (reversed) # default -# rename window with prefix-n +# rename windows/sessions with prefix-n- unbind n #DEFAULT KEY: Move to next split-window -bind n command-prompt "rename-window '%%'" +bind -T prefix n switch-client -T naming_table +bind -T naming_table s command-prompt "rename-session '%%'" +bind -T naming_table w command-prompt "rename-window '%%'" # set the first window id to 1, I know computer scientists always start from 0, but 0 is so far away from my left hand. # remember: prefix-{digit} brings you to the window with the id {digit} diff --git a/home/.tmux.conf b/home/.tmux.conf index b537333..09269da 100644 --- a/home/.tmux.conf +++ b/home/.tmux.conf @@ -42,9 +42,11 @@ bind C-J swap-pane -D # rotate panels with prefix+ctrl+o and prefix+ctrl+shift+o (reversed) # default -# rename window with prefix-n +# rename windows/sessions with prefix-n- unbind n #DEFAULT KEY: Move to next split-window -bind n command-prompt "rename-window '%%'" +bind -T prefix n switch-client -T naming_table +bind -T naming_table s command-prompt "rename-session '%%'" +bind -T naming_table w command-prompt "rename-window '%%'" # set the first window id to 1, I know computer scientists always start from 0, but 0 is so far away from my left hand. # remember: prefix-{digit} brings you to the window with the id {digit}