From 6f0196f81fd3455532dd87fd31108ec85b85b69e Mon Sep 17 00:00:00 2001 From: "Archie Hilton (thytom)" Date: Mon, 21 Oct 2019 19:44:10 +0100 Subject: [PATCH] Many changes to dwmbarrc location. Also changed the path to the working directory for the time being. --- dwmbar | 2 +- dwmbarrc | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dwmbar b/dwmbar index 937ca55..195bd31 100755 --- a/dwmbar +++ b/dwmbar @@ -1,7 +1,7 @@ #!/bin/bash VERSION="0.0.1" -RC_LOCATION="/home/$USER/.config/dwmbar/dwmbarrc" +RC_LOCATION="./dwmbarrc" if [[ -f $DEFAULT_RC_LOCATION ]]; then >&2 echo "No dwmbarrc found." diff --git a/dwmbarrc b/dwmbarrc index 1601db7..dbedf22 100755 --- a/dwmbarrc +++ b/dwmbarrc @@ -1,10 +1,22 @@ #!/bin/bash -modules(){ +MODULES_DIR="modules/" + +SEPARATOR=" | " + +MODULES="test archupdates weather date time" + +run_modules(){ + for module in $MODULES; do + [[ ! "$OUTPUT" = "" ]] && OUTPUT="$OUTPUT$SEPARATOR" + + OUTPUT="$OUTPUT$(exec $MODULES_DIR$module)" + done } run(){ - echo "Test" + run_modules + echo $OUTPUT } run