dwmbar/dwmbarrc
Archie Hilton (thytom) 63399b3319 Added custom modules directory.
Scripts in here override the system ones, and won't get written over
during updates.
2019-10-21 22:57:45 +01:00

29 lines
511 B
Bash
Executable file

#!/bin/bash
# Example file, designed to be edited.
DELAY=5
MODULES_DIR="modules/"
CUSTOM_DIR="modules/custom/"
SEPARATOR=" | "
MODULES="wifi internet bluetooth volume temperature date time battery"
run_modules(){
for module in $MODULES; do
[[ ! "$OUTPUT" = "" ]] && OUTPUT="$OUTPUT$SEPARATOR"
if [[ -f "$CUSTOM_DIR$module" ]]; then
OUTPUT="$OUTPUT$(exec $CUSTOM_DIR$module)"
elif
OUTPUT="$OUTPUT$(exec $MODULES_DIR$module)"
fi
done
}
run(){
run_modules
echo $OUTPUT
sleep $DELAY;
}
run