Add laptop display mirror toggle + hotkey (#5462)

* 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>
This commit is contained in:
timbelmon
2026-04-29 20:19:32 +02:00
committed by GitHub
co-authored by Copilot David Heinemeier Hansson
parent 2f257e167c
commit 35789cc102
5 changed files with 63 additions and 4 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash
TOGGLE="internal-monitor-disable"
MIRROR_TOGGLE="internal-monitor-mirror"
enable() {
if omarchy-hyprland-toggle-enabled "$TOGGLE"; then
@@ -10,7 +11,7 @@ enable() {
disable() {
if omarchy-hw-external-monitors; then
if omarchy-hyprland-toggle-disabled "$TOGGLE"; then
if omarchy-hyprland-toggle-disabled "$TOGGLE" && omarchy-hyprland-toggle-disabled "$MIRROR_TOGGLE"; then
omarchy-hyprland-toggle --enabled-notification "󰍹 Laptop display disabled" "$TOGGLE"
fi
else