Add tmux plugin manager and plugins
This commit is contained in:
@@ -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"]:
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user