Skip to main content

Niri companion scripts

Project description

🫂 niri-companion

Pepy Total Downloads PyPI - Version PyPI - License

niri-companion is a toolkit that adds extra functionality to niri. See the CHANGELOG for a detailed list of updates.

Installation

Install with pipx or pip accordingly:

pipx install niri-companion
pip install niri-companion

Configuration

The configuration file is located at:

~/.config/niri-companion/settings.toml

Check out the example configuration file for reference.

Tools

niri-genconfig

Generates a config.kdl by concatenating files from a specified directory. This lets you split your configuration into smaller, more manageable pieces.

  • niri-genconfig generate: Generates an output file (general.output_path) by conconcatenating sources (genconfig.sources)
  • niri-genconfig daemon: Same things as above, but auto-generates if files inside the watch directory (genconfig.watch_dir) have changed. Works as a daemon.

niri-ipcext

[!WARNING] niri-ipcext does not use a proper KDL parser/writer. Instead, it relies on a custom workaround described below, which can be brittle in some cases.

  • niri-ipcext replace: Edits config.kdl by replacing old_text with new_text.
  • niri-ipcext restore: Reverts the changes by running niri-genconfig generate.

This provides IPC-like behavior, similar to Hyprland's IPC.

niri-workspaces

  • Lets you define workflows that automatically launch specific programs on specific workspaces. For example: open your browser on workspace 1 and your editor on workspace 2.
  • Needs rofi or any program that has a dmenu functionality

Important Notes

The config.kdl file should be treated as temporary:

  • niri-genconfig will overwrite it when generating configs.
  • niri-ipcext depends on config.kdl being updated dynamically.

If you want a permanent configuration, keep it in separate files and let niri-genconfig handle the final config.kdl.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

niri_companion-2.2.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

niri_companion-2.2.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file niri_companion-2.2.0.tar.gz.

File metadata

  • Download URL: niri_companion-2.2.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for niri_companion-2.2.0.tar.gz
Algorithm Hash digest
SHA256 4c634113e8d69aff27a89f3b0b70c0df5089f463cad446a3f45b31e293f26117
MD5 5e469b48befb3ced6fd0acf6ea401de7
BLAKE2b-256 cf02f13df0cc9a7f46abea64c3c6569b8a4af91797653b679450fc6ac4a50556

See more details on using hashes here.

File details

Details for the file niri_companion-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for niri_companion-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 995c2b4b1844f7ec4e3e8e6d655deab4f138646ea0d8132f6538e4eec95c8ce3
MD5 0ff049a84af7f21045cc08b77932a2a3
BLAKE2b-256 957c56fe628c244add344f47a344a73dc8ad46f7a632f7171e80c0eab5f3deb1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page