Listen to iio-sensor-proxy and updates Niri output orientation depending on the accelerometer orientation.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
Listen to IIO-Sensor-Proxy and updates Niri output orientation depending on the accelerometer orientation.
IIO-Niri requires the Rust Compiler if you plan to compile it, you will also need Cargo to build the project and DBus dependencies.
rustc⩾ 1.86.0cargo⩾ 1.86.0pkg-config⩾ 0.29.2libdbus⩾ 1.6
At runtime, the program relies on IIO-Sensor-Proxy to fetch updates on the accelerometer. Make sure it is running alongside IIO-Niri.
If you intend to work with Nix:
nix⩾ 2.28.4 with flake support.
- Clone the repo
git clone https://github.com/Zhaith-Izaliel/iio-niri.git
- Install Cargo and Rustc from your package manager.
- Build IIO-Niri with Cargo in release mode
cargo build --release
- An executable for IIO-Niri will be available in
target/release/iio-niri
IIO-Niri is officially available in Nixpkgs under pkgs.iio-niri and has a corresponding module
at services.iio-niri. This flake exists purely for bleeding edge updates and
for historical reason.
The maintainer of the project is also the maintainer of the package and module upstream (a.k.a. yours truly).
If you prefer, you can install it with the provided flake like so:
- Import the project in your flake inputs
inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; iio-niri = { url = "github:Zhaith-Izaliel/iio-niri"; inputs.nixpkgs.follows = "nixpkgs"; }; };
- You can then install it from
inputs.iio-niri.packages.${system}.defaultwhere${system}is your system descriptor. For Linux, usuallyx86_64-linux.
There are two primary ways to install IIO-Niri via the Arch User Repository (AUR):
- Simply enter one of the two commands below, depending on your installed pacman wrapper:
$ yay -S iio-niri
$ paru -S iio-niri
- Alternatively, simply clone the AUR repository and install using makepkg:
git clone https://aur.archlinux.org/iio-niri.git
cd iio-niri
makepkg -si
Please Note: The AUR package for this project is maintained by the community, and not by the developer. While it is sourced directly from the master branch of the developer's GitHub repository, users should always exercise discretion and caution when installing packages via the AUR.
Use iio-niri -h to see a short summary of available options and iio-niri --help to see a detailed explanation of every available options.
At runtime, the program relies on IIO-Sensor-Proxy to fetch updates on the accelerometer. Make sure it is running alongside IIO-Niri.
Then start IIO-Niri with Niri:
spawn-at-startup "iio-niri" "--monitor" "eDP-1"The provided flake offers a NixOS module to install IIO-Niri as well as an overlay.
Here is a simple example on how to install both the overlay and the module in your NixOS configuration:
outputs = { self, nixpkgs, iio-niri }: {
# replace 'joes-desktop' with your hostname here.
nixosConfigurations.joes-desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
iio-niri.nixosModules.default
# ---Snip---
# Add your own modules here
# ---Snip---
# Example to add the overlay to Nixpkgs:
{
nixpkgs = {
overlays = [
iio-niri.overlays.default
];
};
}
];
};
};Then enable the module.
{...}: {
services.iio-niri = {
enable = true;
extraArgs = [
"--monitor"
"eDP-1"
];
};
}See the module documentation for more info.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/amazing-feature) - Commit your Changes (
git commit -m 'feat: add some amazing-feature')
- Your commit messages must follow the Conventional Commits specification.
- Push to the Branch (
git push origin feature/amazing-feature) - Open a Pull Request on
develop
Distributed under the MIT License. See LICENSE.md for more information.
Zhaith Izaliel - @zhaith-izaliel.bsky.social
Project Link: https://github.com/Zhaith-Izaliel/iio-niri
- Best-README-Template for this README
- IIO-Hyprland for the know how on handling DBus requests and signals for IIO-Sensor-Proxy
- IIO-Sensor-Proxy for the proxy to handle accelerometer requests for this program