Updated Home (markdown)

Chaitu Nookala 2020-12-27 13:27:47 -08:00
parent e225ed3707
commit 107d8f4a50

19
Home.md

@ -88,6 +88,25 @@ bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable
```
However, when reloading sway while using clamshell mode, the displays may reset (i.e. both displays will be enabled). To stop this, save this bash script:
```
#!/usr/bin/bash
if cat /proc/acpi/button/lid/LID/state | grep -q open; then
swaymsg output <LAPTOP> enable
else
swaymsg output <LAPTOP> disable
fi
```
Replace `<LAPTOP>` with the name of the display.
To make sure this script runs whenever Sway is reloaded, add this line to your sway config:
```
exec_always /path/to/script.sh
```
#### HiDPI
HiDPI can be enabled via `output` and its **scale** option.