From 413fbf970a16d963145845c7ced0d59b4222d356 Mon Sep 17 00:00:00 2001 From: aminnairi <18418459+aminnairi@users.noreply.github.com> Date: Mon, 10 Apr 2023 18:40:31 +0200 Subject: [PATCH] initializing tpm & omf on tmux startup --- fish/functions/tmux.fish | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 fish/functions/tmux.fish diff --git a/fish/functions/tmux.fish b/fish/functions/tmux.fish new file mode 100644 index 0000000..9a20c70 --- /dev/null +++ b/fish/functions/tmux.fish @@ -0,0 +1,26 @@ +function tmux + if type -q omf + # Update Oh My Fish if it installed + omf update + end + + if test ! -d ~/.tmux/plugins/tpm + # Install TPM if it is not already installed + git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm + + # Install TPM plugins + ~/.tmux/plugins/tpm/bin/install_plugins + else + # Install plugins that are not already installed + ~/.tmux/plugins/tpm/bin/install_plugins + + # Update plugins that needs update + ~/.tmux/plugins/tpm/bin/update_plugins all + + # Clean plugins that are not used anymore + ~/.tmux/plugins/tpm/bin/update_plugins all + end + + # Execute TMUX + /usr/bin/tmux +end