From b4fb27fd60a64c608319c97826ec2f09f5c26732 Mon Sep 17 00:00:00 2001 From: "Archie Hilton (thytom)" Date: Thu, 24 Oct 2019 16:50:31 +0100 Subject: Just use the source command, and added left padding. --- bar.sh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'bar.sh') diff --git a/bar.sh b/bar.sh index c56cfa1..44c4ec0 100755 --- a/bar.sh +++ b/bar.sh @@ -15,23 +15,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . + CONFIG_FILE="/home/$USER/.config/dwmbar/config" -DELAY=$(cat $CONFIG_FILE | grep -E "DELAY" | cut -d '"' -f2) -MODULES_DIR="/home/$USER/.config/dwmbar/modules/" -CUSTOM_DIR=$(cat $CONFIG_FILE | grep -E "CUSTOM_DIR" | cut -d '"' -f2) -SEPARATOR=$(cat $CONFIG_FILE | grep -E "SEPARATOR" | cut -d '"' -f2) -PADDING=$(cat $CONFIG_FILE | grep -E "PADDING" | cut -d '"' -f2) +source $CONFIG_FILE OUTPUT_CACHE="/home/$USER/.config/dwmbar/.cache/" OUTPUT="" -# What modules, in what order -MODULES=$(cat $CONFIG_FILE | grep -E "MODULES" | cut -d '"' -f2) - -# Modules that require an active internet connection -ONLINE_MODULES=$(cat $CONFIG_FILE | grep -E "ONLINE_MODULES" | cut -d '"' -f2) - INTERNET=1 #0 being true get_internet() @@ -55,7 +46,7 @@ get_bar() done # Uncomment to remove last separator # bar=$(echo $bar | sed 's/.$//g') - echo "$bar$PADDING" + echo "$LEFT_PADDING$bar$RIGHT_PADDING" } run_module() -- cgit v1.2.3