summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-06-24 19:53:57 +0200
committerxengineering <me@xengineering.eu>2024-06-24 19:53:57 +0200
commite8f1e4eae9725085929d19cba4d36dda809c8a89 (patch)
treed253bf8775659f8cfda354e5847a5c2123a68ea7
parent787e177debd365c89ec195e61e2eda932df8e08a (diff)
downloaddotfiles-e8f1e4eae9725085929d19cba4d36dda809c8a89.tar
dotfiles-e8f1e4eae9725085929d19cba4d36dda809c8a89.tar.zst
dotfiles-e8f1e4eae9725085929d19cba4d36dda809c8a89.zip
bash: Check for required programs
This commit adds code to the .bashrc file which checks for required programs on startup of bash. Thus it is easier to detect for the user if essential programs are missing. This will make it significantly easier to setup new machines.
-rw-r--r--.bashrc34
1 files changed, 34 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index 0c48c49..3e1966c 100644
--- a/.bashrc
+++ b/.bashrc
@@ -8,7 +8,41 @@
# variables
GOPATH=$HOME/go
export EDITOR=nvim
+PROGRAMS='
+aerc
+bemenu-run
+brightnessctl
+dunst
+foot
+gammastep
+grim
+htop
+khard
+lf
+mpv
+nvim
+pactl
+rifle
+slurp
+swappy
+swappy
+sway
+swaylock
+vdirsyncer
+'
+# check for missing programs
+echo "$PROGRAMS" | while read -r program
+do
+ if [ "$program" == '' ]
+ then
+ continue
+ fi
+ if ! command -v "$program" 2>&1 > /dev/null
+ then
+ echo "Program is missing: '$program'"
+ fi
+done
# alias definitions
alias ls='ls --color=auto'