Add tmux plugin manager and plugins

This commit is contained in:
2017-11-01 12:11:35 +01:00
parent ee8364d7f3
commit 2ebc02fdc7
2 changed files with 26 additions and 0 deletions

View File

@@ -78,6 +78,20 @@ def install_tmux(pdotfiles, force=False):
print("Symlinking {} to {}".format(phome_tmuxrc, pdotfiles_tmuxrc))
phome_tmuxrc.symlink_to(pdotfiles_tmuxrc)
# tpm
tpm = phome / Path(".tmux/plugins/tpm")
if not force and tpm.exists():
print("tpm already installed?")
else:
if force and tpm.exists():
shutil.rmtree(tpm.as_posix())
print("Install tpm")
check_call(
["git", "clone", "https://github.com/tmux-plugins/tpm",
tpm.as_posix()])
check_call((tpm / Path("bin") / Path("install_plugins")).as_posix())
if __name__ == "__main__":
args = docopt(HELPTEXT, version='0.1')
if args["install"]:

View File

@@ -34,3 +34,15 @@ bind -n S-F11 previous-window
bind -n S-F12 next-window
bind -n S-F9 swap-window -t -1
bind -n S-F8 swap-window -t +1
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# 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'