Files
dotfiles/autostart/services/laptop-lid.service

11 lines
320 B
Desktop File

[Unit]
BindsTo=autostart.target
After=windowmanager.target
ConditionPathExists=%t/features/machine_is_laptop
[Service]
Type=oneshot
ExecStart=/usr/bin/env bash -c 'grep "^${ACPI_LID_NAME}.*enabled" /proc/acpi/wakeup && echo " ${ACPI_LID_NAME}" | sudo tee /proc/acpi/wakeup'
RemainAfterExit=true
PassEnvironment=DISPLAY