feat: hyprland done, testing needed, add wlogout config

This commit is contained in:
2026-06-14 07:54:36 +02:00
parent 37cf063eb1
commit d2e569114f
18 changed files with 180 additions and 8 deletions
+47 -4
View File
@@ -1,9 +1,52 @@
-- TODO: Laptop vs desktop vs docked config
local swap_escape = false
require("hyprland.core.general")
require("hyprland.core.input")(swap_escape)
-- Determine current platform
local is_docked = false
local laptop_config = false
local read_platform = pcall(function()
io.popen("cat ~/.config/janishutz/platform-laptop")
end)
local read_docked = pcall(function()
io.popen("cat ~/.config/janishutz/docked")
end)
if read_platform then
laptop_config = true
end
if read_docked then
laptop_config = true
end
-- Core
require("colors")
require("hyprland.core.general")
require("hyprland.core.input")(laptop_config)
require("hyprland.core.group")
require("hyprland.core.misc")
require("hyprland.core.style")
-- Binds
require("hyprland.binds.device")(laptop_config)
require("hyprland.binds.groups")
require("hyprland.binds.launch")
require("hyprland.binds.main")
require("hyprland.binds.notifications")
require("hyprland.binds.screenshot")
require("hyprland.binds.window")
require("hyprland.binds.workspace")
-- Window rules
require("hyprland.windowrules.floating")
require("hyprland.windowrules.idle")
require("hyprland.windowrules.tags")
require("hyprland.windowrules.workspaces")
-- Workspace rules
require("hyprland.workspacerules.main")
-- Monitors
require("hyprland.monitors")(laptop_config, is_docked)
-- Execs
require("hyprland.execs")
hl.device({
name = "pnp0c50:00-093a:0255-touchpad",
+15
View File
@@ -28,6 +28,21 @@ return function(is_laptop)
end)
end
hl.bind("Shift + T", function ()
hl.device({
name = "pnp0c50:00-093a:0255-touchpad",
enabled = false
})
hl.dispatch(hl.dsp.exec_cmd("notify-send 'Disabled Trackpad' --app-name='Hyprctl'"))
end)
hl.bind("T", function ()
hl.device({
name = "pnp0c50:00-093a:0255-touchpad",
enabled = true
})
hl.dispatch(hl.dsp.exec_cmd("notify-send 'Enabled Trackpad' --app-name='Hyprctl'"))
end)
hl.bind("Escape", function()
exit_submap()
end)
+9
View File
@@ -0,0 +1,9 @@
hl.bind("Super + X", hl.dsp.submap("launch"))
hl.bind("Super + D", hl.dsp.submap("device"))
hl.bind("Super + C", hl.dsp.submap("notifications"))
hl.bind("Super + G", hl.dsp.submap("groups"))
hl.bind("Super + S", hl.dsp.submap("screenshot"))
hl.bind("Super + W", hl.dsp.submap("window"))
hl.bind("Super + A", hl.dsp.submap("workspace"))
hl.bind("Super + Space", hl.dsp.exec_cmd("hyprlauncher"))
hl.bind("Super + Escape", hl.dsp.exec_cmd("wlogout"))
-1
View File
@@ -1,4 +1,3 @@
-- TODO: colours
hl.config({
group = {
auto_group = false,
+2
View File
@@ -4,6 +4,8 @@ hl.on("hyprland.start", function()
-- hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
hl.exec_cmd("systemctl --user start hyprpolkitagent")
hl.exec_cmd("hypridle")
hl.exec_cmd("hyprpaper")
hl.exec_cmd("hyprlauncher -d")
hl.exec_cmd("nm-applet")
hl.exec_cmd("nextcloud --background")
hl.exec_cmd("quickshell")