Go to file
2025-06-22 21:41:24 +10:00
cli feat: refactor + qol 2025-06-20 11:38:54 +10:00
daemon fix: clean up tag toggling event code 2025-06-22 21:41:24 +10:00
lib feat: add config file 2025-06-22 21:27:11 +10:00
.envrc feat: initial working state 2025-06-18 16:55:59 +10:00
.gitignore feat: refactor + qol 2025-06-20 11:38:54 +10:00
Cargo.lock feat: add config file 2025-06-22 21:27:11 +10:00
Cargo.toml feat: add config file 2025-06-22 21:27:11 +10:00
default.nix feat: initial working state 2025-06-18 16:55:59 +10:00
flake.lock feat: initial working state 2025-06-18 16:55:59 +10:00
flake.nix feat: full poc 2025-06-19 17:35:38 +10:00
module.nix fix: change service prerequisites to prevent missing niri socket 2025-06-20 11:54:23 +10:00
README.md chore: write readme 2025-06-20 11:48:40 +10:00

niri-tag

tag-based window management for the niri compositor

niri-tag allows you to use a simple tagging-based system to manage your windows.

how tags work

tag based management is relatively intuitive - sets of windows are assigned numeric tags.
these tags are then de/activated to raise and lower the windows.
only a single workspace is ever in active use per output.

usage

typical unix

first,
clone the repo.
build and install with cargo as per usual for rust projects on your platform.

next,
set up niri-tag as a user-level service.
for systemd users, something like the following should suffice:

# /etc/systemd/user/niri-tag.service
[Unit]
Description=Niri Tag Manager
PartOf=graphical-session.target

[Service]
ExecStart=/usr/bin/niri-tag
PrivateTmp=true
Restart=always
Type=notify

[Install]
WantedBy=graphical-session.target

niri's exec-once should also be okay, but the use of a service manager is highly recommended.

finally,
set up niri binds using tagctl to control windows and tags as you see fit.

nixos (flakes)

first,
add the following to your flake inputs:

niri-tag = {
  url = "git+https://git.atagen.co/atagen/niri-tag";
  inputs.niri-flake.follows = "niri-flake"; 
  inputs.nixpkgs.follows = "nixpkgs";
}

it is assumed you use niri-flake, or else will use the stable package output; this is important for the niri IPC definitions.

next,\

  • add inputs.niri-tag.nixosModules.niri-tag to your module imports
  • add services.niri-tag.enable = true; somewhere in your config
  • if you wish to use a stable niri instead of unstable from niri-flake (default), set services.niri-tag.package = inputs.niri-tag.packages.${pkgs.system}.stable;

finally,
add binds to your niri configuration.

you will need the path of tagctl, which you can get with something like the following:

let
  niri-tag = inputs.niri-tag.packages.${pkgs.system}.unstable; # or stable
  tagctl = lib.getExe' niri-tag "tagctl";
in
...

bindings

first,
it is recommended that you unset all workspace related binds, as switching workspaces or moving windows between them while using tag management can cause unexpected behaviours.

next,
set up:

  • Mod+Shift+$number as a spawn bind for tagctl toggle $number
  • Mod+$number as tagctl toggle-tag $number.

alternatively,
you may bind as you see fit the tagctl commands add remove toggle for window tagging, and enable-tag disable-tag toggle-tag for managing tags.

all commands (except remove) take a tag number from 1-255 after their command.

finally,
you may now use the aforementioned binds to assign tags to windows and toggle the tags on and off to hide/reveal them.

enjoy !