From 5c916d69d457101326803eb076a746060e3618cf Mon Sep 17 00:00:00 2001 From: Vikas Kushwaha Date: Thu, 21 Nov 2024 13:30:52 +0530 Subject: Moved from github --- .config/tmux/tmux.conf | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .config/tmux/tmux.conf (limited to '.config/tmux/tmux.conf') diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf new file mode 100644 index 0000000..cc53fde --- /dev/null +++ b/.config/tmux/tmux.conf @@ -0,0 +1,77 @@ +if-shell '[ "$COLORTERM" != "${COLORTERM#*truecolor}" ]' { + set -g default-terminal "tmux-256color" + set -ga terminal-overrides ',*256col*:Tc' + source ~/.config/tmux/tmux-gruvbox-dark.conf + # run 'bash ~/.config/tmux/tmux-onedark-theme.tmux' +} + +if-shell '[ -z "$SSH_CONNECTION" ] && [ -n "$TERMUX_VERSION" ]' { + set -g status-right "" +} + +# if-shell '[ -n "$TERMUX_VERSION" ]' { +# set -g status-right "" +# } + +if-shell '[ -z "$EDITOR" ]' 'EDITOR=vi' + +unbind C-b +set -g prefix ` +bind ` send-prefix + +set-window-option -g mode-keys vi +set -g status-keys vi +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R +bind -r C-h resize-pane -L +bind -r C-j resize-pane -D +bind -r C-k resize-pane -U +bind -r C-l resize-pane -R +bind -r M-h resize-pane -L 5 +bind -r M-j resize-pane -D 5 +bind -r M-k resize-pane -U 5 +bind -r M-l resize-pane -R 5 + +bind -T copy-mode-vi u send -X halfpage-up +bind -T copy-mode-vi d send -X halfpage-down +bind -T copy-mode-vi i send -X cancel +bind -T copy-mode-vi V send -X select-line +bind -T copy-mode-vi v send -X rectangle-off \; send -X begin-selection +bind -T copy-mode-vi C-v send -X rectangle-on \; send -X begin-selection +bind -T copy-mode-vi p send -X copy-pipe \; paste-buffer +bind -T copy-mode-vi y send -X copy-pipe +bind -T copy-mode-vi Y send -X copy-pipe 'xclip -in -selection clipboard' +bind -T copy-mode-vi MouseDragEnd1Pane send -X begin-selection -x + +bind -r \" split-window -c '#{pane_current_path}' +bind -r % split-window -c '#{pane_current_path}' -h +bind -r c new-window -c '#{pane_current_path}' +bind -r \; last-window +bind -r J rotate-window -D +bind -r K rotate-window -U + +bind E new-window -t9 -n tmux.conf '$EDITOR ~/.config/tmux/tmux.conf' +bind R source ~/.config/tmux/tmux.conf \; display "sourced config" +bind H new-window -n tmux.help 'man tmux' +bind G new-window -t0 gotop + +set -g base-index 1 +set -g escape-time 20 +set -g mouse on +set -g display-time 0 +set -g history-limit 1000000 + +set -g lock-command vlock +# set -g lock-after-time 300 +bind Home lock-server +bind End lock-session +bind Delete lock-client + +bind -r C-u run -b 'brightness up' +bind -r C-d run -b 'brightness down' + +# if -F "#{==:#{session_windows},1}" "set status off" "set status on" + set-hook -g window-linked 'if -F "#{==:#{session_windows},1}" "set status off" "set status on"' + set-hook -g window-unlinked 'if -F "#{==:#{session_windows},1}" "set status off" "set status on"' -- cgit v1.2.3