branch: externals/cursory
commit ca9621885a8f8db73fe12b8a8ff9d19d0e5f47b6
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Update the sample configuration
---
 README.org | 70 ++++++++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 55 insertions(+), 15 deletions(-)

diff --git a/README.org b/README.org
index 850290d86a..58e523b80c 100644
--- a/README.org
+++ b/README.org
@@ -303,21 +303,61 @@ Everything is in place to set up the package.
 Remember to read the doc string of each of these variables or functions.
 
 #+begin_src emacs-lisp
-(require 'cursory)
-
-;; Check the `cursory-presets' for how to set your own preset styles.
-
-(setq cursory-latest-state-file (locate-user-emacs-file 
"cursory-latest-state"))
-
-;; Set last preset or fall back to desired style from `cursory-presets'.
-(cursory-set-preset (or (cursory-restore-latest-preset) 'bar))
-
-;; Arrange to keep track of the latest Cursory preset.
-(cursory-mode 1)
-
-;; We have to use the "point" mnemonic, because C-c c is often the
-;; suggested binding for `org-capture'.
-(define-key global-map (kbd "C-c p") #'cursory-set-preset)
+(use-package cursory
+  :ensure t
+  :demand t
+  :if (display-graphic-p)
+  :config
+  (setq cursory-presets
+        '((box
+           :cursor-color success ; will typically be green
+           :blink-cursor-interval 1.2)
+          (box-no-blink
+           :inherit box
+           :blink-cursor-mode -1)
+          (bar
+           :cursor-type (bar . 2)
+           :cursor-color error ; will typically be red
+           :blink-cursor-interval 0.8)
+          (bar-no-other-window
+           :inherit bar
+           :cursor-in-non-selected-windows nil)
+          (bar-no-blink
+           :inherit bar
+           :blink-cursor-mode -1)
+          (underscore
+           :cursor-color warning ; will typically be yellow
+           :cursor-type (hbar . 3)
+           :blink-cursor-interval 0.3
+           :blink-cursor-blinks 50)
+          (underscore-no-other-window
+           :inherit underscore
+           :cursor-in-non-selected-windows nil)
+          (underscore-thick
+           :inherit underscore
+           :cursor-type (hbar . 8)
+           :cursor-in-non-selected-windows (hbar . 3))
+          (t ; the default values
+           :cursor-color unspecified ; use the theme's original
+           :cursor-type box
+           :cursor-in-non-selected-windows hollow
+           :blink-cursor-mode 1
+           :blink-cursor-blinks 10
+           :blink-cursor-interval 0.2
+           :blink-cursor-delay 0.2)))
+
+  ;; I am using the default value of `cursory-latest-state-file'.
+
+  ;; Set last preset or fall back to desired style from `cursory-presets'.
+  (cursory-set-preset (or (cursory-restore-latest-preset) 'box))
+
+  ;; Persist configurations between Emacs sessions.  Also apply the
+  ;; :cursor-color again when swithcing to another theme.
+  (cursory-mode 1)
+  :bind
+  ;; We have to use the "point" mnemonic, because C-c c is often the
+  ;; suggested binding for `org-capture' and is the one I use as well.
+  ("C-c p" . cursory-set-preset))
 #+end_src
 
 * Acknowledgements

Reply via email to