dconf-mode/README.org

1.5 KiB

Pitch:

In essence, this Emacs mode simply loads the data from dconf into ini files, then applies them after each write to disk. It further provides the variable dconf--default-path to allow more general or specific configuration, as needed.

The main benefit of using something like this is that your GNOME (or whatever else) settings are no longer a nebulous binary hive; they are declarative human-readable text files. They can be version-controlled and distributed alongside your other dotfiles. They can be viewed in other editors and environments. They can be grep'd through.

Installlation:

With straight.el and use-package:

(use-package dconf-mode
  :straight
  (:type git
         :repo "https://git.mitchmarq42.xyz/mitch/dconf-mode.el"))

Usage:

I personally use this to manage my GNOME configuration like so:

~/.config/gnome-custom-configs
├── desktop.gsets
├── settings-daemon.gsets
├── shell.gsets
└── terminal.gsets

Thus, editing `desktop.gsets' modifies the hive /org/gnome/desktop/.

TODO

have an option to use a temp buffer

test

  • working with nonexistent files
  • older/newer emacs versions

    • lexical binding?

In other editors

To achieve something similar in vim/nvim:

autocmd BufReadPre *.gsets silent !dconf dump /org/gnome/%:t:r/ > %
autocmd BufReadPost *.gsets set ft=dosini
autocmd BufWritePost *.gsets silent !cat % | dconf load /org/gnome/%:t:r/