#!/usr/bin/env nu

def active [_change] {
  hyprctl monitors -j | from json | where focused == true | get activeWorkspace.id | first
}

socat -u UNIX-CONNECT:/run/user/1000/hypr/29e2e59fdbab8ed2cc23a20e3c6043d5decb5cdc_1745939475_617930074/.socket2.sock - | lines | take until { is-empty } | active $in
