dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

.tmux.conf (5774B)


      1 # ░▀█▀░█▄█░█░█░█░█░░
      2 # ░░█░░█░█░█░█░▄▀▄░░
      3 # ░░▀░░▀░▀░▀▀▀░▀░▀░░
      4 
      5 # change prefix to backtick
      6 unbind C-b
      7 set-option -g prefix `
      8 bind ` send-prefix
      9 
     10 # unbind detach
     11 # can still use D to select
     12 # a client to detach
     13 unbind d
     14 
     15 # shell
     16 set -g default-command /usr/bin/zsh
     17 set -g default-shell /usr/bin/zsh
     18 
     19 # start with window 1 (instead of 0)
     20 set -g base-index 1
     21 
     22 # start with pane 1
     23 set -g pane-base-index 1
     24 
     25 # keep window names fixed
     26 set-option -g allow-rename off
     27 
     28 # rename window on creation
     29 set-hook -g after-new-window 'command-prompt -I "" "rename-window '%%'"'
     30 set-hook -g after-new-session 'command-prompt -I "" "rename-window '%%'"'
     31 
     32 # screen mode
     33 set -g default-terminal "screen-256color"
     34 
     35 # source config file
     36 bind r source-file ~/.tmux.conf
     37 
     38 # history
     39 set -g history-limit 4096
     40 
     41 # allow terminal scrolling
     42 set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
     43 
     44 # vim style copy paste mode
     45 #unbind [
     46 #bind Escape copy-mode
     47 #bind-key -T copy-mode-vi 'v' send -X begin-selection
     48 #bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel \
     49 #  "/usr/bin/xsel -i -p > /dev/null"\; \
     50 #  display-message "copied selection to primary clipboard"
     51 unbind [
     52 bind Escape copy-mode
     53 unbind i
     54 bind i paste-buffer
     55 bind-key -Tcopy-mode-vi 'v' send -X begin-selection
     56 #bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection primary'
     57 bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel 'xsel -i >/dev/null'
     58 
     59 # use vi mode
     60 setw -g mode-keys vi
     61 set -g status-keys vi
     62 
     63 # splitting
     64 unbind %
     65 bind b split-window -h
     66 unbind '"'
     67 bind v split-window -v
     68 
     69 # window switching
     70 # urxvt tab like window switching (-n: no prior escape seq)
     71 bind-key -n S-left prev
     72 bind-key -n S-right next
     73 bind-key -n C-left swap-window -t -1
     74 bind-key -n C-right swap-window -t +1
     75 
     76 # pane switching
     77 unbind h
     78 bind h select-pane -L
     79 unbind j
     80 bind j select-pane -D
     81 unbind k
     82 bind k select-pane -U
     83 unbind l
     84 bind l select-pane -R
     85 
     86 # colon :
     87 bind : command-prompt
     88 
     89 # pomodoro
     90 bind-key g run-shell "~/.tmux/plugins/tmux-golden-apple/golden_apple.tmux start"
     91 bind-key G run-shell "~/.tmux/plugins/tmux-golden-apple/golden_apple.tmux stop"
     92 
     93 # panes
     94 set -g pane-border-style fg=black
     95 set -g pane-active-border-style fg=colour244
     96 
     97 # messaging
     98 set -g message-style fg=colour7,bg=colour8
     99 set -g message-command-style fg=colour0,bg=colour1
    100 set-option -g display-time 4000
    101 
    102 # window mode
    103 setw -g mode-style fg=colour7,bg=colour5
    104 
    105 # resizing
    106 setw -g aggressive-resize on
    107 
    108 # status bar
    109 set -g status-justify right
    110 set -g status-style bg=terminal
    111 set -g status-fg colour7
    112 set -g status-interval 5
    113 set -g status-right-length 100
    114 setw -g window-status-separator " "
    115 
    116 setw -g window-status-format "#[bg=colour241,fg=colour0] #I #[bg=colour241,fg=colour0]#W #[bg=default,fg=colour241]▓░"
    117 setw -g window-status-current-format "#[bg=colour10,fg=colour0] #I #[bg=colour10,fg=colour0]#W #[bg=default,fg=colour10]▓░"
    118 set -g status-justify left
    119 set-option -g status-right '#[bg=default,fg=colour237]░▓#[bg=colour237,fg=colour15]#{goldenapple}#{muted_state}#{bond_device}#{online_status}#[bg=colour237,fg=colour243] %Y%m#[bg=colour237,fg=colour7]%d#[fg=colour243]-#[fg=colour15]%u #[fg=colour7]%H%M #[bg=colour243,fg=colour237]▓#[default]'
    120 set-option -g status-left ''
    121 
    122 # online and offline icon for tmux-online-status
    123 set -g @online_icon "#[bg=colour237,fg=colour241]░▓█#[bg=colour241,fg=black]online#[bg=colour237,fg=colour241]█▓░#[default]"
    124 set -g @offline_icon "#[bg=colour237,fg=colour1]░▓█#[bg=colour1,fg=white]offline#[bg=colour237,fg=colour1]█▓░#[default]"
    125 
    126 # device names for tmux-bond-device
    127 set -g @ethernet "#[bg=colour237,fg=colour7] hardwire #[default]"
    128 set -g @wifi "#[bg=colour237,fg=colour7] airborne #[default]"
    129 
    130 # device names for tmux-muted
    131 set -g @muted "#[bg=colour237,fg=colour241]░▓█#[bg=colour241,fg=black]mute#[bg=colour237,fg=colour241]█▓░#[default]"
    132 set -g @unmuted "#[bg=colour237,fg=colour1]░▓█#[bg=colour1,fg=white]on air#[bg=colour237,fg=colour1]█▓░#[default]"
    133 
    134 # work minutes for pomodoro
    135 set -g @work 30
    136 
    137 # loud or quiet?
    138 set-option -g visual-activity on
    139 set-option -g visual-bell off
    140 set-option -g visual-silence off
    141 set-window-option -g monitor-activity off
    142 set-option -g bell-action none
    143 
    144 # tmux clock
    145 set -g clock-mode-colour colour6
    146 
    147 # escape time (for vim)
    148 set -sg escape-time 0
    149 
    150 # some key-binding changes
    151 #bind x kill-pane
    152 bind X next-layout
    153 bind Z previous-layout
    154 
    155 # toggle status bar visibility
    156 #bind t set status
    157 
    158 # toggle todo list popup
    159 ## http://git.z3bra.org/scripts/file/todo.html
    160 unbind t
    161 bind t display-popup -w 75 ~/bin/todo
    162 
    163 unbind T
    164 bind T command-prompt -I "run-shell 'todo "
    165 
    166 # plugins
    167 # `mkdir -p ~/.tmux/plugins/ ; git clone 'https://github.com/tmux-plugins/tpm' ~/.tmux/plugins/tpm`
    168 set -g @plugin 'tmux-plugins/tpm'
    169 set -g @plugin 'tmux-plugins/tmux-online-status'
    170 set -g @plugin 'https://gitlab.com/pyratebeard/tmux-bond-device.git'
    171 set -g @plugin 'tmux-plugins/tmux-muted'
    172 
    173 # see: toggle on/off all keybindings · Issue #237 · tmux/tmux - https://github.com/tmux/tmux/issues/237
    174 # Also, change some visual styles when window keys are off
    175 bind-key -T root F12  \
    176 	set-option -g prefix None \;\
    177 	setw -g window-status-current-format "#[bg=colour1,fg=colour0] #I #[bg=colour1,fg=colour0]#W #[bg=colour0,fg=colour1]▓░" \;\
    178 	refresh-client -S
    179 
    180 bind-key -T root F11 \
    181 	set-option -g prefix ` \;\
    182 	bind ` send-prefix \;\
    183 	setw -g window-status-current-format "#[bg=colour10,fg=colour0] #I #[bg=colour10,fg=colour0]#W #[bg=colour0,fg=colour10]▓░" \;\
    184 	refresh-client -S
    185 
    186 # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
    187 run -b '~/.tmux/plugins/tpm/tpm'