startkde: install default GTK config if needed

This commit is contained in:
Thomas Tuegel 2016-11-14 18:02:09 -06:00
parent 66d9772f0b
commit 7397dabc98
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59

View File

@ -6,6 +6,34 @@ export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}@QT_PLUGIN_PATH@"
export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}@QML_IMPORT_PATH@" export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}@QML_IMPORT_PATH@"
export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}@QML2_IMPORT_PATH@" export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}@QML2_IMPORT_PATH@"
# Set the default GTK 2 theme
if [ ! -e $HOME/.gtkrc-2.0 -a -e /run/current-system/sw/share/themes/Breeze/gtk-2.0/gtkrc ]; then
cat >$HOME/.gtkrc-2.0 <<EOF
# Default GTK+ 2 config for NixOS KDE 5
include "/run/current-system/sw/share/themes/Breeze/gtk-2.0/gtkrc"
gtk-theme-name="Breeze"
gtk-icon-theme-name="breeze"
gtk-fallback-icon-theme="hicolor"
gtk-cursor-theme-name="breeze_cursors"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1
EOF
fi
if [ ! -e $HOME/.config/gtk-3.0/settings.ini -a -e /run/current-system/sw/share/themes/Breeze/gtk-3.0 ]; then
cat >$HOME/.config/gtk-3.0/settings.ini <<EOF
[Settings]
gtk-theme-name=Breeze
gtk-icon-theme-name=breeze
gtk-fallback-icon-theme=hicolor
gtk-cursor-theme-name=breeze_cursors
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1
EOF
fi
# The KDE icon cache is supposed to update itself # The KDE icon cache is supposed to update itself
# automatically, but it uses the timestamp on the icon # automatically, but it uses the timestamp on the icon
# theme directory as a trigger. Since in Nix the # theme directory as a trigger. Since in Nix the