mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
* Add check for active external monitors before disabling internal display Co-authored-by: Copilot <copilot@github.com> * Revert "Add check for active external monitors before disabling internal display" This reverts commit e20b3da87e3df0f084c0bca232a61ba58fab4cdc. * feat(hyprland): add toggle for internal monitor mirroring - Implement `omarchy-hyprland-monitor-internal-mirror` to dynamically mirror the internal eDP display to external monitor. - Update `omarchy-hyprland-monitor-internal` to prevent disabling the laptop screen if mirroring is currently active. - Add "Mirror Display" toggle to omarchy hardware Menu * Ensure there is also a laptop monitor available to mirror before we do it * Fix toggle use * Recover from mirror mode gracefully * Add hotkey to mirroring --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: David Heinemeier Hansson <david@hey.com>
16 lines
436 B
Bash
Executable File
16 lines
436 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Listen on Hyprland's event socket and recover monitor toggles whenever a
|
|
# monitor is removed.
|
|
|
|
SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
|
|
|
|
socat -U - "UNIX-CONNECT:$SOCKET" | while read -r event; do
|
|
case "$event" in
|
|
monitorremoved\>\>*|monitorremovedv2\>\>*)
|
|
omarchy-hyprland-monitor-internal recover
|
|
omarchy-hyprland-monitor-internal-mirror recover
|
|
;;
|
|
esac
|
|
done
|