dconf.el draft -- very wip

This commit is contained in:
MitchMarq42 2022-06-19 15:26:59 -08:00
parent 0602465dd1
commit 502ea5a08f

30
lisp/dconf.el Normal file
View File

@ -0,0 +1,30 @@
;;; dconf.el --- Edit dconf settings in an emacs buffer
;;; Commentary:
;; I haven't completely given up on GNOME. This is a little wrapper I've ported
;; from my vim config to modify and save the running GNOME state to files.
;; The relevant vim settings:
;; 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/
;;; Code:
(defun dconf-load-current-file ()
"Load the current file into dconf's live registry."
(interactive)
(shell-command
(concat "cat " buffer-file-name
" | dconf load /org/gnome/" (file-name-base buffer-file-name) "/")))
(if (string-match "*.gsets" buffer-file-name)
(progn
(add-hook ) ;BufReadPre
(conf-windows-mode) ;BufReadPost might be default
(add-hook after-save-hook
#'dconf-load-current-file)
)
)
(provide 'dconf)
;;; dconf.el ends here