Dotfiles/desktopenvs/hyprland/scripts/caffeine.sh

18 lines
272 B
Bash
Executable File

#!/bin/bash
statecon=$( pidof hypridle | grep "[1234567890]" )
#echo $statecon
if [ "$statecon" != "" ]; then
notify-send -t 1000 "caffeine mode on"
killall hypridle
else
notify-send -t 1000 "caffeine mode off"
hyprctl dispatch exec hypridle
fi