mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-11 19:45:25 +03:00
emacs: termux config
This commit is contained in:
parent
1d0c7fdb7d
commit
3a47cea8f7
2 changed files with 137 additions and 59 deletions
|
|
@ -23,6 +23,10 @@
|
||||||
|
|
||||||
(setq my/is-termux (string-match-p (rx (* nonl) "com.termux" (* nonl)) (getenv "HOME")))
|
(setq my/is-termux (string-match-p (rx (* nonl) "com.termux" (* nonl)) (getenv "HOME")))
|
||||||
|
|
||||||
|
(defun my/system-name ()
|
||||||
|
(or (getenv "ANDROID_NAME")
|
||||||
|
(system-name)))
|
||||||
|
|
||||||
(setq my/nested-emacs (and (getenv "IS_EMACS") t))
|
(setq my/nested-emacs (and (getenv "IS_EMACS") t))
|
||||||
(setenv "IS_EMACS" "true")
|
(setenv "IS_EMACS" "true")
|
||||||
|
|
||||||
|
|
@ -43,7 +47,7 @@
|
||||||
gcs-done)
|
gcs-done)
|
||||||
(setq my/emacs-started t)))
|
(setq my/emacs-started t)))
|
||||||
|
|
||||||
;; (setq use-package-verbose t)
|
(setq use-package-verbose t)
|
||||||
|
|
||||||
(setq gc-cons-threshold 80000000)
|
(setq gc-cons-threshold 80000000)
|
||||||
(setq read-process-output-max (* 1024 1024))
|
(setq read-process-output-max (* 1024 1024))
|
||||||
|
|
@ -375,6 +379,13 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
|
||||||
(global-set-key (kbd "C-+") 'my/zoom-in)
|
(global-set-key (kbd "C-+") 'my/zoom-in)
|
||||||
(global-set-key (kbd "C-=") 'my/zoom-out)
|
(global-set-key (kbd "C-=") 'my/zoom-out)
|
||||||
|
|
||||||
|
(when my/is-termux
|
||||||
|
(define-key key-translation-map (kbd "`") (kbd "<escape>"))
|
||||||
|
(define-key key-translation-map (kbd "<escape>") (kbd "`")))
|
||||||
|
|
||||||
|
(when my/is-termux
|
||||||
|
(setq split-width-threshold 90))
|
||||||
|
|
||||||
(unless (or my/remote-server my/nested-emacs)
|
(unless (or my/remote-server my/nested-emacs)
|
||||||
(add-hook 'after-init-hook #'server-start))
|
(add-hook 'after-init-hook #'server-start))
|
||||||
|
|
||||||
|
|
@ -946,7 +957,11 @@ Obeys `widen-automatically', which see."
|
||||||
:if (not (or my/remote-server))
|
:if (not (or my/remote-server))
|
||||||
:config
|
:config
|
||||||
(setq wakatime-ignore-exit-codes '(0 1 102 112))
|
(setq wakatime-ignore-exit-codes '(0 1 102 112))
|
||||||
(advice-add 'wakatime-init :after (lambda () (setq wakatime-cli-path (expand-file-name "~/bin/wakatime-cli"))))
|
(advice-add 'wakatime-init :after
|
||||||
|
(lambda ()
|
||||||
|
(setq wakatime-cli-path (or
|
||||||
|
(executable-find "wakatime-cli")
|
||||||
|
(expand-file-name "~/bin/wakatime-cli")))))
|
||||||
(when (file-exists-p "~/.wakatime.cfg")
|
(when (file-exists-p "~/.wakatime.cfg")
|
||||||
(setq wakatime-api-key
|
(setq wakatime-api-key
|
||||||
(string-trim
|
(string-trim
|
||||||
|
|
@ -2970,12 +2985,13 @@ Returns (<buffer> . <workspace-index>) or nil."
|
||||||
|
|
||||||
(my/set-smartparens-indent 'lua-mode)
|
(my/set-smartparens-indent 'lua-mode)
|
||||||
|
|
||||||
|
(setq org-directory (expand-file-name "~/30-39 Life/32 org-mode"))
|
||||||
|
|
||||||
(use-package org
|
(use-package org
|
||||||
:straight (:type built-in)
|
:straight (:type built-in)
|
||||||
:if (not my/remote-server)
|
:if (not my/remote-server)
|
||||||
:defer t
|
:defer t
|
||||||
:init
|
:init
|
||||||
(setq org-directory (expand-file-name "~/30-39 Life/32 org-mode"))
|
|
||||||
(unless (file-exists-p org-directory)
|
(unless (file-exists-p org-directory)
|
||||||
(mkdir org-directory t))
|
(mkdir org-directory t))
|
||||||
:config
|
:config
|
||||||
|
|
@ -3521,13 +3537,15 @@ With ARG, repeats or can move backward if negative."
|
||||||
f))
|
f))
|
||||||
(seq-filter
|
(seq-filter
|
||||||
(lambda (f) (not (file-directory-p f)))
|
(lambda (f) (not (file-directory-p f)))
|
||||||
(directory-files
|
(when (file-directory-p (concat org-directory "/projects"))
|
||||||
(concat org-directory "/projects"))))))
|
(directory-files
|
||||||
|
(concat org-directory "/projects")))))))
|
||||||
(setq org-agenda-files
|
(setq org-agenda-files
|
||||||
`("inbox.org"
|
(seq-filter #'file-exists-p
|
||||||
"misc/habit.org"
|
`("inbox.org"
|
||||||
"contacts.org"
|
"misc/habit.org"
|
||||||
,@project-files))
|
"contacts.org"
|
||||||
|
,@project-files)))
|
||||||
(setq org-refile-targets
|
(setq org-refile-targets
|
||||||
`(,@(mapcar
|
`(,@(mapcar
|
||||||
(lambda (f) `(,f . (:tag . "refile")))
|
(lambda (f) `(,f . (:tag . "refile")))
|
||||||
|
|
@ -3539,8 +3557,9 @@ With ARG, repeats or can move backward if negative."
|
||||||
(load-file (concat org-directory "/scripts/refile.el"))
|
(load-file (concat org-directory "/scripts/refile.el"))
|
||||||
(run-hooks 'my/org-refile-hooks))))
|
(run-hooks 'my/org-refile-hooks))))
|
||||||
|
|
||||||
|
(setq org-roam-directory (concat org-directory "/roam"))
|
||||||
(with-eval-after-load-norem 'org
|
(with-eval-after-load-norem 'org
|
||||||
(setq org-roam-directory (concat org-directory "/roam"))
|
(require 'seq)
|
||||||
(my/update-org-agenda))
|
(my/update-org-agenda))
|
||||||
|
|
||||||
(setq org-refile-use-outline-path 'file)
|
(setq org-refile-use-outline-path 'file)
|
||||||
|
|
@ -4114,21 +4133,22 @@ KEYS is a list of cons cells like (<label> . <time>)."
|
||||||
(remhash key my/org-alert--alerts)))))
|
(remhash key my/org-alert--alerts)))))
|
||||||
|
|
||||||
(defun my/org-alert--update-today-alerts ()
|
(defun my/org-alert--update-today-alerts ()
|
||||||
(let ((items
|
(when-let* ((files (org-agenda-files))
|
||||||
(org-ql-query
|
(items
|
||||||
:select 'element
|
(org-ql-query
|
||||||
:from (org-agenda-files)
|
:select 'element
|
||||||
:where `(and
|
:from files
|
||||||
(todo "FUTURE")
|
:where `(and
|
||||||
(ts-active :from ,(format-time-string "%Y-%m-%d %H:%M")
|
(todo "FUTURE")
|
||||||
:to ,(format-time-string
|
(ts-active :from ,(format-time-string "%Y-%m-%d %H:%M")
|
||||||
"%Y-%m-%d"
|
:to ,(format-time-string
|
||||||
(time-add
|
"%Y-%m-%d"
|
||||||
(current-time)
|
(time-add
|
||||||
(* 60 60 24)))
|
(current-time)
|
||||||
:with-time t))
|
(* 60 60 24)))
|
||||||
:order-by 'date))
|
:with-time t))
|
||||||
scheduled-keys)
|
:order-by 'date))
|
||||||
|
scheduled-keys)
|
||||||
(cl-loop
|
(cl-loop
|
||||||
for item in items
|
for item in items
|
||||||
for scheduled = (org-timestamp-to-time (org-element-property :scheduled item))
|
for scheduled = (org-timestamp-to-time (org-element-property :scheduled item))
|
||||||
|
|
@ -4339,8 +4359,8 @@ KEYS is a list of cons cells like (<label> . <time>)."
|
||||||
|
|
||||||
(defun my/set-journal-header ()
|
(defun my/set-journal-header ()
|
||||||
(org-set-property "Emacs" emacs-version)
|
(org-set-property "Emacs" emacs-version)
|
||||||
(org-set-property "Hostname" system-name)
|
(org-set-property "Hostname" (my/system-name))
|
||||||
(org-journal-tags-prop-apply-delta :add (list (format "host.%s" (system-name))))
|
(org-journal-tags-prop-apply-delta :add (list (format "host.%s" (my/system-name))))
|
||||||
(when (boundp 'my/location)
|
(when (boundp 'my/location)
|
||||||
(org-set-property "Location" my/location)
|
(org-set-property "Location" my/location)
|
||||||
(when-let ((weather (my/weather-get)))
|
(when-let ((weather (my/weather-get)))
|
||||||
|
|
@ -4410,7 +4430,9 @@ KEYS is a list of cons cells like (<label> . <time>)."
|
||||||
(use-package org-roam
|
(use-package org-roam
|
||||||
:straight (:host github :repo "org-roam/org-roam"
|
:straight (:host github :repo "org-roam/org-roam"
|
||||||
:files (:defaults "extensions/*.el"))
|
:files (:defaults "extensions/*.el"))
|
||||||
:if (not my/remote-server)
|
:if (and
|
||||||
|
(not my/remote-server)
|
||||||
|
(file-directory-p org-roam-directory))
|
||||||
:after org
|
:after org
|
||||||
:init
|
:init
|
||||||
(setq org-roam-file-extensions '("org"))
|
(setq org-roam-file-extensions '("org"))
|
||||||
|
|
@ -4867,6 +4889,9 @@ KEYS is a list of cons cells like (<label> . <time>)."
|
||||||
:if (display-graphic-p)
|
:if (display-graphic-p)
|
||||||
:hook (org-mode . org-bars-mode))
|
:hook (org-mode . org-bars-mode))
|
||||||
|
|
||||||
|
(unless (display-graphic-p)
|
||||||
|
(add-hook 'org-mode-hook #'org-indent-mode))
|
||||||
|
|
||||||
(defun my/org-no-ellipsis-in-headlines ()
|
(defun my/org-no-ellipsis-in-headlines ()
|
||||||
(remove-from-invisibility-spec '(outline . t))
|
(remove-from-invisibility-spec '(outline . t))
|
||||||
(add-to-invisibility-spec 'outline))
|
(add-to-invisibility-spec 'outline))
|
||||||
|
|
@ -5607,6 +5632,10 @@ KEYS is a list of cons cells like (<label> . <time>)."
|
||||||
(shell-quote-argument default-directory))))
|
(shell-quote-argument default-directory))))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(call-process "bash" nil t nil "-c" cmd)
|
(call-process "bash" nil t nil "-c" cmd)
|
||||||
|
(when my/is-termux
|
||||||
|
(let ((inhibit-message t))
|
||||||
|
(replace-string "\\[" "" nil (point-min) (point-max))
|
||||||
|
(replace-string "\\]" "" nil (point-min) (point-max))))
|
||||||
(thread-first "\n"
|
(thread-first "\n"
|
||||||
(concat (string-trim (buffer-string)))
|
(concat (string-trim (buffer-string)))
|
||||||
(ansi-color-apply)))))
|
(ansi-color-apply)))))
|
||||||
|
|
@ -7625,6 +7654,9 @@ base toot."
|
||||||
:commands (biome)
|
:commands (biome)
|
||||||
:init
|
:init
|
||||||
(my-leader-def "ab" #'biome)
|
(my-leader-def "ab" #'biome)
|
||||||
|
(when my/is-termux
|
||||||
|
(setq biome-query-tab-key "<TAB>")
|
||||||
|
(setq biome-api-try-parse-error-as-response t))
|
||||||
:config
|
:config
|
||||||
(add-to-list 'biome-query-coords
|
(add-to-list 'biome-query-coords
|
||||||
'("Saint-Petersburg, Russia" 59.93863 30.31413))
|
'("Saint-Petersburg, Russia" 59.93863 30.31413))
|
||||||
|
|
@ -7873,7 +7905,7 @@ See `my/index--tree-get' for the format of TREE."
|
||||||
(seq-filter
|
(seq-filter
|
||||||
#'identity
|
#'identity
|
||||||
(mapcar
|
(mapcar
|
||||||
(lambda (elem) (my/index--tree-narrow-recursive elem (system-name)))
|
(lambda (elem) (my/index--tree-narrow-recursive elem (my/system-name)))
|
||||||
(copy-tree tree))))
|
(copy-tree tree))))
|
||||||
|
|
||||||
(defun my/index--filesystem-tree-mapping (full-tree tree &optional active-paths)
|
(defun my/index--filesystem-tree-mapping (full-tree tree &optional active-paths)
|
||||||
|
|
|
||||||
106
Emacs.org
106
Emacs.org
|
|
@ -1,4 +1,4 @@
|
||||||
#+PROPERTY: header-args :mkdirp yes
|
#+PROPERTY: heaaer-args :mkdirp yes
|
||||||
#+PROPERTY: header-args:bash :tangle-mode (identity #o755) :comments link :shebang "#!/usr/bin/env bash"
|
#+PROPERTY: header-args:bash :tangle-mode (identity #o755) :comments link :shebang "#!/usr/bin/env bash"
|
||||||
#+PROPERTY: header-args:emacs-lisp :tangle ~/.emacs.d/init.el :mkdirp yes :eval never-export :exports both
|
#+PROPERTY: header-args:emacs-lisp :tangle ~/.emacs.d/init.el :mkdirp yes :eval never-export :exports both
|
||||||
#+TODO: CHECK(s) | OFF(o)
|
#+TODO: CHECK(s) | OFF(o)
|
||||||
|
|
@ -127,6 +127,13 @@ And the following is true if Emacs is run from termux on Android.
|
||||||
(setq my/is-termux (string-match-p (rx (* nonl) "com.termux" (* nonl)) (getenv "HOME")))
|
(setq my/is-termux (string-match-p (rx (* nonl) "com.termux" (* nonl)) (getenv "HOME")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Custom system name logic because on termux it's always "localhost".
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun my/system-name ()
|
||||||
|
(or (getenv "ANDROID_NAME")
|
||||||
|
(system-name)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
Also, I sometimes need to know if a program is running inside Emacs (say, inside a terminal emulator). And sometimes I need to know if I'm running a nested Emacs session. To do that, I set the following environment variable:
|
Also, I sometimes need to know if a program is running inside Emacs (say, inside a terminal emulator). And sometimes I need to know if I'm running a nested Emacs session. To do that, I set the following environment variable:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq my/nested-emacs (and (getenv "IS_EMACS") t))
|
(setq my/nested-emacs (and (getenv "IS_EMACS") t))
|
||||||
|
|
@ -169,7 +176,7 @@ A small function to print out the loading time and number of GCs during the load
|
||||||
|
|
||||||
Set the following to =t= to print debug information during the startup. This will include the order in which the packages are loaded and the loading time of individual packages.
|
Set the following to =t= to print debug information during the startup. This will include the order in which the packages are loaded and the loading time of individual packages.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; (setq use-package-verbose t)
|
(setq use-package-verbose t)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Garbage collection
|
*** Garbage collection
|
||||||
|
|
@ -669,6 +676,20 @@ Evil does a pretty good job of abstracting all these packages with a set of vim-
|
||||||
(global-set-key (kbd "C-+") 'my/zoom-in)
|
(global-set-key (kbd "C-+") 'my/zoom-in)
|
||||||
(global-set-key (kbd "C-=") 'my/zoom-out)
|
(global-set-key (kbd "C-=") 'my/zoom-out)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
*** Termux
|
||||||
|
For some reason my ONYX device has the tilde and escape wrong.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(when my/is-termux
|
||||||
|
(define-key key-translation-map (kbd "`") (kbd "<escape>"))
|
||||||
|
(define-key key-translation-map (kbd "<escape>") (kbd "`")))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
And the screen is less wide.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(when my/is-termux
|
||||||
|
(setq split-width-threshold 90))
|
||||||
|
#+end_src
|
||||||
** i3 integration
|
** i3 integration
|
||||||
UPD <2021-11-27 Sat>. I have finally switched to EXWM as my window manager, but as long as I keep i3 as a backup solution, this section persists. Check out the [[https://sqrtminusone.xyz/posts/2021-10-04-emacs-i3/][post]] for a somewhat better presentation.
|
UPD <2021-11-27 Sat>. I have finally switched to EXWM as my window manager, but as long as I keep i3 as a backup solution, this section persists. Check out the [[https://sqrtminusone.xyz/posts/2021-10-04-emacs-i3/][post]] for a somewhat better presentation.
|
||||||
|
|
||||||
|
|
@ -1565,7 +1586,11 @@ Before I figure out how to package this for Guix:
|
||||||
:if (not (or my/remote-server))
|
:if (not (or my/remote-server))
|
||||||
:config
|
:config
|
||||||
(setq wakatime-ignore-exit-codes '(0 1 102 112))
|
(setq wakatime-ignore-exit-codes '(0 1 102 112))
|
||||||
(advice-add 'wakatime-init :after (lambda () (setq wakatime-cli-path (expand-file-name "~/bin/wakatime-cli"))))
|
(advice-add 'wakatime-init :after
|
||||||
|
(lambda ()
|
||||||
|
(setq wakatime-cli-path (or
|
||||||
|
(executable-find "wakatime-cli")
|
||||||
|
(expand-file-name "~/bin/wakatime-cli")))))
|
||||||
(when (file-exists-p "~/.wakatime.cfg")
|
(when (file-exists-p "~/.wakatime.cfg")
|
||||||
(setq wakatime-api-key
|
(setq wakatime-api-key
|
||||||
(string-trim
|
(string-trim
|
||||||
|
|
@ -4139,12 +4164,13 @@ References:
|
||||||
Use the built-in org mode (=:type built-in=).
|
Use the built-in org mode (=:type built-in=).
|
||||||
|
|
||||||
#+begin_src emacs-lisp :noweb yes
|
#+begin_src emacs-lisp :noweb yes
|
||||||
|
(setq org-directory (expand-file-name "~/30-39 Life/32 org-mode"))
|
||||||
|
|
||||||
(use-package org
|
(use-package org
|
||||||
:straight (:type built-in)
|
:straight (:type built-in)
|
||||||
:if (not my/remote-server)
|
:if (not my/remote-server)
|
||||||
:defer t
|
:defer t
|
||||||
:init
|
:init
|
||||||
(setq org-directory (expand-file-name "~/30-39 Life/32 org-mode"))
|
|
||||||
(unless (file-exists-p org-directory)
|
(unless (file-exists-p org-directory)
|
||||||
(mkdir org-directory t))
|
(mkdir org-directory t))
|
||||||
:config
|
:config
|
||||||
|
|
@ -4923,13 +4949,15 @@ Also, my project structure is somewhat chaotic, so I have an =.el= file in the o
|
||||||
f))
|
f))
|
||||||
(seq-filter
|
(seq-filter
|
||||||
(lambda (f) (not (file-directory-p f)))
|
(lambda (f) (not (file-directory-p f)))
|
||||||
(directory-files
|
(when (file-directory-p (concat org-directory "/projects"))
|
||||||
(concat org-directory "/projects"))))))
|
(directory-files
|
||||||
|
(concat org-directory "/projects")))))))
|
||||||
(setq org-agenda-files
|
(setq org-agenda-files
|
||||||
`("inbox.org"
|
(seq-filter #'file-exists-p
|
||||||
"misc/habit.org"
|
`("inbox.org"
|
||||||
"contacts.org"
|
"misc/habit.org"
|
||||||
,@project-files))
|
"contacts.org"
|
||||||
|
,@project-files)))
|
||||||
(setq org-refile-targets
|
(setq org-refile-targets
|
||||||
`(,@(mapcar
|
`(,@(mapcar
|
||||||
(lambda (f) `(,f . (:tag . "refile")))
|
(lambda (f) `(,f . (:tag . "refile")))
|
||||||
|
|
@ -4941,8 +4969,9 @@ Also, my project structure is somewhat chaotic, so I have an =.el= file in the o
|
||||||
(load-file (concat org-directory "/scripts/refile.el"))
|
(load-file (concat org-directory "/scripts/refile.el"))
|
||||||
(run-hooks 'my/org-refile-hooks))))
|
(run-hooks 'my/org-refile-hooks))))
|
||||||
|
|
||||||
|
(setq org-roam-directory (concat org-directory "/roam"))
|
||||||
(with-eval-after-load-norem 'org
|
(with-eval-after-load-norem 'org
|
||||||
(setq org-roam-directory (concat org-directory "/roam"))
|
(require 'seq)
|
||||||
(my/update-org-agenda))
|
(my/update-org-agenda))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -5651,21 +5680,22 @@ KEYS is a list of cons cells like (<label> . <time>)."
|
||||||
And a function to extract the required items with =org-ql-query= and schedule them:
|
And a function to extract the required items with =org-ql-query= and schedule them:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun my/org-alert--update-today-alerts ()
|
(defun my/org-alert--update-today-alerts ()
|
||||||
(let ((items
|
(when-let* ((files (org-agenda-files))
|
||||||
(org-ql-query
|
(items
|
||||||
:select 'element
|
(org-ql-query
|
||||||
:from (org-agenda-files)
|
:select 'element
|
||||||
:where `(and
|
:from files
|
||||||
(todo "FUTURE")
|
:where `(and
|
||||||
(ts-active :from ,(format-time-string "%Y-%m-%d %H:%M")
|
(todo "FUTURE")
|
||||||
:to ,(format-time-string
|
(ts-active :from ,(format-time-string "%Y-%m-%d %H:%M")
|
||||||
"%Y-%m-%d"
|
:to ,(format-time-string
|
||||||
(time-add
|
"%Y-%m-%d"
|
||||||
(current-time)
|
(time-add
|
||||||
(* 60 60 24)))
|
(current-time)
|
||||||
:with-time t))
|
(* 60 60 24)))
|
||||||
:order-by 'date))
|
:with-time t))
|
||||||
scheduled-keys)
|
:order-by 'date))
|
||||||
|
scheduled-keys)
|
||||||
(cl-loop
|
(cl-loop
|
||||||
for item in items
|
for item in items
|
||||||
for scheduled = (org-timestamp-to-time (org-element-property :scheduled item))
|
for scheduled = (org-timestamp-to-time (org-element-property :scheduled item))
|
||||||
|
|
@ -5943,8 +5973,8 @@ And here's the function that creates a drawer with such information. At the mome
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun my/set-journal-header ()
|
(defun my/set-journal-header ()
|
||||||
(org-set-property "Emacs" emacs-version)
|
(org-set-property "Emacs" emacs-version)
|
||||||
(org-set-property "Hostname" system-name)
|
(org-set-property "Hostname" (my/system-name))
|
||||||
(org-journal-tags-prop-apply-delta :add (list (format "host.%s" (system-name))))
|
(org-journal-tags-prop-apply-delta :add (list (format "host.%s" (my/system-name))))
|
||||||
(when (boundp 'my/location)
|
(when (boundp 'my/location)
|
||||||
(org-set-property "Location" my/location)
|
(org-set-property "Location" my/location)
|
||||||
(when-let ((weather (my/weather-get)))
|
(when-let ((weather (my/weather-get)))
|
||||||
|
|
@ -6067,7 +6097,9 @@ References:
|
||||||
(use-package org-roam
|
(use-package org-roam
|
||||||
:straight (:host github :repo "org-roam/org-roam"
|
:straight (:host github :repo "org-roam/org-roam"
|
||||||
:files (:defaults "extensions/*.el"))
|
:files (:defaults "extensions/*.el"))
|
||||||
:if (not my/remote-server)
|
:if (and
|
||||||
|
(not my/remote-server)
|
||||||
|
(file-directory-p org-roam-directory))
|
||||||
:after org
|
:after org
|
||||||
:init
|
:init
|
||||||
(setq org-roam-file-extensions '("org"))
|
(setq org-roam-file-extensions '("org"))
|
||||||
|
|
@ -6691,6 +6723,12 @@ Disabled it for now because of overlapping functionality with org-bars.
|
||||||
:hook (org-mode . org-bars-mode))
|
:hook (org-mode . org-bars-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Fallback to the standard =org-indent-mode= on terminal.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(unless (display-graphic-p)
|
||||||
|
(add-hook 'org-mode-hook #'org-indent-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
Remove the ellipsis at the end of folded headlines, as it seems unnecessary with =org-bars=.
|
Remove the ellipsis at the end of folded headlines, as it seems unnecessary with =org-bars=.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun my/org-no-ellipsis-in-headlines ()
|
(defun my/org-no-ellipsis-in-headlines ()
|
||||||
|
|
@ -7795,6 +7833,10 @@ The executable can print out the text of the prompt, but somehow it refuses when
|
||||||
(shell-quote-argument default-directory))))
|
(shell-quote-argument default-directory))))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(call-process "bash" nil t nil "-c" cmd)
|
(call-process "bash" nil t nil "-c" cmd)
|
||||||
|
(when my/is-termux
|
||||||
|
(let ((inhibit-message t))
|
||||||
|
(replace-string "\\[" "" nil (point-min) (point-max))
|
||||||
|
(replace-string "\\]" "" nil (point-min) (point-max))))
|
||||||
(thread-first "\n"
|
(thread-first "\n"
|
||||||
(concat (string-trim (buffer-string)))
|
(concat (string-trim (buffer-string)))
|
||||||
(ansi-color-apply)))))
|
(ansi-color-apply)))))
|
||||||
|
|
@ -10487,11 +10529,15 @@ References:
|
||||||
:commands (biome)
|
:commands (biome)
|
||||||
:init
|
:init
|
||||||
(my-leader-def "ab" #'biome)
|
(my-leader-def "ab" #'biome)
|
||||||
|
(when my/is-termux
|
||||||
|
(setq biome-query-tab-key "<TAB>")
|
||||||
|
(setq biome-api-try-parse-error-as-response t))
|
||||||
:config
|
:config
|
||||||
(add-to-list 'biome-query-coords
|
(add-to-list 'biome-query-coords
|
||||||
'("Saint-Petersburg, Russia" 59.93863 30.31413))
|
'("Saint-Petersburg, Russia" 59.93863 30.31413))
|
||||||
(add-to-list 'biome-query-coords
|
(add-to-list 'biome-query-coords
|
||||||
'("Tyumen, Russia" 57.15222 65.52722)))
|
'("Tyumen, Russia" 57.15222 65.52722)))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** Reading documentation
|
** Reading documentation
|
||||||
*** tldr
|
*** tldr
|
||||||
|
|
@ -10911,7 +10957,7 @@ Finally, we need to narrow the tree to only leave nodes that are active for the
|
||||||
(seq-filter
|
(seq-filter
|
||||||
#'identity
|
#'identity
|
||||||
(mapcar
|
(mapcar
|
||||||
(lambda (elem) (my/index--tree-narrow-recursive elem (system-name)))
|
(lambda (elem) (my/index--tree-narrow-recursive elem (my/system-name)))
|
||||||
(copy-tree tree))))
|
(copy-tree tree))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue