Skip to content

feat: native Arch package with KDE/Wayland fixes#23

Open
BattleMage wants to merge 1 commit into
openusage-community:mainfrom
DoDo-Softworks:feat-wayland-compatibility
Open

feat: native Arch package with KDE/Wayland fixes#23
BattleMage wants to merge 1 commit into
openusage-community:mainfrom
DoDo-Softworks:feat-wayland-compatibility

Conversation

@BattleMage

@BattleMage BattleMage commented Jul 14, 2026

Copy link
Copy Markdown

Description

Adds packaging/PKGBUILD, a native build against the host webkit2gtk-4.1, for distributions where the prebuilt AppImage aborts with EGL_BAD_PARAMETER because its bundled GL/Wayland stack no longer matches recent Mesa.

  • should_force_x11_backend detects a Wayland session via WAYLAND_DISPLAY/XDG_SESSION_TYPE instead of DISPLAY, and leaves an explicit GDK_BACKEND untouched.
  • The tray panel anchors bottom-right when the tray icon rect is unavailable and dismisses on focus loss; the click-catcher overlay is disabled on Linux, where it stacked above the panel and swallowed clicks.
  • The Linux tray icon renders as a square image sized for the StatusNotifierItem slot instead of the wide macOS menu-bar layout.
  • Global shortcuts register through the XDG GlobalShortcuts portal via ashpd on Wayland, where tauri-plugin-global-shortcut's X11 XGrabKey never fires; the X11 plugin path is kept otherwise.

Related Issue

Type of Change

  • Bug fix
  • New feature
  • New provider plugin
  • Documentation
  • Performance improvement
  • Other (describe below)

Testing

  • I ran bun run build and it succeeded
  • I ran bun run test and all tests pass
  • I tested the change locally with bun tauri dev

Checklist

  • I read CONTRIBUTING.md
  • My PR targets the main branch
  • I did not introduce new dependencies without justification

Notes

The main concern of this change was to get openusage running on my Arch based system, as the AppImage did not work. No UI was changed, but some functionality was adjusted to better integrate with a Wayland/KDE workflow, e.g. the global keyboard setting wasn't working at all with the previous code.

It does introduce a new liability by adding a PKGBUILD file, but that was deliberately written as frictionless as possible and I integrated the maintenance of the file to the release workflow. The package version is the only value that needs maintenance.

Adds `packaging/PKGBUILD`, a native build against the host
`webkit2gtk-4.1`, for distributions where the prebuilt AppImage aborts
with `EGL_BAD_PARAMETER` because its bundled GL/Wayland stack no longer
matches recent Mesa.

- `should_force_x11_backend` detects a Wayland session via
`WAYLAND_DISPLAY`/`XDG_SESSION_TYPE` instead of `DISPLAY`, and leaves an
explicit `GDK_BACKEND` untouched.
- The tray panel anchors bottom-right when the tray icon rect is
unavailable and dismisses on focus loss; the click-catcher overlay is
disabled on Linux, where it stacked above the panel and swallowed
clicks.
- The Linux tray icon renders as a square image sized for the
StatusNotifierItem slot instead of the wide macOS menu-bar layout.
- Global shortcuts register through the XDG `GlobalShortcuts` portal via
`ashpd` on Wayland, where `tauri-plugin-global-shortcut`'s X11
`XGrabKey` never fires; the X11 plugin path is kept otherwise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant