dotfiles/bin/laptop-disp.sh

12 lines
176 B
Bash
Raw Normal View History

2021-04-07 22:05:46 +00:00
#!/bin/bash
2022-01-03 18:48:25 +00:00
#LAPTOP="eDP-1"
LAPTOP="LVDS-1"
2021-04-07 23:54:41 +00:00
if grep -q open /proc/acpi/button/lid/LID*/state;
2021-04-07 22:05:46 +00:00
then
2022-01-03 18:48:25 +00:00
swaymsg "output $LAPTOP enable"
2021-04-07 22:05:46 +00:00
else
2022-01-03 18:48:25 +00:00
swaymsg "output $LAPTOP disable"
2021-04-07 22:05:46 +00:00
fi