config/users/pbsds/home/profiles/gnome/dconf-pull.sh

48 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p dconf2nix sd
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
dump() {
ROOT="$1"
shift
dconf dump "/$ROOT/" \
| sd '^\[([^/])' "[$ROOT/\$1" \
| sd '^\[/\]$' "[$ROOT]"
}
dump1() {
dump "$@" | sed -e '/^$/,$d'
}
{
dump "org/gnome/desktop/input-sources"
dump "org/gnome/desktop/peripherals/touchpad"
dump "org/gnome/desktop/wm/keybindings"
dump "org/gnome/mutter/keybindings"
dump "org/gnome/shell/keybindings"
dump "org/gnome/settings-daemon/plugins/media-keys"
} | dconf2nix > dconf-gnome-bindings.nix
{
#dump "org/gnome/shell"
dump "org/gnome/shell/extensions/vertical-workspaces"
#dump "org/gnome/shell/extensions/vertical-overview"
dump "org/gnome/shell/extensions/big-avatar"
dump "org/gnome/shell/extensions/gtile"
dump "org/gnome/shell/extensions/just-perfection"
} | dconf2nix > dconf-gnome-extensions.nix
{
dump "org/gnome/shell/extensions/user-theme"
dump "org/gnome/desktop/interface" # features stuff already set by home-manager
dump "org/gnome/desktop/wm/preferences"
dump "org/gnome/shell/overrides"
dump "org/gnome/tweaks"
dump1 "org/gnome/mutter"
dump "org/gnome/desktop/calendar"
dump "org/gnome/desktop/privacy"
} | dconf2nix | sd --string-mode \
'"/org/gnome/desktop/interface" = {' \
'"/org/gnome/desktop/interface" = lib.mkDefault {' \
> dconf-gnome-theme.nix