add lid stuff
This commit is contained in:
@@ -9,6 +9,10 @@ font pango:DejaVu Sans Mono 10
|
||||
output * scale 1
|
||||
output * bg ~/.config/sway/tux.png fill
|
||||
|
||||
# Disable the laptop panel while the lid is closed.
|
||||
bindswitch --reload lid:on exec ~/.config/sway/scripts/lid-output off
|
||||
bindswitch --reload lid:off exec ~/.config/sway/scripts/lid-output on
|
||||
|
||||
input type:keyboard {
|
||||
xkb_layout fo
|
||||
xkb_model pc105
|
||||
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
state="${1:-}"
|
||||
|
||||
internal_output="$(
|
||||
swaymsg -t get_outputs -r |
|
||||
jq -r '.[] | select(.name | test("^(eDP|LVDS)")) | .name' |
|
||||
head -n 1
|
||||
)"
|
||||
|
||||
if [ -z "$internal_output" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$state" in
|
||||
off) swaymsg output "$internal_output" disable ;;
|
||||
on) swaymsg output "$internal_output" enable ;;
|
||||
*) exit 2 ;;
|
||||
esac
|
||||
Reference in New Issue
Block a user