r/linuxmint • u/ye_d7 • 20h ago
Discussion I added "brush" selection to Nemo (right-click + drag to select icons)
Selecting files that aren't next to each other in Nemo means Ctrl+clicking every one of them, and the rubber band only covers rectangles. So I tried something different: you hold the right mouse button on empty space and drag, and everything the line touches gets selected. Go over an icon again and it gets unselected, a third time and it's selected again. The screenshot shows it in action.
It's off by default. If you right-click an icon, or right-click without dragging, Nemo does what it always did. I've used it in the icon view, the compact view and on the desktop, on Mint 22 with Cinnamon on X11. I haven't tried Wayland, multiple monitors or touch screens.
I've opened a pull request, so it may change a lot or never get merged: https://github.com/linuxmint/nemo/pull/3920
The code is on my fork: https://github.com/yazeedali/nemo/tree/path-selection-fixes
There's no checkbox in the preferences yet, so it's turned on with gsettings.
If you want to try it, you have to build Nemo from source, so this is only for people who are comfortable in a terminal. You'll need the build dependencies first. On Mint that's something like `sudo apt build-dep nemo` (needs the source repositories enabled) plus `libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev`. I only tested these steps on my own machine, so tell me if something is missing:
git clone -b path-selection-fixes https://github.com/yazeedali/nemo.git
cd nemo
meson setup build && ninja -C build
glib-compile-schemas libnemo-private/
export GSETTINGS_SCHEMA_DIR=$PWD/libnemo-private
gsettings set org.nemo.preferences path-selection-enabled true
nemo -q; ./build/src/nemo
That runs the copy in that folder and doesn't install anything. The gsettings line is saved in your user settings, so to turn it off again run:
gsettings reset org.nemo.preferences path-selection-enabled
What I'd like to know is whether right-drag feels natural, or whether it should need a modifier key instead. If something acts weird when you try it, please say so.