Merge branch 'main' of https://git.sagev.space/sage/dotfiles
This commit is contained in:
commit
d6859dc8b8
|
@ -85,13 +85,15 @@ function dconf-dump {
|
|||
ignore_section=false
|
||||
fi
|
||||
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
|
||||
;;
|
||||
"[org/gnome/desktop/interface]")
|
||||
if [[ "$line" != "gtk-theme='"* ]]; then
|
||||
echo "$line"
|
||||
if [[ "$line" == "gtk-theme='"* ]]; then
|
||||
continue
|
||||
fi
|
||||
echo "$line"
|
||||
;;
|
||||
*)
|
||||
if ! $ignore_section; then
|
||||
|
@ -103,13 +105,13 @@ function dconf-dump {
|
|||
}
|
||||
|
||||
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'
|
||||
else
|
||||
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
|
||||
dconf-dump > /tmp/dconf-dump || return 1
|
||||
scp -P 11275 /tmp/dconf-dump 'sage@sagev.space:~/dconf-dump'
|
||||
}
|
||||
|
||||
function pushdot {
|
||||
|
@ -127,25 +129,25 @@ function pushdot {
|
|||
}
|
||||
|
||||
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
|
||||
git pull && ./copy.sh
|
||||
if command -v scpace &> /dev/null; then
|
||||
rm /tmp/dconf-dump
|
||||
scp -P 11275 'sage@sagev.space:~/dconf-dump' /tmp/dconf-dump
|
||||
dconf-dump > /tmp/current-dconf-dump
|
||||
if ! git --no-pager diff --no-index /tmp/current-dconf-dump /tmp/dconf-dump &> /dev/null; then
|
||||
echo
|
||||
echo "Incoming conf changes:"
|
||||
echo
|
||||
git --no-pager diff --no-index /tmp/current-dconf-dump /tmp/dconf-dump
|
||||
echo
|
||||
bash -c 'read -p "Press enter to continue, or Ctrl-C to cancel."' || return 1
|
||||
echo "Applying changes..."
|
||||
fi
|
||||
dconf load / < /tmp/dconf-dump || return 1
|
||||
else
|
||||
echo "An alias for scpace has not been defined on this device!"
|
||||
rm /tmp/dconf-dump
|
||||
scp -P 11275 'sage@sagev.space:~/dconf-dump' /tmp/dconf-dump
|
||||
dconf-dump > /tmp/current-dconf-dump
|
||||
if ! git --no-pager diff --no-index /tmp/current-dconf-dump /tmp/dconf-dump &> /dev/null; then
|
||||
echo
|
||||
echo "Incoming conf changes:"
|
||||
echo
|
||||
git --no-pager diff --no-index /tmp/current-dconf-dump /tmp/dconf-dump
|
||||
echo
|
||||
bash -c 'read -p "Press enter to continue, or Ctrl-C to cancel."' || return 1
|
||||
echo "Applying changes..."
|
||||
fi
|
||||
dconf load / < /tmp/dconf-dump || return 1
|
||||
cd - > /dev/null
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue