Meld Menu Original

Dolphin Service Menus diff kde5 kdeplasma meld service-menu

Source (required if based on other people's work):

3
Score 55%
Description:

A complete service menu to compare your files or folders with meld.

Functioning
To handed the files to meld, you have two choices.

variant A
Clicking the right mouse button on a file or folder using the menu item "Set file/folder" the first argument set to compare. In the background, the file/folder is stored as a variable in the /tmp directory.
In another file or another folder will now be using the menu option "Compare with file/folder" is a 2-way comparison of these two starts. For this purpose, in the background, the first argument is read and compared to the currently specified.
pros:
- The files/folders can be located in different places.
Cons:
- Only a 2-way comparison.
- Somewhat more complicated in the input.

variant B
This variation in Dolphin initially up to three files or folders selected. With the menu item "selected comparisons files/folders" this selection is passed to meld.
pros:
- A 3-way comparison is possible.
- Easier to enter.
Cons:
- The files/folders must be in the same folder.

Install

The file is dependent on meld. This can be easily installed via the package manager.

KDE Framework 5
Storage location as there are 2 paths to choose from.
Copy the file to:
~/.local/share/kservices5/ServiceMenus/ (current user)
or
/usr/share/kservices5/ServiceMenus/ (all users)

With the command "kf5-config --path services", the paths could be checked.

KDE 4
Storage location as there are 2 paths to choose from.
Copy the file to:
~/.kde4/share/kde4/services/ServiceMenus/ (current user)
or
/usr/share/services/ServiceMenus/ (all users)

With the command "kde4-config --path services", the paths could be checked.

Troubleshoot

Using "Download New Services" in Dolphin

The function within "Dolphin Preferences > Servives" now saves the files in another folder when you download them. Just copy the file into the desired path (~/.local/share/kservices5/ServiceMenus/ ). If the path not available, simply create a new one.

Translation
If your language is not included? Please translate it and send me a message or write a comment. Then I take the language into the script.

Vote
A positive assessment encourages progress to the development. Don't forget the vote please.
Last changelog:

Version 0.6 27 days ago

- Using Breeze Icons

Trail_deactivated

4 years ago

Hi,
It $ARG1 should probably be escaped with quotes, otherwise paths containing spaces etc do not work.

Exec=ARG1=$(cat /tmp/meld-menu-arg1);meld "$ARG1" %U;

Otherwise works nicely, thanks.

Report

C

romankiefer

4 years ago

Thanks for the hint. I'll change the code accordingly.

Report

dantefff

5 years ago

I'm a KDE user so I don't have meld installed (I use kompare), so I made a kompare version (just find and reemplace meld with kompare).

This is the code in case yo would like to post it:

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory;application/octet-stream;
Actions=setArg1;diff;_SEPARATOR_;selected;
X-KDE-Priority=TopLevel
X-KDE-Submenu=Kompare menu
X-KDE-Submenu[de]=Kompare Menü
X-KDE-Submenu[es]=Kompare menú

[Desktop Action setArg1]
Icon=kompare
Exec=echo "%U" > /tmp/kompare-menu-arg1
Name=Set file/folder
Name[de]=Setze Datei/Ordner
Name[es]=Marcar archivo/carpeta

[Desktop Action diff]
Icon=kompare
Exec=ARG1=$(cat /tmp/kompare-menu-arg1);kompare $ARG1 %U;
Name=Compare with file/folder
Name[de]=Vergleiche mit Datei/Ordner
Name[es]=Comparar con el archivo/carpeta marcado

[Desktop Action selected]
Icon=kompare
Exec=kompare %U;
Name=Compare selected files/folder
Name[de]=Vergleiche ausgewählte Dateien/Ordner
Name[es]=Comparar los archivos/carpetas seleccionadas

Report

C

romankiefer

5 years ago

Thanks for the note. Unfortunately, in my opinion kompare can not compete with meld. Therefore, I also use meld and not kompare. As far as I know, by kompare is already a service menu integrated (I'm not sure it's been so long ago).

Is it advisable to take up the code here? Or is it better to set its own app? I think the latter is probably better to avoid mixing, since it deals with a different program. I can then set a reference to kompare-menu.

Regards, Roman

Report

spikyatlinux

5 years ago

Nice to see that i can help you, yes you´re right youre solution is good.

Thx for naming me ;-)

Regards

Report

C

romankiefer

5 years ago

Hello,
first of all thank you for the advice. I will customize the menu nor accordingly.

@spikyatlinux:
At first glance, it looks simple, but your solution has a downside. When I compare folders or files, I'm not often into the same directory and have jump back and forth. Then I can not use your variant. A menu of both types, but I find good and I will implement yet.

@ msx
I do not know how the others feel, but I find it unnecessary to open another fork. This results in only confusing entries. I will merge the changes into the menu and then the menu exists twice.

Regards, Roman

Report

msx

5 years ago

Hello Roman!
As soon as you update Meld Menu I will gladly drop the fork and use your new .desktop file, just let me know :)

Report

C

romankiefer

5 years ago

The update has already been made. Only the screenshot are not changed (I'll do tonight).
Thanks

Report

msx

5 years ago

Done!
The only thing I think it's left to change is the description of the ServiceMenu since it's more powerful now than the first version, I've used this description on the fork I did create, should you like it:

"A complete service menu to Meld your files and folders."

Cheers,
Martin

Report

C

romankiefer

5 years ago

Sure, I planned to adjust the description, if I change the screen shots. For that I want to take more time. The functionality I want because even describe a little.

Regards, Roman

Report

spikyatlinux

5 years ago

hey,
why so difficult? I use the following code for meld, works with files and folders.

for folders

Quote:
[Desktop Action CompareFolder]
Exec=meld %U
Icon=meld
Name=Compare folders
Name[de]=Unterschiede in Ordnern


and for files

Quote:
[Desktop Action CompareFiles]
Exec=meld %U
Icon=meld
Name=Compare files
Name[de]=Unterschiede in Dateien


regards ;-)

Report

msx

5 years ago

So then -I presume- you just select the directories or files you want to compare and pick one of the ServiceMenu option?

Report

msx

5 years ago

Forget the above comment, works like charm, I will package a service with your method too.

Report

msx

5 years ago

Okay, this it what I'm gonna do: I will merge your idea with the original package, this way we will have a full-featured Meld ServiceMenu.
Why merging both methods? Easy:

Scenario A) you want to Meld two or more files or directories in the same directory, just select all of them and use the appropiate ServiceMenu.

Scenario B) you want to Meld two files or directories from _different directories_ so you selecte folder/file #1, set it and then go to the other one and Meld it.

Any suggestions and comments are welcomed :)

Report

msx

5 years ago

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory;application/octet-stream;
Actions=CompareFiles;CompareFolder;setArg1;diff;
X-KDE-Priority=TopLevel
X-KDE-Submenu=Meld Menu

[Desktop Action setArg1]
Name=Set file/folder
Name[de]=Setze Datei/Ordner
Name[es]=Marcar archivo/carpeta
Icon=meld
Exec=echo "%U" > /tmp/meld-menu-arg1

[Desktop Action diff]
Name=Diff with file/folder
Name[de]=Vergleiche mit Datei/Ordner
Name[es]=Diff con el archivo/carpeta marcado
Icon=meld
Exec=ARG1=$(cat /tmp/meld-menu-arg1);meld $ARG1 %U;

[Desktop Action CompareFolder]
Exec=meld %U
Icon=meld
Name=Compare folders
Name[de]=Unterschiede in Ordnern
Name[es]=Comparar carpetas

[Desktop Action CompareFiles]
Exec=meld %U
Icon=meld
Name=Compare files
Name[de]=Unterschiede in Dateien
Name[es]=Comparar archivos


I tidied it up and added spanish translations.
Here's a screenshot: http://i.imgur.com/BCg9j.png

Report

msx

5 years ago

Forked and posted here with all correspondent credits given:
http://kde-look.org/content/show.php?content=155509

Report

msx

5 years ago

Nice go! I packaged it for Arch Linux: https://aur.archlinux.org/packages/kde-servicemenus-meld-menu/

Report

Version 0.6 27 days ago

- Using Breeze Icons

Version 0.5 27 days ago

- fix: missing link to file
- remove tmp file when done
- install description KDE Framework 5

4 years ago

Version 0.4
- fix: folder with blanks now work (thanks to Trail)

Version 0.3
- Language Topmenu customized (de, es)
- Menu more user-friendly

Version 0.2
- Added menu item "Compare selected files/folders" (thanks to spikyatlinux)
In order for the files/folders are compared, which were selected in Dolphin.
- Added Spanish language (thanks to msx)

Version 0.1
- Simple meld menu

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
GPLv3
version
0.6
updated Sep 19 2018
added Nov 26 2012
downloads today
0
page views today 2
System Tags addon gplv3