Automatically update Nautilus gtk.css on theme switch or installation
What do you need?
Description: Nautilus does not currently refresh its gtk.css automatically when a new theme is installed or when switching between themes. This enhancement proposes adding a small script integration to ensure that Nautilus always reflects the selected theme immediately
Suggested solution: Add a call to omarchy-theme-set-nautilus in:
~/.local/share/omarchy/bin/omarchy-theme-set
omarchy-theme-set-nautilus
Then add the script omarchy-theme-set-nautilus in:
~/.local/share/omarchy/bin/
Script:
#!/bin/bash
# This script applies the Omarchy GTK theme to Nautilus.
# Source and destination paths
SOURCE_THEME="$HOME/.config/omarchy/current/theme/gtk.css"
DEST_GTK4_DIR="$HOME/.config/gtk-4.0"
DEST_THEME="$DEST_GTK4_DIR/gtk.css"
# Create the GTK-4.0 directory if it doesn't exist
mkdir -p "$DEST_GTK4_DIR"
# Copy the theme file
if [ -f "$SOURCE_THEME" ]; then
cp "$SOURCE_THEME" "$DEST_THEME"
echo "Theme copied successfully."
else
echo "Source theme file not found: $SOURCE_THEME"
exit 1
fi
# Restart Nautilus to apply the changes
pkill nautilus
echo "Nautilus restarted."
This script makes sure Nautilus updates its gtk.css automatically after each theme switch or installation.
Credits: Solution tested and provided by Michael91 (Discord: Michael91#9276)
https://github.com/user-attachments/assets/e86293ff-abda-4294-be1f-2c932374d894
is this only for nautilus
Yes , it only changes gtk Theme
You can close it since we have the theme-hook script from bypass
do you have omarchy default theme for gtk?