aboutsummaryrefslogtreecommitdiff
path: root/home-config/waybar/modules/storage.sh
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2026-08-24 01:47:36 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2026-08-24 01:47:36 -0400
commit6c4fc5e429f362c0c5544d34f17285c4cfc16ba8 (patch)
tree47177652c89aeafe7dde2396277c76e1c464eec1 /home-config/waybar/modules/storage.sh
parent72d1c1aae5c6ef87a88e81111a74d7b041c57a22 (diff)
remove old filesand bump nix-files
Diffstat (limited to 'home-config/waybar/modules/storage.sh')
-rwxr-xr-xhome-config/waybar/modules/storage.sh25
1 files changed, 0 insertions, 25 deletions
diff --git a/home-config/waybar/modules/storage.sh b/home-config/waybar/modules/storage.sh
deleted file mode 100755
index 90cc3dc..0000000
--- a/home-config/waybar/modules/storage.sh
+++ /dev/null
@@ -1,25 +0,0 @@
1#!/bin/sh
2
3mount="/"
4warning=20
5critical=10
6
7df -h -P -l "$mount" | awk -v warning=$warning -v critical=$critical '
8/\/.*/ {
9 text=$4
10 tooltip="Filesystem: "$1"\rSize: "$2"\rUsed: "$3"\rAvail: "$4"\rUse%: "$5"\rMounted on: "$6
11 use=$5
12 exit 0
13}
14END {
15 class=""
16 gsub(/%$/,"",use)
17 if ((100 - use) < critical) {
18 class="critical"
19 } else if ((100 - use) < warning) {
20 class="warning"
21 }
22 print "{\"text\":\""text"\", \"percentage\":"use",\"tooltip\":\""tooltip"\", \"class\":\""class"\"}"
23}
24'
25