1
0
mirror of https://github.com/emersion/kanshi synced 2024-09-18 09:51:36 +02:00
Dynamic display configuration
Go to file
Jason Francis afab6397ed Add optional varlink interface.
We don't want to fallback to libwayland's defaults, so WAYLAND_DISPLAY
needs to be set in env. Since IPC in the future is going to use
XDG_RUNTIME_DIR, we also require it.

Because these functions will be used in other parts of the code as well,
we rework the build system slightly to accommodate it.

Co-authored-by: Érico Nogueira <erico.erc@gmail.com>
2021-07-24 08:34:35 +02:00
include Add optional varlink interface. 2021-07-24 08:34:35 +02:00
protocol Listen to output-management events 2019-06-01 13:25:09 +03:00
.build.yml Add optional varlink interface. 2021-07-24 08:34:35 +02:00
.gitignore Add basic parser 2019-06-01 13:25:09 +03:00
event-loop.c Add optional varlink interface. 2021-07-24 08:34:35 +02:00
ipc-addr.c Add optional varlink interface. 2021-07-24 08:34:35 +02:00
ipc.c Add optional varlink interface. 2021-07-24 08:34:35 +02:00
kanshi.1.scd Add signal handlers to reload the config. 2021-07-24 08:34:35 +02:00
kanshi.5.scd Add 'include' directive to read additional configs 2020-10-13 14:42:03 +02:00
LICENSE Add missing LICENSE 2019-08-12 11:45:55 +03:00
main.c Add optional varlink interface. 2021-07-24 08:34:35 +02:00
meson_options.txt Add optional varlink interface. 2021-07-24 08:34:35 +02:00
meson.build Add optional varlink interface. 2021-07-24 08:34:35 +02:00
parser.c parser: support single quotation marks 2021-07-09 14:29:49 +02:00
README.md Add optional varlink interface. 2021-07-24 08:34:35 +02:00

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
}

Contributing

The upstream repository can be found on SourceHut. Open tickets on the SourceHut tracker. Send patches on the mailing list or open pull requests on the GitHub mirror.

License

MIT