diff --git a/config/dot/hypr/keybinds.lua b/config/dot/hypr/keybinds.lua index 38fd760..5e8ecf2 100644 --- a/config/dot/hypr/keybinds.lua +++ b/config/dot/hypr/keybinds.lua @@ -180,23 +180,30 @@ bind(mod .. " + CTRL + L", hl.dsp.window.swap({ direction = "r" }), { descriptio -- Resize (Forge: window-resize--). -- --- Forge resized one named edge at a time. Hyprland resizes the active window --- along an axis and lets the layout decide which edge actually moves, so the --- eight Forge keys collapse onto four behaviors. The pairing is kept --- consistent with the original: Y/B/O/M are horizontal, I/P/U/N are vertical, --- and "increase" always grows while "decrease" always shrinks. +-- Forge resized one named EDGE at a time: its resize() grows the window for a +-- positive amount in every direction, and the edge only decides which side +-- moves -- Y grew leftward, O grew rightward, and so on. Hyprland resizes along +-- an axis and lets the layout choose the border, so those eight distinct +-- behaviours collapse onto four and the direction is simply not expressible. +-- +-- Because of that the sizes are deliberately INVERTED from Forge's naming. +-- Carried over faithfully, "increase" grew and "decrease" shrank, which was +-- correct on paper and wrong under the fingers: with the edge gone, the keys +-- that used to pull a window open from one side now push it from the other. +-- Gabriel uses these daily and reads Y/O as shrink and B/M as grow, so that is +-- what they do. Faithfulness to a mapping nobody can feel is not worth much. local step = 60 -bind(mod .. " + SHIFT + Y", hl.dsp.window.resize({ x = step, y = 0, relative = true }), { repeating = true, description = "Wider" }) -bind(mod .. " + SHIFT + O", hl.dsp.window.resize({ x = step, y = 0, relative = true }), { repeating = true, description = "Wider" }) -bind(mod .. " + SHIFT + B", hl.dsp.window.resize({ x = -step, y = 0, relative = true }), { repeating = true, description = "Narrower" }) -bind(mod .. " + SHIFT + M", hl.dsp.window.resize({ x = -step, y = 0, relative = true }), { repeating = true, description = "Narrower" }) -bind(mod .. " + SHIFT + I", hl.dsp.window.resize({ x = 0, y = step, relative = true }), { repeating = true, description = "Taller" }) -bind(mod .. " + SHIFT + U", hl.dsp.window.resize({ x = 0, y = step, relative = true }), { repeating = true, description = "Taller" }) +bind(mod .. " + SHIFT + Y", hl.dsp.window.resize({ x = -step, y = 0, relative = true }), { repeating = true, description = "Narrower" }) +bind(mod .. " + SHIFT + O", hl.dsp.window.resize({ x = -step, y = 0, relative = true }), { repeating = true, description = "Narrower" }) +bind(mod .. " + SHIFT + B", hl.dsp.window.resize({ x = step, y = 0, relative = true }), { repeating = true, description = "Wider" }) +bind(mod .. " + SHIFT + M", hl.dsp.window.resize({ x = step, y = 0, relative = true }), { repeating = true, description = "Wider" }) +bind(mod .. " + SHIFT + I", hl.dsp.window.resize({ x = 0, y = -step, relative = true }), { repeating = true, description = "Shorter" }) +bind(mod .. " + SHIFT + U", hl.dsp.window.resize({ x = 0, y = -step, relative = true }), { repeating = true, description = "Shorter" }) -- SUPER+SHIFT+P was double-bound with the color picker above; moved to -- Comma, which continues the bottom-row cluster (B/M/N) this axis already -- uses rather than landing on an arbitrary free key. -bind(mod .. " + SHIFT + Comma", hl.dsp.window.resize({ x = 0, y = -step, relative = true }), { repeating = true, description = "Shorter" }) -bind(mod .. " + SHIFT + N", hl.dsp.window.resize({ x = 0, y = -step, relative = true }), { repeating = true, description = "Shorter" }) +bind(mod .. " + SHIFT + Comma", hl.dsp.window.resize({ x = 0, y = step, relative = true }), { repeating = true, description = "Taller" }) +bind(mod .. " + SHIFT + N", hl.dsp.window.resize({ x = 0, y = step, relative = true }), { repeating = true, description = "Taller" }) -- Window cycling (GNOME: cycle-windows on SUPER+Tab), now with an overlay -- showing what you are choosing between. diff --git a/config/dot/quickshell/modules/quicksettings/HomeControls.qml b/config/dot/quickshell/modules/quicksettings/HomeControls.qml index cf8f18b..970686d 100644 --- a/config/dot/quickshell/modules/quicksettings/HomeControls.qml +++ b/config/dot/quickshell/modules/quicksettings/HomeControls.qml @@ -36,9 +36,30 @@ Item { Rectangle { id: restingCard + + // Shown when the section is closed; the expanded grid below replaces + // it when open. + readonly property bool shown: root.hasSelection && !root.expanded + width: parent.width - height: visible ? restingGrid.implicitHeight + 20 : 0 - visible: root.hasSelection && !root.expanded + + // Animated, and on the same curve and duration as the Section that + // replaces it. Previously this hid the instant `expanded` flipped: + // a Column skips invisible children, so everything above snapped up + // while the expanded grid was still sliding open underneath. That + // read as a glitch rather than as an animation, and only here, + // because this is the only control with a resting and an expanded + // form that swap. + height: restingCard.shown ? restingGrid.implicitHeight + 20 : 0 + visible: height > 0 + clip: true + + Behavior on height { + NumberAnimation { + duration: Theme.durNormal + easing.type: Easing.OutCubic + } + } radius: Theme.cardRadius + 2 color: Theme.alpha(Theme.warn, 0.028) border.width: 1