From 1b437e66713610623144a8914f6aa2ad1f1eb20e Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Mon, 19 Feb 2024 01:25:44 -0500 Subject: [PATCH] More flexible dconf-dump specifics --- fake_home/.zshrc | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/fake_home/.zshrc b/fake_home/.zshrc index 3541917..e176476 100644 --- a/fake_home/.zshrc +++ b/fake_home/.zshrc @@ -76,17 +76,29 @@ source ~/.shell_aliases source ~/.zsh_local function dconf-dump { + local current_section="" local ignore_section=false # Ignores certain values/sections that shouldn't be synced - dconf dump / | grep -v "gtk-theme='" | while read -r line; do - if [[ "$line" == "[org/gnome/desktop/background]" ]] || [[ "$line" == "[org/gnome/shell/extensions/gsconnect"* ]]; then - ignore_section=true - elif [[ "$line" == "["* ]]; then + dconf dump / | while read -r line; do + if [[ "$line" == "["* ]]; then + current_section="$line" ignore_section=false fi - if ! $ignore_section; then - echo "$line" - fi + case "$current_section" in + "[org/gnome/desktop/background]" | "[org/gnome/shell/extensions/gsconnect*") + ignore_section=true + ;; + "[org/gnome/desktop/interface]") + if [[ "$line" != "gtk-theme='"* ]]; then + echo "$line" + fi + ;; + *) + if ! $ignore_section; then + echo "$line" + fi + ;; + esac done }