aboutsummaryrefslogtreecommitdiff
path: root/files/.tmux.conf
diff options
context:
space:
mode:
Diffstat (limited to 'files/.tmux.conf')
-rw-r--r--files/.tmux.conf41
1 files changed, 18 insertions, 23 deletions
diff --git a/files/.tmux.conf b/files/.tmux.conf
index 32efa71..ac108c6 100644
--- a/files/.tmux.conf
+++ b/files/.tmux.conf
@@ -1,3 +1,5 @@
+# Inspired by https://github.com/willnorris/dotfiles/blob/main/tmux.conf
+
# bind prefix to ^a
unbind C-b
set -g prefix `
@@ -6,17 +8,20 @@ bind-key ` send-prefix
## make window/pane index start with 1
set -g base-index 1
setw -g pane-base-index 1
+set -g renumber-windows on
set -g set-titles on
set -g set-titles-string "#W @ #H[#S]"
-
# disable auto rename of windows
-set-option -g allow-rename off
+set -g allow-rename off
# enable mouse support
setw -g mouse on
+# watch background windows for activity and highlight status bar
+set -g monitor-activity on
+
## set vi mode for copy mode
#setw -g mode-keys vi
#unbind [
@@ -30,30 +35,20 @@ setw -g mouse on
## Key bindings
##
+bind Space copy-mode
+
+# don't pre-fill with window or session original name when renaming
+bind '$' command-prompt -p "(rename-session '#S')" "rename-session '%%'"
+bind , command-prompt -p "(rename-window '#W')" "rename-window '%%'"
+
+# Move windows
+bind -n P swap-window -t -1\; select-window -t -1
+bind -n N swap-window -t +1\; select-window -t +1
+
#bind \ split-window -h -c '#{pane_current_path}'
# toggle last 2 windows
-bind-key Tab last-window
-
-## pane movement
-#bind h select-pane -L
-#bind j select-pane -D
-#bind k select-pane -U
-#bind l select-pane -R
-
-## window movement
-#bind -r C-h select-window -t :-
-#bind -r C-l select-window -t :+
-
-## resize pane
-#bind -r H resize-pane -L 10
-#bind -r J resize-pane -D 10
-#bind -r K resize-pane -U 10
-#bind -r L resize-pane -R 10
-
-# stay in copy mode on drag end
-#unbind-key -t vi-copy MouseDragEnd1Pane
-#bind-key -t vi-copy MouseUp1Pane cancel
+bind Tab last-window
# Status bar
set -g status-right "$USER@#h %H:%M"