Compare commits

...

11 Commits

Author SHA1 Message Date
ddf2db90e9 fixed fucked url that isnt actually https 2026-07-02 09:01:39 +01:00
8b2ec0c7d7 changed endpoint becuase people are using my dotfiles
It was a known issue that the notification triggers on all my devices
because of how the automation is set up, but it also tells me that OTHER
PEOPLE ARE USING MY DOTFILES!!!!! THATS INSANE!!!! If you're reading
this because you use them too, thank you so much for validating my work,
it means alot. Just stop triggering my automations lol
2026-06-30 00:09:17 +01:00
968ab1ec10 added woomer windowrule 2026-06-29 17:30:14 +01:00
b0177ed346 added woomer 2026-06-27 10:39:15 +01:00
a143b1a1f1 enabled quickshell on desktop 2026-06-26 21:10:49 +01:00
b2d5ecdd0e reorder 2026-06-25 14:39:46 +01:00
aa96d67e71 moved all binds into the array 2026-06-23 16:14:29 +01:00
9257437dc8 added wlshowkeys layerrule 2026-06-17 16:13:38 +01:00
8493ad4365 adjusted heavy spring weight because it was too light 2026-06-15 13:33:52 +01:00
93f532b09b fixed shit values 2026-06-15 13:31:49 +01:00
017cd2257f adjust values after update changed weighting idk 2026-06-15 13:28:23 +01:00
4 changed files with 196 additions and 108 deletions

View File

