update scripts

This commit is contained in:
frosty 2024-07-12 12:24:02 -04:00
parent 01db0f54fa
commit cdcf46f206
2 changed files with 17 additions and 0 deletions

View file

@ -111,6 +111,20 @@ monitor_volume() {
printf '%s%%\n' "$volume" printf '%s%%\n' "$volume"
} }
monitor_uptime() {
up=$(uptime -p)
up=${up#up }
up=${up//,}
up=${up// day/d}
up=${up// days/d}
up=${up// minutes/m}
up=${up// minute/m}
up=${up// hours/h}
up=${up// hour/h}
printf '%s\n' "$up"
}
if command -v monitor_"$1" >/dev/null 2>&1; then if command -v monitor_"$1" >/dev/null 2>&1; then
monitor_"$1" monitor_"$1"
fi fi

3
.local/bin/toggle Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
killall "$1" || "$@"