gamemode 1080p 330hz toggle

This commit is contained in:
2025-12-30 22:48:38 +02:00
parent db810daf00
commit e4296a3251
5 changed files with 133 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
PROFILE_FILE="/home/raga/.config/sway/display-profile.conf"
mode_str=""
if [[ -f "$PROFILE_FILE" ]]; then
mode_str="$(awk '$1=="set" && $2=="$dp1_mode" {print $3; found=1} END {if(!found) print ""}' "$PROFILE_FILE" 2>/dev/null)"
fi
# Display-related FontAwesome icon + a short label.
case "$mode_str" in
3840x2160@*|4096x2160@*) echo " 4K";;
1920x1080@*) echo " 1080p";;
"") echo "";;
*) echo "${mode_str}";;
esac