Add .config/waybar/config-hypr
Add .config/waybar/modules/storage.sh Add .config/waybar/style-hypr.css
This commit is contained in:
parent
1d22097726
commit
5af9a13bd2
3 changed files with 625 additions and 0 deletions
25
private_dot_config/waybar/modules/executable_storage.sh
Normal file
25
private_dot_config/waybar/modules/executable_storage.sh
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
mount="/"
|
||||
warning=20
|
||||
critical=10
|
||||
|
||||
df -h -P -l "$mount" | awk -v warning=$warning -v critical=$critical '
|
||||
/\/.*/ {
|
||||
text=$4
|
||||
tooltip="Filesystem: "$1"\rSize: "$2"\rUsed: "$3"\rAvail: "$4"\rUse%: "$5"\rMounted on: "$6
|
||||
use=$5
|
||||
exit 0
|
||||
}
|
||||
END {
|
||||
class=""
|
||||
gsub(/%$/,"",use)
|
||||
if ((100 - use) < critical) {
|
||||
class="critical"
|
||||
} else if ((100 - use) < warning) {
|
||||
class="warning"
|
||||
}
|
||||
print "{\"text\":\""text"\", \"percentage\":"use",\"tooltip\":\""tooltip"\", \"class\":\""class"\"}"
|
||||
}
|
||||
'
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue