-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Append arguments to .desktop Exec #168
Comments
This mechanism (or a very similar one) is already implemented in j4-dmenu-desktop. j4-dmenu-desktop handles arguments for desktop files whose [Desktop Entry]
Name=Doom
Comment=Play this game on Steam
Exec=steam -applaunch 2280 %F
Icon=steam_icon_2280
Terminal=false
Type=Application
Categories=Game; You can achieve what you want. Note that the whole name of the desktop app has to be provided. This works as expected in the default mode, but if you use something like This feature has been in j4-dmenu-desktop for a long time (I have verified it works on version r2.18). The second easiest solution is to make a custom desktop file: [Desktop Entry]
Name=Doom skip
Comment=Play this modified game on Steam
Exec=steam -applaunch 2280 -warp e1m1
Icon=steam_icon_2280
Terminal=false
Type=Application
Categories=Game; I believe this is the best solution if you want to launch the program with this set of flags often and if you don't want to retype You can put these custom desktop files in Specifying arguments currently works only for desktop files with Because of this issue, I have looked deeper into the argument handling mechanism and "accidentally" found a bug: #169. It is not thankfully present in any released version of j4-dmenu-desktop, but I was planning to release version r3.1 soon, which would have included this bug if I hadn't found it. So thanks for that. |
On Wed, 10 Jul 2024 12:09:41 -0700 meator ***@***.***> wrote:
`%f`, `%F`, `%u` or `%U` field codes
Whoops! It's been so long since I've dealt with .desktop files that I forgot those existed. Yeah that's plenty for me, I wouldn't encourage you adding anything outside of spec when the feature is basically already there. I do think it's kind of weird how there isn't always an implied one at the end of an Exec line, but that's something I'd take up more with XDG I guess.
Thanks for the heads up, and I'm glad I could accidentally be some help.
|
Hi, say I've got the following .desktop file: (I don't actually load my Doom through Steam, but it naturally applies to other use-cases)
When I enter the text
Doom -warp e1m1
, I think it would be nice if j4-dmenu-desktop treated the Exec line as though it looked like this: (In case you're unfamiliar, this argument makes Doom skip the title screen and start the player in a given level)What do you think, might be pretty cool?
The text was updated successfully, but these errors were encountered: