feat: hyprland done, testing needed, add wlogout config
@@ -1,9 +1,52 @@
|
|||||||
-- TODO: Laptop vs desktop vs docked config
|
-- Determine current platform
|
||||||
local swap_escape = false
|
local is_docked = false
|
||||||
require("hyprland.core.general")
|
local laptop_config = false
|
||||||
require("hyprland.core.input")(swap_escape)
|
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("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({
|
hl.device({
|
||||||
name = "pnp0c50:00-093a:0255-touchpad",
|
name = "pnp0c50:00-093a:0255-touchpad",
|
||||||
|
|||||||
@@ -28,6 +28,21 @@ return function(is_laptop)
|
|||||||
end)
|
end)
|
||||||
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()
|
hl.bind("Escape", function()
|
||||||
exit_submap()
|
exit_submap()
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -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,4 +1,3 @@
|
|||||||
-- TODO: colours
|
|
||||||
hl.config({
|
hl.config({
|
||||||
group = {
|
group = {
|
||||||
auto_group = false,
|
auto_group = false,
|
||||||
|
|||||||
@@ -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 import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
|
||||||
hl.exec_cmd("systemctl --user start hyprpolkitagent")
|
hl.exec_cmd("systemctl --user start hyprpolkitagent")
|
||||||
hl.exec_cmd("hypridle")
|
hl.exec_cmd("hypridle")
|
||||||
|
hl.exec_cmd("hyprpaper")
|
||||||
|
hl.exec_cmd("hyprlauncher -d")
|
||||||
hl.exec_cmd("nm-applet")
|
hl.exec_cmd("nm-applet")
|
||||||
hl.exec_cmd("nextcloud --background")
|
hl.exec_cmd("nextcloud --background")
|
||||||
hl.exec_cmd("quickshell")
|
hl.exec_cmd("quickshell")
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
hl.config({
|
hl.config({
|
||||||
general = {
|
general = {
|
||||||
col = {
|
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)",
|
inactive_border = "rgba({{colors.surface_container_low.default.hex_stripped}}33)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
misc = {
|
group = {
|
||||||
background_color = "rgba({{colors.surface.dark.hex_stripped}}FF)",
|
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({
|
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"));
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 5.6 KiB |