Enhance GTK theme configuration and taskbar setup in cloud-init scripts</message>

<message>Update the cloud-init scripts to improve GTK theme settings by enforcing dark mode through gsettings and preserving the icon theme for a cohesive user experience. Additionally, enhance the first-boot script to install a Chromium kiosk launcher icon on the desktop and in the application menu, along with a five-tap close functionality for Chromium. These changes streamline the user interface and ensure a consistent dark theme across applications and the taskbar.
This commit is contained in:
nearxos
2026-02-23 15:07:31 +02:00
parent f42700848a
commit 2d6e5aa009
11 changed files with 251 additions and 38 deletions

View File

@@ -19,7 +19,7 @@ profile {
}
EOF
# Set GTK dark theme (same as first-boot step 08)
# Set GTK dark theme (same as first-boot step 08) and force dark mode via gsettings
GTK_THEME_NAME="PiXnoir"
[[ -d /usr/share/themes/Adwaita-dark ]] && ! [[ -d /usr/share/themes/PiXnoir ]] && GTK_THEME_NAME="Adwaita-dark"
GTK_SETTINGS="$HOME/.config/gtk-3.0/settings.ini"
@@ -30,3 +30,12 @@ else
grep -q '^gtk-application-prefer-dark-theme=' "$GTK_SETTINGS" && sed -i 's/^gtk-application-prefer-dark-theme=.*/gtk-application-prefer-dark-theme=1/' "$GTK_SETTINGS" || echo 'gtk-application-prefer-dark-theme=1' >> "$GTK_SETTINGS"
grep -q '^gtk-theme-name=' "$GTK_SETTINGS" && sed -i "s/^gtk-theme-name=.*/gtk-theme-name=$GTK_THEME_NAME/" "$GTK_SETTINGS" || echo "gtk-theme-name=$GTK_THEME_NAME" >> "$GTK_SETTINGS"
fi
# Force dark mode system-wide (GNOME/GTK apps that read gsettings)
if command -v gsettings >/dev/null 2>&1; then
gsettings set org.gnome.desktop.interface gtk-theme "$GTK_THEME_NAME" 2>/dev/null || true
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' 2>/dev/null || true
fi
# Preserve icon theme (PiXtrix = custom start-here)
if [[ -d /usr/share/icons/PiXtrix ]]; then
grep -q '^gtk-icon-theme-name=' "$GTK_SETTINGS" && sed -i 's/^gtk-icon-theme-name=.*/gtk-icon-theme-name=PiXtrix/' "$GTK_SETTINGS" || echo 'gtk-icon-theme-name=PiXtrix' >> "$GTK_SETTINGS"
fi