{"id":29001685,"url":"https://github.com/calico32/waybar-niri-windows","last_synced_at":"2026-01-22T04:06:14.476Z","repository":{"id":299747688,"uuid":"1004060671","full_name":"calico32/waybar-niri-windows","owner":"calico32","description":"niri window minimap/focus indicator for Waybar","archived":false,"fork":false,"pushed_at":"2025-12-25T02:37:42.000Z","size":156,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T11:56:39.224Z","etag":null,"topics":["go","niri","waybar"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/calico32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-18T04:10:02.000Z","updated_at":"2025-12-26T03:55:37.000Z","dependencies_parsed_at":"2025-06-18T05:27:44.828Z","dependency_job_id":"4394fbf9-6d3a-4b6c-aa85-a73480d33ca2","html_url":"https://github.com/calico32/waybar-niri-windows","commit_stats":null,"previous_names":["calico32/waybar-niri-windows"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/calico32/waybar-niri-windows","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calico32%2Fwaybar-niri-windows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calico32%2Fwaybar-niri-windows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calico32%2Fwaybar-niri-windows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calico32%2Fwaybar-niri-windows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calico32","download_url":"https://codeload.github.com/calico32/waybar-niri-windows/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calico32%2Fwaybar-niri-windows/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28653688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","niri","waybar"],"created_at":"2025-06-25T09:11:25.884Z","updated_at":"2026-01-22T04:06:14.471Z","avatar_url":"https://github.com/calico32.png","language":"Go","funding_links":[],"categories":["Bars and Widgets"],"sub_categories":["Miscellaneous"],"readme":"# niri-windows module for Waybar\n\nThis is a module for [Waybar](https://github.com/Alexays/Waybar) that displays a window minimap for the current [niri](https://github.com/YaLTeR/niri) workspace.\n\n![Image of the module](screenshot.png)\n![Image of the module in text mode](screenshot-text.png)\n\n\u003e [!IMPORTANT]\n\u003e niri ≥ v25.08 is required (for the window locations in IPC messages to be available).\n\n## Installation\n\nIf you're using an amd64 system, you can get a pre-built binary from the\n[releases page](https://github.com/calico32/waybar-niri-windows/releases).\nDownload and place `waybar-niri-windows.so` anywhere permanent;\n`~/.config/waybar` is a good place.\n\n### From source\n\nIf you'd like to build from source (or if you're on a different platform):\n\n1. Install GTK 3 + development headers (`apt install libgtk-3-dev`, `pacman -S gtk3`, etc.).\n2. Clone this repository.\n3. Run `make` to produce `waybar-niri-windows.so`. This might take a while (thanks to cgo).\n\nMove the library anywhere permanent, e.g. `~/.config/waybar`.\n\n## Configuration\n\nAdd a CFFI module to your Waybar config:\n\n```jsonc\n{\n  \"modules-left\": [\"cffi/niri-windows\"],\n  \"cffi/niri-windows\": {\n    // path where you placed the .so file\n    \"module_path\": \"/home/calico32/.config/waybar/waybar-niri-windows.so\",\n    // configure the module's behavior\n    \"options\": {\n      // set the module mode\n      // \"graphical\" (default): draw a minimap of windows in the current workspace\n      // \"text\": draws symbols and a focus indicator for each column (mirrors v1 behavior)\n      \"mode\": \"graphical\",\n\n      // ======= graphical mode options =======\n      //  when to show floating windows\n      //   - \"always\": always show floating window view, even if there are no floating windows\n      //   - \"auto\" (default): show floating window view if there are floating windows on the current workspace\n      //   - \"never\": never show floating windows\n      \"show-floating\": \"auto\",\n      // pick where the floating windows be shown relative to tiled windows\n      //   - \"left\": show floating windows on the left\n      //   - \"right\" (default): show floating windows on the right\n      \"floating-position\": \"right\",\n      // set minimum size of windows, in pixels (default: 1, minimum: 1)\n      // if this value is too large to fit all windows (e.g. in a column with many windows),\n      // it will be reduced\n      \"minimum-size\": 1,\n      // set spacing between windows/columns, in pixels (default: 1, minimum: 0)\n      // if this value is too large, it will be reduced\n      \"spacing\": 1,\n      // set minimum size of windows, in pixels, to draw icons for (default: 0, minimum: 0)\n      // if unset or 0, icons will only be drawn for tiled windows that are the only one in their column\n      // if 1+, icons will be drawn for all windows where w \u003e= icon-minimum-size and h \u003e= icon-minimum-size\n      // icons must be set in the \"rules\" section below for this to have any effect\n      \"icon-minimum-size\": 0,\n      // account for borders when calculating window sizes; see note below (default: 0, minimum: 0)\n      \"column-borders\": 0, // border on .column\n      \"floating-borders\": 0, // border on .floating\n      // trigger actions on tile click (see https://yalter.github.io/niri/niri_ipc/enum.Action.html for available actions)\n      // only actions that take a single window ID are supported\n      // set to an empty string to disable\n      \"on-tile-click\": \"FocusWindow\", // (default: FocusWindow)\n      \"on-tile-middle-click\": \"CloseWindow\", // (default: CloseWindow)\n      \"on-tile-right-click\": \"\", // (default: none)\n      // add CSS classes/icons to windows based on their App ID/Title (see `niri msg windows`)\n      // Go regular expression syntax is supported for app-id and title (see https://pkg.go.dev/regexp/syntax)\n      // rules are checked in the order they are defined - first match wins and checking stops\n      // set \"continue\" to true to also check and apply subsequent rules even if this rule matches\n      // if multiple rules with icons are applied, the first one will be used\n      // *icons are not drawn for floating windows by default*; set \"icon-minimum-size\" to enable (see above)\n      \"rules\": [\n        // .alacritty will be added to all windows with the App ID \"Alacritty\"\n        //  will be drawn in windows that match\n        { \"app-id\": \"Alacritty\", \"class\": \"alacritty\", \"icon\": \"\" },\n        // .firefox will be added to all windows with the App ID \"firefox\"\n        // subsequent rules are also checked and applied for firefox windows\n        { \"app-id\": \"firefox\", \"class\": \"firefox\", \"continue\": true },\n        // .youtube-music will be added to all windows that have \"YouTube Music\" at the end of their title\n        //  will be drawn in windows that match\n        { \"title\": \"YouTube Music$\", \"class\": \"youtube-music\", \"icon\": \"\" }\n      ],\n\n      // ======= text mode options =======\n      // customize the symbols used to draw the columns/windows\n      \"symbols\": {\n        \"unfocused\": \"⋅\",\n        \"focused\": \"⊙\",\n        \"unfocused-floating\": \"∗\",\n        \"focused-floating\": \"⊛\",\n        // text to display when there are no windows on the current workspace\n        // if this is an empty string (default), the module will be hidden when there are no windows\n        \"empty\": \"\"\n      }\n    },\n    \"actions\": {\n      // use niri IPC action names to trigger them (see https://yalter.github.io/niri/niri_ipc/enum.Action.html for available actions)\n      // any action that has no fields is supported\n      \"on-scroll-up\": \"FocusColumnLeft\",\n      \"on-scroll-down\": \"FocusColumnRight\"\n      // in graphical mode, don't configure click actions here—they're handled by the module above\n    }\n  }\n}\n```\n\n### Styling\n\nUse these selectors in your CSS to style the module.\n\n#### Graphical mode\n\n**Windows:**\n\n- `.cffi-niri-windows .tile`: any window, tiled or floating\n- `.cffi-niri-windows .column .tile`: tiled window\n- `.cffi-niri-windows .floating .tile`: floating window\n- `.cffi-niri-windows .\u003ccustom-class\u003e`: any window with a custom class (see `rules` in the config)\n- Add `:hover` (mouse hover) or `:active` (focused) to any of the above selectors to style those states.\n- Use `:first-child`, `:last-child`, and `:nth-child(n)` to style the first, last, or nth window in a column.\n- Use `:only-child` to style the window when it is the only window in a column.\n- Add `.urgent` to style windows marked as urgent.\n\n**Containers:**\n\n- `.cffi-niri-windows .column`: column of tiled windows\n- `.cffi-niri-windows .floating`: floating window view\n- Add `:active` to any of the above selectors to style that container when they contain the focused window.\n- Use `:first-child`, `:last-child`, and `:nth-child(n)` to style the first, last, or nth container.\n- Use `:only-child` to style the container when it is the only container.\n\nFor example:\n\n```css\n.cffi-niri-windows .tile {\n  background-color: rgba(255, 255, 255, 0.5);\n}\n.cffi-niri-windows .tile:hover {\n  background-color: rgba(255, 255, 255, 0.7);\n}\n.cffi-niri-windows .tile:active {\n  background-color: rgb(255, 255, 255);\n}\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e Adding borders to containers may cause them to overflow the bar height. If\n\u003e this happens, set these config options to account for the borders:\n\u003e\n\u003e - Set `column-borders` to the total height (in pixels) of the top and bottom border on `.column`\n\u003e - Set `floating-borders` to the total height (in pixels) of the top and bottom border on `.floating`\n\u003e\n\u003e For example, for the following CSS:\n\u003e\n\u003e ```css\n\u003e .cffi-niri-windows .column {\n\u003e   border: 1px solid rgba(255, 255, 255, 0.85);\n\u003e }\n\u003e\n\u003e .cffi-niri-windows .floating {\n\u003e   border: 2px solid rgba(255, 255, 255, 0.85);\n\u003e }\n\u003e ```\n\u003e\n\u003e Set `column-borders` to `2` and `floating-borders` to `4`.\n\n**Text mode** (be sure to specify a font that supports the symbols you're using):\n\n- `.cffi-niri-windows label`\n\n```css\n.cffi-niri-windows label {\n  font-family: Uiua386;\n  font-size: 18px;\n  margin-top: -2px;\n}\n```\n\n## Contributing\n\nContributions are welcome! If you find a bug or have a feature request, please open an issue or PR.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalico32%2Fwaybar-niri-windows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalico32%2Fwaybar-niri-windows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalico32%2Fwaybar-niri-windows/lists"}