Add tmux configurations

This commit is contained in:
Daniel Lynn 2021-06-16 09:59:25 -05:00
parent 587a6aefd8
commit a315976841
4 changed files with 76 additions and 0 deletions

View File

@ -27,3 +27,7 @@ zshrc = { source = "zsh/zshrc", target = ".zshrc" }
# vim
nvim = { source = "nvim", target = ".config/nvim" }
vimrc = { source = "vim/vimrc", target = ".vimrc" }
# tmux
tmux = { source = "tmux", target = ".config/tmux" }
tmux_conf = { source = "tmux.conf", target = ".tmux.conf" }

View File

@ -5,6 +5,7 @@ Plug 'neoclide/coc-git'
Plug 'cespare/vim-toml'
Plug 'itchyny/lightline.vim'
Plug 'itchyny/vim-gitbranch'
Plug 'edkolev/tmuxline.vim'
" sonokai colorscheme + supporting plugins
Plug 'sainnhe/artify.vim'

50
tmux.conf Normal file
View File

@ -0,0 +1,50 @@
# Powerline
run-shell "/usr/bin/powerline-daemon -q"
source "/usr/share/powerline/bindings/tmux/powerline.conf"
source "/home/daniel/.config/tmux/sonokai.conf"
# Mouse
set-option -g mouse on
bind-key -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
# Vim-like copy/paste mode
setw -g mode-keys vi
bind-key [ copy-mode
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
bind-key -Tcopy-mode-vi Escape send -X cancel
bind-key -Tcopy-mode-vi V send -X rectangle-toggle
bind-key ] paste-buffer
# Integrate with the system clipboard
bind-key -n C-S-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind-key -n C-S-v run "xclip -o -sel clipboard | tmux load-buffer -; tmux paste-buffer"
# Integrate with the system selection clipboard
unbind -n -Tcopy-mode-vi MouseDragEnd1Pane
bind-key -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i > /dev/null"
unbind-key MouseDown2Pane
bind-key -n MouseDown2Pane run "xclip -o | tmux load-buffer -; tmux paste-buffer"
# Set the current working directory based on the current pane's current
# working directory (if set; if not, use the pane's starting directory)
# when creating # new windows and splits.
bind-key c new-window -c '#{pane_current_path}'
bind-key , rename-window '#{b:pane_current_path}'
bind-key '"' split-window -c '#{pane_current_path}'
bind-key % split-window -h -c '#{pane_current_path}'
bind-key | split-window -h -c '#{pane_current_path}' -p 33
bind-key _ split-window -v -c '#{pane_current_path}' -p 25
# Broadcast input
bind-key C-x setw synchronize-panes
# Colors
set -g pane-active-border-style fg='colour162'
# Better font term
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# Neovim said to...
set-option -sg escape-time 10

21
tmux/sonokai.conf Normal file
View File

@ -0,0 +1,21 @@
# This tmux statusbar config was created by tmuxline.vim
# on Wed, 16 Jun 2021
set -g status-justify "left"
set -g status "on"
set -g status-left-style "none"
set -g message-command-style "fg=colour250,bg=colour237"
set -g status-right-style "none"
set -g pane-active-border-style "fg=colour110"
set -g status-style "none,bg=colour236"
set -g message-style "fg=colour250,bg=colour237"
set -g pane-border-style "fg=colour237"
set -g status-right-length "100"
set -g status-left-length "100"
setw -g window-status-activity-style "none"
setw -g window-status-separator ""
setw -g window-status-style "none,fg=colour250,bg=colour236"
set -g status-left "#[fg=colour235,bg=colour110,bold] #S #[fg=colour110,bg=colour236,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=colour237,bg=colour236,nobold,nounderscore,noitalics]#[fg=colour250,bg=colour237] %Y-%m-%d  %H:%M #[fg=colour110,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour235,bg=colour110,bold] #h "
setw -g window-status-format "#[fg=colour250,bg=colour236] #I #[fg=colour250,bg=colour236] #W "
setw -g window-status-current-format "#[fg=colour236,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour250,bg=colour237] #I #[fg=colour250,bg=colour237] #W #[fg=colour237,bg=colour236,nobold,nounderscore,noitalics]"