Add disk usage script to bar
This commit is contained in:
parent
2e8e96a7a0
commit
8987de0516
@ -5,7 +5,8 @@ sym="|"
|
||||
cd "$HOME/.local/bin/scripts/dwmbar/" || exit 1
|
||||
|
||||
status() {
|
||||
echo "$(./internet) $sym $(./lamp) $sym $(./music) $sym $(./alsa) $sym $(./packages) $sym $(./date) $sym $(./clock)"
|
||||
echo "$(./disk) $sym $(./internet) $sym $(./lamp) $sym $(./music) $sym" \
|
||||
"$(./alsa) $sym $(./packages) $sym $(./date) $sym $(./clock)"
|
||||
}
|
||||
|
||||
while :; do
|
||||
|
11
.local/bin/scripts/dwmbar/disk
Executable file
11
.local/bin/scripts/dwmbar/disk
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
used() {
|
||||
df -h "$1" | awk 'NR==2 { print $3 "/" $4 " GB" }' | sed 's/G\//\//g;s/G / /g'
|
||||
}
|
||||
|
||||
root="$(used /)"
|
||||
home="$(used /home)"
|
||||
|
||||
echo ""
|
||||
echo "/ $root, $home"
|
Loading…
x
Reference in New Issue
Block a user