Files
nixos/scripts/hypr-scripts/gamemode_power.sh
T
2026-10-06 22:34:05 +02:00

26 lines
818 B
Bash
Executable File

#!/usr/bin/env bash
# Toggles the GAMING_PROFILE tuxedo power profile
GAMEMODE=$(tailor profile list | grep active | cut --fields 1 -d' ')
GAMING_PROFILE="GAMEINK"
DEFAULT_PROFILE="HOTHOTHOT"
function failure() {
dunstify -r 55422 -t 4000 -u normal -i ~/.icons/candy-icons/apps/scalable/teamspeak.svg "Failed to toggle power profile!"
exit 1
}
if [[ "$GAMEMODE" =~ "GAMEINK" ]] ; then
# Default profile
tailor profile set "$DEFAULT_PROFILE" || failure
dunstify -r 55422 -t 2000 -u low -i ~/.icons/candy-icons/apps/scalable/teamspeak.svg "Gaming power profile deactivated"
exit 0
else
# gaming profile
tailor profile set "$GAMING_PROFILE" || failure
dunstify -r 55422 -t 2000 -u low -i ~/.icons/candy-icons/apps/scalable/teamspeak.svg "Gaming power profile activated"
hyprctl reload
exit 0
fi