Add tmux plugin manager auto setup
This commit is contained in:
parent
410c1177e0
commit
8c5bf02181
3 changed files with 21 additions and 10 deletions
12
.tmux.conf
12
.tmux.conf
|
@ -13,9 +13,9 @@ set -g base-index 1
|
|||
setw -g pane-base-index 1
|
||||
|
||||
# Custom modifier key
|
||||
set -g prefix C-Space
|
||||
set -g prefix C-a
|
||||
unbind-key C-b
|
||||
bind-key C-Space send-prefix
|
||||
bind-key C-a send-prefix
|
||||
|
||||
# Terminal improvements
|
||||
set -g terminal-overrides "xterm*:XT:smcup@:rmcup@"
|
||||
|
@ -35,8 +35,8 @@ bind l clear-history
|
|||
|
||||
# Custom key bindings to split the window
|
||||
# split it using modifier key + v or s
|
||||
bind-key v split-window -h
|
||||
bind-key s split-window -v
|
||||
bind-key h split-window -h
|
||||
bind-key v split-window -v
|
||||
# split it w/o modifier key using - or _
|
||||
bind - split-window -v
|
||||
bind _ split-window -h
|
||||
|
@ -99,4 +99,6 @@ bind-key x kill-pane
|
|||
bind-key C-x kill-window
|
||||
|
||||
# Plugins
|
||||
#run-shell ~/.tmux-plugins/resurrect/resurrect.tmux
|
||||
#run-shell ~/.tmux-plugins/resurrect/resurrect.tmux
|
||||
set -g @plugin 'jimeh/tmux-themepack'
|
||||
set -g @themepack 'powerline/default/blue'
|
||||
|
|
6
.zgenrc
6
.zgenrc
|
@ -49,11 +49,6 @@ load-starter-plugin-list() {
|
|||
# things, anyway.
|
||||
zgen load unixorn/warhol.plugin.zsh
|
||||
|
||||
# macOS helpers. This plugin is smart enough to detect when it isn't running
|
||||
# on macOS and not load itself, so you can safely share the same plugin list
|
||||
# across macOS and Linux/BSD.
|
||||
#zgen load unixorn/tumult.plugin.zsh
|
||||
|
||||
# Warn you when you run a command that you've set an alias for without
|
||||
# using the alias.
|
||||
zgen load djui/alias-tips
|
||||
|
@ -88,6 +83,7 @@ load-starter-plugin-list() {
|
|||
zgen oh-my-zsh plugins/vagrant
|
||||
zgen oh-my-zsh plugins/autojump
|
||||
zgen oh-my-zsh plugins/tmux
|
||||
zgen oh-my-zsh plugins/tmuxinator
|
||||
|
||||
if [ $(uname -a | grep -ci Darwin) = 1 ]; then
|
||||
# Load macOS-specific plugins
|
||||
|
|
13
.zshrc.d/007-tmux-plugins-setup
Normal file
13
.zshrc.d/007-tmux-plugins-setup
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Clone tmux plugin manager if not existing
|
||||
if [[ -z "$TPM_PARENT_DIR" ]]; then
|
||||
TPM_PARENT_DIR=$HOME
|
||||
fi
|
||||
if [[ ! -f $TPM_PARENT_DIR/.tmux/plugins/tpm/tpm ]]; then
|
||||
if [[ ! -d "$TPM_PARENT_DIR" ]]; then
|
||||
mkdir -p "$TPM_PARENT_DIR"
|
||||
fi
|
||||
pushd $TPM_PARENT_DIR
|
||||
git clone https://github.com/tmux-plugins/tpm ./.tmux/plugins/tpm
|
||||
popd
|
||||
fi
|
||||
unset TPM_PARENT_DIR
|
Loading…
Reference in a new issue