update hyprland conf

This commit is contained in:
Johannes Knopp
2025-09-13 15:28:12 +02:00
parent ee6855f2ce
commit a95cd6feed
6 changed files with 220 additions and 239 deletions

View File

@ -0,0 +1,40 @@
#!/bin/bash
current=$(hyprctl activeworkspace -j | jq -r '.id')
if [ "$1" = "click" ]; then
group=$2
start=$(( (group - 1) * 3 + 1 ))
hyprctl --batch " \
dispatch focusmonitor DP-1; dispatch workspace $start; \
dispatch focusmonitor DP-2; dispatch workspace $((start+1)); \
dispatch focusmonitor HDMI-A-2; dispatch workspace $((start+2)); \
dispatch focusmonitor DP-1"
else
# Display button state
group=$1
start=$(( (group - 1) * 3 + 1 ))
end=$(( start + 2 ))
case $group in
1) range="1-3"; icon="" ;;
2) range="4-6"; icon="" ;;
3) range="7-9"; icon="" ;;
4) range="10-12"; icon="" ;;
5) range="13-15"; icon="" ;;
6) range="16-18"; icon="" ;;
7) range="19-21"; icon="" ;;
8) range="22-24"; icon="" ;;
9) range="25-27"; icon="󰝚" ;;
10) range="28-30"; icon="" ;;
esac
if [ $current -ge $start ] && [ $current -le $end ]; then
# Active group - return with active class
echo "{\"text\": \"$icon\", \"class\": \"active\"}"
else
# Inactive group
echo "{\"text\": \"$icon\", \"class\": \"inactive\"}"
fi
fi