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")
+11 -3
View File
@@ -1,13 +1,21 @@
hl.config({
general = {
col = {
active_border = "rgba({{colors.outline_variant.default.hex_stripped}}77)",
active_border = "rgba({{colors.primary.default.hex_stripped}}cc) rgba({{colors.secondary.default.hex_stripped}}cc) rgba({{colors.tertiary.default.hex_stripped}}cc) 45deg",
inactive_border = "rgba({{colors.surface_container_low.default.hex_stripped}}33)",
},
},
misc = {
background_color = "rgba({{colors.surface.dark.hex_stripped}}FF)",
group = {
col = {
active_border = "rgba({{colors.outline_variant.default.hex_stripped}}77)",
inactive_border = "rgba({{colors.surface_container_high.default.hex_stripped}}33)",
},
},
decoration = {
shadow = {
color = "rgba({{colors.shadow.default.hex_stripped}}20)",
}
}
})
hl.window_rule({
@@ -0,0 +1,66 @@
/*
* ╭───────────────────────────────────────────────╮
* │ WLOGOUT │
* ╰───────────────────────────────────────────────╯
*/
window {
font-family: monospace;
font-size: 14pt;
color: {{colors.on_background.default.hex}}; /* text */
background-color: {{colors.primary.background.hex}}60;
}
button {
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
border: none;
background-color: transparent;
margin: 5px;
transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
border-radius: 40px;
}
button:hover {
background-color: {{colors.primary.default.hex}};
}
button:focus {
background-color: {{colors.primary.default.hex}}80;
color: {{colors.on_primary.default.hex}};
}
#lock {
background-image: image(url("./lock.png"));
}
#lock:focus {
background-image: image(url("./lock-hover.png"));
}
#logout {
background-image: image(url("./logout.png"));
}
#logout:focus {
background-image: image(url("./logout-hover.png"));
}
#suspend {
background-image: image(url("./sleep.png"));
}
#suspend:focus {
background-image: image(url("./sleep-hover.png"));
}
#shutdown {
background-image: image(url("./power.png"));
}
#shutdown:focus {
background-image: image(url("./power-hover.png"));
}
#reboot {
background-image: image(url("./restart.png"));
}
#reboot:focus {
background-image: image(url("./restart-hover.png"));
}
+30
View File
@@ -0,0 +1,30 @@
{
"label" : "lock",
"action" : "hyprlock",
"text" : "Lock",
"keybind" : "l"
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"text" : "Reboot",
"keybind" : "r"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "logout",
"action" : "hyprctl dispatch exit 0",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "suspend",
"action" : "systemctl suspend",
"text" : "Suspend",
"keybind" : "u"
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB