This gist is now packaged and maintained at weshouman/nautilus-meld-compare-extension
This Nautilus extension allows us to easily compare files and directories using the Meld comparison tool directly from the Nautilus context menu. The extension adds new menu items that let you set a "left" file or directory for comparison and then compare a "right" file or directory against it.
- Set a file or directory as the "left" item for comparison.
- Compare another file or directory as the "right" item against the previously set "left" item.
- Directly compare two selected files or directories.
- Ubuntu (or any GNOME-based Linux distribution)
- Nautilus File Manager
- Python 3.x
- Meld
- Nautilus Python bindings (
apt install python3-nautilus
) - For new Ubuntu releases, for example 23.10, not the case for 22.04: one needs to change the signature of
get_file_items
fromget_file_items(self, window, files)
toget_file_items(self, files)
, fix reference
mkdir -p ~/.local/share/nautilus-python/extensions/
- Place the
.py
extension file in~/.local/share/nautilus-python/extensions/
. - Restart Nautilus:
nautilus -q && nautilus --no-desktop
- Right-click on a file or directory and choose "Set as Left File to Compare" or "Set as Left Directory to Compare."
- Right-click on another file or directory to see an option to compare it to the previously set "left" item.
- Right-click on 2 files or 2 directories and compre both.
Following your explanation I'm using your current version.
No, not related to the extension. I must have been trigger-happy and launched a new instance before the previous was dead when I tested that first change... and then moved on to the
GObject.GObject
change in my first comment here.I'm getting used to this now, as I've recently been building nautilus locally, and am carrying 3 patches for functionality changes that I want, but are unlikely to be accepted upstream (narrower max sidebar width, optional hiding of the star system, and larger max thumbnail sizes in grid view). Now, with the Meld extension, my version of Nautilus is pretty spiffy for my needs!
Oh, and I put a watch on the
/usr/bin/nautilus --gapplication-service
process, and observed it can take 6-8 seconds to die after exiting the application.