More flexible dconf-dump specifics
This commit is contained in:
parent
aa95c7a9fe
commit
1b437e6671
|
@ -76,17 +76,29 @@ source ~/.shell_aliases
|
||||||
source ~/.zsh_local
|
source ~/.zsh_local
|
||||||
|
|
||||||
function dconf-dump {
|
function dconf-dump {
|
||||||
|
local current_section=""
|
||||||
local ignore_section=false
|
local ignore_section=false
|
||||||
# Ignores certain values/sections that shouldn't be synced
|
# Ignores certain values/sections that shouldn't be synced
|
||||||
dconf dump / | grep -v "gtk-theme='" | while read -r line; do
|
dconf dump / | while read -r line; do
|
||||||
if [[ "$line" == "[org/gnome/desktop/background]" ]] || [[ "$line" == "[org/gnome/shell/extensions/gsconnect"* ]]; then
|
if [[ "$line" == "["* ]]; then
|
||||||
ignore_section=true
|
current_section="$line"
|
||||||
elif [[ "$line" == "["* ]]; then
|
|
||||||
ignore_section=false
|
ignore_section=false
|
||||||
fi
|
fi
|
||||||
if ! $ignore_section; then
|
case "$current_section" in
|
||||||
echo "$line"
|
"[org/gnome/desktop/background]" | "[org/gnome/shell/extensions/gsconnect*")
|
||||||
fi
|
ignore_section=true
|
||||||
|
;;
|
||||||
|
"[org/gnome/desktop/interface]")
|
||||||
|
if [[ "$line" != "gtk-theme='"* ]]; then
|
||||||
|
echo "$line"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if ! $ignore_section; then
|
||||||
|
echo "$line"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue