From 7390605d65283250040ebe89c21165a32568a02c Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Mon, 19 Feb 2024 00:12:19 -0500 Subject: [PATCH] dconf-dump corrections --- fake_home/.zshrc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/fake_home/.zshrc b/fake_home/.zshrc index d17eaa5..9ed03a6 100644 --- a/fake_home/.zshrc +++ b/fake_home/.zshrc @@ -78,25 +78,22 @@ source ~/.zsh_local function dconf-dump { local ignore_section=false dconf dump / | while read -r line; do - if $ignore_section; then - if [[ "$line" == "["* ]]; then - ignore_section=false - fi - else - if [[ "$line" == "[org/gnome/desktop/background]" ]] || [[ "$line" == "[org/gnome/shell/extensions/gsconnect"* ]]; then - ignore_section=true - else - echo "$line" - fi + if [[ "$line" == "[org/gnome/desktop/background]" ]] || [[ "$line" == "[org/gnome/shell/extensions/gsconnect"* ]]; then + ignore_section=true + elif [[ "$line" == "["* ]]; then + ignore_section=false + fi + if ! $ignore_section; then + echo "$line" fi done } function push-dconf { if command -v scpace &> /dev/null; then + rm /tmp/dconf-dump &> /dev/null dconf-dump > /tmp/dconf-dump || return 1 scp -P 11275 /tmp/dconf-dump 'sage@sagev.space:~/dconf-dump' - rm /tmp/dconf-dump else echo "An alias for scpace has not been defined on this device!" fi