dotfiles/.scripts/lol-watcher.sh
2023-09-26 17:12:28 +02:00

13 lines
397 B
Bash
Executable file

#!/bin/sh
# This script + pgrep command
[[ $(pgrep "lol-watcher.sh" | wc -l) -gt 2 ]] && exit 1
while true; do
if hyprctl clients | grep -qe 'title: League of Legends (TM) Client'; then
hyprctl monitors | grep -qe 'HDMI-A-1' && hyprctl keyword monitor HDMI-A-1,disable
else
hyprctl monitors | grep -qe 'HDMI-A-1' || hyprctl keyword monitor HDMI-A-1,1920x1080@60,1920x0,1
fi
sleep 5
done