Update file run_onchange_after_21-dconf-settings.tmpl
This commit is contained in:
parent
c1dbd1cd34
commit
c4c9a52f7b
1 changed files with 13 additions and 0 deletions
|
@ -4,6 +4,19 @@
|
||||||
{{ includeTemplate "universal/profile" }}
|
{{ includeTemplate "universal/profile" }}
|
||||||
{{ includeTemplate "universal/logg" }}
|
{{ includeTemplate "universal/logg" }}
|
||||||
|
|
||||||
|
### Update background to be OS-specific
|
||||||
|
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/dconf/settings/org.gnome.desktop.background" ]; then
|
||||||
|
logg info 'Checking for presence of /usr/local/share/wallpapers/Betelgeuse-{{ title .host.distro.id }}/contents/source.jpg'
|
||||||
|
if [ -f /usr/local/share/wallpapers/Betelgeuse-{{ title .host.distro.id }}/contents/source.jpg ]; then
|
||||||
|
logg info "Updating ${XDG_CONFIG_HOME:-$HOME/.config}/dconf/settings/org.gnome.desktop.background to point to OS-specific background"
|
||||||
|
TMP="$(mktemp)"
|
||||||
|
sed 's/Betelgeuse/Betelgeuse-{{ title .host.distro.id }}/g' < "${XDG_CONFIG_HOME:-$HOME/.config}/dconf/settings/org.gnome.desktop.background" > "$TMP"
|
||||||
|
mv "$TMP" "${XDG_CONFIG_HOME:-$HOME/.config}/dconf/settings/org.gnome.desktop.background"
|
||||||
|
else
|
||||||
|
logg info 'OS-specific background not found'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
### Backup system settings
|
### Backup system settings
|
||||||
DCONF_TMP="$(mktemp)"
|
DCONF_TMP="$(mktemp)"
|
||||||
dconf dump / > "$DCONF_TMP"
|
dconf dump / > "$DCONF_TMP"
|
||||||
|
|
Loading…
Reference in a new issue