Merge pull request #7 from thytom/internet_fix

Fix for internet module.
This commit is contained in:
Archie Hilton 2019-10-26 16:28:07 +01:00 committed by GitHub
commit f39d667cb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

10
bar.sh
View file

@ -53,12 +53,12 @@ run_module()
{ {
if [[ -f "$CUSTOM_DIR$1" ]] if [[ -f "$CUSTOM_DIR$1" ]]
then then
out="$(exec $CUSTOM_DIR$1)" out="$($CUSTOM_DIR$1)"
else else
out="$(exec $MODULES_DIR$1)" out="$($MODULES_DIR$1)"
fi fi
[[ ! "$out" = "" ]] && [[ ! "$module" = "NULL" ]] && out="$out$SEPARATOR." [[ ! "$out" = "" ]] && out="$out$SEPARATOR."
echo "$out" > "$OUTPUT_CACHE$module" echo "$out" > "$OUTPUT_CACHE$module"
} }
@ -67,10 +67,10 @@ run()
get_internet get_internet
for module in $MODULES; do for module in $MODULES; do
pgrep $module &> /dev/null pgrep $module &> /dev/null
if [[ $INTERNET -eq 0 ]] && [[ $? -eq 1 ]]; then if [[ $? -eq 1 ]] && [[ $INTERNET -eq 0 ]]; then
run_module $module & run_module $module &
else else
[[ $ONLINE_MODULES != *"$module"* ]] && run_module $module [[ "$ONLINE_MODULES" != *"$module"* ]] && run_module $module
fi fi
done done
get_bar get_bar

Binary file not shown.

View file

@ -2,7 +2,7 @@
int main() int main()
{ {
char *internet_icon = ""; char *internet_icon = " ";
printf("%s\n", internet_icon); printf("%s\n", internet_icon);