mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 08:15:21 +01:00
[PR #1093] [MERGED] fix(launcher): improve app ID handling: fallback for desktop entries.… #9566
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#9566
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/JakeStanger/ironbar/pull/1093
Author: @slowsage
Created: 7/19/2025
Status: ✅ Merged
Merged: 8/5/2025
Merged by: @JakeStanger
Base:
master← Head:wmclass-async📝 Commits (1)
0159c01fix: app_id StartupWMClass resolution in launcher📊 Changes
1 file changed (+40 additions, -21 deletions)
View changed files
📝
src/modules/launcher/mod.rs(+40 -21)📄 Description
… Fixes: #487
This approach has decent enough defaults and we will not need to change the config parsing as I initially suggested (#487). A mapping can be forced by setting StartupWMClass in the .desktop file.
The app_id found in window/desktop environment will first be matched against the string specified in the favorites list (
items, initially). Failing that, it will try to reverse lookup the app_id as a startup_wm_class. the reverse lookup dictwm_app_idsis a map from startup_wm_class to app_id that the app was initialized with.As long as the same app is launched with the same wm_class, duplicates are handled for both favorites (secondary lookup to find key as it was specified in config file) and non-favorites (app_id/wm_class wont be in favorites, so the app_id passed in will be used as key).
Want to let it run for a bit but figured I'd send what I have for feedback.
P.S. To avoid a secondary IndexMap, I looked at using multi_map but that uses Hashmap underneath - which will not preserve order.
This is the datastructure we need eventually IMO.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.