dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

tmux-dark.conf (4896B)


      1 # vim: foldmethod=marker foldlevel=0
      2 # Global options {{{
      3 # "set" == "set-option"
      4 set -g history-limit 30000
      5 set -g mouse on
      6 # terminal-overrides works based on $TERM outside of tmux
      7 set -g terminal-overrides 'xterm-256color:Tc:smcup@:rmcup@,st-256color:Tc:smcup@:rmcup@,alacritty:Tc:smcup@:rmcup@*:Ss=\E[%p1%d q:Se=\E[ q'
      8 set -g allow-passthrough on # allow escape sequence passthrough
      9 set -g default-command $SHELL
     10 set -g default-shell $SHELL
     11 set -g default-terminal $TERM
     12 set -g set-titles on
     13 set -g set-titles-string '#H:#S.#I.#P #W #T'
     14 set -g status-interval 1
     15 set -g status-justify right
     16 set -g status-left-length 60
     17 set -g status-right-length 60
     18 set -g visual-activity on
     19 set -g base-index 1   # start numbering windows at 1, easier to reach
     20 set -g renumber-windows on
     21 set -s escape-time 0
     22 set -g set-clipboard off
     23 setw -g mode-keys vi
     24 set -g status-keys emacs
     25 # }}}
     26 # Visuals {{{
     27 set -g message-style bg='#185668',fg='#f0e0b2'
     28 set -g pane-active-border-style fg='#f59970'
     29 set -g status-bg '#11121A'
     30 set -g status-fg '#969696'
     31 set -g status-left '#[fg=#557983]» #[fg=#88a6f8,bold]#T#{?pane_synchronized, #[fg=#f59970#,bold][SYNC],} #[default,align=centre,italics]#(mpc | grep -i '^\[paused\]' >/dev/null && printf "⏸  ")#(mpc current)#[default]'
     32 set -g status-right '#[fg=#557983,bold] »» Sesh #S | #(battery -p)%% | %R (%b %d, %a)#[default]'
     33 setw -g mode-style bg='#11121A',fg='#f59970'
     34 setw -g window-status-activity-style fg='#cb4e62,blink'
     35 setw -g window-status-current-style fg='#f59970',bg='#01021e,bold'
     36 setw -g window-status-style fg='#4dbba3',bg='#11121A'
     37 #}}}
     38 # Window options {{{
     39 setw -g monitor-activity on
     40 setw -g xterm-keys on # for vim
     41 setw -g aggressive-resize on
     42 setw -g automatic-rename
     43 setw -g pane-base-index 1   # start numbering panes at 1, easier to reach
     44 # }}}
     45 # Key bindings {{{
     46 # General {{{
     47 
     48 # Set the prefix
     49 unbind C-b # unbind default leader key
     50 set -g prefix C-a
     51 bind a send-prefix
     52 bind C-a send-prefix
     53 
     54 # Switch ; and :
     55 bind \; command-prompt
     56 bind : last-pane
     57 
     58 # Use vi-like keybindings in command prompt mode
     59 set -g status-keys vi
     60 
     61 # Reload the config file
     62 unbind r
     63 bind r source-file ~/.config/tmux/tmux.conf \; display-message "Reloaded config"
     64 
     65 # Allow c-a c-d to detach
     66 bind C-d detach-client
     67 
     68 # Create a new session
     69 bind C new-session
     70 bind c new-window -c "#{pane_current_path}"
     71 
     72 # Tmux clipboard to system clipboard
     73 bind Y run-shell "tmux show-buffer | clc" \; display-message "Tmux clipboard -> System clipboard"
     74 bind -T copy-mode-vi 'Y' send -X copy-pipe-and-cancel "clc"
     75 
     76 # Search youtube
     77 bind-key -T copy-mode-vi 'u' send-keys -X copy-selection \; new-window -n youtube \; send-keys -t youtube 'pipe-viewer "$(tmux show-buffer)" && tmux kill-window' 'Enter'
     78 
     79 # Translate to english
     80 bind-key -T copy-mode-vi 'T' send -X copy-selection-and-cancel \; display-popup -E 'trans "$(tmux show-buffer)" | LESS=-RiX less'
     81 
     82 # Cancel
     83 bind-key -T copy-mode-vi 'i' send-keys -X cancel
     84 
     85 # Copy
     86 bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
     87 
     88 # Don't cancel mouse selection when letting go
     89 unbind -T copy-mode-vi MouseDragEnd1Pane
     90 
     91 # Allow switching sessions with repeat (-r)
     92 bind-key -r ( switch-client -p
     93 bind-key -r ) switch-client -n
     94 # }}}
     95 # Windows {{{
     96 
     97 # Vertical split
     98 unbind %
     99 bind v split-window -h -c "#{pane_current_path}"
    100 
    101 # Horizontal split
    102 unbind '"' # unbind horizontal split
    103 bind s split-window -v -c "#{pane_current_path}" # split pane horizontally
    104 
    105 # Window navigation
    106 unbind C-j
    107 unbind C-k
    108 bind C-j previous-window
    109 bind C-k next-window
    110 
    111 # Moving windows
    112 unbind H
    113 unbind L
    114 bind -r L swap-window -t +1 \; next-window
    115 bind -r H swap-window -t -1 \; previous-window
    116 
    117 # Rotate the layout of panes
    118 unbind C-o
    119 bind M-v rotate-window
    120 
    121 # Switch layouts
    122 unbind M--
    123 unbind M-|
    124 bind M-- select-layout "even-vertical"
    125 bind M-| select-layout "even-horizontal"
    126 
    127 # Screen-like rename binding
    128 unbind A
    129 bind A command-prompt "rename-window %%"
    130 unbind M-a
    131 bind M-a command-prompt -I "#S" "rename-session -- '%%'"
    132 
    133 # Watch/unwatch for activity
    134 unbind !
    135 bind ! setw monitor-activity \; display-message "#{?monitor-activity,M,Not m}onitoring activity"
    136 
    137 # Open a popup window
    138 bind ` display-popup -E
    139 # }}}
    140 # Panes {{{
    141 # Pane navigation
    142 unbind j
    143 unbind h
    144 unbind k
    145 unbind l
    146 bind j select-pane -D
    147 bind h select-pane -L
    148 bind k select-pane -U
    149 bind l select-pane -R
    150 
    151 # Pane resizing
    152 unbind C-h
    153 unbind C-j
    154 unbind C-k
    155 unbind C-l
    156 bind -r C-h resize-pane -L # "-r" means key may repeat
    157 bind -r C-j resize-pane -D
    158 bind -r C-k resize-pane -U
    159 bind -r C-l resize-pane -R
    160 
    161 # Split & join panes
    162 bind T break-pane
    163 bind J command-prompt -p "join pane from:"  "join-pane -s '%%'"
    164 
    165 # Listing panes
    166 unbind Space
    167 unbind S
    168 unbind W
    169 bind Space list-panes
    170 bind S choose-tree -Zs
    171 bind W choose-tree -Zw
    172 
    173 # Synchronize panes
    174 unbind @
    175 bind @ setw synchronize-panes \; display-message "Toggle sync panes"
    176 
    177 # Clear pane
    178 bind C-r send-keys -R \; clear-history
    179 # }}}
    180 # }}}