Skip to content
al20ovPublic

About

Output management for Niri

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Stitch

Output management for Niri similar to nwg-displays.

image

Dependencies

Void Linux

  • gtk4-devel
  • libadwaita-devel
  • blueprint-compiler
  • python3
  • python3-gobject
  • python3-Jinja2
  • ...

Loose description of how it works

The first thing this program does is get a list of outputs from Niri over its UNIX domain socket (path in $NIRI_SOCKET) by sending "Outputs" (with the quotes). That gives us a JSON array (see printf '"Outputs"' | socat STDIO $NIRI_SOCKET | jq . for pretty format).

Then, that array is loaded and each output/display becomes a Gtk.Box that you can drag within a Gtk.Fixed with a Gtk.GestureDrag to arrange your displays.

Click on a display and it brings up a Gtk.Popover where you can change the display's properties such as resolution, refresh rate, scale, etc...

When you're done, you can save the layout, which will then generate a piece of Niri config in KDL format and write it to ~/.config/niri/outputs.kdl. If that file is included in the main ~/.config/niri/config.kdl, Niri should reload its config and apply it.

Useful resources

  1. Blueprint documentation: https://gnome.pages.gitlab.gnome.org/blueprint-compiler/index.html

  2. GTK 4 PyGObject classes: https://api.pygobject.gnome.org/Gtk-4.0/classes.html

  3. GTK 4 CSS properties: https://docs.gtk.org/gtk4/css-properties.html

  4. libadwaita widget gallery: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.7/widget-gallery.html

  5. GTK 4 widget gallery: https://docs.gtk.org/gtk4/visual_index.html

  6. libadwaita built-in CSS classes: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.3/style-classes.html

About

Output management for Niri

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages