From: Andre Ramnitz Date: Wed, 4 Nov 2026 12:24:43 +0000 (+0100) Subject: hypr: add equalize() and toggleRootRatio() X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=HEAD;p=dotfiles.git hypr: add equalize() and toggleRootRatio() --- diff --git a/dot-config/hypr/fragments/functions.lua b/dot-config/hypr/fragments/functions.lua new file mode 100644 index 0000000..d7deea7 --- /dev/null +++ b/dot-config/hypr/fragments/functions.lua @@ -0,0 +1,36 @@ +-- kak: filetype=lua:tabstop=4:indentwidth=4 +-- ░█░█░█░█░█▀█░█▀▄░█░░░█▀█░█▀█░█▀▄░░░█▀▀░█▀█░█▀█░█▀▀░▀█▀░█▀▀ +-- ░█▀█░░█░░█▀▀░█▀▄░█░░░█▀█░█░█░█░█░░░█░░░█░█░█░█░█▀▀░░█░░█░█ +-- ░▀░▀░░▀░░▀░░░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀░░░░▀▀▀░▀▀▀░▀░▀░▀░░░▀▀▀░▀▀▀ + + +-- equalize the split to nearest neighbours +local function equalize() + hl.dispatch(hl.dsp.layout("splitratio 1.0 exact")) +end + +hl.bind("SUPER + SHIFT + E", equalize) + +-- split ratio selector for ultrawide displays +local rootRatio = {} + +local function toggleRootRatio() + local ws = hl.get_active_special_workspace() + or hl.get_active_workspace() + + if not ws or ws.tiled_layout ~= "dwindle" then + return + end + + local id = ws.id + local ratio = rootRatio[id] == 1.334 and 1.0 or 1.334 + + hl.dispatch(hl.dsp.layout( + string.format("splitratio %.3f exact root", ratio) + )) + + rootRatio[id] = ratio +end + +hl.bind("SUPER + SHIFT + R", toggleRootRatio) + diff --git a/dot-config/hypr/fragments/keybinds.lua b/dot-config/hypr/fragments/keybinds.lua index 9cb6566..f5eaccf 100644 --- a/dot-config/hypr/fragments/keybinds.lua +++ b/dot-config/hypr/fragments/keybinds.lua @@ -34,9 +34,7 @@ hl.bind(mainMod .. " + A", hl.dsp.window.pseudo()) hl.bind(mainMod .. " + B", exec("$HOME/.config/hypr/scripts/browser_focus_or_run.sh")) hl.bind(mainMod .. " + C", exec("noctalia msg panel-toggle clipboard")) hl.bind(mainMod .. " + D", exec("noctalia msg panel-toggle launcher")) --- hl.bind(mainMod .. " + SHIFT + D", exec("killall fuzzel || fuzzel --config=$HOME/.config/fuzzel/fuzzel-centered.ini")) -hl.bind(mainMod .. " + E", exec("foot -a lf lf")) -hl.bind(mainMod .. " + SHIFT + E", exec("dolphin")) +-- SUPER+SHIFT+E reserved, see functions.lua hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ mode = "maximized" })) hl.bind(mainMod .. " + SHIFT + F", hl.dsp.window.fullscreen({ mode = "fullscreen" })) @@ -52,9 +50,8 @@ hl.bind(mainMod .. " + SHIFT + I", hl.dsp.window.move({ workspace = "special:ove hl.bind(mainMod .. " + P", exec("foot -w 640x400 -a popup -H hyprpicker")) hl.bind(mainMod .. " + SHIFT + P", hl.dsp.window.pin()) +-- SUPER+SHIFT+R reserved, see functions.lua hl.bind(mainMod .. " + S", hl.dsp.window.float()) --- hl.bind(mainMod .. " + S", hl.dsp.layout("colresize +conf")) --- hl.bind(mainMod .. " + SHIFT + S", hl.dsp.layout("colresize -conf")) hl.bind(mainMod .. " + V", hl.dsp.layout("togglesplit")) hl.bind(mainMod .. " + SHIFT + V", hl.dsp.layout("swapsplit")) diff --git a/dot-config/hypr/fragments/windowrules.lua b/dot-config/hypr/fragments/windowrules.lua index 7d9a3ad..bfd375d 100644 --- a/dot-config/hypr/fragments/windowrules.lua +++ b/dot-config/hypr/fragments/windowrules.lua @@ -5,17 +5,18 @@ -- ~/.config/hypr/fragments/windowrules.lua --- hide hyprbars on non-floating windows +-- catchall for non-floating windows hl.window_rule({ name = "nobar1", match = { float = false, }, no_shadow = true, - ["hyprbars:no_bar"] = true + ["hyprbars:no_bar"] = true, + no_wobble = true, }) --- hide hyprbars on specific windows +-- hide hyprbars on specific floating windows hl.window_rule({ name = "nobar2", match = { @@ -25,6 +26,7 @@ hl.window_rule({ ["hyprbars:no_bar"] = true }) +-- always floating hl.window_rule({ name = "floating_enable", match = { diff --git a/dot-config/hypr/hyprland.lua b/dot-config/hypr/hyprland.lua index 27a145e..c763a06 100644 --- a/dot-config/hypr/hyprland.lua +++ b/dot-config/hypr/hyprland.lua @@ -51,6 +51,7 @@ local menu = "qs -c noctalia-shell ipc call launcher toggle" hl.on("hyprland.start", function () hl.exec_cmd("~/.config/hypr/scripts/hyprinit.sh") -- also runs "openrc -U desktop" + hl.exec_cmd("/usr/libexec/pam_kwallet_init") hl.exec_cmd("hyprpm reload") hl.exec_cmd("env XDG_MENU_PREFIX=plasma- /usr/bin/kbuildsycoca6 --noincremental") hl.exec_cmd("/usr/bin/noctalia") @@ -134,32 +135,32 @@ hl.config({ blur = { enabled = true, - -- variant = "frost", + variant = "heat_shimmer", size = 3, passes = 1, vibrancy = 0.1696, - noise = 0.0696, + noise = 0.0117, }, - -- wobble = { - -- enabled = true, - -- }, + glow = { + enabled = false, + }, motion_blur = { enabled = true, - samples = 7, + samples = 32, }, - -- wobble = { - -- enabled = true, - -- mesh = 22, - -- stiffness =200, - -- damping = 12, - -- mass = 1, - -- intensity = 0.2, - -- value_epsilon = 0.25, - -- velocity_epsilon = 2 - -- }, + wobble = { + enabled = true, + mesh = 12, + stiffness = 200, + damping = 11, + mass = 0.9, + intensity = 0.2, + value_epsilon = 0.25, + velocity_epsilon = 2 + }, }, }) @@ -184,12 +185,12 @@ hl.config({ -- See https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ for more hl.config({ dwindle = { - force_split = 3, + force_split = 2, preserve_split = true, -- You probably want this smart_split = false, smart_resizing = true, permanent_direction_override = false, - special_scale_factor = 2, + special_scale_factor = 1, split_width_multiplier = 1.5, use_active_for_splits = true, default_split_ratio = 1.0, @@ -421,6 +422,7 @@ require("fragments.workspacerules") require("fragments.layerrules") require("fragments.animations") require("fragments.windowrules") +require("fragments.functions") -- For Noctalia Color templates require("noctalia").apply_theme() diff --git a/dot-config/hypr/noctalia.lua b/dot-config/hypr/noctalia.lua index d8df6c6..97ad5d8 100644 --- a/dot-config/hypr/noctalia.lua +++ b/dot-config/hypr/noctalia.lua @@ -1,12 +1,12 @@ -- Generated by Noctalia -local primary = "rgb(9b59ba)" -local surface = "rgb(f5f1fa)" -local on_surface = "rgb(1c1822)" -local secondary = "rgb(784999)" -local on_secondary = "rgb(ffffff)" -local error = "rgb(e9899d)" -local on_error = "rgb(1e1418)" +local primary = "rgb(8fbcbb)" +local surface = "rgb(2e3440)" +local on_surface = "rgb(eceff4)" +local secondary = "rgb(88c0d0)" +local on_secondary = "rgb(2e3440)" +local error = "rgb(bf616a)" +local on_error = "rgb(2e3440)" local function apply_theme() hl.config({