infrastructure/home/wayland/eww/config/scripts/get-active-workspace
Laureηt bd71229ba9
🚚 (home/wayland) move eww's config in its own folder
(this way `default.nix` won't be copied inside the configDir)
2023-12-30 18:41:19 +01:00

9 lines
357 B
Bash
Executable file

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