#!/usr/bin/env bash
# if the script is passed --toggle
if [[ "$1" == *toggle* ]]; then
if pgrep caffeine >/dev/null; then
killall caffeine
else
caffeine &>/dev/null &
fi
exit 0
while true; do
# caffeine is running
echo "%{F#0000FF}"
echo "%{F#FF0000}"
sleep 2
done