1
0
mirror of https://github.com/emersion/kanshi synced 2024-09-19 18:35:44 +02:00
kanshi/README.md

51 lines
977 B
Markdown
Raw Normal View History

2017-08-04 16:02:25 +02:00
# kanshi
2017-08-05 10:33:16 +02:00
Kanshi uses a configuration file and a list of available displays to choose the
right settings for each display. It's useful if your window manager doesn't
support multiple display configurations (e.g. i3/Sway).
For now, it only supports:
2017-08-05 10:33:16 +02:00
* `sysfs` as backend
* `udev` as notifier (optional)
* Configuration file
* GNOME (`~/.config/monitors.xml`)
* Kanshi (see below)
* Sway as frontend
2017-08-05 10:33:16 +02:00
## Usage
2017-08-13 18:56:30 +02:00
```sh
2017-08-05 10:33:16 +02:00
cargo install kanshi
2017-08-13 18:56:30 +02:00
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
2017-08-13 18:56:30 +02:00
### Configuration file
Each monitor configuration is delimited by brackets. Each line has the same
syntax as `sway(5)`.
```
{
output LVDS-1 disable
output VGA-1 resolution 1600x900 position 0,0
}
{
output LVDS-1 vendor CMN product 0x1484 serial 0x0 resolution 1600x900 scale 2
}
```
### Running as a udev rule
Edit `/etc/udev/rules.d/95-monitor-hotplug.rules`:
```
KERNEL=="card0", SUBSYSTEM=="drm", ENV{WAYLAND_DISPLAY}="wayland-0", RUN+="/usr/bin/kanshi -n none"
```
2017-08-04 16:02:25 +02:00
## License
MIT