CURRENT SITUATION: 1. Select two files in Dolphin that should be compared. 2. Open the context menu to find a compare action => Nothing found. 3. Choose Open With... > kompare => Two Kompare instances are opened with the error message "Could not parse diff output." 4. Choose Open With... > kdiff3 => Two KDiff3 instances are opened; files are not compared WISH: Similar to the "Compress" submenu in the context menu there could be a "Compare" submenu where the user can select Kompare or KDiff3 to easily compare two files. CURRENT WORKAROUND: 1. Open a Konsole 2. Type kompare or kdiff3 3. Drag and Drop the two selected files to the Konsole and choose Paste Location 4. Press Enter
Select two files, Control → Extras → Compare Files?
Oh yes, this works. Thanks for the hint. I now wonder if the Tools menu is an intuitive place for the Compare action. The other items in the Tools menu all operate on the current directory and not on selected files. Maybe the Compare action could additionally be added to the context menu > Actions.
I just wrote a file item actions plugin for that, it has two drawbacks, though 1.) only works for comparing files of the same exact type (just because both are "text" doesn't neccessarily work :/), seems a limitation on KIO's side 2.) cannot put it in "Actions" sub menu, plugins are always on top level which makes me wonder since the action is hardly qualified to be shown there
Hmm, not quite satisfactory. Some thoughts: 1) Would it be possible/desirable to extend the KIO plugin system that a plugin author can say: "If there is an Action menu, I would like my plugin menu to be placed there"? This would reduce root menu pollution. 2) KIO plugins could appear in the Actions menu by default. Then the "Compress" menu would also move there. All actions would be consistently together in the same menu, regardless how they are implemented. 3) The Compare action could be added to the Actions menu by Dolphin directly and not by the service menu interface.
This works for me: $ cat <<EOF > ~/.local/share/kservices5/ServiceMenus/kompare.desktop [Desktop Entry] ServiceTypes=KonqPopupMenu/Plugin Actions=kompare Type=Service MimeType=inode/directory;application/octet-stream; # Uncomment following line to pull it out of Action menu # X-KDE-Priority=TopLevel [Desktop Action kompare] Name=Kompare Files Icon=kompare Exec=kompare -c %U EOF $ kbuildsyscoca5 1.) Silently ignores selections != 2
(In reply to ottwolt from comment #5) > This works for me: For me too, thanks. > $ kbuildsyscoca5 ^ one s too much: $ kbuildsycoca5 Could this service menu file be shipped by default with Kompare or Plasma?
Wanna submit a patch on https://phabricator.kde.org/? ;-) Probably for Kompare, since this wouldn't do anything when Kompare isn't installed.
I'm not too happy with it silently ignoring! = 2 selected files as it's not supported. I'll look into extending KIO to allow an action to specify the number of selected items it's offered for.
Git commit 2e557f4065f451161f7bc792f45f3905d22c9684 by Michael Heidelbach. Committed on 18/01/2018 at 14:33. Pushed by michelh into branch 'master'. Added service menu Summary: Limitation: - Files must be presented in the same dolphin pane Reviewers: mlaurent Reviewed By: mlaurent Subscribers: broulik, safaalfulaij, mlaurent, ngraham Differential Revision: https://phabricator.kde.org/D9698 M +1 -0 CMakeLists.txt A +2 -0 servicemenus/CMakeLists.txt A +11 -0 servicemenus/kompare.desktop https://commits.kde.org/kompare/2e557f4065f451161f7bc792f45f3905d22c9684