X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=dotfiles%2Ftmux%2F.tmux.conf;h=69d58a3f57ae6d9f699e82069a0ea38b97b851de;hb=HEAD;hp=67ebcb7b878dd1865d11fa93fa4eaf10135b0113;hpb=86dfdc283ec7db759ee237dd2616cc94857bffc5;p=shutils.git diff --git a/dotfiles/tmux/.tmux.conf b/dotfiles/tmux/.tmux.conf index 67ebcb7..78ac6ed 100644 --- a/dotfiles/tmux/.tmux.conf +++ b/dotfiles/tmux/.tmux.conf @@ -3,13 +3,44 @@ set -g default-terminal "xterm-256color" set -g mouse on +setw -g mode-keys vi + set-window-option -g xterm-keys on +# Pass escape immediately to vim +set -sg escape-time 0 + +# Default word-separators are: "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~" +# Remove some characters to have sane {mouse_word} on filenames +set-window-option -g word-separators "!\"#$%&'()*+,:;<=>?@[\\]^`{|}~" + +# Copy to X11 clipboard +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' + +# Fire drag&drop for files +bind-key -n DoubleClick1Pane run-shell -c '#{pane_current_path}' "dragon -x '#{mouse_word}'" + +bind-key m "set-option -g mouse on \; display 'Mouse: ON'" +bind-key M "set-option -g mouse off \; display 'Mouse: OFF'" + +# Let split et alii use the pane's current path as current path of the new pane +bind-key '"' split-window -c "#{pane_current_path}" +bind-key % split-window -h -c "#{pane_current_path}" +bind-key c new-window -c "#{pane_current_path}" + +# Pass home and end keys +bind-key -n Home send Escape "OH" +bind-key -n End send Escape "OF" + +# Pass titles to terminal +set-option -g set-titles on +set-option -g set-titles-string "[#S : #W : #T]" + # {{{{ Gruvbox color scheme # https://github.com/egel/tmux-gruvbox/blob/master/tmux-gruvbox-dark.conf -## COLORSCHEME: gruvbox dark +## COLORSCHEME: gruvbox dark (medium) set-option -g status "on" # default statusbar color @@ -52,8 +83,9 @@ set-option -g status-right-style none set-option -g status-right-length "80" set-window-option -g window-status-separator "" -set-option -g status-left "#[fg=colour248, bg=colour241] #S #[fg=colour241, bg=colour237, nobold, noitalics, nounderscore]" -set-option -g status-right "#[fg=colour239, bg=colour237, nobold, nounderscore, noitalics]#[fg=colour246,bg=colour239] %Y-%m-%d  %H:%M #[fg=colour248, bg=colour239, nobold, noitalics, nounderscore]#[fg=colour237, bg=colour248] #h " +set-option -g status-left "#[bg=colour241,fg=colour248] #S #[bg=colour237,fg=colour241,nobold,noitalics,nounderscore]" +set-option -g status-right "#[bg=colour237,fg=colour239 nobold, nounderscore, noitalics]#[bg=colour239,fg=colour246] %Y-%m-%d  %H:%M #[bg=colour239,fg=colour248,nobold,noitalics,nounderscore]#[bg=colour248,fg=colour237] #h " + +set-window-option -g window-status-current-format "#[bg=colour214,fg=colour237,nobold,noitalics,nounderscore]#[bg=colour214,fg=colour239] #I #[bg=colour214,fg=colour239,bold] #W#{?window_zoomed_flag,*Z,} #[bg=colour237,fg=colour214,nobold,noitalics,nounderscore]" +set-window-option -g window-status-format "#[bg=colour239,fg=colour237,noitalics]#[bg=colour239,fg=colour223] #I #[bg=colour239,fg=colour223] #W #[bg=colour237,fg=colour239,noitalics]" -set-window-option -g window-status-current-format "#[fg=colour237, bg=colour214, nobold, noitalics, nounderscore]#[fg=colour239, bg=colour214] #I #[fg=colour239, bg=colour214, bold] #W #[fg=colour214, bg=colour237, nobold, noitalics, nounderscore]" -set-window-option -g window-status-format "#[fg=colour237,bg=colour239,noitalics]#[fg=colour223,bg=colour239] #I #[fg=colour223, bg=colour239] #W #[fg=colour239, bg=colour237, noitalics]"