Internet is off on startup. Cleaned up bar.sh and config

This commit is contained in:
Archie Hilton (thytom) 2019-11-04 09:21:40 +00:00
parent 15dc3c709f
commit 71da49fab7
3 changed files with 13 additions and 15 deletions

22
bar.sh
View file

@ -32,7 +32,7 @@ get_bar()
fi fi
done done
# Uncomment to remove last separator # Uncomment to remove last separator
# bar=$(echo $bar | sed 's/.$//g') bar=$(echo $bar | sed 's/.$//g')
echo "$LEFT_PADDING$bar$RIGHT_PADDING" echo "$LEFT_PADDING$bar$RIGHT_PADDING"
} }
@ -51,17 +51,15 @@ run_module()
run() run()
{ {
# for module in $MODULES; do for module in $MODULES; do
# pgrep $module &> /dev/null pgrep $module &> /dev/null
# notrunning=$([[ $? -eq 1 ]]) notrunning=$([[ $? -eq 1 ]])
# if $notrunning && [[ $INTERNET -eq 0 ]]; then if $notrunning && [[ $INTERNET -eq 0 ]]; then
# run_module $module run_module $module
# elif $notrunning && [[ $INTERNET -eq 1 ]]; then elif $notrunning && [[ $INTERNET -eq 1 ]]; then
# [[ "$ONLINE_MODULES" != *"$module"* ]] && run_module $module [[ "$ONLINE_MODULES" != *"$module"* ]] && run_module $module
# fi fi
# done done
parallel $MODULES_DIR{} ::: $MODULES
get_bar get_bar
sleep $DELAY; sleep $DELAY;

4
config
View file

@ -16,5 +16,5 @@ CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/"
SEPARATOR=" | " SEPARATOR=" | "
# Padding at the end and beggining of the status bar # Padding at the end and beggining of the status bar
RIGHT_PADDING="$USER@$HOSTNAME " RIGHT_PADDING=""
LEFT_PADDING=" " LEFT_PADDING=""

2
dwmbar
View file

@ -25,7 +25,7 @@ CUSTOM_DIR="$CONFIG_DIR/custom"
CONFIG_FILE="$CONFIG_DIR/config" CONFIG_FILE="$CONFIG_DIR/config"
CACHE_DIR="$CONFIG_DIR/.cache" CACHE_DIR="$CONFIG_DIR/.cache"
INTERNET=0 INTERNET=1
export INTERNET export INTERNET
print_help(){ print_help(){