srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/core/src/theme.rs
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2026-08-25 14:49:00 +0200
committersrdusr <[email protected]>2026-08-25 14:49:00 +0200
commit8b3ef3c7b28570122126a1c8b3d6695fc3647557 (patch)
tree5e37511996bbaa891476a37906d621ab1912853f /crates/core/src/theme.rs
parent807d0ba1680cdc1322bfe9584781416339f6f76d (diff)
downloadsrdwm-8b3ef3c7b28570122126a1c8b3d6695fc3647557.tar.gz
srdwm-8b3ef3c7b28570122126a1c8b3d6695fc3647557.zip
Move a window in steps, and let the keyboard resize one at all
Two of the owner's reported gaps, both about moving a window without a mouse. Super+Shift+HJKL slammed the window to the far edge of the monitor in one press: "it should move in increments - one side, middle, other side - not just extreme left/up/right/down". It now steps an eighth of the monitor per press, which crosses the screen in eight, passes through the middle at the fourth, and stops flush against the edge rather than short of it. A fraction rather than a pixel count, so the same key feels the same on a laptop panel and a 4K display. Only outside a tiling layout. There a window does not own its geometry -- stepping it would be undone by the next arrange - so the neighbour swap stays, and three tests that assumed swapping on a dynamic workspace now say which layout they mean. Keyboard resize did not exist. Super+right-drag has resized with the mouse for a while, which is why this went unnoticed, but nothing resized a window without one. `srd.window.resize("right", "grow"|"shrink")` grows or shrinks from the far edge in that direction, leaving the top-left where it is, and is bounded by the same minimums a drag is and by the monitor's usable area - a window can be resized neither to nothing nor off the screen, and a test holds each key down forty times to prove it. Wired into the owner's config: Super+Ctrl+arrows resize (the arrow says which way the far edge moves, so Right always widens), and Super+Ctrl+L locks the screen. Hyprland only ever bound the lock to XF86ScreenSaver, which most keyboards do not have; Super+L is the convention everywhere else but is already focus-right here. Ctrl+arrows rather than Ctrl+HJKL because Super+Ctrl+K is already kill-process. Verified through the real path in a nested compositor running that config: 89 bindings, all 89 described, the five new ones registered.
Diffstat (limited to 'crates/core/src/theme.rs')
0 files changed, 0 insertions, 0 deletions