Show age of last Signal message
[khatus.git] / bin / khatus_show
index 19004be..a5fbae8 100755 (executable)
@@ -44,10 +44,9 @@ disk=$(
         function round(n) {return int(n + 0.5)}
 
         $1 == "/dev/mapper/kubuntu--vg-root" {
-            total = $2;
-            used  = $3;
+            curr = $5;
+            sub("%$", "", curr);
             file = "/home/siraaj/var/run/status/disk_space_used_percentage";
-            curr = round(used / total * 100);
             getline prev < file;
             print curr > file;
             if (curr > prev) {
@@ -256,15 +255,31 @@ signal_last_msg_age=$(
 echo \
 "\
  E$energy\
+ \
+ \
  M$memory\
+ \
+ \
  D$disk\
+ \
+ \
  C=[$cpu  ${temp}°C ${fan}rpm]\
- |\
+ \
+ \
  S=$screen_brightness\
+ \
+ \
  V=$volume\
+ \
+ \
  B:$bluetooth_power\
+ \
+ \
  W:$wifi\
- |\
+ \
+ \
+ $signal_last_msg_age\
+ \
  $weather\
  \
  $datetime \
This page took 0.027742 seconds and 4 git commands to generate.