Compare commits
2 Commits
7062581131
...
d11695bcf8
| Author | SHA1 | Date | |
|---|---|---|---|
| d11695bcf8 | |||
| 0a7d11c6d4 |
24
.tmux.conf
24
.tmux.conf
@@ -19,9 +19,9 @@ bind % split-window -h -c "#{pane_current_path}"
|
|||||||
bind -n S-Left if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | head -1) ]" "previous-window"
|
bind -n S-Left if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | head -1) ]" "previous-window"
|
||||||
bind -n S-Right if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | tail -1) ]" "next-window"
|
bind -n S-Right if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | tail -1) ]" "next-window"
|
||||||
|
|
||||||
# swap windows left/right with Ctrl+Shift+Arrow
|
# swap windows left/right with PgUp/PgDn (no wrap)
|
||||||
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
|
bind-key -n PgUp if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | head -1) ]" "swap-window -t -1\; select-window -t -1"
|
||||||
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
|
bind-key -n PgDn if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | tail -1) ]" "swap-window -t +1\; select-window -t +1"
|
||||||
|
|
||||||
# sensible defaults
|
# sensible defaults
|
||||||
set -s escape-time 10
|
set -s escape-time 10
|
||||||
@@ -31,10 +31,26 @@ set -g renumber-windows on
|
|||||||
|
|
||||||
# Auto-rename windows: directory/process
|
# Auto-rename windows: directory/process
|
||||||
set -g automatic-rename on
|
set -g automatic-rename on
|
||||||
set -g automatic-rename-format '#{pane_current_command}@#{b:pane_current_path}'
|
set -g automatic-rename-format '#{pane_current_command}@#{b:pane_current_path}#{?pane_title,: #{pane_title},}'
|
||||||
|
|
||||||
# Rename window (prefix + R)
|
# Rename window (prefix + R)
|
||||||
bind R command-prompt -I "#{window_name}" "rename-window '%%'"
|
bind R command-prompt -I "#{window_name}" "rename-window '%%'"
|
||||||
|
|
||||||
# Fuzzy window switcher (prefix + f)
|
# Fuzzy window switcher (prefix + f)
|
||||||
bind f display-popup -E "tmux list-windows -F '#{window_index}: #{window_name}' | fzf --reverse | cut -d: -f1 | xargs tmux select-window -t"
|
bind f display-popup -E "tmux list-windows -F '#{window_index}: #{window_name}' | fzf --reverse | cut -d: -f1 | xargs tmux select-window -t"
|
||||||
|
|
||||||
|
# status bar
|
||||||
|
set -g status-style "bg=colour235,fg=colour248"
|
||||||
|
set -g status-left "#[fg=colour232,bg=colour34,bold]#S#[fg=colour34,bg=colour235,nobold]"
|
||||||
|
set -g status-left-length 30
|
||||||
|
set -g status-right ""
|
||||||
|
set -g status-right-length 40
|
||||||
|
|
||||||
|
# window tabs
|
||||||
|
setw -g window-status-format "#{?#{m:*[13579],#{window_index}},#[fg=colour235]#[bg=colour236]#[fg=colour250] #I #W #[fg=colour236]#[bg=colour235],#[fg=colour235]#[bg=colour233]#[fg=colour244] #I #W #[fg=colour233]#[bg=colour235]}"
|
||||||
|
setw -g window-status-current-format "#[fg=colour235,bg=colour34]#[fg=colour232,bg=colour34,bold] #I #W #[fg=colour34,bg=colour235]"
|
||||||
|
setw -g window-status-separator ""
|
||||||
|
|
||||||
|
# pane borders
|
||||||
|
set -g pane-border-style "fg=colour238"
|
||||||
|
set -g pane-active-border-style "fg=colour34"
|
||||||
|
|||||||
Reference in New Issue
Block a user