Skip to content

zgx: Linux windows carry zeron.desktop's id, so bars and docks show Zeron's icon - #1505

Open
grishnakov wants to merge 1 commit into
zeronsh:zeron/orchestratorsfrom
grishnakov:zgx/linux-desktop-id
Open

grishnakov wants to merge 1 commit into
zeronsh:zeron/orchestratorsfrom
grishnakov:zgx/linux-desktop-id

Conversation

@grishnakov

@grishnakov grishnakov commented Nov 18, 2026 •

Copy link
Copy Markdown

Targets #1474 (zeron/orchestrators).

Problem

On Linux, Zeron's windows show without an icon in bars, docks and task switchers. That happens in both the released beta and development builds of the zgx app.

Bars match a window's Wayland app_id (the X11 class) to a desktop file to find the app's name and icon. zgx-desktop takes that id from Application::application_id, or else from the executable's name:

Build Window app_id Matches zeron.desktop?
beta (--features beta) sh.zeron.app no
development zeron-zgx no

Linux installs the entry as zeron.desktop, with StartupWMClass=zeron (dist/zeron.desktop, scripts/package-linux.sh), so neither id matches.

Fix

Set Application::desktop_id("zeron") in apps/zgx/src/main.rs. zgx-desktop makes for exactly this case. On Linux it sets the windows' app_id and X11 class, and it takes precedence over the application id. It registers nothing on D-Bus, so the beta's sh.zeron.app URL delivery (zeron:// links) is unchanged. On macOS and Windows it does nothing.

Tested

Tested on Omarchy (Hyprland, Quickshell bar) with this branch's dev build against production:

  • Before: hyprctl clients gave class: zeron-zgx, and the workspace bar showed no icon.
  • After: it gives class: zeron, and the bar shows Zeron's logo from zeron.desktop.

I didn't build or run the beta (--features beta) variant. The change is the same builder call, and zgx-desktop uses desktop_id ahead of application_id.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…eron's icon

A window's Wayland app_id (X11 class) is what bars, docks and task
switchers match to a desktop file for the app's name and icon. zgx took
it from the application id, sh.zeron.app in the beta, or else the
executable's name, zeron-zgx in a development build. The desktop entry
Linux installs is zeron.desktop (StartupWMClass=zeron), so neither
matched and Zeron showed with no icon. Application::desktop_id("zeron")
names the windows after it in every build; it registers nothing on
D-Bus, so the beta's sh.zeron.app URL delivery is unchanged.

@katulevskiy katulevskiy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1-line fix, correct fix, approved

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants