Summary: | Implement a method to add a launcher to the panel via right-click | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | php4fan |
Component: | Panel | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | ASSIGNED --- | ||
Severity: | wishlist | CC: | nate, plasma-bugs, vibs.35 |
Priority: | NOR | Keywords: | usability |
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | openSUSE | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=390817 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
php4fan
2020-10-11 17:12:43 UTC
Thanks for trying out KDE Plasma! Other than this hiccup, I hope you're enjoying it so far. As for your issue, the way you can pin an arbitrary CLI command to the Task Manager is by creating a new .desktop file entry for the command you want to run. You can do this using the KMenuEdit app, which is also accessible from Right-Click on Application Launcher > Edit Applications. From KMenuEdit you can click the "New Item" button and create an entry for the thing. You can give it a name, and icon, and specify an command to run. Once this is done, it will appear in Application Launcher and you can add it to your Task Manager in all the normal ways: drag it there, right-click > pin, etc. If you need for it to handle arguments/paths, you can add a special keyword. %f means "handle a single file" and %F means "handle potentially multiple files if given a space-separated list". %u and %U do the same thing for URLs, if the app has the capability to handle arbitrary URLs with schemes like HTTP:// SMB:// and so on. If you set up the .desktop file this way, you can actually drag files to the Task Manager entry and it will do exactly what you expect. All of this is not KDE-specific; it's governed by a cross-desktop standard about .desktop files: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html --- I agree that being able to create your own .desktop files for arbitrary command-line programs isn't the most discoverable feature. However it's also not a very common workflow, because typically, installing a GUI app will also install a suitable .desktop file automatically. If this isn't happening, I would argue that that's a pretty significant bug that should be reported to the app's developer. Manually creating .desktop files isn't something we should expect users to have to do themselves. Can you explain which specific apps you're having this problem with? Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! There was no reason for this to be in NEEDSINFO in the first place. Yes comment 1 ends with a question but it's far from essential to the issue, and even if I don't have the time to answer that there's enough information here to improve on the issue. Comment 1 explains the convoluted procedure to create an icon and add it to the panel and it confirms that it's ridiculously undiscoverable. The information we asked for was:
> Can you explain which specific apps you're having this problem with?
Yes, and I asked that because I was unsure whether the issue was caused by a defective app not shipping with a correct desktop file, or it was from using a CLI app or some other app without a .desktop file and the reporter needed to create one manually. In the former case, it's a bug with the app in question, while with the latter case, the current UX seems sufficient given that this is a very uncommon, advanced workflow and we already have a whole app dedicated to it (KmenuEdit). That app isn't prominently advertised precisely because using it means you're engaging in an advanced task and we don't want to push that kind of stuff right in the user's face. Editing .desktop files without knowing what you're doing can break various parts of the UI or your ability to launch apps. In either case, I don't think there's anything for us to fix here. > The information we asked for was: I know, and what I said in comment 4 still holds. For example, Telegram Desktop and TortoiseHg (and others I don't remember right now). Actually, it turns out both of them come with a .desktop file but I didn't know that what I needed was a desktop file to begin with. When I right click on the panel (assuming that's what you call the thing at the bottom of the screen where the application icons are), there should be an option "Add application", and among other options, it should suggest me to browse for a .desktop file. There's not even that. But also, I might want to just add an icon to launch a shell script that wasn't even designed to be a desktop application (not to mention a binary that simply doesn't come with a .desktop file). > Yes, and I asked that because I was unsure whether the issue was caused by a
> defective app not shipping with a correct desktop file, or it was from using a
> CLI app or some other app without a .desktop file and the reporter needed to
> create one manually.
It's for both cases (the former not necessarily being "a defective application" but just a program that wasn't designed with a desktop environment in mind). In either case, I just want to create a button that is a shortcut to launch an executable. If a .desktop file is needed for that, a trivial one can be created automatically. I literally just want to be able to tell the system: "please, add a button here that launches this binary". The natural place where I'd expect to find such a functionality is a right click on the place where I want to add the shortcut, i.e. the panel.
So your complaint specifically is that there is no way to do this via right-clicking on the panel, even though there are other ways to do it (drag-and-drop to panel; right-click on app entry in launcher menu > Pin To Task Manager/Add to Panel; create entry in kmenuedit and do one of the above). That seems reasonable to improve. The current panel right-click menu has "Add Widgets..." but nothing there would do what you want because the generic desktop file launcher widget is not exposed in the widgets list there. Perhaps it should be. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4781 |