diff options
| author | Sakamoto <me@sakamoto.network> | 2026-05-12 18:31:15 -0500 |
|---|---|---|
| committer | Sakamoto <me@sakamoto.network> | 2026-05-12 18:31:15 -0500 |
| commit | a623fed63460d6d810605ce1ce858a58a5b222f7 (patch) | |
| tree | 2129e72acc82deaf624630ec271942000eae0aeb /dot_tmux.conf | |
| download | dotfiles-a623fed63460d6d810605ce1ce858a58a5b222f7.tar.xz dotfiles-a623fed63460d6d810605ce1ce858a58a5b222f7.zip | |
init
Diffstat (limited to 'dot_tmux.conf')
| -rw-r--r-- | dot_tmux.conf | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dot_tmux.conf b/dot_tmux.conf new file mode 100644 index 0000000..535b57c --- /dev/null +++ b/dot_tmux.conf @@ -0,0 +1,54 @@ +set-option -g default-shell /bin/zsh +set-option -g default-terminal "tmux-256color" +set -s escape-time 0 +set-option -g detach-on-destroy off + +set -g status-left-length 200 +set -g status-style fg=blue,bg=black +set-window-option -g visual-bell on +set-window-option -g bell-action other + +set -g mouse on +set -g base-index 1 + +set -g prefix C-Space +unbind C-b +bind-key C-Space send-prefix + +unbind % +bind - split-window -h -c "#{pane_current_path}" + +bind "'" split-window -v -c "#{pane_current_path}" + +unbind c +bind -r c neww -c "#{pane_current_path}" + +unbind r +bind r source-file ~/.tmux.conf \; display-message "Re-sourced." + +bind -r C-Down resize-pane -D 5 +bind -r C-Up resize-pane -U 5 +bind -r C-Right resize-pane -R 5 +bind -r C-Left resize-pane -L 5 + +bind -r m resize-pane -Z + +# Smart pane switching with awareness of Vim splits. +# From 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-Left' if-shell "$is_vim" "send-keys C-Left" "select-pane -L" +bind-key -n 'C-Down' if-shell "$is_vim" "send-keys C-Down" "select-pane -D" +bind-key -n 'C-Up' if-shell "$is_vim" "send-keys C-Up" "select-pane -U" +bind-key -n 'C-Right' if-shell "$is_vim" "send-keys C-Right" "select-pane -R" + +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v" +bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y" +unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode when dragging with mouse + +bind f display-popup -E "~/.local/bin/tmux-sessionizer" +bind s display-popup -E -w 70% -h 70% "ncmpcpp -s playlist" +bind g display-popup -E -w 70% -h 70% "lazygit" +bind e neww "aerc" +bind n display-popup -E "~/.local/bin/en" |
