fix laptop lid events
This commit is contained in:
parent
b3aaf792a5
commit
7c48e1221c
2 changed files with 12 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
|||
### Output configuration
|
||||
set $laptop LVDS-1
|
||||
|
||||
#bindswitch --reload lid:on output $laptop disable
|
||||
#bindswitch --reload lid:off output $laptop enable
|
||||
bindswitch --reload --locked lid:on output $laptop disable
|
||||
bindswitch --reload --locked lid:off output $laptop enable
|
||||
bindsym --locked $mod+F8 output $laptop enable
|
||||
bindsym --locked $mod+Mod1+F8 output $laptop disable
|
||||
|
||||
|
@ -12,3 +12,5 @@ bindsym --locked $mod+Mod1+F8 output $laptop disable
|
|||
input type:keyboard {
|
||||
xkb_options ctrl:swapcaps
|
||||
}
|
||||
|
||||
exec_always ~/bin/laptop-disp.sh
|
||||
|
|
8
bin/laptop-disp.sh
Executable file
8
bin/laptop-disp.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
source $HOME/.config/sway/displays.sh
|
||||
if grep -q open /proc/acpi/button/lid/LID/state;
|
||||
then
|
||||
swaymsg output $LAPTOP enable
|
||||
else
|
||||
swaymsg output $LAPTOP disable
|
||||
fi
|
Loading…
Reference in a new issue