From 65c506f8344f7a23219002f3131f25544f08642d Mon Sep 17 00:00:00 2001 From: voidarc Date: Thu, 14 May 2026 19:13:45 +0100 Subject: [PATCH] changed some anim stuff and added screenshot bind --- modules/binds.lua | 15 ++++++++++----- modules/monitors.lua | 1 + modules/settings/animations.lua | 3 ++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/modules/binds.lua b/modules/binds.lua index 87d2140..0771c9b 100644 --- a/modules/binds.lua +++ b/modules/binds.lua @@ -25,18 +25,20 @@ hl.bind(mainMod .. "d", function() end) -- Open windows -local globalAppBinds = { +local appBinds = { { key = { "RETURN" }, dispatch = "kitty" }, { key = { "f", "o" }, dispatch = "firefox" }, { key = { "s" }, dispatch = "nemo" }, { key = { "a", "e" }, dispatch = "wlogout -b 5" }, + { mod = subMod, key = { "SHIFT + s" }, dispatch = "grimblast copy area" }, } -for _, bind in ipairs(globalAppBinds) do +for _, bind in ipairs(appBinds) do + local modBind = bind.mod or mainMod if bind.key[keybindIndex] then - hl.bind(mainMod .. bind.key[keybindIndex], hl.dsp.exec_cmd(bind.dispatch)) + hl.bind(modBind .. bind.key[keybindIndex], hl.dsp.exec_cmd(bind.dispatch)) else - hl.bind(mainMod .. bind.key[1], hl.dsp.exec_cmd(bind.dispatch)) + hl.bind(modBind .. bind.key[1], hl.dsp.exec_cmd(bind.dispatch)) end end @@ -80,6 +82,7 @@ local function normalise_current_window_pos() end end +-- Change scroll binds to be better hl.bind(mainMod .. "h", function() local pos = normalise_current_window_pos() if pos then @@ -87,9 +90,11 @@ hl.bind(mainMod .. "h", function() if pos == 9 then -- If first window, then move to monitor to the left hl.dispatch(hl.dsp.focus({ monitor = "-1" })) + else + -- If not the first window then go to the column to the left + hl.dispatch(hl.dsp.layout("move -col")) end end - hl.dispatch(hl.dsp.layout("move -col")) end) hl.bind(mainMod .. "l", function() diff --git a/modules/monitors.lua b/modules/monitors.lua index bcb90c5..019da12 100644 --- a/modules/monitors.lua +++ b/modules/monitors.lua @@ -21,6 +21,7 @@ if Hostname == "HACKSTATION" then }) hl.workspace_rule({ workspace = "1", monitor = "DP-1" }) + hl.workspace_rule({ workspace = "4", monitor = "DP-1" }) hl.workspace_rule({ workspace = "2", monitor = "HDMI-A-1" }) hl.workspace_rule({ workspace = "3", monitor = "DP-2" }) else diff --git a/modules/settings/animations.lua b/modules/settings/animations.lua index 334c8d4..8acfbf5 100644 --- a/modules/settings/animations.lua +++ b/modules/settings/animations.lua @@ -11,6 +11,7 @@ local beziers = { -- Springs { name = "hardSpring", kind = "spring" }, { name = "mediumSpring", kind = "spring", stiffness = 50, dampening = 10 }, + { name = "heavierSpring", kind = "spring", mass = 1.2, stiffness = 50, dampening = 11 }, { name = "looseSpring", kind = "spring", dampening = 5, stiffness = 50 }, } @@ -39,7 +40,7 @@ end local animations = { -- Window animations - { leaf = "windows", speed = 2, spring = "mediumSpring", style = "slide right" }, + { leaf = "windows", speed = 2, spring = "heavierSpring", style = "slide right" }, { leaf = "windowsOut", speed = 2, bezier = "heavyOvershoot", style = "popin 30%" }, -- Fade