Give scratchpad a Quake-style console presentation (#7409)
* Give scratchpad a Quake-style presentation
* Keep the Quake scratchpad from restyling every window
The presentation was bought with global decoration defaults: rounding went
0 -> 5 and both shadow and blur were switched back on for every window on
the system, undoing 935283c8. Blur in particular is close to invisible
here, since every window is already tagged 0.985/0.96 opacity and no layer
rule asks for it, so it was GPU load on every frame for almost nothing.
Put the globals back and scope the rounding to the scratchpad with a window
rule, the same way popped windows already get theirs. The inset, dim_special
and the slide carry the effect on their own. dim_special only applies while
a special workspace is open, so it stays.
Also drop the four workspace-rule booleans that only restated Hyprland's
defaults, fold the stale scratchpad rows in the hotkey table into the new
ones, and give the binding assertions their own fixture instead of borrowing
the bar-panel one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Omabot <david@hey.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
Omabot
parent
ec779715bd
commit
0b5111702e
@@ -26,6 +26,8 @@ end
|
||||
|
||||
o.bind("SUPER + S", "Toggle scratchpad", hl.dsp.workspace.toggle_special("scratchpad"))
|
||||
o.bind("SUPER + ALT + S", "Move window to scratchpad", hl.dsp.window.move({ workspace = "special:scratchpad", follow = false }))
|
||||
o.bind("SUPER + grave", "Toggle scratchpad", hl.dsp.workspace.toggle_special("scratchpad"))
|
||||
o.bind("SUPER + SHIFT + grave", "Move window to scratchpad", hl.dsp.window.move({ workspace = "special:scratchpad", follow = false }))
|
||||
|
||||
o.bind("SUPER + TAB", "Next workspace", hl.dsp.focus({ workspace = "e+1" }))
|
||||
o.bind("SUPER + SHIFT + TAB", "Previous workspace", hl.dsp.focus({ workspace = "e-1" }))
|
||||
|
||||
@@ -22,6 +22,11 @@ hl.config({
|
||||
decoration = {
|
||||
rounding = 0,
|
||||
|
||||
-- Dimming only kicks in while a special workspace is open, so the
|
||||
-- scratchpad gets its overlay separation without costing anything the
|
||||
-- rest of the time.
|
||||
dim_special = 0.6,
|
||||
|
||||
shadow = {
|
||||
enabled = false,
|
||||
},
|
||||
@@ -64,6 +69,19 @@ hl.config({
|
||||
},
|
||||
})
|
||||
|
||||
-- Give the scratchpad a floating Quake-console presentation. Shadow and blur
|
||||
-- stay off globally (they cost GPU on every frame for almost no visual gain,
|
||||
-- and windows are near-opaque anyway), so the inset, the dimming, and the
|
||||
-- slide carry the effect.
|
||||
hl.workspace_rule({
|
||||
workspace = "special:scratchpad",
|
||||
gaps_out = 80,
|
||||
gaps_in = 40,
|
||||
})
|
||||
|
||||
-- Round just the scratchpad, so the global default can stay square.
|
||||
hl.window_rule({ match = { workspace = "special:scratchpad" }, rounding = 8 })
|
||||
|
||||
-- Default animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/
|
||||
hl.curve("easeOutQuint", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } })
|
||||
hl.curve("easeInOutCubic", { type = "bezier", points = { { 0.65, 0.05 }, { 0.36, 1 } } })
|
||||
@@ -86,7 +104,11 @@ hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear
|
||||
hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "workspaces", enabled = false })
|
||||
hl.animation({ leaf = "specialWorkspace", enabled = true, speed = 3, bezier = "easeOutQuint", style = "slidevert" })
|
||||
-- The direction names the edge the offset is measured from, not where the
|
||||
-- workspace goes: "slide top" drops it down into view, and "slide bottom"
|
||||
-- retracts it back up the way a Quake console does.
|
||||
hl.animation({ leaf = "specialWorkspaceIn", enabled = true, speed = 3, bezier = "easeOutQuint", style = "slide top" })
|
||||
hl.animation({ leaf = "specialWorkspaceOut", enabled = true, speed = 2, bezier = "easeInOutCubic", style = "slide bottom" })
|
||||
|
||||
hl.config({
|
||||
dwindle = {
|
||||
|
||||
@@ -62,9 +62,9 @@ You can pop a window out of its workspace allocation with `Super + O`. That'll p
|
||||
|
||||
### Scratchpad workspace
|
||||
|
||||
Finally, there's a special scratchpad workspace that overlays on whatever workspace you're currently on. You access what's on that using `Super + S` and you place windows there using `Super + Alt + S`.
|
||||
Finally, there's a special scratchpad workspace that drops down over whatever workspace you're currently on, much like a Quake console. Toggle it with `Super + Grave` or `Super + S`, and place a window there using `Super + Shift + Grave` or `Super + Alt + S`.
|
||||
|
||||
It works well for controls or perhaps a terminal that you quickly want to interact with in an overlay without leaving the current workspace. If you want to move a window off the scratchpad, you just move it directly to another workspace with something like `Super + Shift + 1` to move it to workspace 1.
|
||||
It works especially well for a terminal running an agent, or for controls you want to interact with quickly without leaving the current workspace. To move a window off the scratchpad, send it directly to another workspace with something like `Super + Shift + 1`.
|
||||
|
||||
### It takes some getting used to!
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ You can see all the main keyboard bindings with `Super + K` (Tmux bindings with
|
||||
| `Super + Ctrl + Tab` | Jump to former workspace |
|
||||
| `Super + Shift + 1/2/3/4` | Move window to workspace |
|
||||
| `Super + Shift + Alt + 1/2/3/4` | Move window to workspace without following |
|
||||
| `Super + S` / `Super + Grave` | Toggle scratchpad |
|
||||
| `Super + Alt + S` / `Super + Shift + Grave` | Move window to scratchpad |
|
||||
| `Super + Shift + Alt + Arrows` | Move workspaces to directional monitor |
|
||||
| `Super + Arrow` | Move focus to window in direction of arrow |
|
||||
| `Super + Shift + Arrow` | Swap window with another in direction of arrow |
|
||||
@@ -47,8 +49,6 @@ You can see all the main keyboard bindings with `Super + K` (Tmux bindings with
|
||||
| `Super + Alt + 1/2/3/4/5` | Jump to specific window in grouping |
|
||||
| `Super + Alt + Arrow` | Move window into grouping in direction of arrow |
|
||||
| `Super + Ctrl + Left/Right` | Move between windows inside a tiling group |
|
||||
| `Super + S` | Show scratchpad workspace overlay |
|
||||
| `Super + Alt + S` | Move window to scratchpad workspace |
|
||||
| `Super + Ctrl + Z` | Zoom in on screen (repeat for more zoom) |
|
||||
| `Super + Ctrl + Alt + Z` | Zoom fully out from screen |
|
||||
| `Super + /` | Step forward through monitor scaling options |
|
||||
|
||||
@@ -175,6 +175,21 @@ if grep -Fq $'SUPER + CTRL + X Toggle dictation' <<<"$missing_voxtype_output"; t
|
||||
fi
|
||||
pass "missing Voxtype skips dictation bindings"
|
||||
|
||||
# The Grave shortcuts are aliases, so the original SUPER + S pair has to keep
|
||||
# working alongside them.
|
||||
scratchpad_home="$tmpdir/scratchpad-home"
|
||||
mkdir -p "$scratchpad_home"
|
||||
scratchpad_output=$(run_omarchy_bindings "$scratchpad_home")
|
||||
grep -Fqx $'SUPER + S Toggle scratchpad' <<<"$scratchpad_output" ||
|
||||
fail "scratchpad keeps its existing toggle binding"
|
||||
grep -Fqx $'SUPER + grave Toggle scratchpad' <<<"$scratchpad_output" ||
|
||||
fail "scratchpad supports a Quake-style toggle binding"
|
||||
grep -Fqx $'SUPER + ALT + S Move window to scratchpad' <<<"$scratchpad_output" ||
|
||||
fail "scratchpad keeps its existing move binding"
|
||||
grep -Fqx $'SUPER + SHIFT + grave Move window to scratchpad' <<<"$scratchpad_output" ||
|
||||
fail "scratchpad supports a Quake-style move binding"
|
||||
pass "scratchpad retains existing bindings and adds Grave shortcuts"
|
||||
|
||||
# The panel hotkeys claim a row of keys that workspace switching already uses
|
||||
# under other modifiers, so the count matters as much as the bindings: a tenth
|
||||
# claim on SUPER + CTRL + a number is a collision with one of these.
|
||||
|
||||
Reference in New Issue
Block a user