2025-04-25 13:50:06 +02:00
2025-04-25 13:48:44 +02:00
2025-04-25 13:50:06 +02:00
2025-04-25 13:52:01 +02:00
2025-04-25 13:50:06 +02:00

niri_overview

A short python script to see applications for each workspace in the niri desktop .

dependencies

gtk3.0 +++ python

build binary

python -m nuitka --standalone --onefile --include-package=gi --include-plugin-directory=/usr/lib/python3.13/site-packages/gi --include-data-file=style.css=style.css niri_overview.py

Overview

This repository provides a GTK3-based overlay that presents Niri outputs, workspaces and windows in a compact, semi-transparent panel. It enables rapid navigation by clicking workspace or application entries to focus them, and visually distinguishes the active workspace and focused window through configurable neon-tinted borders and shadows.

Dependencies

The application requires Python 3 (version 3.8 or later) and the following PyGObject-based GTK libraries:

PyGObject with GTK 3.0, Gdk 3.0, Pango 1.0, Gio 2.0 and GLib 2.0 bindings
• A working niri command-line client in your $PATH, emitting JSON via niri msg --json …
• A Nerd Font (e.g. Hack Nerd Font) installed to render glyph fallbacks

Installation

Place the three files—niri_overview.py, config.py and style.css—in a single directory. Make niri_overview.py executable:

chmod +x niri_overview.py

Confirm that config.py references the correct path to style.css (by default it assumes both reside in the same folder).

to use nuitka to compile a static binary (on arch)

python -m nuitka --standalone --onefile --include-package=gi --include-plugin-directory=/usr/lib/python3.13/site-packages/gi --include-data-file=style.css=style.css niri_overview.py

Configuration

All tunable parameters appear in config.py. Adjust ICON_SIZE_PX or WINDOW_WIDTH for icon sizing or panel width. Modify BACKGROUND_RGBA to change the overlays darkness and transparency. Application glyph fallbacks and the default glyph for unknown apps can also be extended there.

Styling is defined in style.css. You may alter the background RGBA, neon accent colors or border/shadow rules. GTK3s CSS parser does not support custom properties, so all color values must be specified literally.

Usage

Launch the overview panel by running:

./niri_overview.py

The script will subscribe to Niris JSON event stream, perform an initial data fetch, then enter the GTK main loop. To exit, press q, Escape, or close all visible panels.

Customization

To use a different font for glyph fallbacks, install and reference it in your system. To change neon accent hues, edit the corresponding color values in style.css under the sections:

  • .output-title for the outputname accent
  • .clickable.workspace-focused and .clickable.window-focused for focused borders
  • .glyph-label for fallback glyph coloring

After modifying style.css, simply restart niri_overview.py to see changes.

License

This project is provided under the GPL V3 License.

Description
A short python script to see applications for each workspace in the niri desktop .
Readme GPL-3.0 59 KiB
Languages
Python 88.2%
CSS 11.8%