diff --git a/README.md b/README.md index 37ec974..5e29c88 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,78 @@ # niri_overview -A short python script to see applications for each workspace in the niri desktop . \ No newline at end of file +A short python script to see applications for each workspace in the niri desktop . + + +dependencies + +gtk3.0 +++ +python + + + +build binary + +```sh +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: + +```bash +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) + +```bash +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 overlay’s 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. GTK3’s CSS parser does not support custom properties, so all color values must be specified literally. + +## Usage + +Launch the overview panel by running: + +```bash +./niri_overview.py +``` + +The script will subscribe to Niri’s 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 output‐name 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.