config: org-caldav constants, evil merge, use-package cleanup, keybindings section
- org-caldav: extract UUIDs/URL to defconst near USER IDENTITY (my/caldav-url, my/caldav-id-suky/placeholders/family/klara) - evil: merge two (after! evil) blocks into one - olivetti: use-package! → after! (no load-order keywords needed) - keybindings: central reference section at end of file standalone map! bindings (zoom, elfeed, speech, kubel, iedit, vundo, org-roam-ui, langtool, org-caldav) moved here context-coupled bindings left near their packages with comment index
This commit is contained in:
102
config.el
102
config.el
@@ -7,6 +7,13 @@
|
|||||||
(setq user-full-name "Martin Sukany"
|
(setq user-full-name "Martin Sukany"
|
||||||
user-mail-address "martin@sukany.cz")
|
user-mail-address "martin@sukany.cz")
|
||||||
|
|
||||||
|
;; CalDAV calendar IDs (edit here to update sync targets)
|
||||||
|
(defconst my/caldav-url "https://cal.apps.sukany.cz/dav.php/calendars/martin")
|
||||||
|
(defconst my/caldav-id-suky "default")
|
||||||
|
(defconst my/caldav-id-placeholders "4C748EE5-ECFF-4D4A-A72E-6DE37BAADEB3")
|
||||||
|
(defconst my/caldav-id-family "family")
|
||||||
|
(defconst my/caldav-id-klara "klara")
|
||||||
|
|
||||||
;; Trust all TLS certificates (corporate MITM proxy with intermediate CA)
|
;; Trust all TLS certificates (corporate MITM proxy with intermediate CA)
|
||||||
(setq gnutls-verify-error nil)
|
(setq gnutls-verify-error nil)
|
||||||
(setq tls-checktrust nil)
|
(setq tls-checktrust nil)
|
||||||
@@ -97,7 +104,9 @@
|
|||||||
|
|
||||||
;; Let Evil use the system clipboard
|
;; Let Evil use the system clipboard
|
||||||
(after! evil
|
(after! evil
|
||||||
(setq evil-want-clipboard t))
|
(setq evil-want-clipboard t)
|
||||||
|
;; Ensure dashboard buffer starts in normal state (required for SPC leader)
|
||||||
|
(evil-set-initial-state '+doom-dashboard-mode 'normal))
|
||||||
|
|
||||||
;; Standard macOS modifier keys for GUI Emacs
|
;; Standard macOS modifier keys for GUI Emacs
|
||||||
(when (display-graphic-p)
|
(when (display-graphic-p)
|
||||||
@@ -128,10 +137,6 @@
|
|||||||
(global-set-key [wheel-up] #'mwheel-scroll)
|
(global-set-key [wheel-up] #'mwheel-scroll)
|
||||||
(global-set-key [wheel-down] #'mwheel-scroll))
|
(global-set-key [wheel-down] #'mwheel-scroll))
|
||||||
|
|
||||||
;; Ensure dashboard buffer starts in normal state (required for SPC leader)
|
|
||||||
(after! evil
|
|
||||||
(evil-set-initial-state '+doom-dashboard-mode 'normal))
|
|
||||||
|
|
||||||
;; Cancel persp-mode's 2.5s cache timer after startup
|
;; Cancel persp-mode's 2.5s cache timer after startup
|
||||||
;; (reduces unnecessary redraws that cause macOS Zoom to jump)
|
;; (reduces unnecessary redraws that cause macOS Zoom to jump)
|
||||||
(run-with-timer 3 nil
|
(run-with-timer 3 nil
|
||||||
@@ -805,7 +810,6 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
|
|||||||
;;; RSS — ELFEED
|
;;; RSS — ELFEED
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
(map! :leader :desc "Elfeed" "o r" #'elfeed)
|
|
||||||
|
|
||||||
(after! org
|
(after! org
|
||||||
(setq rmh-elfeed-org-files
|
(setq rmh-elfeed-org-files
|
||||||
@@ -1133,10 +1137,6 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
|
|||||||
(setq dtk-speaker-process nil))
|
(setq dtk-speaker-process nil))
|
||||||
(message "Emacspeak OFF (server restart inhibited)"))
|
(message "Emacspeak OFF (server restart inhibited)"))
|
||||||
|
|
||||||
(map! :leader
|
|
||||||
(:prefix ("t" . "toggle")
|
|
||||||
:desc "Speech ON" "s" #'my/emacspeak-on
|
|
||||||
:desc "Speech OFF" "S" #'my/emacspeak-off))
|
|
||||||
|
|
||||||
(with-eval-after-load 'dtk-speak
|
(with-eval-after-load 'dtk-speak
|
||||||
(setq dtk-speech-rate-base 300)
|
(setq dtk-speech-rate-base 300)
|
||||||
@@ -1229,23 +1229,6 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
|
|||||||
scroll-margin 2)
|
scroll-margin 2)
|
||||||
|
|
||||||
|
|
||||||
;;; ============================================================
|
|
||||||
;;; KEYBINDINGS
|
|
||||||
;;; ============================================================
|
|
||||||
|
|
||||||
(map! :leader
|
|
||||||
(:prefix ("h" . "help")
|
|
||||||
:desc "Describe bindings (buffer-local)" "B" #'describe-bindings))
|
|
||||||
|
|
||||||
(map! :leader
|
|
||||||
(:prefix ("z" . "zoom")
|
|
||||||
:desc "Zoom in (x1.5)" "+" #'my/zoom-in
|
|
||||||
:desc "Zoom in (x1.5)" "=" #'my/zoom-in
|
|
||||||
:desc "Zoom out (x1.5)" "-" #'my/zoom-out
|
|
||||||
:desc "Reset" "0" #'my/zoom-reset
|
|
||||||
:desc "Restore previous" "z" #'my/zoom-restore))
|
|
||||||
|
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; MATRIX — EMENT.EL
|
;;; MATRIX — EMENT.EL
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
@@ -1412,9 +1395,7 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
|
|||||||
;;; WRITING — olivetti-mode
|
;;; WRITING — olivetti-mode
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
(use-package! olivetti
|
(after! olivetti
|
||||||
:defer t
|
|
||||||
:config
|
|
||||||
(setq olivetti-body-width 90))
|
(setq olivetti-body-width 90))
|
||||||
|
|
||||||
(add-hook 'org-mode-hook (lambda () (when buffer-file-name (olivetti-mode 1))))
|
(add-hook 'org-mode-hook (lambda () (when buffer-file-name (olivetti-mode 1))))
|
||||||
@@ -1626,32 +1607,32 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
|
|||||||
(insert "#+TITLE: CalDAV sync\n#+STARTUP: overview\n"))))
|
(insert "#+TITLE: CalDAV sync\n#+STARTUP: overview\n"))))
|
||||||
|
|
||||||
;; 1. Suky (twoway): download -> suky.org, upload from calendar_outbox.org
|
;; 1. Suky (twoway): download -> suky.org, upload from calendar_outbox.org
|
||||||
(setq org-caldav-url "https://cal.apps.sukany.cz/dav.php/calendars/martin"
|
(setq org-caldav-url my/caldav-url
|
||||||
org-caldav-calendar-id "default"
|
org-caldav-calendar-id my/caldav-id-suky
|
||||||
org-caldav-inbox "~/org/caldav/suky.org"
|
org-caldav-inbox "~/org/caldav/suky.org"
|
||||||
org-caldav-files '("~/org/calendar_outbox.org")
|
org-caldav-files '("~/org/calendar_outbox.org")
|
||||||
org-caldav-sync-direction 'twoway)
|
org-caldav-sync-direction 'twoway)
|
||||||
(org-caldav-sync)
|
(org-caldav-sync)
|
||||||
|
|
||||||
;; 2. Placeholders (read-only)
|
;; 2. Placeholders (read-only)
|
||||||
(setq org-caldav-url "https://cal.apps.sukany.cz/dav.php/calendars/martin"
|
(setq org-caldav-url my/caldav-url
|
||||||
org-caldav-calendar-id "4C748EE5-ECFF-4D4A-A72E-6DE37BAADEB3"
|
org-caldav-calendar-id my/caldav-id-placeholders
|
||||||
org-caldav-inbox "~/org/caldav/placeholders.org"
|
org-caldav-inbox "~/org/caldav/placeholders.org"
|
||||||
org-caldav-files nil
|
org-caldav-files nil
|
||||||
org-caldav-sync-direction 'cal->org)
|
org-caldav-sync-direction 'cal->org)
|
||||||
(org-caldav-sync)
|
(org-caldav-sync)
|
||||||
|
|
||||||
;; 3. Family (read-only, shared via Baikal ACL)
|
;; 3. Family (read-only, shared via Baikal ACL)
|
||||||
(setq org-caldav-url "https://cal.apps.sukany.cz/dav.php/calendars/martin"
|
(setq org-caldav-url my/caldav-url
|
||||||
org-caldav-calendar-id "family"
|
org-caldav-calendar-id my/caldav-id-family
|
||||||
org-caldav-inbox "~/org/caldav/family.org"
|
org-caldav-inbox "~/org/caldav/family.org"
|
||||||
org-caldav-files nil
|
org-caldav-files nil
|
||||||
org-caldav-sync-direction 'cal->org)
|
org-caldav-sync-direction 'cal->org)
|
||||||
(org-caldav-sync)
|
(org-caldav-sync)
|
||||||
|
|
||||||
;; 4. Klara (read-only, shared via Baikal ACL)
|
;; 4. Klara (read-only, shared via Baikal ACL)
|
||||||
(setq org-caldav-url "https://cal.apps.sukany.cz/dav.php/calendars/martin"
|
(setq org-caldav-url my/caldav-url
|
||||||
org-caldav-calendar-id "klara"
|
org-caldav-calendar-id my/caldav-id-klara
|
||||||
org-caldav-inbox "~/org/caldav/klara.org"
|
org-caldav-inbox "~/org/caldav/klara.org"
|
||||||
org-caldav-files nil
|
org-caldav-files nil
|
||||||
org-caldav-sync-direction 'cal->org)
|
org-caldav-sync-direction 'cal->org)
|
||||||
@@ -1659,7 +1640,6 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
|
|||||||
|
|
||||||
(message "CalDAV sync done: Suky + Placeholders + Family + Klara")))
|
(message "CalDAV sync done: Suky + Placeholders + Family + Klara")))
|
||||||
|
|
||||||
(map! :leader "o c" #'my/org-caldav-sync)
|
|
||||||
|
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
@@ -1848,7 +1828,6 @@ Formats matching what org-caldav/ox-icalendar export correctly:
|
|||||||
:n "l" #'kubel-get-pod-logs
|
:n "l" #'kubel-get-pod-logs
|
||||||
:n "d" #'kubel-describe-resource
|
:n "d" #'kubel-describe-resource
|
||||||
:n "D" #'kubel-delete-resource))
|
:n "D" #'kubel-delete-resource))
|
||||||
(map! :leader "o k" #'kubel)
|
|
||||||
|
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
@@ -1894,12 +1873,10 @@ Formats matching what org-caldav/ox-icalendar export correctly:
|
|||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
(use-package! iedit :commands iedit-mode)
|
(use-package! iedit :commands iedit-mode)
|
||||||
(map! :leader "s e" #'iedit-mode)
|
|
||||||
|
|
||||||
(use-package! vundo
|
(use-package! vundo
|
||||||
:commands vundo
|
:commands vundo
|
||||||
:config (setq vundo-glyph-alist vundo-unicode-symbols))
|
:config (setq vundo-glyph-alist vundo-unicode-symbols))
|
||||||
(map! :leader "u" #'vundo)
|
|
||||||
|
|
||||||
(use-package! breadcrumb
|
(use-package! breadcrumb
|
||||||
:hook ((prog-mode . breadcrumb-local-mode)
|
:hook ((prog-mode . breadcrumb-local-mode)
|
||||||
@@ -2104,7 +2081,6 @@ Formats matching what org-caldav/ox-icalendar export correctly:
|
|||||||
(setq org-roam-ui-sync-theme t
|
(setq org-roam-ui-sync-theme t
|
||||||
org-roam-ui-follow t
|
org-roam-ui-follow t
|
||||||
org-roam-ui-update-on-save t))
|
org-roam-ui-update-on-save t))
|
||||||
(map! :leader "n r u" #'org-roam-ui-mode)
|
|
||||||
|
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
@@ -2116,9 +2092,49 @@ Formats matching what org-caldav/ox-icalendar export correctly:
|
|||||||
(expand-file-name "~/languagetool/languagetool-commandline.jar")
|
(expand-file-name "~/languagetool/languagetool-commandline.jar")
|
||||||
langtool-default-language "cs"
|
langtool-default-language "cs"
|
||||||
langtool-mother-tongue "cs"))
|
langtool-mother-tongue "cs"))
|
||||||
|
|
||||||
|
|
||||||
|
;;; ============================================================
|
||||||
|
;;; KEYBINDINGS — central reference
|
||||||
|
;;; ============================================================
|
||||||
|
;;; Standalone bindings (package-independent, safe to define top-level).
|
||||||
|
;;
|
||||||
|
;; The following bindings are defined near their packages (load-order sensitive):
|
||||||
|
;; SPC o r — elfeed (elfeed section)
|
||||||
|
;; SPC o n/N — org-noter (org-noter section)
|
||||||
|
;; SPC o C — calendar/calfw (calfw section)
|
||||||
|
;; SPC j k/K — link-hint (link-hint section)
|
||||||
|
;; SPC t o — olivetti (olivetti section)
|
||||||
|
;; SPC z +/= — zoom in/out (keybindings section below)
|
||||||
|
;; SPC o M — Matrix/ement (Matrix section)
|
||||||
|
;; SPC B b/i — bibliography/citar (bibliography section)
|
||||||
|
;; SPC s q/Q — org-ql (org-ql section)
|
||||||
|
;; SPC | di| ci| vi| — table cell objects (evil-org section)
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("z" . "zoom")
|
||||||
|
:desc "Zoom in (x1.5)" "+" #'my/zoom-in
|
||||||
|
:desc "Zoom in (x1.5)" "=" #'my/zoom-in
|
||||||
|
:desc "Zoom out (x1.5)" "-" #'my/zoom-out
|
||||||
|
:desc "Reset" "0" #'my/zoom-reset
|
||||||
|
:desc "Restore previous" "z" #'my/zoom-restore))
|
||||||
|
|
||||||
|
(map! :leader :desc "Elfeed" "o r" #'elfeed)
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("t" . "toggle")
|
||||||
|
:desc "Speech ON" "s" #'my/emacspeak-on
|
||||||
|
:desc "Speech OFF" "S" #'my/emacspeak-off))
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("h" . "help")
|
||||||
|
:desc "Describe bindings (buffer-local)" "B" #'describe-bindings))
|
||||||
|
(map! :leader "o k" #'kubel)
|
||||||
|
(map! :leader "s e" #'iedit-mode)
|
||||||
|
(map! :leader "u" #'vundo)
|
||||||
|
(map! :leader "n r u" #'org-roam-ui-mode)
|
||||||
(map! :leader
|
(map! :leader
|
||||||
"t g" #'langtool-check
|
"t g" #'langtool-check
|
||||||
"t G" #'langtool-check-done)
|
"t G" #'langtool-check-done)
|
||||||
|
(map! :leader "o c" #'my/org-caldav-sync)
|
||||||
|
|
||||||
;; gls
|
;; gls
|
||||||
(setq insert-directory-program "gls")
|
(setq insert-directory-program "gls")
|
||||||
|
|||||||
Reference in New Issue
Block a user