Relative display placement and rotation in the Display panel (an alternative to drag-and-drop) #8969
xe-nvdk
started this conversation in
Show and tell
Replies: 1 comment 1 reply
|
Rotation is a good callout. I'll extend my option as well unless you want to file a pr before I can. Would be great to see one of these solutions in core |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I extended the stock
omarchy.monitor(Display) panel with an ARRANGE section, so multi-monitor placement and rotation can be done from the bar instead of by editing~/.config/hypr/monitors.lua.What it does
0x0.monitors.lua, so it surviveshyprctl reloadand logout. Only the text between the markers is rewritten; your ownhl.monitor()lines above it are left alone.External displays are keyed by
desc:(description + serial from EDID) rather than connector name, so a rule keeps applying when the same monitor moves from DisplayPort to HDMI and comes back as a different output. The internal panel stays keyed by connector name, since it can't move.Why buttons instead of a drag canvas
The arithmetic is the annoying part — "this one is 2560 wide, so the next starts at 2560, and centre the shorter one by half the difference". Four buttons say the intent directly and the plugin does the maths. It's deliberately the lighter-weight take next to the drag-and-drop plugins below.
One thing worth flagging for anyone building in this area
Omarchy configures Hyprland in Lua, and the Lua parser rejects
hyprctl keywordoutright:hyprctl eval 'hl.monitor({ ... })'works instead. I lost a while to this because the failure is quiet if you're also writingmonitors.lua— the file write triggers a reload, so the layout still changes and the deadkeywordcall looks like it worked. Same root cause as #6968, which the open PR #8728 fixes for the stock panel's monitor toggle.Second gotcha, in case it saves someone else the time: editing a user plugin's QML doesn't really hot-reload. The shell logs
Local plugin changed, reloading:and re-reads the file but keeps the old panel instance, so edits appear to do nothing untilomarchy restart shell.Install
Repository: https://github.com/xe-nvdk/omarchy-display-arrange
There's a CLI underneath it too (
nvdk-display-layout place DP-3 left eDP-1,rotate DP-3 90,mode DP-3 2560x1440@100), so it's scriptable without the panel.Known limitations
position = "auto"to the internal panel every ~2s and ignoresdesc:rules (Internal monitor position cannot be made to stick: clamshell watcher and Display panel scaling both re-apply position = "auto" #7326, Clamshell watcher ignores desc: rules for the internal panel and overwrites its scale every 2s #7084 — PR Monitor scaling: honour desc: and multi-line hl.monitor rules for the internal panel #8808 addresses the parser side).Prior art
Credit where due — two drag-and-drop takes on this already exist, and I found them only after building mine:
Neither covers rotation, which is the piece I'd most like to see land in the core widget regardless of which UI wins. Happy to fold the transform handling into whichever approach the maintainers prefer.
All reactions