@@ -1,69 +1,4 @@
-- Set modifier keys
local mainMod = "SUPER + "
local subMod = mainMod
local keyboardString = "qwertyuiop"
local keybindIndex = 1
-- Set different modifiers on laptop
if Hostname == "mobile02" then
mainMod = "ALT + "
subMod = "SUPER + "
keyboardString = "1234567890"
keybindIndex = 2
end
-- Delete windows
hl.bind(mainMod .. "backspace", hl.dsp.window.close())
-- If otter is open, focus it, if not make a new window
hl.bind(mainMod .. "d", function()
if hl.get_windows({ class = "otter" })[1] ~= nil then
hl.dispatch(hl.dsp.focus({ window = "class:otter" }))
else
hl.exec_cmd("kitty --class otter --title otter-launcher -e sh -c 'sleep 0.05 && otter-launcher'")
end
end)
-- Open windows
local globalAppBinds = {
{ 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
local modBind = bind.mod or mainMod
if bind.key[keybindIndex] then
hl.bind(modBind .. bind.key[keybindIndex], hl.dsp.exec_cmd(bind.dispatch))
else
hl.bind(modBind .. bind.key[1], hl.dsp.exec_cmd(bind.dispatch))
end
end
-- Workspace functions
local keyboardSplit = {}
for char in keyboardString:gmatch(".") do
table.insert(keyboardSplit, char)
end
for index, bind in ipairs(keyboardSplit) do
hl.bind(mainMod .. bind, hl.dsp.focus({ workspace = index }))
hl.bind(mainMod .. "SHIFT + " .. bind, hl.dsp.window.move({ workspace = index, follow = false }))
end
-- Music workspace
hl.bind(mainMod .. "m", hl.dsp.workspace.toggle_special("music"))
-- Move windows with hjkl
hl.bind(mainMod .. "SHIFT + h", hl.dsp.layout("swapcol l"))
hl.bind(mainMod .. "SHIFT + l", hl.dsp.layout("swapcol r"))
hl.bind(mainMod .. "k", hl.dsp.focus({ direction = "up" }))
hl.bind(mainMod .. "j", hl.dsp.focus({ direction = "down" }))
-- Function to get window position relative to monitor
-- Get window position relative to monitor
local function normalise_current_window_pos()
local active = hl.get_active_window()
if active then
@@ -82,44 +17,179 @@ 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
-- 9 derived from 5 gap plus 3 border (8), so first pixel of window is 9
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"))
-- Notification helper function
local function notif(text, timeout, icon)
hl.notification.create({
text = text or "notification",
timeout = timeout or 2000,
icon = icon or "ok",
})
end
end
end)
hl.bind(mainMod .. "l", function()
-- Set modifier keys
local mainMod = "SUPER + "
local subMod = mainMod
local keyboardString = "qwertyuiop"
local keybindIndex = 1
local recordingMode = 0
-- Set different modifiers on laptop
if Hostname == "mobile02" then
mainMod = "ALT + "
subMod = "SUPER + "
keyboardString = "1234567890"
keybindIndex = 2
end
local globalAppBinds = {
---- Window functions
{ key = { "BACKSPACE" }, dispatch = hl.dsp.window.close() },
{ key = { "b", "f" }, dispatch = hl.dsp.window.fullscreen({ action = "toggle" }) },
{ mod = subMod, key = { "space" }, dispatch = hl.dsp.window.float() },
---- Apps
-- Launcher
{
key = { "d" },
dispatch = function()
if hl.get_windows({ class = "otter" })[1] ~= nil then
hl.dispatch(hl.dsp.focus({ window = "class:otter" }))
else
hl.exec_cmd("kitty --class otter --title otter-launcher -e sh -c 'sleep 0.05 && otter-launcher'")
end
end,
},
-- Terminal
{
key = { "RETURN" },
dispatch = function()
if recordingMode == 1 then
hl.exec_cmd("kitty -o font_size=24 -o window_margin_width=20")
else
hl.exec_cmd("kitty")
end
end,
},
-- Firefox and file browser
{ key = { "f", "o" }, dispatch = "firefox" },
{ key = { "s" }, dispatch = "nemo" },
---- Move windows
{ key = { "k" }, dispatch = hl.dsp.focus({ direction = "up" }) },
{ key = { "j" }, dispatch = hl.dsp.focus({ direction = "down" }) },
{ key = { "SHIFT + h" }, dispatch = hl.dsp.layout("swapcol l") },
{ key = { "SHIFT + l" }, dispatch = hl.dsp.layout("swapcol r") },
{
key = { "l" },
dispatch = function()
-- Move before so you can detect if it is the last window
hl.dispatch(hl.dsp.layout("move +col"))
if not normalise_current_window_pos() then
-- Go back a window
hl.dispatch(hl.dsp.layout("move -col"))
-- Move to monitor to the right
hl.dispatch(hl.dsp.focus({ monitor = "-1" }))
hl.dispatch(hl.dsp.focus({ monitor = "right" }))
end
end)
end,
},
{
key = { "h" },
dispatch = function()
local pos = normalise_current_window_pos()
if pos then
-- 9 derived from 5 gap plus 3 border (8), so first pixel of window is 9
if pos == 9 then
-- If first window, then move to monitor to the left
hl.dispatch(hl.dsp.focus({ monitor = "left" }))
else
-- If not the first window then go to the column to the left
hl.dispatch(hl.dsp.layout("move -col"))
end
end
end,
},
-- Fullscreen with b
hl.bind(mainMod .. "b", hl.dsp.window.fullscreen({ action = "toggle" }))
---- Special Workspaces
{ key = { "m" }, dispatch = hl.dsp.workspace.toggle_special("music") },
{ key = { "minus" }, dispatch = hl.dsp.workspace.toggle_special("scratch") },
{ key = { "SHIFT + minus" }, dispatch = hl.dsp.window.move({ workspace = "special:scratch", follow = false }) },
-- SubMod plus space to float
hl.bind(subMod .. "space", hl.dsp.window.float())
-- Youtuber mode lol
{
key = { "z" },
dispatch = function()
if recordingMode == 0 then
recordingMode = 1
hl.exec_cmd(
"wshowkeys -a right -F 'FiraMono Nerd Font 35' -s '#cba6f7ff' -f '#cdd6f4ff' -b '#45475a99' -m 70 -l 60 -t 1000 -a top"
)
notif("Recording Mode Enabled")
else
recordingMode = 0
hl.exec_cmd("pkill wshowkeys")
notif("Recording Mode Disabled")
end
end,
},
-- Special workspace
hl.bind(mainMod .. "minus", hl.dsp.workspace.toggle_special("scratch"))
hl.bind(mainMod .. "SHIFT + minus", hl.dsp.window.move({ workspace = "special:scratch", follow = false }))
{
key = { "x" },
dispatch = function()
if recordingMode == 1 then
hl.exec_cmd("woomer --output DP-1 --radius 2 --monitor DP-1 -S")
end
end,
},
-- Float resize and move window with mouse
hl.bind(subMod .. "mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(subMod .. "mouse:272", hl.dsp.window.float(), { mouse = true, click = true })
hl.bind(subMod .. "mouse:272", hl.dsp.layout("promote"), { mouse = true, release = true })
hl.bind(subMod .. "SHIFT + mouse:272", hl.dsp.window.resize(), { mouse = true })
-- Logout menu
{ key = { "a", "e" }, dispatch = "wlogout -b 5" },
-- Screenshot
{ mod = subMod, key = { "SHIFT + s" }, dispatch = "grimblast copy area" },
-- Mouse for moving windows
{ mod = subMod, key = { "mouse:272" }, dispatch = hl.dsp.window.drag(), opts = { mouse = true } },
{ mod = subMod, key = { "mouse:272" }, dispatch = hl.dsp.window.float(), opts = { mouse = true, click = true } },
{
mod = subMod,
key = { "mouse:272" },
dispatch = hl.dsp.layout("promote"),
opts = { mouse = true, release = true },
},
{ mod = subMod, key = { "SHIFT + mouse:272" }, dispatch = hl.dsp.window.resize(), opts = { mouse = true } },
}
-- Workspace switch keys
for _, bind in ipairs(globalAppBinds) do
local modBind = bind.mod or mainMod
local command
if type(bind.dispatch) ~= "string" then
command = bind.dispatch
else
command = hl.dsp.exec_cmd(bind.dispatch)
end
local opts = {}
if bind.opts then
opts = bind.opts
end
if bind.key[keybindIndex] then
hl.bind(modBind .. bind.key[keybindIndex], command, opts)
else
hl.bind(modBind .. bind.key[1], command)
end
end
-- Workspace functions
local keyboardSplit = {}
for char in keyboardString:gmatch(".") do
table.insert(keyboardSplit, char)
end
for index, bind in ipairs(keyboardSplit) do
hl.bind(mainMod .. bind, hl.dsp.focus({ workspace = index }))
hl.bind(mainMod .. "SHIFT + " .. bind, hl.dsp.window.move({ workspace = index, follow = false }))
end

View File

@@ -1,10 +1,8 @@
local appList = {
"waybar",
"dunst",
"wpaperd -d",
"syncthing -home=/home/user01/.config/syncthing -no-browser",
"gotify-desktop",
'sleep 5 && curl -X POST -H "Content-Type: application/json" -d "{\\"ref\\":\\"$(git -C ~/.dotfiles rev-parse HEAD)\\", \\"status\\":\\"$(git -C ~/.dotfiles diff --quiet && echo "clean" || echo "dirty")\\"}" https://n8n.voidarc.co.uk/webhook/config-checker',
'sleep 5 && curl -X POST -H "Content-Type: application/json" -d "{\\"ref\\":\\"$(git -C ~/.dotfiles rev-parse HEAD)\\", \\"status\\":\\"$(git -C ~/.dotfiles diff --quiet && echo "clean" || echo "dirty")\\"}" http://192.168.1.180:5678/webhook/config-checker',
}
local localAppList
@@ -12,11 +10,14 @@ if Hostname == "HACKSTATION" then
-- If on desktop do desktop things
localAppList = {
"wayvnc 0.0.0.0 --output=DP-1",
"quickshell",
}
elseif Hostname == "mobile02" then
-- If on laptop, do laptop things
localAppList = {
"way-edges",
"waybar",
"dunst",
}
end

View File

@@ -65,6 +65,14 @@ hl.window_rule({
animation = "slide top",
})
hl.window_rule({
name = "woomer no anim",
match = {
title = "woomer",
},
no_anim = true,
})
-- Define gaps for music workspace
hl.workspace_rule({
workspace = "special:music",
@@ -137,3 +145,12 @@ hl.layer_rule({
blur = false,
ignore_alpha = 0,
})
hl.layer_rule({
name = "showkeys",
match = {
namespace = "showkeys",
},
blur = false,
no_anim = true,
})

View File

@@ -11,7 +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 = "heavierSpring", kind = "spring", mass = 1.3, stiffness = 50, dampening = 11 },
{ name = "looseSpring", kind = "spring", dampening = 5, stiffness = 50 },
}
@@ -29,8 +29,8 @@ for _, bezier in ipairs(beziers) do
type = "spring",
-- If all the parameters are empty make a spring with the values from the wiki
mass = bezier.mass or 1,
stiffness = bezier.stiffness or 70,
dampening = bezier.dampening or 10,
stiffness = (bezier.stiffness or 70) + 430,
dampening = (bezier.dampening or 10) + 26,
})
else
-- You fucked something up