dotfiles

custom dotfiles
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

.tmux.conf (5297B)


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