This commit is contained in:
Sage Vaillancourt 2024-02-19 20:44:22 -05:00
commit d6859dc8b8
1 changed files with 26 additions and 24 deletions

View File

@ -85,13 +85,15 @@ function dconf-dump {
ignore_section=false ignore_section=false
fi fi
case "$current_section" in case "$current_section" in
"[org/gnome/desktop/background]" | "[org/gnome/shell/extensions/gsconnect"*) "[org/gnome/desktop/background]" | \
"[org/gnome/shell/extensions/gsconnect"*)
ignore_section=true ignore_section=true
;; ;;
"[org/gnome/desktop/interface]") "[org/gnome/desktop/interface]")
if [[ "$line" != "gtk-theme='"* ]]; then if [[ "$line" == "gtk-theme='"* ]]; then
echo "$line" continue
fi fi
echo "$line"
;; ;;
*) *)
if ! $ignore_section; then if ! $ignore_section; then
@ -103,13 +105,13 @@ function dconf-dump {
} }
function push-dconf { function push-dconf {
if command -v scpace &> /dev/null; then if ! command -v scpace &> /dev/null; then
echo "An alias for scpace has not been defined on this device!"
return 1
fi
rm /tmp/dconf-dump &> /dev/null 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'
else
echo "An alias for scpace has not been defined on this device!"
fi
} }
function pushdot { function pushdot {
@ -127,9 +129,12 @@ function pushdot {
} }
function getdot { function getdot {
if ! command -v scpace &> /dev/null; then
echo "An alias for scpace has not been defined on this device!"
return 1
fi
cd "$DOT_DIR" || return 1 cd "$DOT_DIR" || return 1
git pull && ./copy.sh git pull && ./copy.sh
if command -v scpace &> /dev/null; then
rm /tmp/dconf-dump rm /tmp/dconf-dump
scp -P 11275 'sage@sagev.space:~/dconf-dump' /tmp/dconf-dump scp -P 11275 'sage@sagev.space:~/dconf-dump' /tmp/dconf-dump
dconf-dump > /tmp/current-dconf-dump dconf-dump > /tmp/current-dconf-dump
@ -143,9 +148,6 @@ function getdot {
echo "Applying changes..." echo "Applying changes..."
fi fi
dconf load / < /tmp/dconf-dump || return 1 dconf load / < /tmp/dconf-dump || return 1
else
echo "An alias for scpace has not been defined on this device!"
fi
cd - > /dev/null cd - > /dev/null
} }