From cacd49a569f3185894b53e2c4ad77b812f0dd6f1 Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Sun, 10 Mar 2024 16:06:38 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20build:=20up=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/fish/functions/tmux_up.fish | 7 +++++++ .config/fish/functions/up.fish | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .config/fish/functions/tmux_up.fish create mode 100644 .config/fish/functions/up.fish diff --git a/.config/fish/functions/tmux_up.fish b/.config/fish/functions/tmux_up.fish new file mode 100644 index 0000000..f0c4a13 --- /dev/null +++ b/.config/fish/functions/tmux_up.fish @@ -0,0 +1,7 @@ +#!/usr/bin/env fish + +function tmux_up --description "Update tmux plugins" + ~/.config/tmux/plugins/tpm/bin/install_plugins + ~/.config/tmux/plugins/tpm/bin/clean_plugins + ~/.config/tmux/plugins/tpm/bin/update_plugins all +end diff --git a/.config/fish/functions/up.fish b/.config/fish/functions/up.fish new file mode 100644 index 0000000..9e83a5b --- /dev/null +++ b/.config/fish/functions/up.fish @@ -0,0 +1,28 @@ +function up --description "Update everything except pacman/yay" + cd $HOME || exit 1 + + if type -q brew + set_color magenta && echo Homebrew && set_color normal + brew update && brew upgrade + end + + if type -q npm + set_color magenta && echo npm && set_color normal + npm up -g + end + + if type -q tmux + set_color magenta && echo tmux && set_color normal + tmux_up + end + + if type -q fish_update_completions + set_color magenta && echo "fish completions" && set_color normal + fish_update_completions + end + + if type -q fisher + set_color magenta && echo fisher && set_color normal + fisher update + end +end