Add diskusage indicator
This commit is contained in:
parent
1345847603
commit
b0e061eb95
|
@ -47,7 +47,7 @@ bottom-left = powermenu title bluetooth wireguard redshift
|
|||
bottom-center = i3
|
||||
bottom-right = alsa battery date
|
||||
|
||||
top-left = cpu memory backlight
|
||||
top-left = cpu memory diskusage backlight
|
||||
top-center = cava
|
||||
top-right = spotify-prev spotify-play-pause spotify-next spotify network-detail
|
||||
|
||||
|
|
|
@ -415,3 +415,11 @@ format-underline = ${colors.urgent}
|
|||
exec = $HOME/.config/polybar/scripts/redshift.sh period
|
||||
click-left = $HOME/.config/polybar/scripts/redshift.sh toggle
|
||||
interval = 1
|
||||
|
||||
[module/diskusage]
|
||||
type=custom/script
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.notify}
|
||||
format-underline = ${colors.notify}
|
||||
exec = $HOME/.config/polybar/scripts/diskusage.sh
|
||||
interval = 30
|
||||
|
|
4
.config/polybar/scripts/diskusage.sh
Executable file
4
.config/polybar/scripts/diskusage.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
DISK=/dev/sda3
|
||||
df -h $DISK | awk '/^\/dev\/sd[ab]/ { sum+=$5 } END { print sum }' | sed -e "s/$/%/"
|
Loading…
Reference in a new issue