diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index 3c72f54..56bc332 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -1,7 +1,12 @@ -# vim: foldmethod=marker ts=2 sw=2 ft=tmux +# vim: foldenable foldmethod=marker ts=2 sw=2 ft=tmux # general {{{ -# i need my cute colors -set -g default-terminal "screen-256color" +set -g default-shell /bin/fish +set -g default-terminal "tmux-256color" +set -ag terminal-overrides ",xterm-kitty:Tc,xterm-kitty:U8=0" +set -g set-clipboard on +set -g allow-passthrough on +set -g detach-on-destroy off +set -ga terminal-overrides ",*256col*:Tc" # mouse? set -g mouse on @@ -20,54 +25,81 @@ set -g visual-silence off setw -g monitor-activity off set -g bell-action none # }}} -# help my vim addiction {{{ +# keymaps {{{ +unbind C-b +set -g prefix C-t +bind-key C-t send-prefix + +## vim all the way set-window-option -g mode-keys vi bind-key -T copy-mode-vi 'v' send -X begin-selection bind-key -T copy-mode-vi 'y' send -X copy-selection unbind -T copy-mode-vi MouseDragEnd1Pane -# }}} -# keymaps {{{ -unbind C-b -set -g prefix C-a -bind-key C-a send-prefix -# some life improvements -bind r source-file ~/.tmux.conf \; display 'Reloaded tmux config' +bind R source-file ~/.config/tmux/tmux.conf \; display 'Reloaded tmux config' bind Tab last-window -# change focus -bind -r h select-pane -L -bind -r j select-pane -D -bind -r k select-pane -U -bind -r l select-pane -R -# resizing panes +unbind c; bind t new-window -c "#{pane_current_path}"; +unbind <; bind < swap-window -t -1; +unbind >; bind > swap-window -t +1; +unbind x; bind w kill-pane; +unbind f; bind f resize-pane -Z; +unbind s; bind o choose-session; +bind O choose-tree; +unbind /; bind / copy-mode; +unbind '%'; bind n split-window -h -c "#{pane_current_path}"; +unbind '"'; bind N split-window -v -c "#{pane_current_path}"; +unbind '$'; bind r command-prompt -I "#S" "rename-session -- '%%'"; +bind = resize-pane -U 5; +bind - resize-pane -D 5; + +bind C-n new-session + +bind -n M-1 select-window -t 1 +bind -n M-2 select-window -t 2 +bind -n M-3 select-window -t 3 +bind -n M-4 select-window -t 4 +bind -n M-5 select-window -t 5 +bind -n M-6 select-window -t 6 +bind -n M-7 select-window -t 7 +bind -n M-8 select-window -t 8 +bind -n M-9 select-window -t 9 + +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R bind -r H resize-pane -L 2 bind -r J resize-pane -D 2 bind -r K resize-pane -U 2 bind -r L resize-pane -R 2 # }}} -# apperence {{{ +# appearance {{{ +set -g mode-style "fg=#7aa2f7,bg=#16161e" +set -g message-style "fg=#7aa2f7,bg=#3b4261" +set -g message-command-style "fg=#7aa2f7,bg=#1a1b26" +set -g pane-border-style "fg=#3b4261" +set -g pane-active-border-style "fg=#7aa2f7" +set -g status-style "fg=#7aa2f7,bg=#1a1b26" +set -g window-status-current-style "fg=#7aa2f7" +set -g window-status-style "fg=#c0caf5" + set-option -g status-position top - -# colors -set -g pane-border-style fg=colour240 -set -g pane-active-border-style fg=colour39 -set-window-option -g window-status-current-style fg=colour39 - -# status bar -set -g status-right ' #{?client_prefix,*,} #S ' -set -g status-left ' ' -set -g status-bg default -set -g status-fg colour254 -set -g status-style fg=colour110 +set -g status-left-length 85 +set -g status-left ' #[fg=#7aa2f7,bold] #S#[fg=#a9b1d6,nobold] #{?client_prefix,█,|} #[default]' +set -g status-right '' # }}} # plugins {{{ set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' -set -g @resurrect-capture-pane-contents 'on' set -g @continuum-restore 'on' +set -g @continuum-save-interval '10' +set -g @resurrect-capture-pane-contents 'on' +set -g @resurrect-strategy-nvim 'session' -run '~/.tmux/plugins/tpm/tpm' +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' # }}}