xdg-desktop-portal-zenzai

Crates.ioxdg-desktop-portal-zenzai
lib.rsxdg-desktop-portal-zenzai
version0.3.1
created_at2025-05-18 12:55:18.294799+00
updated_at2025-05-31 09:42:05.717207+00
descriptionA collection of several xdg-desktop-portal implementations to serve more lightweight wayland compositors like Hyprland
homepage
repository
max_upload_size
id1678633
size109,358
Christopher Kaster (atomicptr)

documentation

README

xdg-desktop-portal-zenzai

A collection of several xdg-desktop-portal implementations to serve more lightweight wayland compositors like Hyprland

Supported Portals

  • App Chooser - choose an application
  • Settings - control color scheme, accent color and appearance

Install

Available via:

Configuration

Edit $XDG_CONFIG_HOME/xdg-desktop-portal-zenzai/config.toml

# define your terminal here, this will be used by some services (AppChooser only right now)
terminal = "ghostty"

### App Chooser Portal Config
[appchooser]
enabled = true

[appchooser.runner]
type = "dmenu" # currently only dmenu style API is supported (list of files into stdin)
command = "wofi"
arguments = ["--dmenu"]

# list of content types -> app associations
[appchooser.defaults]
"text/plain" = { command = "ghostty", arguments = ["-e", "nvim"] } # run arbitrary commands
"image/jpeg" = "io.github.woelper.Oculante" # or execute desktop files
"image/webp" = ["io.github.woelper.Oculante.desktop", "com.brave.Browser.desktop"] # you can also always pick from a group

### Settings Portal Config
[settings]
enabled = true # portals have to be explicitly enabled
color-scheme = "dark" # set color scheme to dark/light
accent-color = "#b4befe" # define an accent color

# some apps query arbitrary data from the settings portal which you can set like this:
[settings.dict."org.gnome.SomeApp"]
some-key = "some value"
some-number = 1337

How to use it

To use zenzai you need to create ~/.config/xdg-desktop-portal/CURRENT_DESKTOP_NAME-portals.conf, for example, if you use Hyprland, you need to name it Hyprland-portals.conf.

[preferred]
default=hyprland;zenzai;gtk
org.freedesktop.impl.portal.AppChooser=zenzai
org.freedesktop.impl.portal.Settings=zenzai

Motivation

The goal for me is to use this to replace xdg-desktop-portal-gtk completely on my Hyprland setup.

License

GPLv3

Commit count: 0

cargo fmt