aboutsummaryrefslogtreecommitdiff
path: root/i3blocks
diff options
context:
space:
mode:
Diffstat (limited to 'i3blocks')
-rwxr-xr-xi3blocks/i3disk.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/i3blocks/i3disk.sh b/i3blocks/i3disk.sh
index fc569f9..7c70819 100755
--- a/i3blocks/i3disk.sh
+++ b/i3blocks/i3disk.sh
@@ -1,7 +1,11 @@
#!/bin/sh
case $BLOCK_BUTTON in
- 1) notify-send -h string:x-canonical-private-synchronous:disk -t 3000 "$(df -h | grep ^/dev/sda8 | awk '{print "/: Used "$3"/"$2" ("$5")"}')"
+ 1)
+ root="$(df -h | grep /$ | awk '{print "/: Used "$3"/"$2" ("$5")"}')"
+ home="$(df -h | grep /home$ | awk '{print "/home: Used "$3"/"$2" ("$5")"}')"
+ notify-send -h string:x-canonical-private-synchronous:disk -t 5000 "$root
+$home" ;;
esac
-df -h | grep ^/dev/sda8 | awk '{print $4"/"$2}'
+df -h | grep "/home$" | awk '{print $4"/"$2}'