Skip to content

Rotate a monitor from the layout map's right-click menu - #17170

Merged
dhh merged 7 commits into
quattrofrom
monitor-layout-rotate
Oct 31, 2026
Merged

dhh merged 7 commits into
quattrofrom
monitor-layout-rotate

Conversation

@dhh

@dhh dhh commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Right-click a display in the monitor panel's layout map to rotate it.

The menu

  • Normal, 90°, 180° and 270°, with the display's current quarter turn checked. Its rows are the dock's menu row, moved into a shared shell/Ui/PopupMenuRow that both use.
  • It sits over the panel's scrolling content so the panel's edge doesn't clip it near the bottom. A click elsewhere closes it, and Esc closes it before the panel.
  • The layout map now shows for a single display too, so a lone monitor can be rotated (found in a Codex review).

Rotating

  • New omarchy-hyprland-monitor-rotate [--monitor NAME] [0|90|180|270]; without an angle it prints the current one. Mirrored transforms (4-7) are left to monitors.lua.
  • A quarter turn swaps the display's width and height in the layout, so it goes through the layout command's resize path: the turn and its neighbours closing up apply in one eval, ordered so nothing overlaps.

Saving

  • The rotation is saved with the display's other settings as a transform field before the identity, which stays last. The settings module, clamshell and persist still read lines saved before it, and adding a rotation keeps such a line's mode, position and scale.
  • A saved rotation is applied with the rest on load and when the display arrives, and a display already turned as saved isn't turned again.

Tests cover rotating beside another display and alone, refusing other angles, adding a rotation to an older saved line, and the settings module applying a saved rotation. Tried live on a laptop beside a 6K display.

🤖 Generated with Claude Code

dhh and others added 6 commits October 31, 2026 19:07
Setting omarchy_monitor_panel_settings = false in hypr/monitors.lua,
like the omarchy_default_bindings switch, leaves that file alone in
charge of every monitor: the saved panel settings aren't applied on
load or when a monitor arrives, GDK_SCALE is left to the file, and
clamshell recovery ignores them too. The panel's changes then last only
until Hyprland reloads. The template, manual and agent skill say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…clamshell

With the panel's choices switched off, clamshell sync corrected an
enabled laptop panel back to monitors.lua's scale every two seconds
while docked, undoing a panel change straight away instead of at the
next reload as documented. It now leaves an enabled panel's scale alone
then, and only brings a panel that's off back at the file's scale.

Its comment stripping also only knew block comments ending on the same
line, so a switch wrapped in a multi-line --[[ ]] still took effect. It
now drops a block comment's lines up to its closing ]].

Co-Authored-By: Claude Opus 5.5 <[email protected]>
New omarchy-hyprland-monitor-rotate [--monitor NAME] 0|90|180|270
turns a monitor a quarter turn at a time. A turn swaps the monitor's
width and height in the layout, so it goes through the layout command's
resize path: the turn and its neighbours closing up apply in one eval.

The rotation is saved with the monitor's other settings as a transform
field before the identity, and the settings module, clamshell and
persist read lines saved before it as well.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Right-clicking a display in the monitor panel's layout map opens a menu
of its quarter turns, Normal, 90°, 180° and 270°, with the current one
checked, styled like the dock's menu. Choosing one runs
omarchy-hyprland-monitor-rotate for that display. The menu sits over
the panel's scrolling content so its edge doesn't clip it; a click
elsewhere or Esc closes it, Esc before the panel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rotate menu copied the dock's menu row. Both now use
shell/Ui/PopupMenuRow, which emits triggered() and leaves closing the
menu to its owner.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rotate menu opens from the layout map, which was hidden with only
one display on, leaving a single monitor no way to be rotated from the
panel. The map now shows for one display too; dragging it and h/l have
nowhere to move it, so they do nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge based on the reviewed changes.

Summary

Adds monitor rotation through the layout map’s right-click menu and omarchy-hyprland-monitor-rotate.

  • Right-click a display to choose its rotation.
  • A monitor rotation command turns a display and fits its neighbors.
  • Saved monitor settings now include each display's rotation.
  • The keyboard layout indicator ignores hotkey and radio-control devices.
  • Dropbox install and removal use the current indicator package.
  • Desktop environment notes explain where exports go and how to recover.

No actionable new issues were found in the changes since the previous review. No previous review threads were supplied.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Right-click display] --> B[Choose rotation]
  B --> C[Save display settings]
  C --> D{Other displays active?}
  D -->|Yes| E[Rotate and move neighbors together]
  D -->|No| F[Rotate the lone display]
Loading

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/qua..." · Reviewed by Greptile

# Conflicts:
#	test/shell.d/hyprland-monitor-settings-test.sh
@dhh
dhh changed the base branch from monitor-panel-settings-switch to quattro October 31, 2026 18:43
@dhh
dhh merged commit 068bebb into quattro Oct 31, 2026
2 checks passed
omarchybot added a commit to ekollof/omarchy that referenced this pull request Nov 1, 2026
The display panel was rewritten on quattro (omacom#17159, omacom#17170, omacom#17175) with a taller cap and its full-card ScrollView kept, so it keeps scrollOverflow: false beside the new contentHeight.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@emirb emirb added this to the 4.6.0 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants