about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-01-02 16:03:46 -0600
committerCase Duckworth2021-01-02 16:03:46 -0600
commite8468ca32abba8539679f87c6def3bd54d8fd796 (patch)
tree5df78b36119de5b1620038d0ca0e1d5e6fd0c4cf
parentAdd back early-init.el (diff)
downloademacs-e8468ca32abba8539679f87c6def3bd54d8fd796.tar.gz
emacs-e8468ca32abba8539679f87c6def3bd54d8fd796.zip
Add garbage collect magic hack
-rw-r--r--config.org15
1 files changed, 15 insertions, 0 deletions
diff --git a/config.org b/config.org index c444638..f523266 100644 --- a/config.org +++ b/config.org
@@ -628,6 +628,21 @@ Commented for now because I really need to figure out the keybindings I want to
628 (global-set-key (kbd "M-/") #'hippie-expand) 628 (global-set-key (kbd "M-/") #'hippie-expand)
629#+end_src 629#+end_src
630 630
631*** Garbage collection
632
633 #+begin_src emacs-lisp
634 (straight-use-package 'gcmh)
635 (gcmh-mode +1)
636
637 (defun dotfiles--gc-on-last-frame-out-of-focus ()
638 "GC if all frames are inactive."
639 (if (seq-every-p #'null (mapcar #'frame-focus-state (frame-list)))
640 (garbage-collect)))
641
642 (add-function :after after-focus-change-function
643 #'dotfiles--gc-on-last-frame-out-of-focus)
644 #+end_src
645
631** Keyboard 646** Keyboard
632 647
633*** =ESC= cancels all 648*** =ESC= cancels all