commit dcedac3d5413a9a6e2224659ded9ba5aa4b93640 Author: murgi Date: Wed Apr 12 10:07:35 2017 +0200 Squashed 'tmux/' content from commit 57c4310 git-subtree-dir: tmux git-subtree-split: 57c4310073200ad55041dfb59e32452b81b2188e diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..13ff5b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.tmux_config_* +!.tmux_config_*.example +plugins/ +!plugins/tpm +*.log diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2f7c75e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "plugins/tpm"] + path = plugins/tpm + url = https://github.com/tmux-plugins/tpm.git diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..ff4ff46 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,75 @@ +set -g default-terminal "screen-256color" + +set -g history-limit 999999999 + +# Remap prefix +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix +bind-key -n C-b send-prefix + +setw -g mode-keys vi +set-option -g status-keys vi + +bind-key -n C-E split-window -h +bind-key -n C-O split-window -v +bind | split-window -h -c '#{pane_current_path}' +bind - split-window -v -c '#{pane_current_path}' + +# Switch windows +bind-key -n M-Left select-window -t -1 +bind-key -n M-Right select-window -t +1 + +unbind '"' +unbind '%' +#bind-key -n M-left select-pane -L +#bind-key -n M-right select-pane -R +#bind-key -n M-up select-pane -U +#bind-key -n M-down select-pane -D +bind-key -n C-x resize-pane -Z + +bind k clear-history + +bind-key a set-window-option synchronize-panes + +bind r source-file ~/.tmux.conf\; display "Conf reloaded!" + +set -g mouse on + +# Vi copypaste mode +set-window-option -g mode-keys vi +bind-key -t vi-copy 'v' begin-selection +bind-key -t vi-copy 'y' copy-selection +bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard' + +# Smart pane switching with awareness of vim splits +# See: https://github.com/christoomey/vim-tmux-navigator +is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"' +bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" +bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" +bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" +bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" + +# Copying +# move x clipboard into tmux paste buffer +bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer" +# move tmux copy buffer into x clipboard +bind C-y run "tmux save-buffer - | xclip -i" + +source-file ~/.tmux/.tmux_config_powerline + +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-sidebar' +set -g @plugin 'tmux-plugins/tmux-open' +set -g @plugin 'tmux-plugins/tmux-yank' +# set -g @open-editor 'C-b' + +# Other examples: +# set -g @plugin 'github_username/plugin_name' +# set -g @plugin 'git@github.com/user/plugin' +# set -g @plugin 'git@bitbucket.com/user/plugin' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.tmux/plugins/tpm/tpm' diff --git a/.tmux_config_powerline_arch.example b/.tmux_config_powerline_arch.example new file mode 100644 index 0000000..121cb1a --- /dev/null +++ b/.tmux_config_powerline_arch.example @@ -0,0 +1 @@ +source /usr/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf diff --git a/.tmux_config_powerline_debian.example b/.tmux_config_powerline_debian.example new file mode 100644 index 0000000..da2f6a4 --- /dev/null +++ b/.tmux_config_powerline_debian.example @@ -0,0 +1 @@ +source /usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf diff --git a/plugins/tpm b/plugins/tpm new file mode 160000 index 0000000..51ff07a --- /dev/null +++ b/plugins/tpm @@ -0,0 +1 @@ +Subproject commit 51ff07a729b4b67f692936ad75cb0650149afbb4