summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-01 16:40:31 -0500
committerCase Duckworth2021-04-01 16:40:31 -0500
commit8bedff5f5717a3dccc7bf0cc6fd3399116d0a9a1 (patch)
tree52decb343fd87e6cc442eaf7c7df2381959264a7
parentUpdate `consult' bindings and config (diff)
downloademacs-8bedff5f5717a3dccc7bf0cc6fd3399116d0a9a1.tar.gz
emacs-8bedff5f5717a3dccc7bf0cc6fd3399116d0a9a1.zip
Add comments
-rw-r--r--lisp/acdw.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index e1d4b48..6409f89 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -21,12 +21,14 @@
21 21
22;;; Utilities 22;;; Utilities
23 23
24;;;; Determine the system I'm on
24(defconst acdw/system (pcase system-type 25(defconst acdw/system (pcase system-type
25 ('gnu/linux :home) 26 ('gnu/linux :home)
26 ((or 'msdos 'windows-nt) :work) 27 ((or 'msdos 'windows-nt) :work)
27 (_ :other)) 28 (_ :other))
28 "Which system is currently being used.") 29 "Which system is currently being used.")
29 30
31;;;; Run commands only when unfocused
30(defun acdw/when-unfocused (func &rest args) 32(defun acdw/when-unfocused (func &rest args)
31 "Call FUNC, with ARGS, iff all Emacs frames are out of focus. 33 "Call FUNC, with ARGS, iff all Emacs frames are out of focus.
32 34
@@ -34,6 +36,7 @@ Ready for use with `after-focus-change-function'."
34 (when (seq-every-p #'null (mapcar #'frame-focus-state (frame-list))) 36 (when (seq-every-p #'null (mapcar #'frame-focus-state (frame-list)))
35 (apply func args))) 37 (apply func args)))
36 38
39;;;; Run commands at sunrise and sunset
37(defun acdw/sunrise-sunset (sunrise-command sunset-command) 40(defun acdw/sunrise-sunset (sunrise-command sunset-command)
38 "Run commands at sunrise and sunset." 41 "Run commands at sunrise and sunset."
39 (let* ((times-regex (rx (* nonl) 42 (let* ((times-regex (rx (* nonl)