2.7 KiB
Kanshi Ansible role
This role install and configure Kanshi service.
Variables
This role needs two variables for creating Kanshi configuration file
sway_output
provided by ansible-sway
role and kanshi_profiles
.
sway_outputs
is not mandatory butuseful to provide id ans options for outputs.
Here is an example of kanshi_profile
kanshi_profiles:
- profile: 'laptop'
screens:
- id: 'eDP-1'
- profile: 'home'
screens:
- id: 'eDP-1'
enable: false
- id: 'iiyama_27_4k'
position: '1080,0'
- id: 'iiyama_23_fhd'
position: '0,0'
mode: '1920x1024'
transform: 90
options:
- id: 'eDP-1'
option: 'bg'
value: '~/images/bg.jpg'
commands:
- swaymsg workspace 1, move workspace to +eDP1+
profile
: name of the profilescreens
: list of outputsid
: id of the screen, could be the real name, ouput name like HDMI-1 (both given byswaymsg -t output
) or id referenced insway_outputs
position
: absolute position of the screenmode
: resolution of the screenscale
: scale factor for the screentransform
: rotation (90, 180 or 270 degres) for the screen
options
: list of options:id
: see above in screens sectionoptions
: option namevalue
: value
commands
: list of command to execute when switching to profile
Licence
This script is released under le MIT licence
Copyright © 2021 Yorick Barbanneau
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.