diff options
author | xengineering <me@xengineering.eu> | 2024-06-27 18:43:43 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-06-27 18:43:43 +0200 |
commit | f1bb75196c361c09152dce84e310a3ea967cdd1f (patch) | |
tree | 5b2fa85efe9df1c331d73c49455c44b2d715dd72 | |
parent | e618c76fca1da9a72d1a605f647f02d39ab17dcd (diff) | |
download | dotfiles-f1bb75196c361c09152dce84e310a3ea967cdd1f.tar dotfiles-f1bb75196c361c09152dce84e310a3ea967cdd1f.tar.zst dotfiles-f1bb75196c361c09152dce84e310a3ea967cdd1f.zip |
bash: Move parts to posix-shell/programs.sh
-rw-r--r-- | .bashrc | 35 | ||||
-rw-r--r-- | posix-shell/programs.sh | 38 |
2 files changed, 40 insertions, 33 deletions
@@ -8,27 +8,6 @@ # variables export GOPATH=$HOME/go export EDITOR=nvim -PROGRAMS=' -aerc -bemenu-run -brightnessctl -dunst -foot -gammastep -grim -htop -khard -lf -mpv -nvim -pactl -rifle -slurp -swappy -sway -swaylock -vdirsyncer -' # shellcheck source=posix-shell/aliases.sh . "${HOME}/.config/posix-shell/aliases.sh" @@ -39,18 +18,8 @@ vdirsyncer PATH=~/.local/bin:$PATH -# check for missing programs -echo "$PROGRAMS" | while read -r program -do - if [ "$program" == '' ] - then - continue - fi - if ! command -v "$program" > /dev/null 2>&1 - then - echo "Program is missing: '$program'" - fi -done +# shellcheck source=posix-shell/programs.sh +. "${HOME}/.config/posix-shell/programs.sh" parse_git_branch() { diff --git a/posix-shell/programs.sh b/posix-shell/programs.sh new file mode 100644 index 0000000..06af8e9 --- /dev/null +++ b/posix-shell/programs.sh @@ -0,0 +1,38 @@ +#!/bin/sh + + +PROGRAMS=' +aerc +bemenu-run +brightnessctl +dunst +foot +gammastep +grim +htop +khard +lf +mpv +nvim +pactl +rifle +slurp +swappy +sway +swaylock +vdirsyncer +' + + +# check for missing programs +echo "$PROGRAMS" | while read -r program +do + if [ "$program" = '' ] + then + continue + fi + if ! command -v "$program" > /dev/null 2>&1 + then + echo "Program is missing: '$program'" + fi +done |