Commit cf88bb9
Changed files (5)
.config
.config/tmux/core.conf
@@ -0,0 +1,25 @@
+# TERMINAL COMPATIBILITY
+set-option -g default-terminal 'screen-256color'
+set-option -ga terminal-overrides ',xterm-ghostty:Tc'
+set-option -ga terminal-overrides ',xterm-ghostty:RGB'
+
+# Extended keys support for Ghostty
+set -s extended-keys on
+set -as terminal-features 'xterm-ghostty:extkeys'
+
+# General Settings
+set -g history-limit 1000000
+set -g base-index 1
+set -g pane-base-index 1
+set -g renumber-windows on
+set -g escape-time 0
+set -g set-clipboard on
+set -g status-position top
+set -g mouse on
+
+# Rename windows automatically
+set -g automatic-rename on
+set -g automatic-rename-format "#(~/.wraith/scripts/tmux-window-name.sh '#{pane_current_command}' '#{pane_current_path}' '#{pane_title}' '#{HOME}')"
+
+# Theme
+source-file ~/.config/tmux/generated.conf
.config/tmux/keybinds.conf
@@ -0,0 +1,43 @@
+# Prefix
+unbind C-b
+set -g prefix C-s
+bind C-s send-prefix
+
+# Reload config
+bind C-r source-file ~/.config/tmux/tmux.conf \; display "Config Reloaded!"
+
+# Pane splits
+unbind %
+unbind '"'
+bind e split-window -h -c "#{pane_current_path}"
+bind o split-window -v -c "#{pane_current_path}"
+
+# Windows
+unbind t
+bind t new-window -c "#{pane_current_path}"
+bind T clock-mode
+
+# Search
+unbind f
+bind f copy-mode \; command-prompt -p "Search:" "send-keys -X search-forward '%%'"
+
+# Copy mode
+set -g mode-keys vi
+unbind -T copy-mode-vi MouseDragEnd1Pane
+
+# Resurrect plugin
+set -g @resurrect-save 'S'
+set -g @resurrect-restore 'R'
+
+
+# Popups
+bind C-l if-shell \
+ 'git -C "#{pane_current_path}" rev-parse --is-inside-work-tree >/dev/null 2>&1' \
+ 'display-popup -d "#{pane_current_path}" -w 90% -h 90% -E "lazygit"' \
+ 'display-message "Git repo not found"'
+
+bind C-p display-menu -T "#[align=centre]Dev Menu" \
+ -x C -y C \
+ "" \
+ "Edit Dotfiles" d "new-window -c ~ 'cd dotfiles && nvim .'" \
+ "Edit .zshrc" z "display-popup -E 'nvim ~/.zshrc'" \
.config/tmux/plugins.conf
@@ -0,0 +1,14 @@
+# Plugins
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-resurrect'
+
+# tmux-resurrect settings
+set -g @resurrect-strategy-nvim 'session'
+set -g @resurrect-capture-pane-contents 'on'
+set -g @resurrect-save-shell-history 'on'
+
+# Auto install TPM if missing
+if "test ! -d ~/.config/tmux/plugins/tpm" \
+ "run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm && ~/.config/tmux/plugins/tpm/bin/install_plugins'"
+
+run '~/.config/tmux/plugins/tpm/tpm'
.config/tmux/status.conf
@@ -0,0 +1,23 @@
+# Status appearance
+set -g window-style 'bg=default'
+set -g window-active-style 'bg=default'
+set -g status-bg default
+set -g status-style bg=default
+
+# Window format
+set -g window-status-format "#[fg=#{E:@thm_text_variant}]#[fg=#{E:@thm_surface},bg=#{E:@thm_text_variant}]#I #[fg=#{E:@thm_primary},bg=#{E:@thm_surface}] #W#[fg=#{E:@thm_surface},bg=default]"
+
+set -g window-status-current-format "#[fg=#{E:@thm_primary}]#[fg=#{E:@thm_surface},bg=#{E:@thm_primary}]#I #[fg=#{E:@thm_primary},bg=#{E:@thm_surface}] #[fg=#{E:@thm_surface},bg=default]"
+
+# Length
+set -g status-left-length 40
+set -g status-right-length 40
+
+# Left modules
+set -g status-left ""
+set -ag status-left "#{?client_prefix,#[bg=default]#[fg=@thm_fg] ⌨ ,}"
+set -ag status-left "#{?#{==:#{pane_mode},copy-mode},#[bg=default]#[fg=@thm_fg] ,}"
+
+# Right modules
+set -g status-right "#(~/.wraith/scripts/tmux-git-status.sh '#{pane_current_path}') "
+set -ag status-right "#[fg=#{E:@thm_primary}]#[fg=#{E:@thm_surface},bg=#{E:@thm_primary}] #[fg=#{E:@thm_primary},bg=#{E:@thm_surface}] %I:%M %p#[fg=#{E:@thm_surface},bg=default]"
.config/tmux/tmux.conf
@@ -1,87 +1,4 @@
-# TERMINAL COMPATIBILITY
-set-option -g default-terminal 'screen-256color'
-set-option -ga terminal-overrides ',xterm-ghostty:Tc'
-set-option -ga terminal-overrides ',xterm-ghostty:RGB'
-
-# Extended keys support for Ghostty
-set -s extended-keys on
-set -as terminal-features 'xterm-ghostty:extkeys'
-
-# General Settings
-set -g history-limit 1000000
-set -g base-index 1
-set -g pane-base-index 1
-set -g renumber-windows on
-set -g escape-time 0
-set -g set-clipboard on
-set -g status-position top
-set -g mouse on
-
-# KEY BINDINGS
-unbind -T copy-mode-vi MouseDragEnd1Pane
-
-unbind C-b
-set -g prefix C-s
-bind C-s send-prefix
-
-unbind r
-bind r source-file ~/.config/tmux/tmux.conf \; display "Config Reloaded!"
-
-unbind %
-unbind '"'
-bind e split-window -h -c "#{pane_current_path}"
-bind o split-window -v -c "#{pane_current_path}"
-
-unbind c
-unbind t
-bind t new-window -c "#{pane_current_path}"
-bind T clock-mode
-
-unbind f
-bind f copy-mode \; command-prompt -p "Search:" "send-keys -X search-forward '%%'"
-set -g mode-keys vi
-
-set -g automatic-rename on
-set -g automatic-rename-format "#(~/.wraith/scripts/tmux-window-name.sh '#{pane_current_command}' '#{pane_current_path}' '#{pane_title}' '#{HOME}')"
-
-# Load generated theme configuration
-source-file ~/.config/tmux/generated.conf
-
-# Status Bar Appearance
-set -g window-style 'bg=default'
-set -g window-active-style 'bg=default'
-set -g status-bg default
-set -g status-style bg=default
-
-set -g window-status-format "#[fg=#{E:@thm_text_variant}]#[fg=#{E:@thm_surface},bg=#{E:@thm_text_variant}]#I #[fg=#{E:@thm_primary},bg=#{E:@thm_surface}] #W#[fg=#{E:@thm_surface},bg=default]"
-set -g window-status-current-format "#[fg=#{E:@thm_primary}]#[fg=#{E:@thm_surface},bg=#{E:@thm_primary}]#I #[fg=#{E:@thm_primary},bg=#{E:@thm_surface}] #[fg=#{E:@thm_surface},bg=default]"
-
-# Status Bar Length
-set -g status-left-length 40
-set -g status-right-length 40
-
-# Status Left Modules
-set -g status-left ""
-set -ag status-left "#{?client_prefix,#[bg=default]#[fg=@thm_fg] ⌨ ,}"
-set -ag status-left "#{?#{==:#{pane_mode},copy-mode},#[bg=default]#[fg=@thm_fg] ,}"
-
-# Status Right Modules:wraith
-set -g status-right "#(~/.wraith/scripts/tmux-git-status.sh '#{pane_current_path}') "
-set -ag status-right "#[fg=#{E:@thm_primary}]#[fg=#{E:@thm_surface},bg=#{E:@thm_primary}] #[fg=#{E:@thm_primary},bg=#{E:@thm_surface}] %I:%M %p#[fg=#{E:@thm_surface},bg=default]"
-
-# Plugins
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-resurrect'
-#set -g @plugin 'catppuccin/tmux'
-
-# tmux-resurrect Settings
-set -g @resurrect-strategy-nvim 'session' # Restore neovim sessions
-set -g @resurrect-capture-pane-contents 'on' # Restore pane contents (scrollback)
-set -g @resurrect-save-shell-history 'on' # Save shell history
-
-# Auto install TPM if not present
-if "test ! -d ~/.config/tmux/plugins/tpm" \
- "run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm && ~/.config/tmux/plugins/tpm/bin/install_plugins'"
-
-run '~/.config/tmux/plugins/tpm/tpm'
-
+source-file ~/.config/tmux/core.conf
+source-file ~/.config/tmux/keybinds.conf
+source-file ~/.config/tmux/status.conf
+source-file ~/.config/tmux/plugins.conf