Closed willemw12 closed 9 years ago
Thank you for the report. I'll implement proper Exec parsing when I have some free time.
I use Arch Linux myself, so I guess I'll install the package too. :-)
OK. Had a look at i3-dmenu-desktop to see how special field codes (%) are handled there. Now I have come up with a small fix for this dmenu-frecency issue.
If you like I can create a pull request, so you can have a look (later on).
Of course, do create a pull request then.
I've merged the fix, but it still uses regexes, so I will implement real parsing for the field eventually.
With the current fix more, maybe all, kde programs are launched properly.
I think only handling "Quoting" and "Reserved characters" is missing. Some of these reserved characters I don't see being handled in i3-dmenu-desktop.
I implemented parsing of the Exec key without regexes in a899210f7c8e39b2bd59c9c045a170af4cdbb5e7 using shlex. Hopefully it works well. The state format changed slightly so visits are cleared when updating.
Some issues I found. When launching 'KDE Dolphin':
Exec=dolphin %i -caption %c %u
the window title is system-file-manager - Dolphin
, expected <my user name> - Dolphin
.
Launching 'KDE System Settings'
Exec=systemsettings -caption %c %i
fails:
$ dmenu-frecency
systemsettings: Unexpected argument 'preferences-system'.
systemsettings: Use --help to get a list of available command line options.
Ah, I misread the specification for %i, it should be fixed now.
Still getting the same issues with commit 952e8fa.
Does the issue persist after launching 'dmenu-frecency --read-apps'? The relevant code is only executed when updating the cache. Dolphin and Gwenview launch properly for me.
That solved it (removed the cache before running 'dmenu-frecency --read-apps').
Some of the Exec key values from .desktop files are passed (incorrectly) to the launched program.
For example,
Results in error message:
And the window title is "%c".
Desktop Exec key specification: http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables
BTW, I have created a package for Arch Linux (https://aur.archlinux.org/packages/dmenu-frecency-git/).