Coder Social home page Coder Social logo

kanshi's Introduction

kanshi

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:

  • sysfs as backend
  • udev as notifier (optional)
  • Configuration file
    • GNOME (~/.config/monitors.xml)
    • Kanshi (see below)
  • Sway as frontend

Usage

cargo install kanshi
touch ~/.config/kanshi/config
kanshi

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"

License

MIT

kanshi's People

Contributors

emersion avatar colemickens avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.