Crates.io | shikane |
lib.rs | shikane |
version | 1.0.1 |
source | src |
created_at | 2023-02-10 15:50:42.384192 |
updated_at | 2024-05-28 14:10:56.864719 |
description | dynamic output configuration tool focusing on accuracy and determinism |
homepage | |
repository | https://gitlab.com/w0lff/shikane |
max_upload_size | |
id | 781948 |
size | 251,012 |
shikane (/ʃiˈkaːnə/) is a dynamic output configuration tool focusing on accuracy and determinism.
It automatically detects and configures connected displays based on a set of profiles. Each profile specifies a set of outputs with additional parameters (e.g., mode, position, scale). A profile will be applied automatically if all specified outputs and modes can be perfectly matched to the currently connected displays and their capabilities.
This is a Wayland equivalent for tools like autorandr. It aims to fully replace kanshi, surpass its inaccuracies and add new features. shikane works with Wayland compositors supporting versions >=3 of the wlr-output-management protocol (e.g., compositors using wlroots v0.16).
shikane selects possible profiles automatically at startup and when a change
in the set of currently connected displays occurs.
A profile is taken into consideration if every currently connected display
can be matched to at least one output and no output is unmatched.
A display matches an output if:
After assembling a list of possible profiles shikane generates all variants of every profile. Once all variants have been verified and sorted by exactness, shikane tries to apply them one after the other until one succeeds or there are no variants left to try.
Variants are slightly different versions of the same profile.
For example, a given display has a set of supported modes: 1920x1080@60Hz and
1920x1080@50Hz. If the mode in the config.toml is specified as "1920x1080"
both modes would fit the specification. Instead of choosing just one mode and
using that, shikane takes both into account by generating two variants based on
the same profile. One variant uses the 1920x1080@60Hz mode and the other
variant uses the 1920x1080@50Hz mode.
The same goes for the search parameter. If multiple
(display,output,mode)-combinations are possible, shikane generates variants with
all of them.
man 5 shikane
for more detailed information.shikane
shikanectl
to generate configurationsshikanectl export "room04"
shikanectl reload
Documentation is provided as man pages:
man 1 shikane
man 5 shikane
man 1 shikanectl
They are also viewable online.
Via your $AURhelper
from the AUR:
$AURhelper -S shikane
Via cargo from crates.io (without man pages):
cargo install shikane
Dependencies:
Building shikane:
cargo build --release
Building the man pages:
./scripts/build-docs.sh man
man -l build/man/shikane.1.gz
man -l build/man/shikane.5.gz
man -l build/man/shikanectl.1.gz
shikane uses the TOML file format for its configuration file
and contains an array of profiles. Each profile is a table containing an
array of output tables. The configuration file should be placed at
$XDG_CONFIG_HOME/shikane/config.toml
.
[[profile]]
name = "dual_foo"
exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\""]
[[profile.output]]
# search for a matching serial number and model by full text comparison
search = ["s=SERIAL123", "m=1Q2X5T"]
enable = true
mode = "1920x1080@50"
position = "0,0"
scale = 1.3
[[profile.output]]
search = "n/HDMI-[ABC]-[1-9]" # search for a matching name by regex
enable = true
exec = ["echo This is output $SHIKANE_OUTPUT_NAME"]
mode = "2560x1440@75Hz"
position = "1920,0"
transform = "270"
MIT