2021-07-04 18:23:37 +02:00
|
|
|
# [kanshi]
|
2017-08-04 16:02:25 +02:00
|
|
|
|
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
|
|
|
|
2021-05-21 16:08:09 +02:00
|
|
|
Join the IRC channel: #emersion on Libera Chat.
|
2019-05-30 14:46:11 +02:00
|
|
|
|
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)
|
2021-07-07 05:13:58 +02:00
|
|
|
* libvarlink (optional, for remote control functionality)
|
2019-06-01 12:14:36 +02:00
|
|
|
|
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
|
|
|
|
|
|
|
```
|
2020-04-02 11:05:06 +02:00
|
|
|
profile {
|
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
|
|
|
}
|
|
|
|
|
2020-04-02 11:05:06 +02:00
|
|
|
profile {
|
2019-06-01 12:08:05 +02:00
|
|
|
output LVDS-1 enable scale 2
|
2017-08-13 18:56:30 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2021-07-04 18:23:37 +02:00
|
|
|
## Contributing
|
|
|
|
|
|
|
|
The upstream repository can be found [on SourceHut][repo]. Open tickets [on
|
2021-07-04 18:24:52 +02:00
|
|
|
the SourceHut tracker][issue-tracker]. Send patches
|
|
|
|
[on the mailing list][mailing-list] or open pull requests
|
|
|
|
[on the GitHub mirror][github].
|
2021-07-04 18:23:37 +02:00
|
|
|
|
2017-08-04 16:02:25 +02:00
|
|
|
## License
|
|
|
|
|
|
|
|
MIT
|
2019-06-01 12:08:05 +02:00
|
|
|
|
2021-07-04 18:23:37 +02:00
|
|
|
[kanshi]: https://wayland.emersion.fr/kanshi/
|
2019-06-01 12:08:05 +02:00
|
|
|
[autorandr]: https://github.com/phillipberndt/autorandr
|
2021-07-04 18:23:37 +02:00
|
|
|
[repo]: https://git.sr.ht/~emersion/kanshi
|
|
|
|
[issue-tracker]: https://todo.sr.ht/~emersion/kanshi
|
|
|
|
[mailing-list]: https://lists.sr.ht/~emersion/public-inbox
|
|
|
|
[github]: https://github.com/emersion/kanshi
|