dotfiles/.tmux.conf

130 lines
3.9 KiB
Text
Raw Permalink Normal View History

2016-10-10 16:23:16 +02:00
set -g prefix ^o
set -g base-index 1
set -g display-panes-time 3000
#set -s escape-time 7
set -s escape-time 10
2019-01-02 17:47:42 +01:00
set -g status on
2018-01-12 14:04:53 +01:00
set -g status-interval 30
2016-10-10 16:23:16 +02:00
set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
set -g terminal-overrides ",*:colors=256:smso=\e[3m:rmso=\e[23m:sitm=\e[3m:ritm=\e[23m"
2017-06-13 07:45:56 +02:00
set -g terminal-overrides ",xterm-256color:Tc"
2018-04-25 10:51:45 +02:00
set -ga terminal-overrides ",xterm-256color:Tc"
set-option -ag terminal-overrides ",xterm-256color:Ms=\\E]52;c;%p2%s\\7"
2018-04-25 10:51:45 +02:00
set -g default-terminal "xterm-256color"
2016-10-10 16:23:16 +02:00
# clipboard
set -g set-clipboard on
bind-key ] paste-buffer -p
2018-01-12 14:04:53 +01:00
set-option -g mouse on
2016-10-10 16:23:16 +02:00
#bind -n WheelUpPane copy-mode
2019-10-19 12:34:02 +02:00
set -g update-environment "XAUTHORITY DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION"
2016-10-10 16:23:16 +02:00
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
set -g default-command zsh
2016-10-10 16:23:16 +02:00
#set -g mouse-select-pane on
set -g history-limit 50000
setw -g alternate-screen on
setw -g aggressive-resize on
setw -g automatic-rename off
setw -g mode-keys vi
# Status and Titles
2018-01-12 14:04:53 +01:00
set -g status-justify left
2016-10-10 16:23:16 +02:00
set -g status-left-length 30
set -g status-right-length 90
set -g set-titles off
set -g set-titles-string "###I : #T"
#set -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name, active(or not)
# Key bindings
2018-01-12 14:04:53 +01:00
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
2018-01-03 08:47:21 +01:00
bind -n M-Tab last-pane
2016-10-10 16:23:16 +02:00
bind -n M-1 select-window -t 1
bind -n M-- select-window -t 2
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
bind -n M-0 select-window -t 10
2019-01-01 19:48:52 +01:00
bind -n M-m send-keys -t 9 q C-u "clear; tmux clear-history -t 9" C-m C-p C-p C-p C-m
2016-10-10 16:23:16 +02:00
bind 1 select-window -t 1
bind 2 select-window -t 2
bind 3 select-window -t 3
bind 4 select-window -t 4
bind 5 select-window -t 5
bind 6 select-window -t 6
bind 7 select-window -t 7
bind 8 select-window -t 8
bind 9 select-window -t 9
bind 0 select-window -t 10
bind -n M-` last-window
bind C-o last-window
bind k next-window
bind j previous-window
bind l next-window
bind h previous-window
2018-01-12 14:04:53 +01:00
bind r source-file ~/.tmux.conf
2016-10-10 16:23:16 +02:00
bind -n C-Right next-window
bind -n C-Left previous-window
bind C-k next-window
bind C-l next-window
bind C-j previous-window
bind C-h previous-window
bind C-s set-option -g status
bind s split-window -h
bind S split-window -v
bind q kill-pane
2018-01-03 08:47:21 +01:00
bind Tab last-pane
2016-10-10 16:23:16 +02:00
bind C-p select-pane -U
bind K confirm kill-server
2018-01-03 08:47:21 +01:00
bind C-k clear-history
2019-07-04 17:15:47 +02:00
bind -n C-l send-keys C-l \; clear-history
2016-10-10 16:23:16 +02:00
2018-01-12 14:04:53 +01:00
setw -g window-status-format ""
2018-01-17 11:05:01 +01:00
setw -g window-status-current-format "#W"
2018-01-12 14:04:53 +01:00
setw -g window-status-separator ""
2019-07-04 17:15:47 +02:00
set -g status-fg "#B0BEC5"
set -g status-bg "#37474F"
2019-01-02 17:47:42 +01:00
set -g status-left '#[bg=#335566,fg=#1a2a3a] #I #[default] '
2019-01-01 19:48:52 +01:00
# set -g status-right '#[fg=#666666]|#[bg=#222222,fg=#99cc99] #{?#(tmux show-buffer -b project),#(tmux show-buffer -b project),-} #[bg=#222222,fg=#666666]| #{battery_percentage} #{battery_remain} |  %a %h-%d %H:%M | #(date +"%R") '
set -g status-right '#{battery_icon} #{battery_percentage}  %a %h-%d %H:%M '
2016-10-10 16:23:16 +02:00
2016-10-10 16:23:16 +02:00
# Startup
new -d -s0 'exec zsh'
neww -d 'exec zsh'
neww -d 'exec zsh'
neww -d 'exec zsh'
neww -d 'exec zsh'
neww -d 'exec zsh'
neww -d 'exec zsh'
neww -d 'exec zsh'
neww -d 'exec zsh'
neww -d 'exec zsh'
2016-10-10 16:23:16 +02:00
selectw -t 1
2018-11-01 09:50:03 +01:00
run-shell ~/.tmux/plugins/tmux-battery/battery.tmux
2017-02-09 14:19:54 +01:00
2018-01-03 08:47:21 +01:00
# source /usr/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf
2019-09-03 14:50:36 +02:00
#
# if -F "#{==:#{session_windows},1}" "set -g status off" "set -g status on"
# set-hook -g window-linked 'if -F "#{==:#{session_windows},1}" "set -g status off" "set -g status on"'
# set-hook -g window-unlinked 'if -F "#{==:#{session_windows},1}" "set -g status off" "set -g status on"'
2019-09-03 14:50:36 +02:00
#set-hook -g session-window-changed 'if -F "#{==:#{window_index},1}" "set -g status off" "set -g status on"'
2016-10-10 16:23:16 +02:00
# vim:set ft=tmux: