From a315976841d0eb4f5214290f88bc45b3ef64647c Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Wed, 16 Jun 2021 09:59:25 -0500 Subject: [PATCH] Add tmux configurations --- bombadil.toml | 4 ++++ nvim/plugins | 1 + tmux.conf | 50 +++++++++++++++++++++++++++++++++++++++++++++++ tmux/sonokai.conf | 21 ++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 tmux.conf create mode 100644 tmux/sonokai.conf diff --git a/bombadil.toml b/bombadil.toml index 1a6685f..531ece9 100644 --- a/bombadil.toml +++ b/bombadil.toml @@ -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" } diff --git a/nvim/plugins b/nvim/plugins index 9522cbf..747557e 100644 --- a/nvim/plugins +++ b/nvim/plugins @@ -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' diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..2095b51 --- /dev/null +++ b/tmux.conf @@ -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 diff --git a/tmux/sonokai.conf b/tmux/sonokai.conf new file mode 100644 index 0000000..305b549 --- /dev/null +++ b/tmux/sonokai.conf @@ -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]"