full functionality restored (omg)

This commit is contained in:
2026-05-13 19:49:14 +01:00
parent f678372ee4
commit 0909e98a03
8 changed files with 210 additions and 237 deletions

View File

@@ -51,6 +51,8 @@ for index, bind in ipairs(keyboardSplit) do
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"))
@@ -110,7 +112,7 @@ hl.bind(mainMod .. "minus", hl.dsp.workspace.toggle_special("scratch"))
hl.bind(mainMod .. "SHIFT + minus", hl.dsp.window.move({ workspace = "special:scratch", follow = false }))
-- Float resize and move window with mouse
hl.bind(subMod .. "mouse:272", hl.dsp.window.drag(), { mouse = true, drag = true })
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 })

32
modules/events.lua Normal file
View File

@@ -0,0 +1,32 @@
local appList = {
"waybar",
"dunst",
"wpaperd -d",
"wayvnc 0.0.0.0 --output=DP-1",
"syncthing -home=/home/user01/.config/syncthing -no-browser",
"gotify-desktop",
"sleep 10 && 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",
}
local localAppList
if Hostname == "HACKSTATION" then
-- If on desktop do all the decoration nonsense
localAppList = {
"kitten panel --edge=background -o background_opacity=0 --output-name HDMI-A-1 sh -c 'cmatrix -b -C magenta -a -u 10'",
"kitten panel --edge=background -o background_opacity=0 --output-name DP-2 sh -c 'cava'",
}
elseif Hostname == "mobile02" then
-- If on laptop, launch way-edges
localAppList = {
"way-edges",
}
end
table.insert(appList, localAppList)
-- For everything in the applist run it on startup
hl.on("hyprland.start", function()
for _, command in ipairs(appList) do
hl.exec_cmd(command)
end
end)

View File

