#!/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
    swaylock -f -c 000000
else
    notify-send 'Caffeine' 'Not sleeping'
fi
