dotfiles/hypr/scripts/handle-second-monitor.sh

17 lines
673 B
Bash

#!/bin/sh
handle() {
case $1 in monitoradded*)
hyprctl dispatch moveworkspacetomonitor "1 DP-2"
hyprctl dispatch moveworkspacetomonitor "2 DP-2"
hyprctl dispatch moveworkspacetomonitor "3 DP-2"
hyprctl dispatch moveworkspacetomonitor "4 DP-2"
hyprctl dispatch moveworkspacetomonitor "5 DP-2"
hyprctl dispatch moveworkspacetomonitor "6 DP-2"
hyprctl dispatch moveworkspacetomonitor "7 DP-2"
hyprctl dispatch moveworkspacetomonitor "8 DP-2"
hyprctl dispatch moveworkspacetomonitor "9 DP-2"
esac
}
socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/${HYPRLAND_INSTANCE_SIGNATURE}/.socket2.sock" | while read -r line; do handle "$line"; done