nemo-dim-hidden
A nemo-python extension that dims hidden files (dotfiles) in Nemo's list view.
Nemo already dims hidden files in icon view out of the box. This extension
brings the same visual treatment to list view, greying out the Name, Size,
Type, Date Modified columns (and any other text columns you have enabled)
for every file whose name starts with ..
Compact view: Nemo natively dims the file icon in compact view (50 % opacity). The text labels there are rendered on an EelCanvas with no Python API, so this extension cannot affect them.
- Nemo ≥ 3.0 (tested on 6.2 / Linux Mint 22)
nemo-pythonpackage
sudo apt install nemo-python # Debian / Ubuntu / Mint
mkdir -p ~/.local/share/nemo-python/extensions/
cp nemo-dim-hidden.py ~/.local/share/nemo-python/extensions/
nemo -q && nemoTo uninstall, delete the file and restart Nemo.
GTK's GtkCellRenderer has a sensitive property: when False, the theme
renders the cell in its "insensitive" (greyed-out) state. The extension hooks
into every text cell renderer in the file-list tree view via
set_cell_data_func, checks whether the filename starts with ., and sets
sensitive accordingly on every render pass.
A few non-obvious things worth knowing if you're reading the source:
-
InfoProviderstub — in nemo-python 6.x, a class that only implementsNameAndDescProvideris imported but never instantiated. AddingInfoProvider(with a trivial do-nothing stub) is necessary to get the class instantiated. -
set_cell_data_funcreplaces attribute bindings — Nemo normally binds model columns to renderer properties viaadd_attribute. Callingset_cell_data_funcoverrides this, so the text value must be set explicitly inside the callback. Each column'ssort-column-idequals the model column Nemo uses for thetextattribute, somodel.get_value(it, col.get_sort_column_id())reproduces the original text. -
draw-signal overlay doesn't work — the draw signal fires before the extension's idle callback connects to it (the window is already painted), and later redraws may be clipped to regions that exclude hidden-file rows.
set_cell_data_funcruns for every cell on every render pass, bypassing both issues.
MIT