dotfiles/homes/x86_64-linux/christopher@cobalt/config/eww/scripts/get-active-workspace
Christopher Mühl d20c9ac3bd
Move eww config
2025-08-04 18:21:31 +02:00

23 lines
449 B
Bash
Executable file

#!/usr/bin/env bash
MONITOR=$1
if [ -z "$MONITOR" ]; then
echo "Usage: $0 <monitor>"
exit 1
fi
PREFIX="$MONITOR"
if [ "$MONITOR" == 0 ]; then
PREFIX=""
fi
# Output the currently selected workspace
workspace () {
hyprctl monitors -j | jq ".[] | select(.id == $MONITOR) | .activeWorkspace.id"
}
workspace
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
workspace
done