A dynamic output configuration tool that automatically detects and configures connected outputs based on a set of profiles.

Overview

shikane

A dynamic output configuration tool that automatically detects and configures connected outputs based on a set of profiles.

Each profile specifies a set of outputs with additional parameters (e.g., mode). A profile will be applied automatically if all specified outputs and modes can be perfectly matched to the currently connected outputs and their capabilities.

This is a Wayland equivalent for tools like autorandr. It aims to fully replace kanshi and add new features. shikane works with Wayland compositors supporting version 3 of the wlr-output-management protocol (e.g., compositors using wlroots v0.16).

Features

feature kanshi shikane
configure output properties: resolution, refresh rate, position, scaling, transformation yes yes
configure adaptive sync no yes
execute commands yes yes
output names are supplied to executed commands no yes
full cardinality matching algorithm no yes
regex based output matching no yes
state machine defined execution no yes
one-shot mode no yes

Installation

Via your $AURhelper from the AUR:

$AURhelper -S shikane

Via cargo from crates.io (without man pages):

cargo install shikane

Documentation

Documentation is provided as man pages:

man 1 shikane
man 5 shikane

Usage

  1. Create your configuration file. See configuration for a short overview or have a look at the man page man 5 shikane for more detailed information.
  2. Start shikane.
    shikane

Building

Dependencies:

  • a rust toolchain >=1.60
  • pandoc (for building the man pages)

Building shikane:

cargo build --release

Building the man pages:

./scripts/build-docs.sh man

man -l build/shikane.1.gz
man -l build/shikane.5.gz

Configuration

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]]
    match = "Company Foo"
    enable = true
    mode = { width = 1920, height = 1080, refresh = 50 }
    position = { x = 0, y = 0 }
    scale = 1.3

    [[profile.output]]
    match = "/HDMI-[ABC]-[1-9]/"
    enable = true
    exec = ["echo This is output $SHIKANE_OUTPUT_NAME"]
    mode = { width = 2560, height = 1440, refresh = 75 }
    position = { x = 1920, y = 0 }
    transform = "270"

Acknowledgements

  • kanshi being the inspiration and motivation
  • wayland-rs providing the wayland bindings

License

MIT

You might also like...
Simple benchmark to compare different Kafka clients performance with similar configuration.

Kafka Producer Benchmark Simple benchmark to compare different clients performance against similar configuration. The project is relatively low tech a

twilight-interactions is a set of macros and utilities to work with Discord Interactions using twilight.

Twilight interactions twilight-interactions is a set of macros and utilities to work with Discord Interactions using twilight. Note: This crate is not

Ampseer examines reads in fastq format and identifies which multiplex PCR primer set was used to generate the SARS-CoV-2 sequencing library they are read from.

Ampseer examines reads in fastq format and identifies which multiplex PCR primer set was used to generate the SARS-CoV-2 sequencing library they are read from.

A GitHub Action to automatically build and deploy your mdbook project.

📘 deploy-mdbook The deploy-mdbook action allows you to easily build and deploy your mdBook project to GitHub Pages. See action.yml for configuration

kindly is a simple Rust implementation of a set-user-ID-root program, similar to sudo but in a much reduced way.

kindly is a simple Rust implementation of a set-user-ID-root program, similar to sudo but in a much reduced way.

Autorebase automatically rebases all of your feature branches onto master.

Autorebase automatically rebases all of your feature branches onto master. If conflicts are found it will rebase to the last commit that doesn't cause conflicts. By default, branches with an upstream are excluded. You don't need to switch to any branch, the only limitation is that a branch that is checked out and not clean will not be rebased (though I may add that in future).

Adds size optimizations to any Perseus app automatically.

Perseus Size Optimization Plugin WARNING: Until Perseus #66 is fixed, this plugin can actually increase overall binary size! Once that issue is fixed

Automatically download minecraft server jars in one line

MCDL Automatically download minecraft server jars in one line (or one click) Installation Download (Windows, Linux) Install via cargo: cargo install m

🛡️ Automatically protect the default branch of new repositories in a GitHub organization

The Branch Autoprotector watches a GitHub organization and automatically protects the default branch in new repositories. This service notifies the creator of the default branch of this automatic branch protection setup by filing an issue in the repository.

CLI tool that make it easier to perform multiple lighthouse runs towards a single target and output the result in a "plotable" format.

Lighthouse Groupie CLI tool that make it easier to perform multiple lighthouse runs towards a single target and output the result in a "plotable" form

Polestar 1 Jan 12, 2022
Swayidle alternative to handle wayland idle notifications, sleep and lock events in Rust with Lua scripting based configuration language

swayidle-rs This is intended as a replacement of sway's idle management daemon. I use it as a tool to understand rust message passing and state manage

Reza Jelveh 8 Nov 27, 2023
A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

William 19 Nov 29, 2022
Dynamic key remapper for X11 and Wayland

???????????? ⌨️ xremap is a key remapper for Linux. Unlike xmodmap, it supports app-specific remapping and Wayland. Concept Fast - Xremap is written i

Takashi Kokubun 643 Jan 8, 2023
Rust library for program synthesis of string transformations from input-output examples 🔮

Synox implements program synthesis of string transformations from input-output examples. Perhaps the most well-known use of string program synthesis in end-user programs is the Flash Fill feature in Excel. These string transformations are learned from input-output examples.

Anish Athalye 21 Apr 27, 2022
Shows only the first page of rustc output

cargo-first-page Shows only the first page of rustc output. Installation cargo install cargo-firstpage Usage Prefix the cargo command by firstpage: T

Cecile Tonglet 11 Dec 19, 2021
A boiler plate code to create dynamic link library in rust.

?? rust-dll-bp This is a boiler plate code that will be generated as a dll binary. I personally cache this here for me but if you're intend to create

s3pt3mb3r 9 Nov 7, 2022
use variant nesting information to flter overlapping sites from vg deconstruct output

vcfbub popping bubbles in vg deconstruct VCFs overview The VCF output produced by a command like vg deconstruct -e -a -H '#' ... includes information

null 11 Dec 28, 2022
Provides a Suricata Eve output for Kafka with Suricate Eve plugin

Suricata Eve Kafka Output Plugin for Suricata 6.0.x This plugin provides a Suricata Eve output for Kafka. Base on suricata-redis-output: https://githu

Center 7 Dec 15, 2022
🥅 Dead simple webhook worker for Sentry to output events in a Discord channel

?? Sentry Webhook Dead simple webhook worker for Sentry to output events in a Discord channel Why? This is just a simple Rust HTTP service to do so, t

Noel 5 Nov 7, 2022