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

42 lines
1.2 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]"
}
{
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"
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