aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-09-12 15:49:50 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-09-12 15:49:50 -0500
commitcd95f9630a74fc06404abbf211cd537f60201c34 (patch)
tree6d25ddcc302f3faa750aaea48eff91825dd94f85
parent2e074850de19b246888b6f7cff110644ed34e170 (diff)
refactor(tmux): remove tpm
-rw-r--r--tmux/.config/tmux/tmux.conf89
1 files changed, 69 insertions, 20 deletions
diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf
index 6ea9962..0e28346 100644
--- a/tmux/.config/tmux/tmux.conf
+++ b/tmux/.config/tmux/tmux.conf
@@ -17,16 +17,58 @@ set -g base-index 1
set -g pane-base-index 1
set -g detach-on-destroy off
set -g set-clipboard on
-set -g status-keys vi
+set -g status-keys emacs
set -g history-limit 10000
+set -g focus-events on
-bind -N "Last session" A switchc -l
-bind -N "Clock" T clock-mode
-bind -N "Session" f run "projectr -mgE ~/.local/src | fzf --tmux --tac --exit-0 -d/ --with-nth=-1 --preview='lesspipe.sh {}' | mksession -"
-bind -N "Window" t neww
-bind -N "Switch" w choose-tree -Zws -F \
+set -wg aggressive-resize on
+set -wg monitor-activity on
+set -wg monitor-bell on
+
+set -g set-titles on
+set -g set-titles-string "#H:#{s|$HOME|~|:session_path} (#W)"
+
+set -g status-interval 1
+set -g pane-active-border-style fg="#fe8019"
+set -g pane-border-style fg="#3c3836"
+set -g message-style bg="#fe8019",fg="#3c3836"
+set -g message-command-style bg="#a89984",fg="#3c3836"
+set -g display-panes-active-colour "#fe8019"
+set -g display-panes-colour "#3c3836"
+
+set -wg mode-style bg="#fe8019",fg="#3c3836"
+set -wg clock-mode-colour "#fe8019"
+set -wg copy-mode-match-style "bg=#a89984,fg=#3c3836"
+set -wg copy-mode-current-match-style "bg=#fe8019,fg=#3c3836"
+
+set -g status-style bg=terminal,fg="#a89984"
+set -g status-left-length 30
+set -g status-left-style "fg=#3c3836,#{?client_prefix,bg=#fe8019,bg=#a89984}"
+set -g status-left " #{s|$HOME|~|:session_path} "
+set -g status-right "#[bg=#3c3836, fg=#7c6f64] %Y-%m-%d %H:%M:%S #[bg=#a89984, fg=#3c3836]#{?client_prefix,#[bg=#fe8019],#[bg=#a89984]} #{host_short} "
+
+set -wg window-status-separator ""
+set -wg window-status-format " #{window_index} #{window_name} "
+set -wg window-status-current-format " #{window_index} #{window_name} "
+set -wg window-status-style bg="#3c3836",fg="#7c6f64"
+set -wg window-status-activity-style bg="#3c3836",fg="#a89984"
+set -wg window-status-bell-style bg="#3c3836",fg="#fe8019"
+set -wg window-status-current-style bg="#3c3836",fg="#ebdbb2"
+
+bind-key R source ~/.config/tmux/tmux.conf \; display "sourced config"
+unbind C-b
+bind C-a send-prefix
+bind a last-window
+bind A switchc -l
+bind T clock-mode
+bind t neww
+bind C-p previous-window
+bind C-n next-window
+bind w choose-tree -Zws -F \
"#(echo '#{tree_mode_format}' | sed 's%##{session_windows} windows%##{s|$HOME|~|:session_path}%')"
+bind f run "projectr -mgE ~/.local/src | fzf --tmux --tac --exit-0 -d/ --with-nth=-1 --preview='lesspipe.sh {}' | mksession -"
+
# i3/sway style window navigation
bind '1' if 'tmux selectw -t :=1' '' 'neww -t :=1'
bind '2' if 'tmux selectw -t :=2' '' 'neww -t :=2'
@@ -50,21 +92,28 @@ bind '*' if 'tmux swapw -d -t :=8' '' 'movew -t :=8'
bind '(' if 'tmux swapw -d -t :=9' '' 'movew -t :=9'
bind ')' if 'tmux swapw -d -t :=0' '' 'movew -t :=0'
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-sensible'
-set -g @plugin 'tmux-plugins/tmux-pain-control'
-set -g @plugin 'lawabidingcactus/tmux-gruvbox-truecolor'
+bind 'c' neww -c '#{pane_current_path}'
+bind '\' splitw -fh -c '#{pane_current_path}'
+bind '-' splitw -v -c '#{pane_current_path}'
-if "test ! -d $XDG_CONFIG_HOME/tmux/plugins/tpm" \
- "run 'git clone https://github.com/tmux-plugins/tpm $XDG_CONFIG_HOME/tmux/plugins/tpm \
- && $XDG_CONFIG_HOME/tmux/plugins/tpm/bin/install_plugins'"
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
-run '$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm'
+bind -r H resize-pane -L 5
+bind -r J resize-pane -D 5
+bind -r K resize-pane -U 5
+bind -r L resize-pane -R 5
-set -g set-titles on
-set -g set-titles-string "#H:#{s|$HOME|~|:session_path} (#W)"
-set -g status-left-length 30
-set -g status-left-style "fg=#3c3836,#{?client_prefix,bg=#fe8019,bg=#a89984}"
-set -g status-left " #{s|$HOME|~|:session_path} "
-set -wg window-status-current-style bg="#3c3836",fg="#ebdbb2"
+
+# set -g @plugin 'tmux-plugins/tpm'
+# set -g @plugin 'lawabidingcactus/tmux-gruvbox-truecolor'
+#
+# if "test ! -d $XDG_CONFIG_HOME/tmux/plugins/tpm" \
+# "run 'git clone https://github.com/tmux-plugins/tpm $XDG_CONFIG_HOME/tmux/plugins/tpm \
+# && $XDG_CONFIG_HOME/tmux/plugins/tpm/bin/install_plugins'"
+#
+# run '$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm'
+