https://github.com/emersion/kanshi
Dynamic display configuration (mirror)
https://github.com/emersion/kanshi
autorandr display monitor sway
Last synced: about 1 year ago
JSON representation
Dynamic display configuration (mirror)
- Host: GitHub
- URL: https://github.com/emersion/kanshi
- Owner: emersion
- License: mit
- Archived: true
- Created: 2017-08-03T09:54:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-09-15T08:33:30.000Z (almost 5 years ago)
- Last Synced: 2025-04-19T02:32:45.396Z (about 1 year ago)
- Topics: autorandr, display, monitor, sway
- Language: C
- Homepage: https://wayland.emersion.fr/kanshi/
- Size: 167 KB
- Stars: 664
- Watchers: 17
- Forks: 46
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [kanshi]
> **Heads up!** This project has [moved to SourceHut](https://sr.ht/~emersion/kanshi/).
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.
Join the IRC channel: #emersion on Libera Chat.
## Building
Dependencies:
* wayland-client
* scdoc (optional, for man pages)
* libvarlink (optional, for remote control functionality)
```sh
meson build
ninja -C build
```
## Usage
```sh
mkdir -p ~/.config/kanshi && touch ~/.config/kanshi/config
kanshi
```
## Configuration file
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.
```
profile {
output LVDS-1 disable
output "Some Company ASDF 4242" mode 1600x900 position 0,0
}
profile {
output LVDS-1 enable scale 2
}
```
## Contributing
The upstream repository can be found [on SourceHut][repo]. Open tickets [on
the SourceHut tracker][issue-tracker], send patches
[on the mailing list][mailing-list].
## License
MIT
[kanshi]: https://wayland.emersion.fr/kanshi/
[autorandr]: https://github.com/phillipberndt/autorandr
[repo]: https://git.sr.ht/~emersion/kanshi
[issue-tracker]: https://todo.sr.ht/~emersion/kanshi
[mailing-list]: https://lists.sr.ht/~emersion/public-inbox