Listen iio-sensor-proxy and auto change sway output orientation
- Make sure iio-sensor-proxy running
- add exec iio-sway to your sway config file
./iio-sway [sway-output to rotate, default=eDP-1], run swaymsg -t get_outputs to list.
In your flake.nix
inputs.iio-sway.url = "github:tbaumann/iio-sway";
Use it in a home manager module
{ config, pkgs, ... }:
{
imports = [ inputs.iio-sway.homeManagerModules.default ];
programs.iio-sway = {
enable = true;
display = "HDMI-1"; # Optional
};
}