add: tmux configurations
This commit is contained in:
parent
5088feba09
commit
c6c190efc2
4 changed files with 141 additions and 0 deletions
1
.config/tmux/.gitignore
vendored
Normal file
1
.config/tmux/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/plugins/
|
||||||
11
.config/tmux/plugin.conf
Normal file
11
.config/tmux/plugin.conf
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
|
||||||
|
# restore tmux sessions after system restart
|
||||||
|
# bindings:
|
||||||
|
# ctrl-s -> save
|
||||||
|
# ctrl-r -> restore
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
|
|
||||||
|
# init tmux plugin manager
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
33
.config/tmux/statusline.conf
Normal file
33
.config/tmux/statusline.conf
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
# these configurations are from https://github.com/craftzdog/dotfiles-public/blob/master/.config/tmux/statusline.conf
|
||||||
|
|
||||||
|
# vim: ft=tmux
|
||||||
|
set -g mode-style "fg=#eee8d5,bg=#073642"
|
||||||
|
|
||||||
|
set -g message-style "fg=#eee8d5,bg=#073642"
|
||||||
|
set -g message-command-style "fg=#eee8d5,bg=#073642"
|
||||||
|
|
||||||
|
set -g pane-border-style "fg=#073642"
|
||||||
|
set -g pane-active-border-style "fg=#eee8d5"
|
||||||
|
|
||||||
|
set -g status "on"
|
||||||
|
set -g status-interval 1
|
||||||
|
set -g status-justify "left"
|
||||||
|
|
||||||
|
set -g status-style "fg=#586e75,bg=#073642"
|
||||||
|
|
||||||
|
set -g status-bg "#002b36"
|
||||||
|
|
||||||
|
set -g status-left-length "100"
|
||||||
|
set -g status-right-length "100"
|
||||||
|
|
||||||
|
set -g status-left-style NONE
|
||||||
|
set -g status-right-style NONE
|
||||||
|
|
||||||
|
set -g status-left "#[fg=#073642,bg=#eee8d5,bold] #S #[fg=#eee8d5,bg=#93a1a1,nobold,nounderscore,noitalics]#[fg=#15161E,bg=#93a1a1,bold] #(whoami) #[fg=#93a1a1,bg=#002b36]"
|
||||||
|
set -g status-right "#[fg=#586e75,bg=#002b36,nobold,nounderscore,noitalics]#[fg=#93a1a1,bg=#586e75]#[fg=#657b83,bg=#586e75,nobold,nounderscore,noitalics]#[fg=#93a1a1,bg=#657b83]#[fg=#93a1a1,bg=#657b83,nobold,nounderscore,noitalics]#[fg=#15161E,bg=#93a1a1,bold] #h "
|
||||||
|
|
||||||
|
setw -g window-status-activity-style "underscore,fg=#839496,bg=#002b36"
|
||||||
|
setw -g window-status-separator ""
|
||||||
|
setw -g window-status-style "NONE,fg=#839496,bg=#002b36"
|
||||||
|
setw -g window-status-format '#[fg=#002b36,bg=#002b36]#[default] #I #{b:pane_current_path} #[fg=#002b36,bg=#002b36,nobold,nounderscore,noitalics]'
|
||||||
|
setw -g window-status-current-format '#[fg=#002b36,bg=#eee8d5]#[fg=#b58900,bg=#eee8d5] #I #[fg=#eee8d5,bg=#b58900] #{b:pane_current_path} #[fg=#b58900,bg=#002b36,nobold]'
|
||||||
96
.config/tmux/tmux.conf
Normal file
96
.config/tmux/tmux.conf
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
set -g default-terminal "xterm-256color"
|
||||||
|
set -ga terminal-overrides ",xterm-256color:Tc"
|
||||||
|
|
||||||
|
# prefix
|
||||||
|
unbind C-b
|
||||||
|
set-option -g prefix C-t
|
||||||
|
set-option -g repeat-time 0
|
||||||
|
set-option -g focus-events on
|
||||||
|
|
||||||
|
# remove auto window rename
|
||||||
|
set-option -g allow-rename off
|
||||||
|
|
||||||
|
## Key bindings
|
||||||
|
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
|
||||||
|
# reload tmux config file
|
||||||
|
bind r source-file ~/.tmux.conf \; display "Reloaded!"
|
||||||
|
|
||||||
|
# open cwd (only for macOS)
|
||||||
|
bind o run-shell "open #{pane_current_path}"
|
||||||
|
|
||||||
|
# remove all window splits
|
||||||
|
bind -r e kill-pane -a
|
||||||
|
|
||||||
|
# split window
|
||||||
|
bind s split-window -h -c "#{pane_current_path}"
|
||||||
|
bind v split-window -v -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# unbind default split mappings
|
||||||
|
unbind '"'
|
||||||
|
unbind %
|
||||||
|
|
||||||
|
# move around panes
|
||||||
|
bind -r h select-pane -L
|
||||||
|
bind -r j select-pane -D
|
||||||
|
bind -r k select-pane -U
|
||||||
|
bind -r l select-pane -R
|
||||||
|
|
||||||
|
# resize panes
|
||||||
|
bind -r + resize-pane -U 5
|
||||||
|
bind -r - resize-pane -D 5
|
||||||
|
bind -r < resize-pane -L 5
|
||||||
|
bind -r > resize-pane -R 5
|
||||||
|
|
||||||
|
# toggle back and forth between panes
|
||||||
|
bind -r . select-pane -t !
|
||||||
|
|
||||||
|
## basic settings
|
||||||
|
set-option -g status-justify "left"
|
||||||
|
|
||||||
|
set-option -g status-fg cyan
|
||||||
|
set-option -g status-bg black
|
||||||
|
set -g pane-active-border-style fg=colour166,bg=default
|
||||||
|
set -g window-style fg=colour10,bg=default
|
||||||
|
set -g window-active-style fg=colour12,bg=default
|
||||||
|
set-option -g history-limit 64096
|
||||||
|
|
||||||
|
set -sg escape-time 10
|
||||||
|
|
||||||
|
## Colours
|
||||||
|
|
||||||
|
# default statusbar colours
|
||||||
|
set-option -g status-style bg=colour235,fg=colour136,default
|
||||||
|
|
||||||
|
# default window title colours
|
||||||
|
set-window-option -g window-status-style fg=colour244,bg=colour234,dim
|
||||||
|
|
||||||
|
# active window title colours
|
||||||
|
set-window-option -g window-status-current-style fg=colour166,bg=default,bright
|
||||||
|
|
||||||
|
# pane border
|
||||||
|
set-option -g pane-border-style fg=colour235 # base02 - solarized dark
|
||||||
|
set-option -g pane-active-border-style fg=colour136,bg=colour235
|
||||||
|
|
||||||
|
# message text
|
||||||
|
set-option -g message-style bg=colour235,fg=colour166
|
||||||
|
|
||||||
|
# pane number display
|
||||||
|
set-option -g display-panes-active-colour colour33 # blue
|
||||||
|
set-option -g display-panes-colour colour166 # orange
|
||||||
|
|
||||||
|
# clock
|
||||||
|
set-window-option -g clock-mode-colour colour64 # gree
|
||||||
|
|
||||||
|
# allow the title bar to adapt to whatever host you connect to
|
||||||
|
set -g set-titles on
|
||||||
|
set -g set-titles-string "#T"
|
||||||
|
|
||||||
|
|
||||||
|
## Imports
|
||||||
|
|
||||||
|
source ~/.config/tmux/statusline.conf
|
||||||
|
source ~/.config/tmux/plugin.conf
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue