mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
feat(config): enable selective blur for terminals and set flat decoration defaults
This commit is contained in:
1 parent
2288fd065e
commit
8c50abb602
2 files changed
+53
-27
No files matched your search
@@ -5,26 +5,44 @@
|
|||||||
-- last writer and wins over the theme. That is the point of this file: a theme
|
-- last writer and wins over the theme. That is the point of this file: a theme
|
||||||
-- picks colours, the compositor's feel stays ours.
|
-- picks colours, the compositor's feel stays ours.
|
||||||
|
|
||||||
-- Omarchy 4's decoration defaults, pinned explicitly.
|
-- Flat by default, glass for terminals only.
|
||||||
--
|
--
|
||||||
-- Stock quattro is flat and cheap: rounding 0, blur off, shadow off
|
-- Stock quattro is rounding 0, blur off, shadow off
|
||||||
-- ($OMARCHY_PATH/default/hypr/looknfeel.lua). Most third-party themes ship a
|
-- ($OMARCHY_PATH/default/hypr/looknfeel.lua); themes that ship a hyprland.lua
|
||||||
-- hyprland.lua that turns glass on instead -- Cyberdream and Spectra both did --
|
-- turn all three on for every window (Cyberdream and Spectra both did), which
|
||||||
-- and on this box that is a bad trade: blur at size 6 / 3 passes over an eDP
|
-- on this box is a bad trade: blur over an eDP panel plus a 5K Studio Display
|
||||||
-- panel plus a 5K Studio Display is real frame time on an iGPU sharing system
|
-- is real frame time on an iGPU sharing system memory, and Chromium/Electron
|
||||||
-- memory, and rounded corners plus per-window opacity make the Chromium and
|
-- windows cannot paint a transparent background, so fading them just shows
|
||||||
-- Electron surfaces (which cannot paint a transparent background themselves)
|
-- wallpaper where page background should be.
|
||||||
-- show wallpaper where page background should be.
|
|
||||||
--
|
--
|
||||||
-- Turning blur off globally also neutralises any layer_rule blur a theme adds
|
-- Blur has to be enabled globally to exist at all -- there is no positive
|
||||||
-- for the Quickshell surfaces: a layer rule cannot blur while
|
-- `blur` window rule, only `no_blur`, and kitty's own `background_blur` (the
|
||||||
-- decoration:blur:enabled is false.
|
-- ext-background-effect-v1 protocol, which Hyprland 0.56 does implement) is a
|
||||||
|
-- no-op while decoration:blur:enabled is false. So: switch it on here, then
|
||||||
|
-- opt every window out again except the terminals below.
|
||||||
hl.config({
|
hl.config({
|
||||||
|
general = {
|
||||||
|
-- Master instead of Omarchy's dwindle. Per-workspace layouts saved by
|
||||||
|
-- omarchy-hyprland-workspace-layout-toggle (~/.local/state/omarchy/
|
||||||
|
-- workspace-layouts/*.lua) still win for the workspaces they name.
|
||||||
|
layout = "master",
|
||||||
|
},
|
||||||
|
|
||||||
decoration = {
|
decoration = {
|
||||||
rounding = 0,
|
rounding = 0,
|
||||||
|
|
||||||
blur = {
|
blur = {
|
||||||
enabled = false,
|
enabled = true,
|
||||||
|
-- Cheaper than the themes' size 6 / 3 passes; with only terminals
|
||||||
|
-- blurred this is a handful of quads per frame, not the whole screen.
|
||||||
|
size = 5,
|
||||||
|
passes = 2,
|
||||||
|
brightness = 0.8,
|
||||||
|
contrast = 1.1,
|
||||||
|
vibrancy = 0.15,
|
||||||
|
noise = 0.01,
|
||||||
|
new_optimizations = true,
|
||||||
|
popups = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
shadow = {
|
shadow = {
|
||||||
@@ -40,12 +58,21 @@ hl.config({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Omarchy tags every mapped window `default-opacity` and fades it with this
|
-- Omarchy tags every mapped window `default-opacity` and fades it to
|
||||||
-- rule; themes re-issue it with deeper values (Cyberdream used 0.98 / 0.92).
|
-- 0.985 / 0.96; themes deepen that (Cyberdream used 0.98 / 0.92). Rules are
|
||||||
-- Window rules are last-match-wins, so restating the default here puts every
|
-- last-match-wins, so this pins every window opaque and blur-free. An opaque
|
||||||
-- window that did not explicitly opt out of the tag back on stock fade.
|
-- window has nothing visible behind it, so the pass above never runs for it.
|
||||||
-- Terminals keep their own alpha (kitty's `background_opacity`) on top of it.
|
o.window({ tag = "default-opacity" }, { opacity = "1.0 1.0", no_blur = true })
|
||||||
o.window({ tag = "default-opacity" }, { opacity = "0.985 0.96" })
|
|
||||||
|
-- The exception: terminals carry their own alpha (kitty's
|
||||||
|
-- `background_opacity`, 0.9 in ~/.config/kitty/kitty.conf), so they are the one
|
||||||
|
-- surface where blurring the backdrop buys anything. Full class list because
|
||||||
|
-- the kitty hosts run under their own app-ids (kitty-herdr, kitty-tmux,
|
||||||
|
-- kitty-goliath) and Omarchy tags nothing as `terminal`.
|
||||||
|
o.window(
|
||||||
|
"^(kitty(-.*)?|Alacritty|com\\.mitchellh\\.ghostty|foot|org\\.codeberg\\.dnkl\\.foot|wezterm)$",
|
||||||
|
{ no_blur = false }
|
||||||
|
)
|
||||||
|
|
||||||
-- Themes are also free to re-enable the workspace slide (Spectra sets
|
-- Themes are also free to re-enable the workspace slide (Spectra sets
|
||||||
-- `workspaces` with its "flow" bezier); Omarchy's default is off. Restate it.
|
-- `workspaces` with its "flow" bezier); Omarchy's default is off. Restate it.
|
||||||
|
|||||||
@@ -4,15 +4,14 @@ bold_italic_font auto
|
|||||||
window_padding_width 8
|
window_padding_width 8
|
||||||
hide_window_decorations yes
|
hide_window_decorations yes
|
||||||
# Transparency: kitty's own alpha, not the compositor's -- Hyprland fades a
|
# Transparency: kitty's own alpha, not the compositor's -- Hyprland fades a
|
||||||
# window uniformly (chrome included), kitty only makes the cell background
|
# whole window (chrome included), kitty only makes the cell background
|
||||||
# translucent, so text stays fully opaque on top of it.
|
# translucent, so text stays fully opaque on top of it. This alpha is also what
|
||||||
|
# makes kitty the one window Hyprland blurs: hypr/looknfeel.lua enables blur
|
||||||
|
# globally and then opts every window out except the terminal classes, and an
|
||||||
|
# opaque window has no backdrop to blur. kitty's own `background_blur` does
|
||||||
|
# nothing here -- it rides ext-background-effect-v1, which Hyprland ignores
|
||||||
|
# while decoration:blur:enabled is false, and is redundant once it is true.
|
||||||
background_opacity 0.9
|
background_opacity 0.9
|
||||||
# Per-window blur without global blur. Hyprland 0.56 implements the staging
|
|
||||||
# protocol ext-background-effect-v1 and kitty's Wayland backend speaks it, so
|
|
||||||
# kitty asks the compositor to blur the region behind its own surface. That is
|
|
||||||
# why hypr/looknfeel.lua can keep decoration:blur:enabled = false: nothing else
|
|
||||||
# on screen pays for the blur pass. Needs background_opacity < 1.
|
|
||||||
background_blur 1
|
|
||||||
cursor_blink_interval 1
|
cursor_blink_interval 1
|
||||||
copy_on_select auto
|
copy_on_select auto
|
||||||
strip_trailing_spaces smart
|
strip_trailing_spaces smart
|
||||||
|
|||||||
Reference in new issue
Block a user