about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xhome-manager/config/yambar/scripts/disk6
-rwxr-xr-xhome-manager/config/yambar/scripts/grades-average2
-rwxr-xr-xhome-manager/config/yambar/scripts/network6
-rwxr-xr-xhome-manager/config/yambar/scripts/sound-volume2
4 files changed, 8 insertions, 8 deletions
diff --git a/home-manager/config/yambar/scripts/disk b/home-manager/config/yambar/scripts/disk
index d96a8683..9b405dc4 100755
--- a/home-manager/config/yambar/scripts/disk
+++ b/home-manager/config/yambar/scripts/disk
@@ -5,9 +5,9 @@ SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH
 
 # Main loop
 while true; do
-    # vars
-    used_space=$(btrfs filesystem usage /srv 2> /dev/null | awk '{if ( /Used:/ ) { print $2 } } ' | head -n1)
-    all_space=$(btrfs filesystem usage /srv 2> /dev/null | awk '{if ( /Device size:/ ) { print $3 } } ' | head -n1 | tr -d "GiB")
+  # vars
+  used_space=$(btrfs filesystem usage /srv 2> /dev/null | awk '{if ( /Used:/ ) { print $2 } } ' | head -n1)
+  all_space=$(btrfs filesystem usage /srv 2> /dev/null | awk '{if ( /Device size:/ ) { print $3 } } ' | head -n1 | tr -d "GiB")
 
 
   # Check space available (4) and percentage used (5)
diff --git a/home-manager/config/yambar/scripts/grades-average b/home-manager/config/yambar/scripts/grades-average
index b8b5c04c..06f2dde3 100755
--- a/home-manager/config/yambar/scripts/grades-average
+++ b/home-manager/config/yambar/scripts/grades-average
@@ -4,7 +4,7 @@
 SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH
 
 while true; do
-    grade=$(grades list average | awk '{print $2}');
+    grade="$(grades list average | awk '{print $2}')";
 
     echo "grade|string|$grade";
     echo "";
diff --git a/home-manager/config/yambar/scripts/network b/home-manager/config/yambar/scripts/network
index 0d98b110..7b0e4762 100755
--- a/home-manager/config/yambar/scripts/network
+++ b/home-manager/config/yambar/scripts/network
@@ -29,14 +29,14 @@ case "$backend" in
         while true; do
 
             ping_result=$(mktmp)
-            ping $ip_address -c $ping_number -q | awk 'BEGIN {FS="/"} END {print $5}' > $ping_result
+            ping $ip_address -c $ping_number -q | awk 'BEGIN {FS="/"} END {print $5}' > "$ping_result"
 
-            if [ "$(cat $ping_result | wc -l)" -eq 0 ]; then
+            if [ "$(cat "$ping_result" | wc -l)" -eq 0 ]; then
                 echo "med|string|No connection"
                 echo ""
                 sleep $retest_if_con_fails
             else
-                echo "med|string|$(cat $ping_result) ms"
+                echo "med|string|$(cat "$ping_result") ms"
                 echo ""
                 sleep $retest
             fi
diff --git a/home-manager/config/yambar/scripts/sound-volume b/home-manager/config/yambar/scripts/sound-volume
index 41230141..bdd42bdd 100755
--- a/home-manager/config/yambar/scripts/sound-volume
+++ b/home-manager/config/yambar/scripts/sound-volume
@@ -4,7 +4,7 @@
 SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH
 
 while true; do
-    volume=$(pactl get-sink-volume 0 | awk 'BEGIN { FS="/" } {gsub("%","",$2); gsub(" ","",$2)} {printf $2}')
+    volume="$(pactl get-sink-volume 0 | awk 'BEGIN { FS="/" } {gsub("%","",$2); gsub(" ","",$2)} {printf $2}')"
 
     if [ "$volume" -eq 0 ]; then
         echo "muted|bool|true"