feat: start new lua-based hyprland config

This commit is contained in:
2026-06-13 16:12:20 +02:00
parent d6d9a28161
commit a253ce56b7
22 changed files with 376 additions and 345 deletions
+10
View File
@@ -0,0 +1,10 @@
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.define_submap("launch", function()
hl.bind("l", function()
hl.dispatch(hl.dsp.exec_cmd("librewolf"))
exit_submap()
end)
end)
+91
View File
@@ -0,0 +1,91 @@
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
hl.define_submap("launch", function()
-- Librewolf
hl.bind("l", function()
hl.dispatch(hl.dsp.exec_cmd("librewolf"))
exit_submap()
end)
-- Steam
hl.bind("s", function()
hl.dispatch(hl.dsp.exec_cmd("steam"))
exit_submap()
end)
-- Discord
hl.bind("d", function()
hl.dispatch(hl.dsp.exec_cmd("vesktop"))
exit_submap()
end)
-- Kitty
hl.bind("k", function()
hl.dispatch(hl.dsp.exec_cmd("kitty"))
exit_submap()
end)
hl.bind("Return", function()
hl.dispatch(hl.dsp.exec_cmd("kitty"))
exit_submap()
end)
-- Filezilla
hl.bind("f", function()
hl.dispatch(hl.dsp.exec_cmd("filezilla"))
exit_submap()
end)
-- Thunderbird
hl.bind("t", function()
hl.dispatch(hl.dsp.exec_cmd("thunderbird"))
exit_submap()
end)
-- Zathura
hl.bind("z", function()
hl.dispatch(hl.dsp.exec_cmd("zathura"))
exit_submap()
end)
-- Brave
hl.bind("Shift + B", function()
hl.dispatch(hl.dsp.exec_cmd("brave"))
exit_submap()
end)
-- bsmanager
hl.bind("b", function()
hl.dispatch(hl.dsp.exec_cmd("/opt/bs-manager/bs-manager"))
exit_submap()
end)
-- ALVR
hl.bind("p", function()
hl.dispatch(hl.dsp.exec_cmd("alvr_dashboard"))
exit_submap()
end)
-- Qalculate
hl.bind("c", function()
hl.dispatch(hl.dsp.exec_cmd("qalculate-qt"))
exit_submap()
end)
-- AirPlay
hl.bind("a", function()
hl.dispatch(hl.dsp.exec_cmd("notify-send 'AirPlay server is starting...' --app-name='AirPlay Video'"))
hl.dispatch(
hl.dsp.exec_cmd(
"terminator -T 'hiddent'terminator' -e 'systemctl start avahi-daemon' && sleep 5 && uxplay -n LinuxVideoplay -nh"
)
)
exit_submap()
end)
-- Escape
hl.bind("Escape", function()
exit_submap()
end)
end)
+10
View File
@@ -0,0 +1,10 @@
hl.config({
general = {
gaps_in = 3,
gaps_out = 4,
border_size = 2,
no_focus_fallback = true,
layout = "dwindle",
},
})
+1
View File
@@ -0,0 +1 @@
-- TODO: Check out what this does (pretty sure as in i3)
+51
View File
@@ -0,0 +1,51 @@
--- @param swap_escape boolean
return function(swap_escape)
hl.config({
inputs = {
kb_options = swap_escape and "caps:swapescape" or "",
kb_layout = "us",
kb_variant = "altgr-intl",
natural_scroll = "true",
numlock_by_default = true,
repeat_delay = 400,
follow_mouse = 2,
mouse_refocus = true,
scroll_factor = 2,
accel_profile = "flat",
touchpad = {
disable_while_typing = true,
natural_scroll = true,
scroll_factor = 4,
},
focus_on_close = 1,
sensitivity = 0,
},
gestures = {
workspace_swipe_distance = 200,
workspace_swipe_cancel_ratio = 0.3,
workspace_swipe_forever = true,
workspace_swipe_direction_lock = false,
},
})
hl.gesture({
fingers = 3,
direction = "horizontal",
action = "workspace",
})
hl.gesture({
fingers = 3,
direction = "down",
action = "close",
})
hl.gesture({
fingers = 3,
direction = "up",
action = "fullscreen",
})
end
+23
View File
@@ -0,0 +1,23 @@
hl.config({
xwayland = {
force_zero_scaling = true,
},
misc = {
disable_hyprland_logo = true,
disable_splash_rendering = true,
vrr = 3,
allow_session_lock_restore = true,
},
dwindle = {
pseudotile = true,
force_split = 2,
preserve_split = true,
},
binds = {
workspace_back_and_forth = true,
},
cursor = {
no_warps = false,
inactive_timeout = 5,
},
})
+26
View File
@@ -0,0 +1,26 @@
hl.config({
decoration = {
inactive_opacity = 1,
rounding = 10,
shadow = {
enabled = true,
range = 4,
},
blur = {
enabled = true,
xray = true,
new_optimizations = true,
size = 1,
passes = 2,
},
dim_inactive = true,
dim_strength = 0.1,
-- TODO: Consider adding glow?
},
animations = {
enabled = true,
},
})
+6
View File
@@ -0,0 +1,6 @@
hl.on("hyprland.start", function()
-- hl.exec_cmd("~/.config/hypr/xdg-portal-hyprland")
-- hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY DISPLAY")
-- hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
hl.exec_cmd("systemctl --user start hyprpolkitagent")
end)
+44
View File
@@ -0,0 +1,44 @@
return function(is_laptop, is_docked)
if is_laptop then
hl.monitor({
output = "",
mode = "preferred",
position = "auto",
scale = 1,
})
if is_docked then
hl.monitor({
output = "eDP-1",
disabled = true,
})
else
hl.monitor({
output = "eDP-1",
mode = "2880x1800@240",
position = "0x0",
scale = 1.5,
})
end
elseif is_laptop and is_docked then
hl.monitor({
output = "DP-1",
mode = "1920x1080@144",
position = "0x0",
scale = 1,
})
else
hl.monitor({
output = "DP-1",
mode = "1920x1080@144",
position = "0x0",
scale = 1,
vrr = 2
})
hl.monitor({
output = "DP-2",
mode = "1920x1080@75",
position = "1920x0",
scale = 1,
})
end
end