aboutsummaryrefslogtreecommitdiff
path: root/i3blocks
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-03-14 15:58:34 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2019-03-14 15:58:34 +0100
commit6610964c6726be86b00b9884bd494c863cefbadf (patch)
treed0980741bc3d2a9e7b5589a5aa974bc0e484aa8d /i3blocks
parentc9f1f31057720c848fa8e1f092b278712efc4d4f (diff)
downloadscripts-6610964c6726be86b00b9884bd494c863cefbadf.tar.gz
scripts-6610964c6726be86b00b9884bd494c863cefbadf.zip
Reformatted click behavior to show multiple partitions.
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}'