For those who stay in Nautilus and have different dim and color for hidden folders/files, you can try this extension.
- create a file ~/.local/share/nautilus-python/extensions/hidden-dim.py
- copy this and save
import gi
gi.require_version('Nautilus', '4.0')
gi.require_version('Gtk', '4.0')
from gi.repository import Nautilus, GObject, Gtk, GLib
def walk_and_dim(widget):
if isinstance(widget, Gtk.Label):
text = widget.get_text()
if text.startswith('.') and len(text) > 1:
# Couleur sur le label
widget.set_markup(f'<span foreground="#c0bfbc">{GLib.markup_escape_text(text)}</span>')
# Opacité sur le parent cell (icône + label)
parent = widget.get_parent()
for _ in range(10):
if parent is None:
break
parent_name = type(parent).__name__
if any(x in parent_name for x in ['ViewCell', 'FlowBoxChild', 'GridCell', 'Thumbnail', 'CanvasItem']):
parent.set_opacity(0.6)
break
parent = parent.get_parent()
child = widget.get_first_child()
while child:
walk_and_dim(child)
child = child.get_next_sibling()
class HiddenFileDimmer(GObject.GObject, Nautilus.MenuProvider):
def __init__(self):
GLib.timeout_add(500, self._tick)
def _tick(self):
for window in Gtk.Window.list_toplevels():
if 'Nautilus' in type(window).__name__:
walk_and_dim(window)
return True
def get_file_items(self, files):
return []
def get_background_items(self, folder):
return []
- relaunch nautilus :
nautilus -q && nautilus & - you can change the text color here
widget.set_markup(f'<span foreground="#c0bfbc">{GLib.markup_escape_text(text)}</span>')
and the opacity here
parent.set_opacity(0.6)
when you edit thr script think to stop and relaunch nautilus
nautilus -q && nautilus &
this isn't perfect but it work for me
Or if you prefer another script to replace the first who change the opacity for the folder and file icon only
import gi
gi.require_version('Nautilus', '4.0')
gi.require_version('Gtk', '4.0')
from gi.repository import Nautilus, GObject, Gtk, GLib
def find_label_text(widget):
if isinstance(widget, Gtk.Label):
return widget.get_text()
child = widget.get_first_child()
while child:
result = find_label_text(child)
if result:
return result
child = child.get_next_sibling()
return None
def find_picture(widget):
if isinstance(widget, Gtk.Picture):
return widget
child = widget.get_first_child()
while child:
result = find_picture(child)
if result:
return result
child = child.get_next_sibling()
return None
def walk_and_dim(widget):
name = type(widget).__name__
if name in ('NautilusNameCell', 'NautilusGridCell'):
label_text = find_label_text(widget)
if label_text and label_text.startswith('.') and len(label_text) > 1:
picture = find_picture(widget)
if picture:
picture.set_opacity(0.35)
return
child = widget.get_first_child()
while child:
walk_and_dim(child)
child = child.get_next_sibling()
class HiddenFileDimmer(GObject.GObject, Nautilus.MenuProvider):
def __init__(self):
GLib.timeout_add(500, self._tick)
def _tick(self):
for window in Gtk.Window.list_toplevels():
if 'Nautilus' in type(window).__name__:
walk_and_dim(window)
return True
def get_file_items(self, files):
return []
def get_background_items(self, folder):
return []
here you can change the opacity
picture.set_opacity(0.35)



