Compare commits

...

3 Commits

Author SHA1 Message Date
e42e3b4fcd Change permissions. 2025-11-10 14:02:31 -07:00
856290c33f Add function to quickly check storage. 2025-11-10 14:02:16 -07:00
e7ae358fa9 Add function to check battery percentage. 2025-11-10 14:02:01 -07:00
3 changed files with 37 additions and 0 deletions

7
files/dwm/battery.function Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
function battery {
upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage | grep -o "[0-9.%]*"
}
alias show-battery="battery"
alias battery-display="battery"

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
function storage {
location="$1"
quiet="$2"
if [[ -z $location ]]; then
echo "ERROR: Location must be passed. $location"
fi
if [[ -n "$quiet" ]]; then
df -h $location | tail -n 1 | awk {print $5", "$3"/"$2""}
else
df -h $location | tail -n 1 | awk {print $5" Free, "$3"/"$2" Used"}
fi
}
function storage-root {
storage / $1
}
function storage-root-dwm {
storage-root q
}
function storage-home {
storage /home $1
}
function storage-home-dwm {
storage-root q
}

0
files/dwm/volume.function Normal file → Executable file
View File