81cccf3cc9
- /home/dot_local/bin/executable_backup-dconf.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_70-misc-bug-fixes.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_19-theme-files.tmpl - /home/private_dot_config/dconf/settings/org.gnome.desktop.interface - /home/private_dot_config/dconf/settings/org.gnome.desktop.calendar - /home/private_dot_config/dconf/settings/org.gnome.desktop.app-folders - /home/private_dot_config/dconf/settings/org.gnome.desktop.applications - /home/private_dot_config/dconf/settings/org.gnome.desktop.privacy - /home/private_dot_config/dconf/settings/org.gnome.desktop.session - /home/private_dot_config/dconf/settings/org.gnome.desktop.sound - /home/private_dot_config/dconf/settings/org.gnome.desktop.wm.preferences - /home/private_dot_config/dconf/settings/org.gnome.settings-daemon.plugins.power - /home/private_dot_config/dconf/settings/org.gnome.shell - /home/private_dot_config/dconf/settings/org.gnome.desktop.background - /home/private_dot_config/dconf/settings/org.gtk.settings.debug - /home/private_dot_config/dconf/settings/org.gnome.terminal - /home/private_dot_config/dconf/settings/org.gnome.nautilus - /home/private_dot_config/dconf/settings/org.gtk.settings.file-chooser
27 lines
1 KiB
Cheetah
27 lines
1 KiB
Cheetah
{{- if eq .host.distro.family "linux" -}}
|
|
#!/usr/bin/env bash
|
|
|
|
{{ includeTemplate "universal/profile" }}
|
|
{{ includeTemplate "universal/logg" }}
|
|
|
|
### Create backups
|
|
if [ -d "$XDG_CONFIG_HOME/dconf/settings" ]; then
|
|
DCONF_TMP="$(mktemp)"
|
|
logg info 'Moving ~/.config/dconf/settings to '"$DCONF_TMP"
|
|
cp -rf "$XDG_CONFIG_HOME/dconf/settings" "$DCONF_TMP"
|
|
fi
|
|
|
|
### Ensure ~/.config/dconf/settings exists
|
|
mkdir -p "$XDG_CONFIG_HOME/dconf/settings"
|
|
|
|
### Overwrite ~/.config/dconf/settings configurations so we can diff with Chezmoi
|
|
find "$XDG_CONFIG_HOME/dconf/settings" -mindepth 1 -maxdepth 1 -type f | while read DCONF_CONFIG_FILE; do
|
|
DCONF_SETTINGS_ID="/$(basename "$DCONF_CONFIG_FILE" | sed 's/\./\//g')/"
|
|
logg info 'Dumping `'"$DCONF_SETTINGS_ID"'` to '"$DCONF_CONFIG_FILE"
|
|
dconf dump "$DCONF_SETTINGS_ID" > "$DCONF_CONFIG_FILE"
|
|
logg success 'Saved new configuration to '"$DCONF_CONFIG_FILE"
|
|
logg info 'Printing diff for '"$DCONF_CONFIG_FILE"
|
|
chezmoi diff "$DCONF_CONFIG_FILE" || true
|
|
done
|
|
|
|
{{ end -}}
|