From 53755eedfbd9c612d2e4dda7105fc315cfc46d03 Mon Sep 17 00:00:00 2001 From: Thomas Naderer Date: Mon, 7 Jul 2025 15:33:50 +0200 Subject: [PATCH] Added working and fancy Tmux configuration (shitload of trial and error) --- tmux/plugins/tmux | 1 + tmux/plugins/tmux-colortag | 1 + tmux/plugins/tmux-fzf | 1 + tmux/plugins/tmux-fzf-url | 1 + tmux/plugins/tmux-nerd-font-window-name | 1 + tmux/plugins/tmux-pain-control | 1 + tmux/plugins/tmux-pomodoro-plus | 1 + tmux/plugins/tmux-sensible | 1 + tmux/plugins/tmux-transient-status | 1 + tmux/plugins/tmux-weather | 1 + tmux/plugins/tmux2k | 1 + tmux/plugins/tpm | 1 + tmux/plugins/vim-tmux-navigator | 1 + tmux/tmux.conf | 197 ++++++++++++++++++++++++ 14 files changed, 210 insertions(+) create mode 160000 tmux/plugins/tmux create mode 160000 tmux/plugins/tmux-colortag create mode 160000 tmux/plugins/tmux-fzf create mode 160000 tmux/plugins/tmux-fzf-url create mode 160000 tmux/plugins/tmux-nerd-font-window-name create mode 160000 tmux/plugins/tmux-pain-control create mode 160000 tmux/plugins/tmux-pomodoro-plus create mode 160000 tmux/plugins/tmux-sensible create mode 160000 tmux/plugins/tmux-transient-status create mode 160000 tmux/plugins/tmux-weather create mode 160000 tmux/plugins/tmux2k create mode 160000 tmux/plugins/tpm create mode 160000 tmux/plugins/vim-tmux-navigator diff --git a/tmux/plugins/tmux b/tmux/plugins/tmux new file mode 160000 index 0000000..0e568d1 --- /dev/null +++ b/tmux/plugins/tmux @@ -0,0 +1 @@ +Subproject commit 0e568d1d7bf6b9e9f842ddd62d89f00b6467f1d5 diff --git a/tmux/plugins/tmux-colortag b/tmux/plugins/tmux-colortag new file mode 160000 index 0000000..8cad56d --- /dev/null +++ b/tmux/plugins/tmux-colortag @@ -0,0 +1 @@ +Subproject commit 8cad56db38920a6b6581d367e7912fa600efdb2c diff --git a/tmux/plugins/tmux-fzf b/tmux/plugins/tmux-fzf new file mode 160000 index 0000000..e91c1ae --- /dev/null +++ b/tmux/plugins/tmux-fzf @@ -0,0 +1 @@ +Subproject commit e91c1ae55389f2b34480ea23df77682bdd51d735 diff --git a/tmux/plugins/tmux-fzf-url b/tmux/plugins/tmux-fzf-url new file mode 160000 index 0000000..16381dc --- /dev/null +++ b/tmux/plugins/tmux-fzf-url @@ -0,0 +1 @@ +Subproject commit 16381dce1c30fedd75fc775f887be7ea6c7cbf55 diff --git a/tmux/plugins/tmux-nerd-font-window-name b/tmux/plugins/tmux-nerd-font-window-name new file mode 160000 index 0000000..4c9e7a5 --- /dev/null +++ b/tmux/plugins/tmux-nerd-font-window-name @@ -0,0 +1 @@ +Subproject commit 4c9e7a51387d0cead1465a3628244beb790a3c95 diff --git a/tmux/plugins/tmux-pain-control b/tmux/plugins/tmux-pain-control new file mode 160000 index 0000000..32b760f --- /dev/null +++ b/tmux/plugins/tmux-pain-control @@ -0,0 +1 @@ +Subproject commit 32b760f6652f2305dfef0acd444afc311cf5c077 diff --git a/tmux/plugins/tmux-pomodoro-plus b/tmux/plugins/tmux-pomodoro-plus new file mode 160000 index 0000000..f1b76b7 --- /dev/null +++ b/tmux/plugins/tmux-pomodoro-plus @@ -0,0 +1 @@ +Subproject commit f1b76b760157f4521d5c05ec64ac70ecd34cfb46 diff --git a/tmux/plugins/tmux-sensible b/tmux/plugins/tmux-sensible new file mode 160000 index 0000000..25cb91f --- /dev/null +++ b/tmux/plugins/tmux-sensible @@ -0,0 +1 @@ +Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa diff --git a/tmux/plugins/tmux-transient-status b/tmux/plugins/tmux-transient-status new file mode 160000 index 0000000..c3fcd51 --- /dev/null +++ b/tmux/plugins/tmux-transient-status @@ -0,0 +1 @@ +Subproject commit c3fcd5180999a7afc075d2dd37d37d1b1b82f7e8 diff --git a/tmux/plugins/tmux-weather b/tmux/plugins/tmux-weather new file mode 160000 index 0000000..829b703 --- /dev/null +++ b/tmux/plugins/tmux-weather @@ -0,0 +1 @@ +Subproject commit 829b7031952f1c27eaf08e06001861b66b4de81e diff --git a/tmux/plugins/tmux2k b/tmux/plugins/tmux2k new file mode 160000 index 0000000..a7834f4 --- /dev/null +++ b/tmux/plugins/tmux2k @@ -0,0 +1 @@ +Subproject commit a7834f40cf5ce42d90a2b41be053e96c16733916 diff --git a/tmux/plugins/tpm b/tmux/plugins/tpm new file mode 160000 index 0000000..99469c4 --- /dev/null +++ b/tmux/plugins/tpm @@ -0,0 +1 @@ +Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946 diff --git a/tmux/plugins/vim-tmux-navigator b/tmux/plugins/vim-tmux-navigator new file mode 160000 index 0000000..412c474 --- /dev/null +++ b/tmux/plugins/vim-tmux-navigator @@ -0,0 +1 @@ +Subproject commit 412c474e97468e7934b9c217064025ea7a69e05e diff --git a/tmux/tmux.conf b/tmux/tmux.conf index f714f10..1b3724c 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -1,3 +1,200 @@ +# ============================================ +# TMUX CONFIGURATION - CLEAN GRUVBOX +# ============================================ + +# ============================================ +# TERMINAL & ENVIRONMENT +# ============================================ + +# Terminal settings set -g allow-passthrough on set -ga update-environment TERM set -ga update-environment TERM_PROGRAM +set -g default-terminal "xterm-256color" +set-option -ga terminal-overrides ",xterm-kitty:Tc,*:Tc,*:RGB" + +# Shell configuration +set -g default-shell /bin/zsh +set -g default-command /bin/zsh + +# Environment variables for proper shell integration +set -ga update-environment KITTY_WINDOW_ID +set -ga update-environment KITTY_PID +set -ga update-environment XDG_CONFIG_HOME +set -ga update-environment ZDOTDIR + +# ============================================ +# GENERAL SETTINGS +# ============================================ + +# Start windows and panes at 1, not 0 +set -g base-index 1 +setw -g pane-base-index 1 + +# Renumber windows when one is closed +set -g renumber-windows on + +# Increase scrollback buffer size +set -g history-limit 10000 + +# Don't rename windows automatically +set-option -g allow-rename off + +# Reduce escape time for neovim +set -sg escape-time 0 + +# Enable focus events +set -g focus-events on + +# Show pane numbers longer +set -g display-panes-time 2000 + +# Show messages longer +set -g display-time 2000 + +# Aggressive resize for multiple clients +setw -g aggressive-resize on + +# ============================================ +# VI-LIKE KEYBINDINGS +# ============================================ + +# Vi mode +setw -g mode-keys vi +set -g status-keys vi + +# Smart pane switching with awareness of Vim splits +is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' +bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' +bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' +bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' + +# Vi-like pane resizing +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 + +# Vi-like copy mode +bind-key -T copy-mode-vi 'v' send -X begin-selection +bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel +bind-key -T copy-mode-vi 'r' send -X rectangle-toggle + +# Enter copy mode with Escape +bind Escape copy-mode + +# ============================================ +# PANE MANAGEMENT +# ============================================ + +# Split panes with v and s (vi-like) +bind v split-window -h -c "#{pane_current_path}" +bind s split-window -v -c "#{pane_current_path}" +unbind '"' +unbind % + +# New window in current path +bind c new-window -c "#{pane_current_path}" + +# Quick pane cycling +bind -r C-h select-window -t :- +bind -r C-l select-window -t :+ + +# Kill pane without confirmation +bind x kill-pane + +# Kill window without confirmation +bind X kill-window + +# Toggle zoom +bind z resize-pane -Z + +# Synchronize panes +bind y set-window-option synchronize-panes + +# Quick session switching +bind S choose-tree -sZ -O name + +# Create new session +bind N command-prompt -p "New session name:" "new-session -d -s '%%'" + +# ============================================ +# MOUSE SUPPORT +# ============================================ + +set -g mouse on + +# Don't jump to bottom when mouse selecting +unbind -T copy-mode-vi MouseDragEnd1Pane + +# ============================================ +# GRUVBOX STYLING +# ============================================ + +# Status bar position +set -g status-position top + +# Status bar styling +set -g status-style "bg=#3c3836,fg=#ebdbb2" +set -g status-left-length 100 +set -g status-right-length 100 + +# Pane borders +set -g pane-border-style "fg=#3c3836" +set -g pane-active-border-style "fg=#d79921" + +# Message styling +set -g message-style "bg=#d79921,fg=#282828,bold" +set -g message-command-style "bg=#d79921,fg=#282828,bold" + +# Mode styling +set -g mode-style "bg=#d79921,fg=#282828,bold" + +# Colorful window status styling +set -g window-status-style "fg=#a89984,bg=#3c3836" + +# Different colors for different windows +setw -g window-status-format "#[fg=#282828,bg=#{?#{==:#{window_index},0},#98971a,#{?#{==:#{window_index},1},#458588,#{?#{==:#{window_index},2},#b16286,#{?#{==:#{window_index},3},#689d6a,#{?#{==:#{window_index},4},#d65d0e,#cc241d}}}}}] #I #[fg=#ebdbb2,bg=#3c3836] #W " + +# Current window status - bright yellow +set -g window-status-current-style "fg=#282828,bg=#d79921,bold" +set -g window-status-current-format "#[fg=#282828,bg=#d79921] #I #[fg=#282828,bg=#fabd2f] #W " + +# Status bar content +set -g status-left "#[fg=#282828,bg=#d79921,bold] 󰅬 #S #[fg=#d79921,bg=#3c3836]" +set -g status-right "#[fg=#a89984] %H:%M #[fg=#d79921,bg=#3c3836]#[fg=#282828,bg=#d79921] %d %b " + +# Status bar separators +set -g window-status-separator "" +set -g status-justify left +set -g status-interval 1 + +# Activity monitoring +set -g monitor-activity on +set -g visual-activity off +set -g activity-action other + +# Bell settings +set -g monitor-bell on +set -g visual-bell off +set -g bell-action any + +# Clock colors +set -g clock-mode-colour "#d79921" +set -g clock-mode-style 24 + +# ============================================ +# TRANSPARENCY SETTINGS +# ============================================ + +# Make pane backgrounds transparent +set -g window-style "bg=default" +set -g window-active-style "bg=default" + +# ============================================ +# RELOAD CONFIG +# ============================================ + +# Reload config file with message +bind r source-file ~/.config/tmux/tmux.conf \; display-message "󰑓 Config reloaded!" \ No newline at end of file