dconf-dump corrections

This commit is contained in:
Sage Vaillancourt 2024-02-19 00:12:19 -05:00
parent ee9709a54d
commit 7390605d65
1 changed files with 8 additions and 11 deletions

View File

@ -78,25 +78,22 @@ source ~/.zsh_local
function dconf-dump { function dconf-dump {
local ignore_section=false local ignore_section=false
dconf dump / | while read -r line; do dconf dump / | while read -r line; do
if $ignore_section; then if [[ "$line" == "[org/gnome/desktop/background]" ]] || [[ "$line" == "[org/gnome/shell/extensions/gsconnect"* ]]; then
if [[ "$line" == "["* ]]; then ignore_section=true
ignore_section=false elif [[ "$line" == "["* ]]; then
fi ignore_section=false
else fi
if [[ "$line" == "[org/gnome/desktop/background]" ]] || [[ "$line" == "[org/gnome/shell/extensions/gsconnect"* ]]; then if ! $ignore_section; then
ignore_section=true echo "$line"
else
echo "$line"
fi
fi fi
done done
} }
function push-dconf { function push-dconf {
if command -v scpace &> /dev/null; then if command -v scpace &> /dev/null; then
rm /tmp/dconf-dump &> /dev/null
dconf-dump > /tmp/dconf-dump || return 1 dconf-dump > /tmp/dconf-dump || return 1
scp -P 11275 /tmp/dconf-dump 'sage@sagev.space:~/dconf-dump' scp -P 11275 /tmp/dconf-dump 'sage@sagev.space:~/dconf-dump'
rm /tmp/dconf-dump
else else
echo "An alias for scpace has not been defined on this device!" echo "An alias for scpace has not been defined on this device!"
fi fi