Do dconf cleaning on output AND input.
Add a few more ignored dconf sections. Also, add uuid and vin aliases.
This commit is contained in:
parent
dc2b1ce01f
commit
67d7b4a0b5
|
@ -119,6 +119,8 @@ function undelete {
|
||||||
alias j='journalctl -xefu'
|
alias j='journalctl -xefu'
|
||||||
alias hsearch='hearch'
|
alias hsearch='hearch'
|
||||||
alias d='docker'
|
alias d='docker'
|
||||||
|
alias uuid='uuidgen'
|
||||||
|
alias vin='curl -s "http://randomvin.com/getvin.php?type=real"'
|
||||||
|
|
||||||
alias diff='diff -u'
|
alias diff='diff -u'
|
||||||
|
|
||||||
|
|
|
@ -75,11 +75,11 @@ fi
|
||||||
source ~/.shell_aliases
|
source ~/.shell_aliases
|
||||||
source ~/.zsh_local
|
source ~/.zsh_local
|
||||||
|
|
||||||
function dconf-dump {
|
# Ignores certain values/sections that shouldn't be synced
|
||||||
|
function dconf-clean {
|
||||||
local current_section=""
|
local current_section=""
|
||||||
local ignore_section=false
|
local ignore_section=false
|
||||||
# Ignores certain values/sections that shouldn't be synced
|
cat "$1" | while read -r line; do
|
||||||
dconf dump / | while read -r line; do
|
|
||||||
if [[ "$line" == "["* ]]; then
|
if [[ "$line" == "["* ]]; then
|
||||||
current_section="$line"
|
current_section="$line"
|
||||||
ignore_section=false
|
ignore_section=false
|
||||||
|
@ -91,6 +91,9 @@ function dconf-dump {
|
||||||
case "$current_section" in
|
case "$current_section" in
|
||||||
"[org/gnome/desktop/background]" | \
|
"[org/gnome/desktop/background]" | \
|
||||||
"[org/gnome/gedit/state/history-entry]" | \
|
"[org/gnome/gedit/state/history-entry]" | \
|
||||||
|
"[org/gnome/gedit/plugins/filebrowser]" | \
|
||||||
|
"[org/gnome/desktop/notifications]" | \
|
||||||
|
"[org/gnome/cheese]" | \
|
||||||
"[org/gnome/shell/extensions/gsconnect"*)
|
"[org/gnome/shell/extensions/gsconnect"*)
|
||||||
ignore_section=true
|
ignore_section=true
|
||||||
;;
|
;;
|
||||||
|
@ -109,6 +112,12 @@ function dconf-dump {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dconf-dump {
|
||||||
|
dconf dump / > "$HOME/.dconf-dump.tmp"
|
||||||
|
dconf-clean "$HOME/.dconf-dump.tmp"
|
||||||
|
rm "$HOME/.dconf-dump.tmp"
|
||||||
|
}
|
||||||
|
|
||||||
function push-dconf {
|
function push-dconf {
|
||||||
if ! command -v dconf &> /dev/null; then
|
if ! command -v dconf &> /dev/null; then
|
||||||
echo "The current system does not include dconf"
|
echo "The current system does not include dconf"
|
||||||
|
@ -202,7 +211,8 @@ function sync-dconf {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
rm $HOME/.tmp/dconf-dump &> /dev/null
|
rm $HOME/.tmp/dconf-dump &> /dev/null
|
||||||
scp -P 11275 'sage@sagev.space:~/dconf-dump' $HOME/.tmp/dconf-dump
|
scp -P 11275 'sage@sagev.space:~/dconf-dump' $HOME/.tmp/dconf-dump-inbound
|
||||||
|
dconf-clean $HOME/.tmp/dconf-dump-inbound > $HOME/.tmp/dconf-dump
|
||||||
dconf-dump > $HOME/.tmp/current-dconf-dump
|
dconf-dump > $HOME/.tmp/current-dconf-dump
|
||||||
if ! git --no-pager diff --no-index $HOME/.tmp/current-dconf-dump $HOME/.tmp/dconf-dump &> /dev/null; then
|
if ! git --no-pager diff --no-index $HOME/.tmp/current-dconf-dump $HOME/.tmp/dconf-dump &> /dev/null; then
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in New Issue