1
0
mirror of https://github.com/emersion/kanshi synced 2024-11-22 15:51:58 +01:00
Dynamic display configuration
Go to file
Simon Ser 38d27474b6 Fix head matches indexing
The `matches` array contained heads *and* was indexed by head. This didn't
make a lot of sense.

Instead, make it contain profile outputs and indexed by head.
2019-06-07 23:03:16 +03:00
include Apply profile 2019-06-01 13:25:09 +03:00
protocol Listen to output-management events 2019-06-01 13:25:09 +03:00
.build.yml ci: add .build.yml 2019-06-01 13:33:46 +03:00
.gitignore Add basic parser 2019-06-01 13:25:09 +03:00
kanshi.1.scd Add docs 2019-06-01 13:25:09 +03:00
kanshi.5.scd Showcase output identifiers in docs 2019-06-01 13:25:09 +03:00
main.c Fix head matches indexing 2019-06-07 23:03:16 +03:00
meson_options.txt Generate man pages 2019-06-01 13:25:09 +03:00
meson.build Generate man pages 2019-06-01 13:25:09 +03:00
parser.c Parse quoted strings 2019-06-01 13:25:09 +03:00
README.md readme: add a note about required sway version 2019-06-03 07:55:45 +03: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.

Sway users: kanshi requires the latest Git version of Sway.

Join the IRC channel: ##emersion on Freenode.

Building

Dependencies:

  • wayland-client
  • scdoc (optional, for man pages)
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.

{
	output LVDS-1 disable
	output "Some Company ASDF 4242" mode 1600x900 position 0,0
}

{
	output LVDS-1 enable scale 2
}

License

MIT