diff --git a/stow/.config/tmux/tmux.conf b/stow/.config/tmux/tmux.conf index e8290de..68d3069 100644 --- a/stow/.config/tmux/tmux.conf +++ b/stow/.config/tmux/tmux.conf @@ -1,3 +1,7 @@ +# +# keybindings +# + # remap prefix from 'C-b' to 'C-a' unbind C-b set-option -g prefix C-a @@ -9,33 +13,53 @@ bind j select-pane -D bind k select-pane -U bind l select-pane -R +bind r source-file ~/.config/tmux/tmux.conf + # start ajacent terminals with same path bind c new-window -c "#{pane_current_path}" bind '"' split-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" +# +# options +# + # set variables set -g mouse on set -g history-limit 100000 +# start panes and windows at index 1 instead of 0 set -g base-index 1 setw -g pane-base-index 1 +set-option -g renumber-windows on # if win 2 get deleted, win 3 gets renamed to win 2 -set -gq allow-passthrough on set -g visual-activity off +set -g set-clipboard on +set -g focus-events on # lets programs know if they loose focus +set -g status-keys emacs # emacs bindings in tmux prompt ( prefix + :) +set -g default-terminal "screen-256color" # upgrade TERM variable to have more colours +set -g display-time 4000 # display tmux messages for 4s + +# +# status bar +# + +set -g status-style "bg=default" +set -g status-fg "white" +set -g status-left "#[bg=purple,fg=black]#{?client_prefix,#[reverse]#[bg=yellow]#[noreverse]} #S " +set -g status-right "%d/%m #[bg=purple,fg=black] #H " + +# max allowed lenth for statuses to flow into +set -g status-left-length 20 +set -g status-right-length 20 + +# tab bar +set -g window-status-format " #I #W " +set -g window-status-current-format " #I #W " +set -g window-status-current-style bg=black,fg=blue,bold # fix undercurls: https://github.com/folke/tokyonight.nvim#fix-undercurls-in-tmux set -g default-terminal "${TERM}" set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' - -# plugins -# got from: https://github.com/tmux-plugins/tpm/blob/master/docs/automatic_tpm_installation.md, changed to a more sensible install dir -if "test ! -d ~/.local/share/tmux/plugins/tpm" \ - "run 'git clone https://github.com/tmux-plugins/tpm ~/.local/share/tmux/plugins/tpm && ~/.local/share/tmux/plugins/tpm/bin/install_plugins'" - -set -g @plugin 'tmux-plugins/tpm' -set -g @plugin 'tmux-plugins/tmux-sensible' -set -g @plugin "janoamaral/tokyo-night-tmux" - -run '~/.local/share/tmux/plugins/tpm/tpm' +set -gq allow-passthrough on