diff options
author | terminaldweller <devi@terminaldweller.com> | 2023-07-13 18:10:26 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2023-07-13 18:10:26 +0000 |
commit | b595ac2150e42a22e92b954188ae374d290b3f53 (patch) | |
tree | b5e9d5e421c6d266e669476e2a1dfa4e89383953 /.tmux.conf | |
parent | update (diff) | |
download | scripts-main.tar.gz scripts-main.zip |
Diffstat (limited to '.tmux.conf')
-rw-r--r-- | .tmux.conf | 39 |
1 files changed, 32 insertions, 7 deletions
@@ -9,6 +9,11 @@ set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'wfxr/tmux-fzf-url' set -g @plugin 'tmux-plugins/tmux-prefix-highlight' set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'roosta/tmux-fuzzback' + +set -g @fuzzback-popup 1 +set -g @fuzzback-popup-size '90%' +set -g @fuzzback-finder-layout 'reverse' set -g @continuum-restore 'on' set -g @continuum-save-interval '15' @@ -35,6 +40,8 @@ unbind-key n # set -g renumber-windows on # set -g- set-titles on +# set-option -g base-index 1 +# setw -g pane-base-index 1 set-window-option -g automatic-rename on set-option -g set-titles on set -g focus-events on @@ -46,10 +53,12 @@ set -sg escape-time 0 set -g default-command /usr/bin/zsh set -g default-shell /usr/bin/zsh set -g default-terminal "screen-256color" +# set-option -ga terminal-overrides ",screen-256color:Tc" +# set -sa terminal-overrides ",*:RGB" # set -s set-clipboard external set-option -g prefix C-a -set -g status-interval 120 +set -g status-interval 40 set-option -g history-limit 30000 set-option -g repeat-time 500 set -g display-time 0 @@ -109,7 +118,19 @@ bind -T off F6 \ wg_is_keys_off="#[fg=colour15,bg=colour63,bold]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[fg=colour24] #{?#{pane_ssh_connected},#[fg=colour63 bg=colour70],#[fg=colour63 bg=colour70]}#[default]" # from christoomey's vim-tmux-nivagator -is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?)(diff)?$'" +tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' +if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" +if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" + +bind-key -n 'S-Left' if-shell "$is_vim" 'send-keys C-Left' 'select-pane -L' +bind-key -n 'S-Down' if-shell "$is_vim" 'send-keys C-Down' 'select-pane -D' +bind-key -n 'S-Up' if-shell "$is_vim" 'send-keys C-Up' 'select-pane -U' +bind-key -n 'S-Right' if-shell "$is_vim" 'send-keys C-Right' 'select-pane -R' +bind-key -T copy-mode-vi 'S-Left' select-pane -L +bind-key -T copy-mode-vi 'S-Down' select-pane -D +bind-key -T copy-mode-vi 'S-Up' select-pane -U +bind-key -T copy-mode-vi 'S-Right' select-pane -R #key bindings #do not use alt keybindings. because of the escape passed at the beginning of a alt keycode, #zsh's vim mode's escape becomes slow since tmux will have to wait on keybindings beginning with escape. @@ -122,6 +143,7 @@ bind -r l select-pane -R # bind -n C-w-w select-pane -l bind-key -Ttable1 'C-w' if-shell "$is_vim" 'send-keys C-w' 'select-pane -l' bind-key -Troot 'C-w' if-shell "$is_vim" 'send-keys C-w' 'switch-client -Ttable1' +bind-key -T copy-mode-vi 'C-\' select-pane -l # bind -n S-Right next-window # bind -n S-Left previous-window bind -n C-k next-window @@ -174,12 +196,13 @@ set -g pane-border-format "#{pane_index}:#{pane_current_command}" # message text set -g message-style bg='#44475a',fg='#8be9fd' -set-option -g status on +set-option -g status 2 # toggle the display of the statusbar bind-key -n S-F6 set-option -g status +bind-key C-^ last-window set-option -g status-justify "centre" set-option -g status-left-length 120 -set-option -g status-right-length 170 +set-option -g status-right-length 120 continuumStatus="#[fg=colour16 bg=colour70 bold]#(xkb-switch -p)#[nobold]#{?#{pane_ssh_connected},#[fg=colour70 bg=colour31],#[fg=colour70 bg=colour24]}" sshStatus="#{?#{pane_ssh_connected},#[fg=colour15 bold],#[fg=colour15 nobold]}#U@#H#{?#{pane_ssh_connected},:#{pane_ssh_port}#[fg=colour31 bg=colour26],#[fg=colour24 bg=colour26]}" @@ -188,15 +211,17 @@ set-option -g status-left "#{prefix_highlight}$wg_is_keys_off$continuumStatus$ss set-option -g status-right "#(/home/devi/scripts/tmux/date.sh)" # set-option -g status-left ">>>" # set-option -g status-right "<<<" +# set-option -g status-format[1] "#[fg=colour16 bg=colour32,bold][#S:#F]#[fg=colour32 bg=#1d7708]#[fg=colour16]#{pid}#[fg=colour255] #[fg=colour16]#{client_pid}#[fg=colour255] #[fg=colour16]#{pane_pid} #[fg=#1d7708 bg=colour63] #[bg=colour63 fg=colour16]#[nobold]#{pane_current_path} #[fg=colour63 bg=colour16]" +set-option -g status-format[1] "#[fg=colour16 bg=colour63]#{pane_tty}#[fg=colour63 bg=colour70]#[fg=colour16]#{pid}#[fg=colour255] #[fg=colour16]#{client_pid}#[fg=colour255] #[fg=colour16]#{pane_pid} #[fg=colour70 bg=colour26]#[bg=colour26 fg=colour255]#{pane_current_path} #[fg=colour26 bg=colour16]" -current_window_format="#{?window_zoomed_flag,#[fg=colour63#, bg=colour16]#[fg=colour63#, bg=colour16#, bold]Z #W #[fg=colour63#, bg=colour16],#[fg=colour22#, bg=colour16, bold]#W #[fg=colour22#, bg=colour16, bold]}" +current_window_format="#{?window_zoomed_flag,#[fg=colour63#, bg=colour16]#[fg=colour63#, bg=colour16#, bold]#F#[fg=colour63#, bg=colour16],#[fg=colour22#, bg=colour16, bold]#F#[fg=colour22#, bg=colour16, bold]}" set-window-option -g window-status-current-format $current_window_format # set-window-option -g window-status-current-format "#[fg=colour255, bg=colour16]#[fg=colour255, bg=colour16] #I #W #[fg=colour255, bg=colour16]" set -g status-bg colour16 # set-window-option -g window-status-format "#[fg=colour32 bg=colour16]#[fg=colour255 bg=colour32]#I#[fg=colour32 bg=colour16]" -set-window-option -g window-status-format "#[fg=colour32 bg=colour0]#I " -set-window-option -g window-status-separator "" +set-window-option -g window-status-format "#[fg=colour32 bg=colour0]#F#I" +set-window-option -g window-status-separator " " #run command on idle #set -g lock-after-time 300 |