From e5df0b93cc9145091b5b9b73573e578d6793511c Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Tue, 16 Apr 2024 15:05:15 -0400 Subject: [PATCH] better updater --- nix/home-manager/modules/packages/neovim.nix | 1 + nix/update.sh | 13 +++++++++++-- zsh/funcs/updater | 3 --- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/nix/home-manager/modules/packages/neovim.nix b/nix/home-manager/modules/packages/neovim.nix index 407c9e0..0ddfb20 100644 --- a/nix/home-manager/modules/packages/neovim.nix +++ b/nix/home-manager/modules/packages/neovim.nix @@ -84,6 +84,7 @@ }; splitjoin.enable = true; surround.enable = true; + tabline.enable = true; }; nvim-cmp = { enable = true; diff --git a/nix/update.sh b/nix/update.sh index b9d3183..2232369 100755 --- a/nix/update.sh +++ b/nix/update.sh @@ -1,10 +1,16 @@ #!/bin/bash + do_devenv() { pushd ~/.dotfiles || return printf "Updating \033[38;5;87mdevenv\033[0m \n" nix flake update popd || return } + +do_topgrade() { + topgrade +} + update_home_manager() { pushd ./home-manager || return printf "Updating \033[38;5;87mhome-manager\033[0m\n" @@ -21,7 +27,7 @@ apply_home_manager() { popd || return } -while getopts ':dha' opt; do +while getopts ':dhat' opt; do case $opt in a) apply_home_manager @@ -33,8 +39,11 @@ while getopts ':dha' opt; do update_home_manager apply_home_manager ;; + t) + do_topgrade + ;; ?) - echo "Ignoring unknown option. Please only pass -a, -d, or -h" + echo "Ignoring unknown option. Please only pass -a, -d, -h, or -t" exit ;; esac diff --git a/zsh/funcs/updater b/zsh/funcs/updater index 9c98117..cf83ce3 100644 --- a/zsh/funcs/updater +++ b/zsh/funcs/updater @@ -1,8 +1,5 @@ function update_me { pushd ~ - if [[ ! ( "$@" =~ -n ) ]]; then - topgrade - fi pushd ~/.dotfiles/nix ./update.sh $@ popd