2017-08-04 16:02:25 +02:00
|
|
|
# kanshi
|
|
|
|
|
2019-06-01 12:08:05 +02:00
|
|
|
kanshi allows you to define output profiles that are automatically enabled and
|
|
|
|
disabled on hotplug. For instance, this can be used to turn a laptop's internal
|
|
|
|
screen off when docked.
|
|
|
|
|
|
|
|
This is a Wayland equivalent for tools like [autorandr]. kanshi can be used on
|
|
|
|
Wayland compositors supporting the wlr-output-management protocol.
|
2017-08-05 10:33:16 +02:00
|
|
|
|
2019-05-30 14:46:11 +02:00
|
|
|
Join the IRC channel: ##emersion on Freenode.
|
|
|
|
|
2019-06-01 12:08:05 +02:00
|
|
|
## Building
|
|
|
|
|
2019-06-01 12:14:36 +02:00
|
|
|
Dependencies:
|
|
|
|
|
|
|
|
* wayland-client
|
|
|
|
* scdoc (optional, for man pages)
|
|
|
|
|
2019-06-01 12:08:05 +02:00
|
|
|
```sh
|
|
|
|
meson build
|
|
|
|
ninja -C build
|
|
|
|
```
|
|
|
|
|
2017-08-05 10:33:16 +02:00
|
|
|
## Usage
|
|
|
|
|
2017-08-13 18:56:30 +02:00
|
|
|
```sh
|
2019-02-01 22:18:49 +01:00
|
|
|
mkdir -p ~/.config/kanshi && touch ~/.config/kanshi/config
|
2018-09-16 14:18:59 +02:00
|
|
|
kanshi
|
2017-08-05 10:33:16 +02:00
|
|
|
```
|
2017-08-04 16:02:25 +02:00
|
|
|
|
2019-06-01 12:08:05 +02:00
|
|
|
## Configuration file
|
2017-08-13 18:56:30 +02:00
|
|
|
|
2019-06-01 12:08:05 +02:00
|
|
|
Each output profile is delimited by brackets. It contains several `output`
|
|
|
|
directives (whose syntax is similar to `sway-output(5)`). A profile will be
|
|
|
|
enabled if all of the listed outputs are connected.
|
2017-08-13 18:56:30 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
{
|
|
|
|
output LVDS-1 disable
|
2019-06-01 12:23:54 +02:00
|
|
|
output "Some Company ASDF 4242" mode 1600x900 position 0,0
|
2017-08-13 18:56:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2019-06-01 12:08:05 +02:00
|
|
|
output LVDS-1 enable scale 2
|
2017-08-13 18:56:30 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2017-08-04 16:02:25 +02:00
|
|
|
## License
|
|
|
|
|
|
|
|
MIT
|
2019-06-01 12:08:05 +02:00
|
|
|
|
|
|
|
[autorandr]: https://github.com/phillipberndt/autorandr
|