Mercurial > dotfiles
view dot_tmux.conf @ 299:1070d75463db
Add global Brewfile with some common packages
author | zegervdv <zegervdv@me.com> |
---|---|
date | Tue, 10 Nov 2020 17:44:13 +0100 |
parents | 88d7010b5694 |
children | f220567b278e |
line wrap: on
line source
set-environment -g PATH "/project/asic_fpga/tools/tmux/bin:$PATH" # Nested TMUX sessions (from # https://medium.freecodecamp.org/tmux-in-practice-local-and-nested-remote-tmux-sessions-4f7ba5db8795) bind -T root F12 \ set prefix None \;\ set key-table off \;\ set status-right "#[fg=colour0,bg=colour1] DISABLED #[fg=colour3,bg=colour0] #{session_name}#[fg=colour1] | #[fg=colour2]%d %b %l:%M %p " refresh-client -S \;\ bind -T off F12 \ set -u prefix \;\ set -u key-table \;\ set -u status-right \;\ refresh-client -S # improve colors set -g default-terminal 'xterm-256color' set-option -ga terminal-overrides ",xterm-256color:Tc" set-option -g allow-rename off set-window-option -g automatic-rename off # Status bar set -g set-titles 'off' set -g status-position 'top' set -g status-left "" set -g status-right-length 200 set -g status-right "#[fg=colour0,bg=colour5] vsim #[fg=colour0,bg=colour15] #(ps hux -u $(whoami) | grep 'vish' | grep -v -E 'grep|view' | wc -l) #[fg=colour3,bg=colour0] #[fg=colour0,bg=colour3] load #[fg=colour0,bg=colour15] #(cat /proc/loadavg | awk '{ print $3; }' | xargs printf '%2.2f') #[fg=colour3,bg=colour0] #[fg=colour0,bg=colour2] mem #[fg=colour0,bg=colour15] #(ps haux | awk -v user=$(whoami) '$1 ~ user { sum += $4 } END { print sum; }' | xargs printf '%2.2f')% #[fg=colour3,bg=colour0] #[fg=colour0,bg=colour1] time #[fg=colour0,bg=colour15] %d %b %l:%M %p #[fg=colour3,bg=colour0] #[fg=colour15,bg=colour8] #{session_name} #[fg=colour0,bg=colour0] " # Tabs setw -g window-status-format " #I #W " setw -g window-status-style fg=colour15 setw -g window-status-current-format " #I #W " setw -g window-status-current-style fg=red set -g status-justify "left" set -g status-bg "colour0" set -g status-fg "colour7" set -g message-bg "colour0" set -g message-fg "colour8" setw -g window-status-bell-style "fg=colour0,bg=colour5" bind s split-window -v -c "#{pane_current_path}" bind v split-window -h -c "#{pane_current_path}" bind a split-window -v -p 15 -c "#{pane_current_path}" # bind c new-window -c "#{pane_current_path}" bind c command-prompt -p "Name:" "new-window -c \"#{pane_current_path}\" -n %%" # Enable delete in command sequencer bind h send-keys 'c-h' # Open man pages in split bind @ command-prompt -p "Man:" "split-window -v 'exec man %%'" # act like vim bind Escape copy-mode set-window-option -g mode-keys vi bind-key -T copy-mode-vi 'v' send -X begin-selection bind-key -T copy-mode-vi 'V' send -X select-line bind-key -T copy-mode-vi 'r' send -X rectangle-toggle bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard' unbind-key -T copy-mode-vi MouseDragEnd1Pane unbind -T copy-mode-vi MouseDragEnd1Pane # unbind -t vi-copy MouseDragEnd1Pane # Smart pane switching with awareness of Vim splits. # See: 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-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" bind-key -T copy-mode-vi C-h select-pane -L bind-key -T copy-mode-vi C-j select-pane -D bind-key -T copy-mode-vi C-k select-pane -U bind-key -T copy-mode-vi C-l select-pane -R bind-key -T copy-mode-vi C-\ select-pane -l #act like GNU screen unbind C-b set -g prefix C-Space bind Space send-prefix set -g escape-time 20 # start window numbers at 1 to match keyboard order with tmux window order set -g base-index 1 # renumber windows sequentially after closing any of them set -g renumber-windows on bind-key r source ~/.tmux.conf # Fix hightlighting in less set -ga terminal-overrides ',*:sitm@,ritm@' # increase scrollback lines set -g history-limit 100000 setw -g mouse on set -g focus-events on # Allow for visual bell when a command completes set-window-option -g visual-bell on set-window-option -g bell-action other set-option -g default-shell "/bin/bash" # set-option -g default-command "/bin/bash" # set-environment -g SHELL "/bin/bash" # set-environment -g PATH "$PATH:/home/zvandeva/bin" # Local config if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local' # Plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'nhdaly/tmux-better-mouse-mode' set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'Morantron/tmux-fingers' set -g @plugin 'laktak/extrakto' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' # Config set -g @fingers-skip-health-check '1' set -g @fingers-compact-hints '0' set -g @fingers-hint-format-nocompact " #[fg=colour1][%s]" set -g @fingers-highlight-format-nocompact "#[fg=colour5]%s" set -g @fingers-pattern-0 "[[:digit:]][[:digit:]][[:digit:]]+" set -g @scroll-without-changing-pane "on" set -g @emulate-scroll-for-no-mouse-alternate-buffer "on" set -g @extrakto_fzf_tool "/home/zvandeva/.fzf/bin/fzf" set -g @resurrect-strategy-nvim 'session' set -g @resurrect-capture-pane-contents 'on' run-shell "~/.tmux/plugins/tpm/tpm"