#!/bin/sh caffeine_file=$HOME/.cache/idle if [[ ! -f $caffeine_file ]] then echo 0 > $caffeine_file fi caffeine=$(<$HOME/.cache/idle) if [[ $caffeine -eq 0 ]] then echo 1 > $caffeine_file notify-send 'Caffeine' 'Caffeine Enabled' else echo 0 > $caffeine_file notify-send 'Caffeine' 'Caffeine Disabled' fi