mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 11:15:20 +01:00
[GH-ISSUE #222] [Launcher] Incorrect programs being opened #7125
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#7125
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?
Originally created by @donovanglover on GitHub (Jul 4, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/222
Describe the bug
Launcher does not open the correct programs. For example,
thunaropens the bulk renamer.To Reproduce
thunarto launcherthunarExpected behavior
File browser is opened.
System information:
github.com/JakeStanger/ironbar@f8d8c06300Additional context
@JakeStanger commented on GitHub (Jul 5, 2023):
Hey are you able to confirm how both programs were installed, and if possible the absolute path to their desktop files please?
The opening process works by finding the desktop file and passing that to gtk-launch. There have been some recent changes to the code that finds the file so that might be a culprit.
@donovanglover commented on GitHub (Jul 5, 2023):
Thunar and the bulk renamer are both called with
thunar, so their paths are the same. Thunar was installed the usual way and you are free to reproduce my setup in NixOS.I also encountered issues with
org.qutebrowser.qutebrowseropeningzathura,although surprisingly it works as expected now.Looks like it doesn't work anymore.qutebrowseralso works, however it opens a separate icon (or usesorg.qutebrowser.qutebrowser) instead of using the existing one.I feel like this is related to the change used to fix
github.com/nwg-piotr/nwg-dock-hyprland@5128931d1b, although I haven't digged in./src/modules/launcheryet.@yavko commented on GitHub (Jul 5, 2023):
Yeah but what are the desktop file locations
@donovanglover commented on GitHub (Jul 5, 2023):
Looks like home manager packages are in
/etc/profiles/per-user/user/share/applicationsand system packages are in/run/current-system/sw/share/applications/. Both are inXDG_DATA_DIRS.Thunar has different
.desktopfiles for the bulk renamer and the usual file browser./run/current-system/sw/share/applications/thunar.desktop/run/current-system/sw/share/applications/thunar-bulk-rename.desktop@yavko commented on GitHub (Jul 5, 2023):
So I think I found it, in this code it's checking if any field "contains" it, so obviously it's going to be positive for
thunar-bulk-renaner, I mean it includes thunar. But I'm not sure idk much about this code.https://github.com/JakeStanger/ironbar/blob/master/src/desktop_file.rs#L110-L115
@JakeStanger commented on GitHub (Jul 5, 2023):
Ah yeah I think you're correct. The fix should just be to do a first pass that checks for an exact match, then do the
containsin a second pass@JakeStanger commented on GitHub (Jul 5, 2023):
Turns out it was actually incorrectly matching on the file name before reading any of the desktop files.
I've tested the above with
thunarandthunar-bulk-renameand both now seem to be working reliably. It also shimmies the logic around a bit to try and prevent the same thing happening in other places.If you're able to, could you give it ago yourself and let me know if it does the trick or you encounter any other false matches please?