Update and clean up user scripts

This commit is contained in:
natemaia
2017-12-01 23:06:11 -08:00
parent dcf56fc86a
commit 5be5c23629
17 changed files with 62 additions and 122 deletions

View File

@ -1,44 +1,21 @@
#!/usr/bin/env bash
# if the script is passed --toggle
if [[ "$1" == *toggle* ]]; then
# if caffeine is running kill it
if pgrep caffeine >/dev/null; then
killall caffeine
else # otherwise start it and fork to background
else
caffeine &>/dev/null &
fi
# exit or get caught in the infinite loop
exit 0
fi
# infinite loop for polybar
while true; do
# caffeine is running
if pgrep caffeine >/dev/null; then
# Change Me
echo "%{F#0000FF}"
else # otherwise it must not be... LOL
# Change Me
else
echo "%{F#FF0000}"
fi
# sleep interval... Change the responsiveness
sleep 2
done