add hypr-lid service for clamshell and delayed lid sleep
This commit is contained in:
@@ -65,6 +65,5 @@ hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
|
||||
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||
|
||||
-- Laptop lid for opening and closing
|
||||
hl.bind("switch:on:Lid Switch", hl.dsp.exec_cmd("hyprctl dpms off && hyprctl dispatch exec hyprlock"), { locked = true })
|
||||
hl.bind("switch:off:Lid Switch", hl.dsp.exec_cmd("hyprctl dispatch dpms on"), { locked = true })
|
||||
-- Laptop lid is handled by hypr-lid.service (clamshell when docked, delayed
|
||||
-- lock/suspend otherwise) instead of these binds; see .local/bin/hypr-lid.sh.
|
||||
|
||||
@@ -3,6 +3,7 @@ hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("hyprctl setcursor catppuccin-mocha-dark-cursors 28 &")
|
||||
hl.exec_cmd("systemctl --user start hyprpolkitagent &")
|
||||
hl.exec_cmd("waybar & mako & hyprpaper & hypridle & wluma & hyprshell run &")
|
||||
hl.exec_cmd("systemctl --user start hypr-lid.service &")
|
||||
hl.exec_cmd("blueman-applet &")
|
||||
hl.exec_cmd("1password --silent &")
|
||||
hl.exec_cmd("op signin &")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
-- Generated by nwg-displays on 2026-05-12 at 10:26:18. Do not edit manually.
|
||||
-- External displays (docked layout). The built-in panel is managed at runtime
|
||||
-- by hypr-lid: it is enabled here, then disabled while the lid is closed with
|
||||
-- external displays attached (clamshell). See hyprland/.local/bin/hypr-lid.sh.
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Monitors/ for more
|
||||
hl.monitor({ output = "desc:BOE 0x0BC9", disabled = true })
|
||||
hl.monitor({ output = "desc:BOE 0x0BC9", mode = "preferred", position = "0x0", scale = 1.0 })
|
||||
hl.monitor({ output = "desc:Viewteck Co. Ltd. GNV34DB", mode = "3440x1440@50.0", position = "3795x1785", scale = 1.0 })
|
||||
hl.monitor({ output = "desc:Dell Inc. DELL U2515HX GMDK46C4053L", mode = "2560x1440@59.95", position = "5488x345", scale = 1.0 })
|
||||
hl.monitor({ output = "desc:Dell Inc. DELL U2518D 0WG2J9C5B3WL", mode = "2560x1440@59.95", position = "2928x345", scale = 1.0 })
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Hyprland lid and clamshell monitor handler
|
||||
After=graphical-session.target
|
||||
PartOf=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=%h/.local/bin/hypr-lid.sh
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
Reference in New Issue
Block a user