Compare commits
3 Commits
16dfeca689
...
e42e3b4fcd
| Author | SHA1 | Date | |
|---|---|---|---|
| e42e3b4fcd | |||
| 856290c33f | |||
| e7ae358fa9 |
7
files/dwm/battery.function
Executable file
7
files/dwm/battery.function
Executable 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"
|
||||||
30
files/dwm/storage.function
Normal file
30
files/dwm/storage.function
Normal 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
0
files/dwm/volume.function
Normal file → Executable file
Reference in New Issue
Block a user