1
0
Fork 0
mirror of synced 2024-12-04 14:45:38 -05:00

fixup! added support for configuration files in the following locations: - ~/.tmux.conf and ~/.tmux.conf.local - $XDG_CONFIG_HOME/tmux/tmux.conf and $XDG_CONFIG_HOME/tmux/tmux.conf.local - ~/.config/tmux/tmux.conf and ~/.config/tmux/tmux.conf.local

This commit is contained in:
Gregory Pakosz 2023-01-10 09:33:28 +01:00
parent 54502e0f68
commit 6eeb02c72d

View file

@ -26,10 +26,10 @@ setw -q -g utf8 on
set -g history-limit 5000 # boost history
# edit configuration
bind e new-window -n "#{TMUX_CONF_LOCAL}" sh -c '${EDITOR:-vim} "$TMUX_CONF_LOCAL" && tmux source "$TMUX_CONF" && tmux display "$TMUX_CONF sourced"'
bind e new-window -n "$TMUX_CONF_LOCAL" sh -c "\${EDITOR:-vim} \"$TMUX_CONF_LOCAL\" && tmux source \"$TMUX_CONF\" && tmux display \"$TMUX_CONF sourced\""
# reload configuration
bind r source-file "$TMUX_CONF" \; display '#{TMUX_CONF} sourced'
bind r source-file "$TMUX_CONF" \; display "$TMUX_CONF sourced"
# -- display -------------------------------------------------------------------
@ -80,7 +80,7 @@ bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# maximize current pane
bind + run 'cut -c3- "#{TMUX_CONF}" | sh -s _maximize_pane "#{session_name}" "#D"'
bind + run "cut -c3- \"$TMUX_CONF\" | sh -s _maximize_pane '#{session_name}' '#D'"
# pane resizing
bind -r H resize-pane -L 2
@ -96,17 +96,17 @@ bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
# toggle mouse
bind m run 'cut -c3- "#{TMUX_CONF}" | sh -s _toggle_mouse'
bind m run "cut -c3- \"$TMUX_CONF\" | sh -s _toggle_mouse"
# -- urlview -------------------------------------------------------------------
bind U run 'cut -c3- "#{TMUX_CONF}" | sh -s _urlview "#{pane_id}"'
bind U run "cut -c3- \"$TMUX_CONF\" | sh -s _urlview '#{pane_id}'"
# -- facebook pathpicker -------------------------------------------------------
bind F run 'cut -c3- "#{TMUX_CONF}" | sh -s _fpp "#{pane_id}" "#{pane_current_path}"'
bind F run "cut -c3- \"$TMUX_CONF\" | sh -s _fpp '#{pane_id}' '#{pane_current_path}'"
# -- copy mode -----------------------------------------------------------------