@@ -1,17 +1,66 @@
-- Size for otter launcher
hl.window_rule({
name = "otter-launcher",
match = {
class = "otter",
},
float = true,
animation = "popin 80%",
size = { 410, 220 },
opaque = true,
})
-- Dont dim youtube windows
hl.window_rule({
name = "nodim-youtube",
match = {
class = "^(firefox|Firefox)$",
title = "^(.*YouTube.*)$",
},
no_dim = true,
opaque = true,
})
-- Define windows that float
local standardFloatingWindows = {
{ class = "^(xdg-desktop-portal-gtk)$" },
{ class = "^(firefox)$", title = "^(.*Save.*)" },
}
-- For every window that floats make a rule
for _, window in ipairs(standardFloatingWindows) do
hl.window_rule({
name = "float file selector",
match = {
-- both are optional ig
class = window.class or "",
title = window.title or "",
},
float = true,
animation = "popin 70%",
size = { 800, 500 },
})
end
-- Don't dim fullscreen windows
hl.window_rule({
name = "nodim fullscreen",
match = {
fullscreen = true,
},
no_dim = true,
opaque = true,
})
hl.window_rule({
name = "jelly slide",
match = {
class = "^(jf-tui)$",
},
animation = "slide top",
})
-- Define gaps for music workspace
hl.workspace_rule({
workspace = "special:music",
gaps_out = {
@@ -19,4 +68,29 @@ hl.workspace_rule({
right = 400,
bottom = 400,
},
animation = "slidefadevert",
})
-- Something from the example idk
hl.window_rule({
name = "move-hyprland-run",
match = { class = "hyprland-run" },
move = "20 monitor_h-120",
float = true,
})
-- Fix some dragging issues with XWayland
hl.window_rule({
name = "fix-xwayland-drags",
match = {
class = "^$",
title = "^$",
xwayland = true,
float = true,
fullscreen = false,
pin = false,
},
no_focus = true,
})

View File

@@ -1 +1,77 @@
local beziers = {
-- Overshoot
{ name = "heavyOvershoot", points = { 0.53, 0.51, 0.4, 1.22 } },
{ name = "lightOvershoot", points = { 0.33, 0.61, 0.63, 1.19 } },
-- Linear
{ name = "smoothSnap", points = { 0.32, 0.51, 0.44, 1 } },
{ name = "smoothIn", points = { 0.25, 1, 0.5, 1 } },
{ name = "smoothOutOvershoot", points = { 0.46, -0.25, 0.81, 0.51 } },
-- Springs
{ name = "hardSpring", kind = "spring" },
{ name = "mediumSpring", kind = "spring", stiffness = 50, dampening = 10 },
{ name = "looseSpring", kind = "spring", dampening = 5, stiffness = 50 },
}
-- For every curve in the table (ik it says bezier stfu)
for _, bezier in ipairs(beziers) do
-- If there are points then its not a spring
if bezier.points then
hl.curve(bezier.name, {
type = "bezier",
points = { { bezier.points[1], bezier.points[2] }, { bezier.points[3], bezier.points[4] } },
})
-- If its a spring
elseif bezier.kind == "spring" then
hl.curve(bezier.name, {
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,
})
else
-- You fucked something up
hl.notification.create({ text = "invalid curve generated", icon = "warning", timeout = 8000 })
end
end
local animations = {
-- Default animation
{ leaf = "global", speed = 5, spring = "mediumSpring" },
-- Window animations
{ leaf = "windows", speed = 2, spring = "mediumSpring", style = "slide right" },
{ leaf = "windowsOut", speed = 2, bezier = "heavyOvershoot", style = "popin 30%" },
-- Fade
{ leaf = "fade", speed = 2, bezier = "smoothIn" },
-- Workspaces and Special
{ leaf = "workspaces", speed = 2, bezier = "heavyOvershoot", style = "slidefade 20%" },
{ leaf = "specialWorkspace", speed = 5, spring = "mediumSpring", style = "slidefadevert -80%" },
}
-- For every entry in the animation table
for _, anim in ipairs(animations) do
-- If there is a bezier param
if anim.bezier then
hl.animation({
leaf = anim.leaf,
enabled = true,
speed = anim.speed,
bezier = anim.bezier or "",
style = anim.style or "",
})
elseif anim.spring then
-- Make a spring instead bcs apparently they're different idk
hl.animation({
leaf = anim.leaf,
enabled = true,
speed = anim.speed,
spring = anim.spring or "",
style = anim.style or "",
})
end
end

View File

@@ -1,24 +1,33 @@
hl.config({
input = {
kb_layout = "gb",
follow_mouse = 1,
kb_layout = "gb", -- Goddamn kier starmer
follow_mouse = 1, -- Moving to a window will focus it
touchpad = {
natural_scroll = true,
disable_while_typing = true,
natural_scroll = true, -- Better scrolling
disable_while_typing = true, -- Sanity
},
sensitivity = -0.3,
force_no_accel = false,
sensitivity = -0.3, -- DPI is too high ffs
force_no_accel = false, -- I love mouse acceleration
tablet = {
left_handed = true,
output = "current",
left_handed = true, -- Top 10 disabilities
output = "current", -- Make the tablet usable
},
},
cursor = {
inactive_timeout = 2,
warp_on_change_workspace = 1,
hide_on_key_press = true,
warp_on_toggle_special = 1,
inactive_timeout = 2, -- Hide white thing on the screen
hide_on_key_press = true, -- Hide white thing when typing
warp_on_change_workspace = 1, -- Make it go to workspaces
warp_on_toggle_special = 1, -- Go to special workspaces too
persistent_warps = true, -- Go back to where it was when I warp
},
})
if Hostname == "mobile02" then
hl.config({
input = { -- If on laptop make caps the escape key but make it be capslock when shift caps is pressed
kb_options = "caps:escape_shifted_capslock",
},
})
end

View File

@@ -1,15 +0,0 @@
local appList = {
"waybar",
"dunst",
"wpaperd -d",
"wayvnc 0.0.0.0 --output=DP-1",
"syncthing -home=/home/user01/.config/syncthing -no-browser",
"gotify-desktop",
"sleep 10 && 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",
}
hl.on("hyprland.start", function()
for _, command in ipairs(appList) do
hl.exec_cmd(command)
end
end)