From 6610964c6726be86b00b9884bd494c863cefbadf Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Thu, 14 Mar 2019 15:58:34 +0100 Subject: Reformatted click behavior to show multiple partitions. --- i3blocks/i3disk.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'i3blocks') 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}' -- cgit v1.2.1