Skip to main content

Niri companion scripts

Project description

🫂 niri-companion

PyPI - Downloads PyPI - Version

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.1.0.tar.gz (18.9 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.1.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for niri_companion-2.1.0.tar.gz
Algorithm Hash digest
SHA256 940b5b0908da8f9ad89bd16c423d1343527aa9bc959035922a39bc4d02df23d3
MD5 f3de6e23eb150c4ccef7da00f8904ca8
BLAKE2b-256 7ddac10bedf7258f6f052d0e84c3189fca0df95d0efc200b2e82d9a8244ad02c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for niri_companion-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6b9ea479e132683ae63f060fda5b56a8ff840326b9f14a2fe648991ab9d8ae9
MD5 01fc26428c7aaf3c9f33dfabbd777b3a
BLAKE2b-256 1b08c81034baf93429336bf52d7fa18f9d139a7a3093678290800409a6ccb2aa

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