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 = {
|
||||
|
||||
Reference in New Issue
Block a user