Dotfiles/.config/eww/scripts/get-active-workspace

6 lines
271 B
Bash
Executable File

#!/usr/bin/env bash
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
socat -u UNIX-CONNECT:/run/user/$UID/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'