aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbar.sh22
-rw-r--r--config4
-rwxr-xr-xdwmbar2
3 files changed, 13 insertions, 15 deletions
diff --git a/bar.sh b/bar.sh
index 0614c09..187b3c3 100755
--- a/bar.sh
+++ b/bar.sh
@@ -32,7 +32,7 @@ get_bar()
fi
done
# Uncomment to remove last separator
- # bar=$(echo $bar | sed 's/.$//g')
+ bar=$(echo $bar | sed 's/.$//g')
echo "$LEFT_PADDING$bar$RIGHT_PADDING"
}
@@ -51,17 +51,15 @@ run_module()
run()
{
- # for module in $MODULES; do
- # pgrep $module &> /dev/null
- # notrunning=$([[ $? -eq 1 ]])
- # if $notrunning && [[ $INTERNET -eq 0 ]]; then
- # run_module $module
- # elif $notrunning && [[ $INTERNET -eq 1 ]]; then
- # [[ "$ONLINE_MODULES" != *"$module"* ]] && run_module $module
- # fi
- # done
-
- parallel $MODULES_DIR{} ::: $MODULES
+ for module in $MODULES; do
+ pgrep $module &> /dev/null
+ notrunning=$([[ $? -eq 1 ]])
+ if $notrunning && [[ $INTERNET -eq 0 ]]; then
+ run_module $module
+ elif $notrunning && [[ $INTERNET -eq 1 ]]; then
+ [[ "$ONLINE_MODULES" != *"$module"* ]] && run_module $module
+ fi
+ done
get_bar
sleep $DELAY;
diff --git a/config b/config
index c53aaeb..98bad4e 100644
--- a/config
+++ b/config
@@ -16,5 +16,5 @@ CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/"
SEPARATOR=" | "
# Padding at the end and beggining of the status bar
-RIGHT_PADDING="$USER@$HOSTNAME "
-LEFT_PADDING=" "
+RIGHT_PADDING=""
+LEFT_PADDING=""
diff --git a/dwmbar b/dwmbar
index dcb65e0..4617cf3 100755
--- a/dwmbar
+++ b/dwmbar
@@ -25,7 +25,7 @@ CUSTOM_DIR="$CONFIG_DIR/custom"
CONFIG_FILE="$CONFIG_DIR/config"
CACHE_DIR="$CONFIG_DIR/.cache"
-INTERNET=0
+INTERNET=1
export INTERNET
print_help(){