From 700da3aa0b223e194ffd5a7717802df67d221186 Mon Sep 17 00:00:00 2001 From: dissimulo Date: Wed, 6 May 2026 02:24:32 -0700 Subject: [PATCH] Make tmux/tmux.conf a relative symlink to ../.tmux.conf YADR's Rakefile maps tmux/tmux.conf -> $HOME/.tmux.conf, but the canonical, customized tmux config has lived at the repo root since 3d2508a (when the relationship was inverted). Re-running rake install on its own (without the bash installer's subsequent personal-deploy overlay) was therefore replacing the deployed real .tmux.conf with a symlink to the older 3987-byte tmux/tmux.conf, dropping the IP/host status-right and the bumped history limit. Pointing tmux/tmux.conf at ../.tmux.conf via a relative symlink fixes this on any machine, regardless of where ~/.yadr lives or which user owns it: rake install's symlink chain now resolves to the customized config no matter the install order. --- tmux/tmux.conf | 103 +------------------------------------------------ 1 file changed, 1 insertion(+), 102 deletions(-) mode change 100644 => 120000 tmux/tmux.conf diff --git a/tmux/tmux.conf b/tmux/tmux.conf deleted file mode 100644 index bf1c96c2..00000000 --- a/tmux/tmux.conf +++ /dev/null @@ -1,102 +0,0 @@ -# Ring the bell if any background window rang a bell -set -g bell-action any - -# Default termtype. If the rcfile sets $TERM, that overrides this value. -set -g default-terminal screen-256color - -# Keep your finger on ctrl, or don't -bind-key ^D detach-client - -# Create splits and vertical splits -bind-key v split-window -h -p 50 -c "#{pane_current_path}" -bind-key ^V split-window -h -p 50 -c "#{pane_current_path}" -bind-key s split-window -p 50 -c "#{pane_current_path}" -bind-key ^S split-window -p 50 -c "#{pane_current_path}" - -# Pane resize in all four directions using vi bindings. -# Can use these raw but I map them to shift-ctrl- in iTerm. -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 - -# Smart pane switching with awareness of Vim splits. -# See: https://github.com/christoomey/vim-tmux-navigator -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' - -tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' -if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ - "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" -if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ - "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" - -bind-key -T copy-mode-vi 'C-h' select-pane -L -bind-key -T copy-mode-vi 'C-j' select-pane -D -bind-key -T copy-mode-vi 'C-k' select-pane -U -bind-key -T copy-mode-vi 'C-l' select-pane -R -bind-key -T copy-mode-vi 'C-\' select-pane -l - -# Use vi keybindings for tmux commandline input. -# Note that to get command mode you need to hit ESC twice... -set -g status-keys vi - -# Use vi keybindings in copy and choice modes -setw -g mode-keys vi - -# easily toggle synchronization (mnemonic: e is for echo) -# sends input to all panes in a given window. -bind e setw synchronize-panes on -bind E setw synchronize-panes off - -# set first window to index 1 (not 0) to map more to the keyboard layout... -set-option -g base-index 1 -set-window-option -g pane-base-index 1 -set-window-option -g mouse on - -# color scheme (styled as vim-powerline) -set -g status-left-length 52 -set -g status-right-length 451 -set -g status-style fg=white,bg=colour234 -set -g pane-border-style fg=colour245 -set -g pane-active-border-style fg=colour39 -set -g message-style fg=colour16,bg=colour221,bold -set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀' -set -g window-status-format '#[fg=colour235,bg=colour252,bold] #I #(pwd="#{pane_current_path}"; echo ${pwd####*/}) #W ' -set -g window-status-current-format '#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #{?window_zoomed_flag,#[fg=colour228],} #I #(pwd="#{pane_current_path}"; echo ${pwd####*/}) #W #[fg=colour39,bg=colour234,nobold]⮀' -set-option -g status-interval 2 - -# Patch for OS X pbpaste and pbcopy under tmux. -set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL" - -# Screen like binding -unbind C-b -set -g prefix C-a -bind a send-prefix - -# No escape time for vi mode -set -sg escape-time 0 - -# Screen like binding for last window -unbind l -bind C-a last-window - -# Bigger history -set -g history-limit 10000 - -# New windows/pane in $PWD -bind c new-window -c "#{pane_current_path}" - -# Fix key bindings broken in tmux 2.1 -set -g assume-paste-time 0 - -# force a reload of the config file -unbind r -bind r source-file ~/.tmux.conf \; display "Reloaded!" - -# Local config -if-shell "[ -f ~/.tmux.conf.user ]" 'source ~/.tmux.conf.user' diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 120000 index 00000000..151c0bd4 --- /dev/null +++ b/tmux/tmux.conf @@ -0,0 +1 @@ +../.tmux.conf \ No newline at end of file