summaryrefslogtreecommitdiff
path: root/sway/sway_stats
diff options
context:
space:
mode:
authortslil clingman <>2022-04-06 16:20:11 -0400
committertslil clingman <>2022-04-06 16:20:11 -0400
commit4af79f764d31692ce5146f5c9a00355c3b35f654 (patch)
tree28d657b7f648c376deecb7bcf6ca4dba2dc7779c /sway/sway_stats
parentc5224d827b34b9f63b5028d8ab4730cdf0b182b6 (diff)
parent0b4aa5db57f3572feb97cadc61db3f69665989c8 (diff)
Merge branch 'master' of git.sr.ht:~tslil/dotfiles
Diffstat (limited to 'sway/sway_stats')
-rwxr-xr-xsway/sway_stats12
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/sway_stats b/sway/sway_stats
new file mode 100755
index 0000000..96b0923
--- /dev/null
+++ b/sway/sway_stats
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+raw_freq=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq)
+cpu_freq="$(( $raw_freq / 1000 )) MHz"
+
+name="$(date '+%Hh%M %A %y.%m.%d')"
+summary="$(battery) @ $cpu_freq"
+body=$(free -h | awk '/Mem:/ { ram=$3 }
+ /Swap:/ { swap=$3 }
+ END { printf("Used Ram/Swap: %s/%s",ram,swap) }')
+
+notify-send -t 10000 --app-name="$name" "$summary" "$body"