summaryrefslogtreecommitdiff
path: root/config.org
diff options
context:
space:
mode:
Diffstat (limited to 'config.org')
-rw-r--r--config.org112
1 files changed, 105 insertions, 7 deletions
diff --git a/config.org b/config.org
index 8434b00..5c7fa8e 100644
--- a/config.org
+++ b/config.org
@@ -2589,12 +2589,7 @@ Auto switch silos (different workspaces/folders) based on preconfigured director
(company-backends '(company-capf))
:config
(defun my/company-limit-candidates (candidates)
- (seq-take candidates 4))
-
- (define-key company-mode-map [remap indent-for-tab-command]
- #'company-manual-begin)
- (define-key company-mode-map [remap c-indent-line-or-region]
- #'company-manual-begin))
+ (seq-take candidates 4)))
#+end_src
* which-key
@@ -2679,7 +2674,7 @@ Auto switch silos (different workspaces/folders) based on preconfigured director
"\\`\\*elpaca-log\\*\\'"
"\\`\\*Native-compile-Log\\*\\'"
"\\`\\*Async-native-compile-log\\*\\'"))
- (helm-display-function #'helm-display-buffer-in-own-frame)
+ ;; (helm-display-function #'helm-display-buffer-in-own-frame)
:bind (:map helm-map
("C-j" . helm-next-line)
("C-k" . helm-previous-line)))
@@ -2775,6 +2770,17 @@ Auto switch silos (different workspaces/folders) based on preconfigured director
(kbd "g b") #'citre-jump-back)))
#+end_src
+* nov
+
+#+begin_src emacs-lisp
+(use-package nov
+ :ensure t
+ :mode ("\\.epub\\'" . nov-mode)
+ :hook (nov-mode . visual-line-mode)
+ :custom
+ (nov-text-width 100))
+#+end_src
+
* programming
@@ -5130,6 +5136,98 @@ opening another file in same project does not re-notify."
(minimal-dashboard-modeline-shown t)) ;; visibility of the modeline
#+end_src
+* rsync
+
+#+begin_src emacs-lisp
+(use-package rsync-ui
+ :ensure nil
+ :commands (rsync-ui rsync-ui-dired)
+ :bind (:map dired-mode-map
+ ("C-c r" . rsync-ui-dired))
+ :init
+ (with-eval-after-load 'general
+ (my-leader "or" '(rsync-ui :wk "rsync"))))
+#+end_src
+
+* exp
+
+#+begin_src emacs-lisp
+(defun rlr/org-export-html-to-browser ()
+ "Export the current Org buffer to a temporary HTML file in the system temp directory, open it, and then delete it when Emacs is killed."
+ (interactive)
+ (unless (derived-mode-p 'org-mode)
+ (user-error "Not in an Org buffer"))
+ (let* ((tmp (make-temp-file "org-preview-" nil ".html"))
+ (org-export-in-background nil)
+ (org-html-head-include-default-style nil)
+ (org-html-head-include-scripts nil)
+ (org-html-head rlr/org-preview-css)
+ (org-html-validation-link nil))
+ (org-export-to-file 'html tmp)
+ (add-hook 'kill-emacs-hook
+ (lambda () (ignore-errors (delete-file tmp))))
+ (funcall browse-url-secondary-browser-function
+ (browse-url-file-url tmp))))
+(defvar rlr/org-preview-css "
+<style>
+ :root { color-scheme: light dark; }
+ body {
+ max-width: 40rem;
+ margin: 3rem auto;
+ padding: 0 1.25rem;
+ font-family: -apple-system, BlinkMacSystemFont, 'Iowan Old Style','Palatino Linotype', Georgia, serif;
+ font-size: 1.125rem;
+ line-height: 1.65;
+ color: #24292f;
+ background: #fdfdfc;
+ text-rendering: optimizeLegibility;
+ hyphens: auto;
+ }
+ h1, h2, h3, h4 {
+ font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
+ line-height: 1.25;
+ margin-top: 2.25em;
+ color: #14181c;
+ }
+ h1 { font-size: 1.9rem; margin-bottom: 0.2em; }
+ h2 { font-size: 1.45rem; }
+ h3 { font-size: 1.2rem; }
+ .title { text-align: left; margin-bottom: 2rem; }
+ #table-of-contents { font-size: 0.95rem; }
+ a { color: #0b5cad; text-underline-offset: 2px; }
+ blockquote {
+ margin: 1.5em 0; padding: 0.25em 0 0.25em 1.25em;
+ border-left: 3px solid #d0d7de; color: #4a5058; font-style: italic;
+ }
+ pre, code { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 0.9rem; }
+ pre {
+ background: #f4f4f2; padding: 0.9em 1.1em;
+ border-radius: 6px; overflow-x: auto; line-height: 1.45;
+ }
+ code { background: #f0f0ee; padding: 0.1em 0.3em; border-radius: 3px; }
+ pre code { background: none; padding: 0; }
+ table { border-collapse: collapse; margin: 1.5em 0; font-size: 0.95rem; }
+ th, td { border: 1px solid #d0d7de; padding: 0.4em 0.7em; text-align: left; }
+ th { background: #f4f4f2; }
+ hr { border: none; border-top: 1px solid #d8d8d4; margin: 2.5em 0; }
+ .footpara { display: inline; }
+ #postamble { margin-top: 3rem; font-size: 0.85rem; color: #6a707a; }
+ @media (prefers-color-scheme: dark) {
+ body { color: #d6d3cd; background: #16181a; }
+ h1, h2, h3, h4 { color: #f0ede8; }
+ a { color: #6cb3f5; }
+ blockquote { border-left-color: #3a3f45; color: #a8a49d; }
+ pre { background: #1e2124; }
+ code { background: #24282c; }
+ th, td { border-color: #3a3f45; }
+ th { background: #1e2124; }
+ hr { border-top-color: #2e3236; }
+ }
+</style>"
+ "Stylesheet injected into throwaway HTML previews of Org buffers.")
+#+end_src
+
+
* provide init
#+begin_src emacs-lisp