mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
Updated Home (markdown)
parent
e225ed3707
commit
107d8f4a50
19
Home.md
19
Home.md
|
@ -88,6 +88,25 @@ bindswitch --reload --locked lid:on output $laptop disable
|
||||||
bindswitch --reload --locked lid:off output $laptop enable
|
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
|
||||||
|
|
||||||
HiDPI can be enabled via `output` and its **scale** option.
|
HiDPI can be enabled via `output` and its **scale** option.
|
||||||
|
|
Loading…
Reference in a new issue