diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2024-05-10 16:51:30 +0100 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2024-05-10 16:51:30 +0100 |
commit | 4c0436594011bb7663832234f5fac0613d42b6bf (patch) | |
tree | d8e6ba3c06e25353b54c0684f73bcb4df6402553 | |
parent | 8a150fc566fe188bd46f4acfe959a610f45b2094 (diff) | |
download | dotfiles-4c0436594011bb7663832234f5fac0613d42b6bf.tar.gz |
tidy up populating window-system-default-frame-alist
-rw-r--r-- | .emacs.d/init.el | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 06e572c6..0333269c 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -104,18 +104,16 @@ ;; The colour is from the Lucid build of Emacs. '(region ((t (:extend t :background "#EECD82"))))) -;; Set background colour but don't touch text terminals. -(dolist (ws '(x pgtk w32 ns)) - (add-to-list - 'window-system-default-frame-alist - ;; If we were not started with --daemon or by 'emacsclient -a ""', then - ;; we're probably a shortlived instance of Emacs just to test something. - ;; Set a different background colour to more easily distinguish frames - ;; belonging to shortlived instances from those belonging to main instance. - `(,ws - . ((background-color - . ,(pcase (daemonp) - ('nil "#F0FFF0") ("gdbmacs" "#F5F5DC") (_ "#FFFFF6"))))))) +;; Set background colours for graphical frames; leave TUI frames alone. +;; If we were not started with --daemon or by 'emacsclient -a ""', then +;; we're probably a shortlived instance of Emacs just to test something. +;; Set a different background colour to more easily distinguish frames +;; belonging to shortlived instances from those belonging to main instance. +(let ((colour (pcase (daemonp) + ('nil "#F0FFF0") ("gdbmacs" "#F5F5DC") (_ "#FFFFF6")))) + (dolist (ws '(x pgtk w32 ns)) + (add-to-list 'window-system-default-frame-alist + `(,ws . ((background-color . ,colour)))))) (defun spw/maybe-scale-basic-faces (frame) "Entry for `window-size-change-functions' to increase font sizes, |