Go to file
Érico Nogueira 67a081e49a Remove unnecessary errno reset.
errno is checked only if fgetc returns an error.
2021-07-06 23:36:55 -03:00
include Always check that the environment is sane. 2021-07-02 13:52:41 -03:00
protocol Listen to output-management events 2019-06-01 13:25:09 +03:00
.build.yml Add config reloading with varlink 2021-06-30 22:10:15 -03:00
.gitignore Add basic parser 2019-06-01 13:25:09 +03:00
LICENSE Add missing LICENSE 2019-08-12 11:45:55 +03:00
README.md Add config reloading with varlink 2021-06-30 22:10:15 -03:00
ctl.c Always check that the environment is sane. 2021-07-02 13:52:41 -03:00
event-loop.c Remove POLLOUT. 2021-07-06 23:30:40 -03:00
ipc-addr.c Always check that the environment is sane. 2021-07-02 13:52:41 -03:00
ipc.c Add TODO comment to ipc.c re. configuration timing 2021-06-30 22:15:11 -03:00
kanshi.1.scd Add kanshictl utility 2021-06-30 22:10:21 -03:00
kanshi.5.scd Add 'include' directive to read additional configs 2020-10-13 14:42:03 +02:00
kanshictl.1.scd Reorganize and fix style 2021-06-30 22:10:21 -03:00
main.c Always check that the environment is sane. 2021-07-02 13:52:41 -03:00
meson.build Clean up ipc.h header and forward declarations 2021-06-30 22:12:26 -03:00
meson_options.txt Add config reloading with varlink 2021-06-30 22:10:15 -03:00
parser.c Remove unnecessary errno reset. 2021-07-06 23:36:55 -03:00

README.md

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)
meson build
ninja -C build

Usage

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
}

License

MIT