This commit is contained in:
Phil Bajsicki 2024-06-06 01:26:00 +02:00
parent 87ad70fd1d
commit 605c4f0e5e
17 changed files with 999 additions and 268 deletions

View file

@ -1,2 +1 @@
(after! flyspell
(setq flyspell-lazy-idle-seconds 2))

View file

@ -1,4 +1,4 @@
#+title: Phil's Doom Emacs Config #+Title: Phil's Doom Emacs Config
#+STARTUP: indent #+STARTUP: indent
* Intro * Intro
@ -66,14 +66,26 @@ This command only sets up the path to your java runtime binary.
#+end_src #+end_src
**** Fonts **** Fonts
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq doom-themes-enable-bold t (setq doom-themes-enable-bold t
doom-themes-enable-italic t) doom-themes-enable-italic t
doom-font (font-spec :family "Iosevka" :size 14)
doom-big-font (font-spec :family "Iosevka" :size 16)
;; doom-variable-pitch-font (font-spec :family "Iosevka" :size 14)
doom-unicode-font (font-spec :family "Iosevka"))
;; doom-serif-font (font-spec :family "IBM Plex Mono" :size 10 :weight 'light))
;; (set-face-attribute 'default nil :family "Iosevka")
;; (set-face-attribute 'variable-pitch nil :family "Iosevka Aile")
;; (set-face-attribute 'org-modern-symbol nil :family "Iosevka")
#+end_src #+end_src
#+RESULTS: #+RESULTS:
: #<font-spec nil nil Iosevka nil nil nil nil nil nil nil nil nil nil>
**** Font Family List **** Font Family List
This is a simple command that outputs the fonts you have available in Emacs. This is a simple command that outputs the fonts you have available in Emacs.
#+begin_src emacs-lisp :results value format: pp #+begin_src emacs-lisp :results value format: pp :tangle no
(print (font-family-list)) (print (font-family-list))
#+end_src #+end_src
@ -117,7 +129,7 @@ This is a simple command that outputs the fonts you have available in Emacs.
(setq column-number-mode t) (setq column-number-mode t)
#+end_src #+end_src
*** set start of week to Monday (not sunday) http://sunsite.univie.ac.at/textbooks/emacs/emacs_33.html *** set start of week to Monday (not sunday) http://sunsite.univie.ac.at/textbooks/emacs/emacs_33.html
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle config.el
(setq-default calendar-week-start-day 1) (setq-default calendar-week-start-day 1)
#+END_SRC #+END_SRC
@ -134,6 +146,17 @@ Setting this here because I experiment with these occasionally and want them res
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq straight-repository-branch "develop") (setq straight-repository-branch "develop")
#+end_src #+end_src
*** [disabled] copilot.el
#+begin_src emacs-lisp :tangle no
;; accept completion from copilot and fallback to company
(use-package! copilot
:hook (prog-mode . copilot-mode)
:bind (:map copilot-completion-map
("<tab>" . 'copilot-accept-completion)
("TAB" . 'copilot-accept-completion)
("C-TAB" . 'copilot-accept-completion-by-word)
("C-<tab>" . 'copilot-accept-completion-by-word)))
#+end_src
*** pdf-tools *** pdf-tools
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(use-package! pdf-tools (use-package! pdf-tools
@ -165,6 +188,7 @@ Setting this here because I experiment with these occasionally and want them res
If you use `org' and don't want your org files in the default location below, change `org-directory'. It must be set before org loads! If you use `org' and don't want your org files in the default location below, change `org-directory'. It must be set before org loads!
Make .org file automatically open in org-mode. Make .org file automatically open in org-mode.
**** org **** org
***** Basic settings ***** Basic settings
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(add-to-list 'auto-mode-alist (add-to-list 'auto-mode-alist
@ -172,24 +196,21 @@ Make .org file automatically open in org-mode.
(setq org-image-actual-width nil) (setq org-image-actual-width nil)
(setq org-enforce-todo-dependencies t) (setq org-enforce-todo-dependencies t)
(setq org-insert-heading-respect-content nil)
(setq org-reverse-note-order nil) (setq org-reverse-note-order nil)
(setq org-show-following-heading t)
(setq org-show-hierarchy-above t)
(setq org-deadline-warning-days 7) (setq org-deadline-warning-days 7)
(setq org-blank-before-new-entry (quote ((heading . t) (setq org-blank-before-new-entry (quote ((heading . t)
(plain-list-item . nil)))) (plain-list-item . nil))))
(setq org-num-mode t)
(setq org-todo-repeat-to-state "LOOP") (setq org-todo-repeat-to-state "LOOP")
(setq org-remove-highlights-with-change nil) (setq org-remove-highlights-with-change nil)
(setq org-read-date-prefer-future nil) (setq org-read-date-prefer-future t)
(setq org-special-ctrl-a/e t) (setq org-special-ctrl-a/e t)
(setq org-special-ctrl-k t) (setq org-special-ctrl-k t)
(setq org-yank-adjusted-subtrees t) (setq org-yank-adjusted-subtrees t)
(setq org-M-RET-may-split-line t) (setq org-M-RET-may-split-line (quote (default . t)))
(setq org-log-done (quote time)) (setq org-log-done (quote time))
(setq org-log-into-drawer t) (setq org-log-into-drawer t)
(setq org-catch-invisible-edits "smart") (setq org-catch-invisible-edits "smart")
(setq org-completion-use-ido t)
(setq org-use-property-inheritance nil) (setq org-use-property-inheritance nil)
(setq org-duration-format 'h:mm) (setq org-duration-format 'h:mm)
(setq org-hierarchical-todo-statistics t) (setq org-hierarchical-todo-statistics t)
@ -197,7 +218,6 @@ Make .org file automatically open in org-mode.
#+RESULTS: #+RESULTS:
: t : t
***** my-org-tree-to-indirect-buffer ***** my-org-tree-to-indirect-buffer
#+begin_quote #+begin_quote
This beautiful piece of code was done by [[https://www.reddit.com/user/github-alphapapa][alphapapa]] and published on This beautiful piece of code was done by [[https://www.reddit.com/user/github-alphapapa][alphapapa]] and published on
@ -250,7 +270,7 @@ Lucky me, I found the ready-to-use solution [[https://emacs.stackexchange.com/a/
#+end_quote #+end_quote
--Karl Voit --Karl Voit
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle no
(defun my-org-retrieve-url-from-point () (defun my-org-retrieve-url-from-point ()
(interactive) (interactive)
(let* ((link-info (assoc :link (org-context))) (let* ((link-info (assoc :link (org-context)))
@ -265,7 +285,7 @@ Lucky me, I found the ready-to-use solution [[https://emacs.stackexchange.com/a/
(kill-new text)))) (kill-new text))))
#+END_SRC #+END_SRC
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle no
(global-set-key (kbd "C-c o") 'my-org-retrieve-url-from-point) (global-set-key (kbd "C-c o") 'my-org-retrieve-url-from-point)
#+END_SRC #+END_SRC
***** org-element cache verification ***** org-element cache verification
@ -297,20 +317,30 @@ https://www.emacswiki.org/emacs/TruncateLines =M-x toggle-truncate-lines=
(setq org-src-fontify-natively t) (setq org-src-fontify-natively t)
(setq org-hide-leading-stars t) (setq org-hide-leading-stars t)
;;disabled;(setq org-agenda-dim-blocked-tasks t)
;;disabled 2020-07-07;; (setq org-agenda-dim-blocked-tasks 'invisible)
(setq org-agenda-dim-blocked-tasks nil);; show blocked tasks
#+END_SRC #+END_SRC
****** Set the width of inline images: ****** Set the width of inline images:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle config.el
(setq org-image-actual-width '(600)) (setq org-image-actual-width '(600))
#+END_SRC #+END_SRC
****** org-modern ****** org-modern
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(package-initialize)
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
;; (modus-themes-load-operandi)
;; Choose some fonts
;; (set-face-attribute 'default nil :family "Iosevka")
;; (set-face-attribute 'variable-pitch nil :family "Iosevka Aile")
;; (set-face-attribute 'org-modern-symbol nil :family "Iosevka")
;; Add frame borders and window dividers
(modify-all-frames-parameters (modify-all-frames-parameters
'((right-divider-width . 2) '((right-divider-width . 0)
(internal-border-width . 0))) (internal-border-width . 0)))
(dolist (face '(window-divider (dolist (face '(window-divider
window-divider-first-pixel window-divider-first-pixel
@ -324,12 +354,12 @@ https://www.emacswiki.org/emacs/TruncateLines =M-x toggle-truncate-lines=
org-auto-align-tags nil org-auto-align-tags nil
org-tags-column 0 org-tags-column 0
org-catch-invisible-edits 'show-and-error org-catch-invisible-edits 'show-and-error
org-special-ctrl-a/e t
org-insert-heading-respect-content t org-insert-heading-respect-content t
;; Org styling, hide markup etc. ;; Org styling, hide markup etc.
org-hide-emphasis-markers t org-hide-emphasis-markers t
org-pretty-entities t org-pretty-entities t
org-ellipsis "…"
;; Agenda styling ;; Agenda styling
org-agenda-tags-column 0 org-agenda-tags-column 0
@ -339,17 +369,83 @@ https://www.emacswiki.org/emacs/TruncateLines =M-x toggle-truncate-lines=
(800 1000 1200 1400 1600 1800 2000) (800 1000 1200 1400 1600 1800 2000)
" ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄") " ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
org-agenda-current-time-string org-agenda-current-time-string
"⌚ now ─────────────────────────────────────────────────") "◀── now ─────────────────────────────────────────────────")
;; Ellipsis styling
;; (setq org-ellipsis "…")
;; (set-face-attribute 'org-ellipsis nil :inherit 'default :box nil)
(global-org-modern-mode) (global-org-modern-mode)
#+end_src #+end_src
#+RESULTS:
: t
****** Directory to org
#+begin_src elisp :tangle config.el
(defun my-dir-to-org (dir org-file)
"Create a file ORG-FILE which has all txt files in DIR as linked headlines
and the contents of the files below the headlines."
(interactive "DDirectory to convert: \nFFilename: ")
(let ((files (directory-files
dir t ".*\\.txt\\'")))
(with-temp-file org-file
(dolist (file files)
(insert (concat "* " (file-name-nondirectory file) "\n\n"))
(insert-file-contents file)
(goto-char (point-max))
(insert "\n")))))
(defun my-dir-to-org-with-links (dir org-file)
"Create a file ORG-FILE which has all txt files in DIR as linked headlines
and the contents of the files below the headlines."
(interactive "DDirectory to convert: \nFFilename: ")
(let ((files (directory-files
dir t ".*\\.txt\\'")))
(with-temp-file org-file
(dolist (file files)
(insert (concat "* " "[[" file "][" (file-name-nondirectory file) "]]\n\n"))
(insert-file-contents file)
(goto-char (point-max))
(insert "\n")))))
(defun my-mass-conversion (source-dir target-dir)
"Create one org file per directory of SOURCE-DIR inside TARGET-DIR."
(interactive "DDirectory to convert: \nDTarget Directory:")
(let ((dirs-full
(remove-if-not #'file-directory-p
(directory-files
source-dir t
directory-files-no-dot-files-regexp))))
(mapc (lambda (dir)
(my-dir-to-org dir
(concat target-dir
(file-name-base dir) ".org")))
dirs-full)))
#+end_src
#+RESULTS:
: my-mass-conversion
***** Dependencies ***** Dependencies
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq-default org-enforce-todo-dependencies t) (setq-default org-enforce-todo-dependencies t)
(setq org-enforce-todo-checkbox-dependencies t) (setq org-enforce-todo-checkbox-dependencies t)
#+END_SRC #+END_SRC
***** org-auto-tangle
#+begin_src emacs-lisp :tangle config.el
(require 'org-auto-tangle)
(add-hook 'org-mode-hook 'org-auto-tangle-mode)
#+end_src
***** auto-tangle-mode
#+begin_src emacs-lisp :tangle yes
#+end_src
**** Hooks **** Hooks
***** append and update time-stamps for =Time-stamp: <>= in headers: ***** append and update time-stamps for =Time-stamp: <>= in headers:
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
@ -365,6 +461,31 @@ https://www.emacswiki.org/emacs/TruncateLines =M-x toggle-truncate-lines=
;; auto-fill mode on ;; auto-fill mode on
(auto-fill-mode 1))) (auto-fill-mode 1)))
#+end_src #+end_src
***** expand macros inline
#+begin_src emacs-lisp :tangle config.el
(add-to-list 'font-lock-extra-managed-props 'display)
(font-lock-add-keywords
'org-mode
'(("\\({{{[a-zA-Z#%)(_-+0-9]+}}}\\)" 0
`(face nil display
,(format "%s"
(let* ((input-str (match-string 0))
(el (with-temp-buffer
(insert input-str)
(goto-char (point-min))
(org-element-context)))
(text (org-macro-expand el org-macro-templates)))
(if text
text
input-str)))))))
#+end_src
#+RESULTS:
**** Keybinds **** Keybinds
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
@ -382,25 +503,53 @@ Inserts timestamps in the proper format. ~'(16)~ stands for two universal argume
(org-time-stamp-inactive '(16)))) (org-time-stamp-inactive '(16))))
#+end_src #+end_src
***** Automated timestamps in headings
I need this because hitting the above is tedious.
For the files whose paths match the strings in the function, it will advise the org-insert-heading function to insert an inactive timestamp into the new heading.
This turns making new entries from ~C-<return> C-i i~ into just ~C-<return>~. Much easier, and I don't have to think about this any more.
#+begin_src emacs-lisp :tangle config.el
(add-hook 'org-insert-heading-hook
(lambda ()
(if
(or
(string-match-p "journal.org" buffer-file-name)
(string-match-p "money" buffer-file-name)
(string-match-p "therapy.org" buffer-file-name))
((lambda ()
(interactive)
(org-time-stamp-inactive '(16))
(newline)))
(setq org-insert-heading-hook nil)
)))
#+end_src
#+RESULTS:
| lambda | nil | (if (or (string-match-p journal.org buffer-file-name) (string-match-p money buffer-file-name) (string-match-p therapy.org buffer-file-name)) ((lambda nil (interactive) (org-time-stamp-inactive '(16)) (newline))) (setq org-insert-heading-hook nil)) |
**** Todo keywords **** Todo keywords
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq org-todo-keywords (setq org-todo-keywords
'((sequence '((sequence
"INBOX(i)" "INBOX(i!)"
"TASK(t)" ; A task that needs doing & is ready to do "TASK(t!)" ; A task that needs doing & is ready to do
"PROJ(p)" ; A project, which usually contains other tasks "PROJ(p!)" ; A project, which usually contains other tasks
"LOOP(r)" ; A recurring task "LOOP(r!)" ; A recurring task
"WAIT(w)" ; Something external is holding up this task "WAIT(w!)" ; Something external is holding up this task
"HOLD(h)" ; This task is paused/on hold because of me "HOLD(h!)" ; This task is paused/on hold because of me
"|" "|"
"DONE(d)" ; Task successfully completed "DONE(d!@)" ; Task successfully completed
"KILL(k)") ; Task was cancelled, aborted or is no longer applicable "KILL(k!@)") ; Task was cancelled, aborted or is no longer applicable
(sequence (sequence
"DECIDE()" ; for making decisions "DECIDE()" ; for making decisions
"|" "|"
"OKAY(o)" ; okay as-is "OKAY(o!)" ; okay as-is
"YES(y)" ; take action "YES(y!)" ; take action
"NO(n)")) ; don't take action "NO(n!)")) ; don't take action
org-todo-keyword-faces org-todo-keyword-faces
'( '(
("INBOX" :foreground "cyan" :weight bold) ("INBOX" :foreground "cyan" :weight bold)
@ -438,46 +587,17 @@ Change font for DONE tasks
**** Automated timestamps in headings
I need this because hitting the above is tedious.
For the files whose paths match the strings in the function, it will advise the org-insert-heading function to insert an inactive timestamp into the new heading.
This turns making new entries from ~C-<return> C-i i~ into just ~C-<return>~. Much easier, and I don't have to think about this any more.
#+begin_src emacs-lisp :tangle config.el
(add-hook 'org-insert-heading-hook
(lambda ()
(if
(or
(string-match "journal.org" buffer-file-name)
(string-match "money" buffer-file-name)
(string-match "therapy.org" buffer-file-name))
((lambda ()
(interactive)
(org-time-stamp-inactive '(16))
(newline)))
(setq org-insert-heading-hook nil)
)))
#+end_src
#+RESULTS:
| lambda | nil | (if (or (string-match journal buffer-file-name) (string-match money buffer-file-name) (string-match therapy buffer-file-name)) ((lambda nil (interactive) (org-timestamp-inactive '(16)) (newline))) (setq 'org-insert-heading-hook nil)) |
| lambda | nil | (if (or (string-match journal buffer-file-name) (string-match money buffer-file-name) (string-match therapy buffer-file-name)) (progn (org-timestamp-inactive '(16)) (newline)) (progn (signal 'wrong-type-argument (list 'symbolp ''org-insert-heading-hook)))) |
**** Capture templates **** Capture templates
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq org-capture-templates '(("t" "inbox" entry (file+headline "~/enc/org/phil.org" "Inbox") "* TODO %i%?") (setq org-capture-templates '(("t" "inbox" entry (file+headline "~/enc/org/agenda.org" "Inbox") "* %i%?")
("i" "idea" entry (file+headline "~/enc/org/phil.org" "Ideas") "* %?") ("i" "idea" entry (file+headline "~/enc/org/agenda.org" "Ideas") "* %?")
("d" "reminder" entry (file+headline "~/enc/org/phil.org" "Reminders") "* %i%? \n %U") ("d" "reminder" entry (file+headline "~/enc/org/agenda.org" "Reminders") "* %i%? \n %U")
("p" "person" entry (file+headline "~/enc/org/people.org" "People") ("p" "person" entry (file+headline "~/enc/org/people.org" "Sort")
"* %(org-contacts-template-name) "* %(org-contacts-template-name)
:PROPERTIES: :PROPERTIES:
:EMAIL: %(org-contacts-template-email) :EMAIL: %(org-contacts-template-email)
:PHONE: %(org-contacts-template-phone) :PHONE:
:ALIAS: :ALIAS:
:NICKNAME: :NICKNAME:
:IGNORE: :IGNORE:
@ -488,6 +608,11 @@ This turns making new entries from ~C-<return> C-i i~ into just ~C-<return>~. Mu
:END:"))) :END:")))
#+end_src #+end_src
#+RESULTS:
| t | inbox | entry | (file+headline ~/enc/org/agenda.org Inbox) | * %i%? |
| i | idea | entry | (file+headline ~/enc/org/agenda.org Ideas) | * %? |
| d | reminder | entry | (file+headline ~/enc/org/agenda.org Reminders) | * %i%? |
**** preserving all heading levels when archiving **** preserving all heading levels when archiving
Karl Voit: Karl Voit:
@ -496,7 +621,7 @@ Karl Voit:
Preserve the hierarchy when archiving: [[https://fuco1.github.io/2017-04-20-Archive-subtrees-under-the-same-hierarchy-as-original-in-the-archive-files.html][blog article]], [[https://gist.github.com/Fuco1/e86fb5e0a5bb71ceafccedb5ca22fcfb][source code (GitHub gist)]] Preserve the hierarchy when archiving: [[https://fuco1.github.io/2017-04-20-Archive-subtrees-under-the-same-hierarchy-as-original-in-the-archive-files.html][blog article]], [[https://gist.github.com/Fuco1/e86fb5e0a5bb71ceafccedb5ca22fcfb][source code (GitHub gist)]]
#+end_quote #+end_quote
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle config.el
(setq org-archive-default-command #'org-archive-subtree-hierarchically) (setq org-archive-default-command #'org-archive-subtree-hierarchically)
(defun org-archive-subtree-hierarchically (&optional prefix) (defun org-archive-subtree-hierarchically (&optional prefix)
@ -563,7 +688,7 @@ This results in a list that gets added to the Org-mode buffer similar to:
#+end_quote #+end_quote
#+begin_src emacs-lisp :results none #+begin_src emacs-lisp :results none :tangle no
(defun my-dired-insert-lfile-link-list-to-other-org-window (files) (defun my-dired-insert-lfile-link-list-to-other-org-window (files)
;; adapted by Karl Voit from https://emacs.stackexchange.com/a/60369 ;; adapted by Karl Voit from https://emacs.stackexchange.com/a/60369
(interactive (interactive
@ -603,7 +728,7 @@ This results in a list that gets added to the Org-mode buffer similar to:
#+end_quote #+end_quote
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle config.el
(setq my-linkcolor-org "wheat3") (setq my-linkcolor-org "wheat3")
(setq my-linkcolor-file "MediumSeaGreen") (setq my-linkcolor-file "MediumSeaGreen")
(setq my-linkcolor-web "DeepSkyBlue") (setq my-linkcolor-web "DeepSkyBlue")
@ -715,20 +840,71 @@ This results in a list that gets added to the Org-mode buffer similar to:
- Org links had: snow3 - Org links had: snow3
- File links: DarkSeaGreen, wheat2 - File links: DarkSeaGreen, wheat2
- Web links: DeepSkyBlue - Web links: DeepSkyBlue
*** org-edna
https://www.nongnu.org/org-edna-el/
#+begin_src emacs-lisp :tangle config.el
** org-transclusion
#+end_src
*** mu4e
#+begin_src elisp :tangle config.el
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e/")
(setq mu4e-change-filenames-when-moving t)
(setq mu4e-update-interval (* 10 60))
(setq mu4e-get-mail-command "mbsync -a")
(setq mu4e-maildir "~/enc/.mail")
(setq mu4e-drafts-folder "/Drafts")
(setq mu4e-sent-folder "/Sent")
(setq mu4e-refile-folder "/Refile")
(setq mu4e-trash-folder "/Trash")
(mu4e t)
#+end_src
#+RESULTS:
*** sly
#+begin_src emacs-lisp :tangle config.el
;; (load (expand-file-name "~/.roswell/helper.el"))
(setq inferior-lisp-program "sbcl --dynamic-space-size 8192 -Q -l ~/.sbclrc")
#+end_src
#+RESULTS:
: sbcl --dynamic-space-size 8192 -Q -l ~/.sbclrc
*** multiple-cursors
#+begin_src emacs-lisp :tangle config.el
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
#+end_src
#+RESULTS:
: mc/mark-all-like-this
*** org-transclusion
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(use-package! org-transclusion (use-package! org-transclusion
:after org :after org
:init :init
(map! (map!
:map global-map "<F12>" #'org-transclusion-add :map global-map "<f12>" #'org-transclusion-add
:leader :leader
:prefix "n" :prefix "n"
:desc "Org Transclusion Mode" "t" #'org-transclusion-mode)) :desc "Org Transclusion Mode" "t" #'org-transclusion-mode))
#+end_src #+end_src
** org-babel #+RESULTS:
: org-transclusion
*** org-babel
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images) (add-hook 'org-babel-after-execute-hook 'org-display-inline-images)
#+end_src #+end_src
@ -741,7 +917,7 @@ When some code generates an image file, display it in the results:
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images) (add-hook 'org-babel-after-execute-hook 'org-display-inline-images)
#+END_SRC #+END_SRC
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle no
(add-hook 'org-babel-after-execute-hook (add-hook 'org-babel-after-execute-hook
(lambda () (lambda ()
(unless (eq this-command 'org-babel-tangle) (unless (eq this-command 'org-babel-tangle)
@ -752,21 +928,54 @@ When some code generates an image file, display it in the results:
#+END_SRC #+END_SRC
** org-export*** LaTeX *** org-export*** LaTeX
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(with-eval-after-load 'ox-latex (with-eval-after-load 'ox-latex
(add-to-list 'org-latex-classes (add-to-list 'org-latex-classes
'("tufte-handout"
"\\documentclass[nobib]{tufte-handout}
\\usepackage{nicefrac}
\\usepackage{units}
[NO-DEFAULT-PACKAGES]
[EXTRA]"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
'("memoir" '("memoir"
"\\documentclass{memoir}" "\\documentclass{memoir}"
("\\chapter{%s}" . "\\chapter*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))) ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
#+end_src
#+begin_src emacs-lisp :tangle no
(print org-latex-classes)
#+end_src #+end_src
#+RESULTS: #+RESULTS:
| memoir | \documentclass{memoir} | (\chapter{%s} . \chapter*{%s}) | (\section{%s} . \section*{%s}) | (\subsection{%s} . \subsection*{%s}) | (\subsubsection{%s} . \subsubsection*{%s}) | |
| article | \documentclass[11pt]{article} | (\section{%s} . \section*{%s}) | (\subsection{%s} . \subsection*{%s}) | (\subsubsection{%s} . \subsubsection*{%s}) | (\paragraph{%s} . \paragraph*{%s}) | (\subparagraph{%s} . \subparagraph*{%s}) |
| report | \documentclass[11pt]{report} | (\part{%s} . \part*{%s}) | (\chapter{%s} . \chapter*{%s}) | (\section{%s} . \section*{%s}) | (\subsection{%s} . \subsection*{%s}) | (\subsubsection{%s} . \subsubsection*{%s}) |
| book | \documentclass[11pt]{book} | (\part{%s} . \part*{%s}) | (\chapter{%s} . \chapter*{%s}) | (\section{%s} . \section*{%s}) | (\subsection{%s} . \subsection*{%s}) | (\subsubsection{%s} . \subsubsection*{%s}) |
| tufte-handout | \documentclass[nobib]{tufte-handout} | | | | | |
** org-super-links #+begin_src
(setq org-latex-default-class "tufte-handout"
org-latex-pdf-process '("latexmk -pdf -bibtex-cond -f -outdir=%o %f"))
#+end_src
#+RESULTS:
| latexmk -pdf -bibtex-cond -f -outdir=%o %f |
*** org-super-links
***** Quick related link function ***** Quick related link function
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
@ -800,7 +1009,7 @@ Replace org-store-link and org-insert-link with org-super-links alternatives.
#+RESULTS: #+RESULTS:
: org-super-links-delete-link : org-super-links-delete-link
** org-super-agenda *** org-super-agenda
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
(org-super-agenda-mode) (org-super-agenda-mode)
(setq super-agenda-groups (setq super-agenda-groups
@ -862,22 +1071,29 @@ Replace org-store-link and org-insert-link with org-super-links alternatives.
** Org-wild-notifier *** Org-wild-notifier
This lets me get desktop notifications for TODO items. This lets me get desktop notifications for TODO items.
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(org-wild-notifier-mode)
(setq org-wild-notifier-alert-time '(10)) (org-wild-notifier-mode)
(setq org-wild-notifier-notification-title "Emacs org-mode agenda") (setq alert-default-style 'libnotify
(setq org-wild-notifier-keyword-whitelist '("TODO")) org-wild-notifier-alert-time '(0 5 15 60)
org-wild-notifier-keyword-whitelist nil
;; good for testing
org-wild-notifier--alert-severity 'high
alert-fade-time 50
)
#+end_src #+end_src
** org-id #+RESULTS:
*** my-id-get-or-generate : 50
*** org-id
**** my-id-get-or-generate
Straight from Karl Voit's config. Straight from Karl Voit's config.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle no
(defun my-id-get-or-generate() (defun my-id-get-or-generate()
"Returns the ID property if set or generates and returns a new one if not set. "Returns the ID property if set or generates and returns a new one if not set.
The generated ID is stripped off potential progress indicator cookies and The generated ID is stripped off potential progress indicator cookies and
@ -918,7 +1134,7 @@ Straight from Karl Voit's config.
#+END_SRC #+END_SRC
** Org-refile *** Org-refile
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq org-refile-targets '((nil :maxlevel . 9) (setq org-refile-targets '((nil :maxlevel . 9)
@ -928,23 +1144,13 @@ Straight from Karl Voit's config.
#+end_src #+end_src
(setq find-file-visit-truename t) (setq find-file-visit-truename t)
** org-contacts *** org-contacts
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq org-contacts-files '("~/enc/org/people.org")) (setq org-contacts-files '("~/enc/org/people.org"))
#+end_src #+end_src
** org-roam
*** Keybinds
#+begin_src emacs-lisp :tangle config.el
(define-prefix-command 'org-roam-map)
(global-set-key "\C-r" 'org-roam-map)
(define-key org-roam-map "o" 'org-roam-buffer-toggle)
(define-key org-roam-map "f" 'org-roam-node-find)
(define-key org-roam-map "i" 'org-roam-node-insert)
(define-key org-roam-map "n" 'org-roam-capture)
#+end_src
*** org-roam *** org-roam
**** org-roam
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq org-roam-v2-ack t) (setq org-roam-v2-ack t)
(setq org-roam-completion-everywhere t) (setq org-roam-completion-everywhere t)
@ -971,8 +1177,18 @@ Straight from Karl Voit's config.
:unnarrowed))) :unnarrowed)))
#+end_src #+end_src
** org-agenda **** Keybinds
*** Keybinds #+begin_src emacs-lisp :tangle config.el
(define-prefix-command 'org-roam-map)
(global-set-key "\C-r" 'org-roam-map)
(define-key org-roam-map "o" 'org-roam-buffer-toggle)
(define-key org-roam-map "f" 'org-roam-node-find)
(define-key org-roam-map "i" 'org-roam-node-insert)
(define-key org-roam-map "n" 'org-roam-capture)
#+end_src
*** org-agenda
**** Keybinds
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-ca" 'org-agenda)
(define-prefix-command 'org-agenda-map) (define-prefix-command 'org-agenda-map)
@ -981,36 +1197,33 @@ Straight from Karl Voit's config.
(define-key org-agenda-map "a" 'org-agenda) (define-key org-agenda-map "a" 'org-agenda)
#+end_src #+end_src
*** Settings **** Settings
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq org-agenda-start-day nil (setq org-agenda-start-day nil
org-agenda-span '14 org-agenda-span 'day
org-agenda-dim-blocked-tasks 'invisible org-agenda-dim-blocked-tasks t
org-agenda-sorting-strategy org-agenda-sorting-strategy
'((agenda habit-down time-up priority-down category-keep) '(time-up priority-up category-keep)
(todo priority-down category-keep) org-deadline-warning-days 4
(search category-keep))
org-deadline-warning-days 3
org-agenda-insert-diary-extract-time t
org-log-into-drawer t org-log-into-drawer t
org-treat-insert-todo-heading-as-state-change t
org-clock-into-drawer t org-clock-into-drawer t
org-agenda-log-mode-items '(closed clock state) org-agenda-log-mode-items '(closed clock state)
org-agenda-prefix-format "%l %i %c %s %t") org-agenda-prefix-format '((agenda . " %l %i %c %s %t")
(todo . " %i %-12:c")
(tags . " %i $-12:c")
(search . " %i %-12:c"))
org-agenda-compact-blocks nil
org-agenda-use-tag-inheritance (quote (agenda));; agenda performance
org-agenda-block-separator "---------")
(setq org-agenda-compact-blocks t)
(setq org-agenda-use-tag-inheritance (quote (agenda)));; agenda performance
(setq org-agenda-span 1)
(add-hook 'org-agenda-mode-hook '(lambda () (hl-line-mode 1))) (add-hook 'org-agenda-mode-hook '(lambda () (hl-line-mode 1)))
(setq org-agenda-custom-commands
(quote (("x" "Phil's view" agenda ""
((org-agenda-prefix-format " %i %-12:c %s %t "))))))
#+end_src #+end_src
#+RESULTS: #+RESULTS:
| x | Phil's view | agenda | | ((org-agenda-prefix-format %i %-12:c %s %t )) | | (lambda nil (hl-line-mode 1)) | +org-habit-resize-graph-h | org-fancy-priorities-mode |
**** From Karl Voit ***** From Karl Voit
Remove completed deadline tasks from the agenda view Remove completed deadline tasks from the agenda view
#+BEGIN_SRC emacs-lisp :tangle config.el #+BEGIN_SRC emacs-lisp :tangle config.el
(setq org-agenda-skip-deadline-if-done t) (setq org-agenda-skip-deadline-if-done t)
@ -1060,12 +1273,18 @@ Show all agenda dates - even if they are empty
Sorting order for tasks on the agenda Sorting order for tasks on the agenda
#+BEGIN_SRC emacs-lisp :tangle config.el #+BEGIN_SRC emacs-lisp :tangle config.el
(setq org-agenda-sorting-strategy (setq org-agenda-sorting-strategy
(quote ((agenda habit-down time-up user-defined-up priority-down category-keep) (quote ((agenda time-up user-defined-up priority-down category-keep)
(todo priority-down category-keep) (todo priority-down category-keep)
(tags priority-down category-keep) (tags priority-down category-keep)
(search category-keep)))) (search category-keep))))
#+END_SRC #+END_SRC
#+RESULTS:
| agenda | time-up | user-defined-up | priority-down | category-keep |
| todo | priority-down | category-keep | | |
| tags | priority-down | category-keep | | |
| search | category-keep | | | |
Start the weekly agenda today Start the weekly agenda today
#+BEGIN_SRC emacs-lisp :tangle config.el #+BEGIN_SRC emacs-lisp :tangle config.el
(setq org-agenda-start-on-weekday nil) (setq org-agenda-start-on-weekday nil)
@ -1111,7 +1330,7 @@ Disabled 2020-01-03 because I usually see one single day only.
#+END_SRC #+END_SRC
*** Exports **** Exports
Export subtree (by default) instead of whole buffer: Export subtree (by default) instead of whole buffer:
http://orgmode.org/manual/The-Export-Dispatcher.html http://orgmode.org/manual/The-Export-Dispatcher.html
@ -1133,7 +1352,7 @@ part of the export result get broken because of a typo or similar.
#+BEGIN_SRC emacs-lisp :tangle config.el #+BEGIN_SRC emacs-lisp :tangle config.el
(setq org-export-with-broken-links t) (setq org-export-with-broken-links t)
#+END_SRC #+END_SRC
**** Org-Reveal - generate nice presentations out of Org-mode ***** Org-Reveal - generate nice presentations out of Org-mode
https://github.com/yjwen/org-reveal https://github.com/yjwen/org-reveal
#+BEGIN_QUOTE #+BEGIN_QUOTE
- =Reveal.js= is a tool for creating good-looking HTML presentations, authored by Hakim El Hattab. - =Reveal.js= is a tool for creating good-looking HTML presentations, authored by Hakim El Hattab.
@ -1150,7 +1369,7 @@ https://github.com/yjwen/org-reveal
:config) :config)
#+END_SRC #+END_SRC
**** my-org-copy-region-as-markdown ***** my-org-copy-region-as-markdown
| 2022-05-03 | initial setup and disabled because of error | | 2022-05-03 | initial setup and disabled because of error |
I've found this nugget on http://mbork.pl/2021-05-02_Org-mode_to_Markdown_via_the_clipboard. I've found this nugget on http://mbork.pl/2021-05-02_Org-mode_to_Markdown_via_the_clipboard.
@ -1184,11 +1403,45 @@ Debugging:
(org-export-string-as region 'md t '(:with-toc nil)) (org-export-string-as region 'md t '(:with-toc nil))
#+END_SRC #+END_SRC
** yasnippets **** org-habits
#+begin_src emacs-lisp :tangle config.el
(add-to-list 'org-modules 'habit)
(setq org-habit-following-days 2
org-habit-preceding-days 7
org-habit-show-all-today nil
org-habit-show-habits-only-for-today t
org-habit-show-habits t)
#+end_src
#+RESULTS:
: t
**** org-habit-stats
#+begin_src emacs-lisp :tangle config.el
(define-key org-mode-map (kbd "C-c h") 'org-habit-stats-view-habit-at-point)
(define-key org-agenda-mode-map (kbd "H") 'org-habit-stats-view-habit-at-point-agenda)
(add-hook 'org-after-todo-state-change-hook 'org-habit-stats-update-properties)
#+end_src
#+RESULTS:
| org-habit-stats-update-properties |
**** org-download
this is here as a reminder of the config options, so no tangling
#+begin_src emacs-lisp :tangle no
(setq-default org-download-image-dir "~/enc/org/.attach")
;; can also set for the individual buffer
;; -*- mode: Org; org-download-image-dir: "~/Pictures/foo"; -*-
#+end_src
*** yasnippets
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq doom-snippets-enable-short-helpers t) (setq doom-snippets-enable-short-helpers t)
#+end_src #+end_src
** dired-open *** dired-open
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(setq dired-open-extensions '(("gif" . "sxiv") (setq dired-open-extensions '(("gif" . "sxiv")
("jpg" . "sxiv") ("jpg" . "sxiv")
@ -1197,18 +1450,18 @@ Debugging:
("mp4" . "mpv"))) ("mp4" . "mpv")))
#+end_src #+end_src
** mode-icons *** mode-icons
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(mode-icons-mode) (mode-icons-mode)
(add-hook 'dired-mode-hook #'mode-icons--mode-disable) ;; with mode-icons, visiting a dir with dired takes up *lots* of CPU for =mode-icons-reset= (performance-issue) (add-hook 'dired-mode-hook #'mode-icons--mode-disable) ;; with mode-icons, visiting a dir with dired takes up *lots* of CPU for =mode-icons-reset= (performance-issue)
#+end_src #+end_src
** csv-mode *** csv-mode
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
(add-to-list 'auto-mode-alist '("\\.[Cc][Ss][Vv]\\'" . csv-mode)) (add-to-list 'auto-mode-alist '("\\.[Cc][Ss][Vv]\\'" . csv-mode))
(autoload 'csv-mode "csv-mode" (autoload 'csv-mode "csv-mode"
"Major mode for editing comma-separated value files." t) "Major mode for editing comma-separated value files." t)
#+end_src #+end_src
** whisper.el (S2T; speech to text) *** whisper.el (S2T; speech to text)
- https://github.com/natrys/whisper.el - https://github.com/natrys/whisper.el
@ -1231,7 +1484,7 @@ Use =whisper-run= once to start recording and a second time for start
the translation process which puts the text into the buffer. This the translation process which puts the text into the buffer. This
works *offline* (without cloud or network) and amazingly well for English. works *offline* (without cloud or network) and amazingly well for English.
#+BEGIN_SRC emacs-lisp :results none #+BEGIN_SRC emacs-lisp :results none :tangle no
(use-package whisper (use-package whisper
:load-path (lambda () (expand-file-name (concat my-user-emacs-directory "contrib/whisper.el/"))) :load-path (lambda () (expand-file-name (concat my-user-emacs-directory "contrib/whisper.el/")))
;; :bind ("C-H-r" . whisper-run) ;; :bind ("C-H-r" . whisper-run)
@ -1244,7 +1497,7 @@ works *offline* (without cloud or network) and amazingly well for English.
) )
#+END_SRC #+END_SRC
** hledger-mode *** hledger-mode
#+begin_src emacs-lisp :tangle config.el #+begin_src emacs-lisp :tangle config.el
;; To open files with .journal extension in hledger-mode ;; To open files with .journal extension in hledger-mode
(add-to-list 'auto-mode-alist '("\\.journal\\'" . hledger-mode)) (add-to-list 'auto-mode-alist '("\\.journal\\'" . hledger-mode))
@ -1258,10 +1511,52 @@ works *offline* (without cloud or network) and amazingly well for English.
(add-to-list 'company-backends 'hledger-company) (add-to-list 'company-backends 'hledger-company)
#+end_src #+end_src
*** gptel
#+begin_src emacs-lisp :tangle config.el
(use-package! gptel
:config
(setq! gptel-api-key "your key")
(setq! gptel-max-tokens 8192)
(setq
gptel-model "model"
gptel-backend (gptel-make-openai "llama-cpp"
:stream t
:protocol "http"
:host "localhost:5000"
:models '("model"))))
(gptel-make-openai "llama-cpp" ;Any name
:stream t ;Stream responses
:protocol "http"
:host "localhost:5000" ;Llama.cpp server location
:models '("model")) ;Any names, doesn't matter for Llama
(setq gptel--debug t)
#+end_src
#+RESULTS:
: t
*** erc
**** config
#+begin_src emacs-lisp :tangle config.el
;; Set our nickname & real-name as constant variables
(setq
erc-nick "phil_bb" ; Our IRC nick
erc-user-full-name "Phil B.") ; Our /whois name
;; Define a function to connect to a server
(defun erc/libera ()
(interactive)
(erc :server "irc.libera.chat"
:port "6667"))
#+end_src
#+RESULTS:
: erc/libera
* custom.el * custom.el
Custom variables. Note that this file is generally set up automatically by Emacs, so I'm not exporting this block. I'm keeping the default warning commants in just for completion here. Custom variables. Note that this file is generally set up automatically by Emacs, so I'm not exporting this block. I'm keeping the default warning commants in just for completion here.
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
(custom-set-variables (custom-set-variables)
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
@ -1300,7 +1595,7 @@ This is the state as of <2023-08-12 Sat>. I'm sure Doom Emacs will expand/ chang
;;layout ; auie,ctsrnm is the superior home row ;;layout ; auie,ctsrnm is the superior home row
:completion :completion
company ; the ultimate code completion backend (company +childframe) ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life ;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine... ;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life ;;ivy ; a search engine for love and life
@ -1402,7 +1697,7 @@ This is the state as of <2023-08-12 Sat>. I'm sure Doom Emacs will expand/ chang
;;crystal ; ruby at the speed of c ;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans ;;csharp ; unity, .NET, and mono shenanigans
data ; config/data formats data ; config/data formats
;;(dart +flutter) ; paint ui and not much else (dart +flutter) ; paint ui and not much else
;;dhall ;;dhall
;;elixir ; erlang done right ;;elixir ; erlang done right
;;elm ; care for a cup of TEA? ;;elm ; care for a cup of TEA?
@ -1421,7 +1716,7 @@ This is the state as of <2023-08-12 Sat>. I'm sure Doom Emacs will expand/ chang
;;hy ; readability of scheme w/ speed of python ;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on ;;idris ; a language you can depend on
json ; At least it ain't XML json ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome (java +lsp) ; the poster child for carpal tunnel syndrome
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here)))))) (javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
(julia +lsp) ; a better, faster MATLAB (julia +lsp) ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script) ;;kotlin ; a better, slicker Java(Script)
@ -1457,7 +1752,7 @@ This is the state as of <2023-08-12 Sat>. I'm sure Doom Emacs will expand/ chang
(zig +lsp) ; C, but simpler (zig +lsp) ; C, but simpler
:email :email
;;(mu4e +org +gmail) (mu4e +org +gmail)
;;notmuch ;;notmuch
;;(wanderlust +gmail) ;;(wanderlust +gmail)
@ -1531,9 +1826,7 @@ release. You can ~unpin!~ them. Note ~(unpin! t)~ unpins all the packages and ca
(unpin! pinned-package) (unpin! pinned-package)
(unpin! pinned-package another-pinned-package) (unpin! pinned-package another-pinned-package)
(unpin! t) (unpin! t)
#+end_#+begin_src #+end_src
#+end_src
** Packages: ** Packages:
*** Core *** Core
#+begin_src emacs-lisp :tangle packages.el #+begin_src emacs-lisp :tangle packages.el
@ -1557,6 +1850,7 @@ release. You can ~unpin!~ them. Note ~(unpin! t)~ unpins all the packages and ca
(package! battle-haxe) (package! battle-haxe)
(package! fish-mode) (package! fish-mode)
(package! typescript-mode) (package! typescript-mode)
(package! terraform-mode)
(package! wc-mode) (package! wc-mode)
(package! plantuml-mode) (package! plantuml-mode)
(package! csv-mode) (package! csv-mode)
@ -1580,6 +1874,10 @@ release. You can ~unpin!~ them. Note ~(unpin! t)~ unpins all the packages and ca
(package! org-auto-tangle) (package! org-auto-tangle)
(package! ox-slack) (package! ox-slack)
(package! ox-tufte) (package! ox-tufte)
(package! ox-gemini
:recipe (
:host sourcehut
:repo "abrahms/ox-gemini"))
(package! org-special-block-extras) (package! org-special-block-extras)
(package! org-transclusion) (package! org-transclusion)
(package! org-modern) (package! org-modern)
@ -1594,9 +1892,15 @@ release. You can ~unpin!~ them. Note ~(unpin! t)~ unpins all the packages and ca
(package! org-download) (package! org-download)
(package! org-cliplink) (package! org-cliplink)
(package! org-roam) (package! org-roam)
(package! org-super-agenda) ;; (package! org-super-agenda)
(package! org-wild-notifier) (package! org-wild-notifier)
(package! org-habit-stats)
#+end_src #+end_src
*** Yasnippet
#+begin_src emacs-lisp :tangle packages.el
#+end_src
*** Org-depend *** Org-depend
Ensure task dependencies are met. Ensure task dependencies are met.
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
@ -1641,3 +1945,24 @@ Pretty Gantt chart for your agenda.
#+begin_src emacs-lisp :tangle packages.el #+begin_src emacs-lisp :tangle packages.el
(package! hledger-mode) (package! hledger-mode)
#+end_src #+end_src
*** copilot.el
#+begin_src emacs-lisp :tangle no
(package! copilot
:recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist")))
#+end_src
*** elpher
#+begin_src emacs-lisp :tangle packages.el
(package! elpher)
#+end_src
*** multiple-cursors
#+begin_src emacs-lisp :tangle packages.el
(package! multiple-cursors)
#+end_src
*** gptel
#+begin_src emacs-lisp :tangle packages.el
(package! gptel
:recipe (:host github
:repo "karthink/gptel"
:files ("*.el")))
#+end_src

View file

@ -24,8 +24,17 @@
(doom-themes-neotree-config) (doom-themes-neotree-config)
(doom-themes-org-config) (doom-themes-org-config)
(setq doom-themes-enable-bold t (setq doom-themes-enable-bold t
doom-themes-enable-italic t) doom-themes-enable-italic t
doom-font (font-spec :family "Iosevka" :size 14)
doom-big-font (font-spec :family "Iosevka" :size 16)
;; doom-variable-pitch-font (font-spec :family "Iosevka" :size 14)
doom-unicode-font (font-spec :family "Iosevka"))
;; doom-serif-font (font-spec :family "IBM Plex Mono" :size 10 :weight 'light))
;; (set-face-attribute 'default nil :family "Iosevka")
;; (set-face-attribute 'variable-pitch nil :family "Iosevka Aile")
;; (set-face-attribute 'org-modern-symbol nil :family "Iosevka")
(ligature-set-ligatures 't '("www")) (ligature-set-ligatures 't '("www"))
;; Enable traditional ligature support in eww-mode, if the ;; Enable traditional ligature support in eww-mode, if the
@ -58,6 +67,8 @@
(setq x-stretch-cursor t) (setq x-stretch-cursor t)
(setq column-number-mode t) (setq column-number-mode t)
(setq-default calendar-week-start-day 1)
(global-set-key "\C-g" 'keyboard-quit) (global-set-key "\C-g" 'keyboard-quit)
(global-set-key "\C-cu" 'browse-url-chrome) (global-set-key "\C-cu" 'browse-url-chrome)
@ -82,24 +93,21 @@
(setq org-image-actual-width nil) (setq org-image-actual-width nil)
(setq org-enforce-todo-dependencies t) (setq org-enforce-todo-dependencies t)
(setq org-insert-heading-respect-content nil)
(setq org-reverse-note-order nil) (setq org-reverse-note-order nil)
(setq org-show-following-heading t)
(setq org-show-hierarchy-above t)
(setq org-deadline-warning-days 7) (setq org-deadline-warning-days 7)
(setq org-blank-before-new-entry (quote ((heading . t) (setq org-blank-before-new-entry (quote ((heading . t)
(plain-list-item . nil)))) (plain-list-item . nil))))
(setq org-num-mode t)
(setq org-todo-repeat-to-state "LOOP") (setq org-todo-repeat-to-state "LOOP")
(setq org-remove-highlights-with-change nil) (setq org-remove-highlights-with-change nil)
(setq org-read-date-prefer-future nil) (setq org-read-date-prefer-future t)
(setq org-special-ctrl-a/e t) (setq org-special-ctrl-a/e t)
(setq org-special-ctrl-k t) (setq org-special-ctrl-k t)
(setq org-yank-adjusted-subtrees t) (setq org-yank-adjusted-subtrees t)
(setq org-M-RET-may-split-line t) (setq org-M-RET-may-split-line (quote (default . t)))
(setq org-log-done (quote time)) (setq org-log-done (quote time))
(setq org-log-into-drawer t) (setq org-log-into-drawer t)
(setq org-catch-invisible-edits "smart") (setq org-catch-invisible-edits "smart")
(setq org-completion-use-ido t)
(setq org-use-property-inheritance nil) (setq org-use-property-inheritance nil)
(setq org-duration-format 'h:mm) (setq org-duration-format 'h:mm)
(setq org-hierarchical-todo-statistics t) (setq org-hierarchical-todo-statistics t)
@ -134,8 +142,22 @@ selected instead of creating a new buffer."
(setq org-element--cache-self-verify nil) (setq org-element--cache-self-verify nil)
(setq org-image-actual-width '(600))
(package-initialize)
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
;; (modus-themes-load-operandi)
;; Choose some fonts
;; (set-face-attribute 'default nil :family "Iosevka")
;; (set-face-attribute 'variable-pitch nil :family "Iosevka Aile")
;; (set-face-attribute 'org-modern-symbol nil :family "Iosevka")
;; Add frame borders and window dividers
(modify-all-frames-parameters (modify-all-frames-parameters
'((right-divider-width . 2) '((right-divider-width . 0)
(internal-border-width . 0))) (internal-border-width . 0)))
(dolist (face '(window-divider (dolist (face '(window-divider
window-divider-first-pixel window-divider-first-pixel
@ -149,12 +171,12 @@ selected instead of creating a new buffer."
org-auto-align-tags nil org-auto-align-tags nil
org-tags-column 0 org-tags-column 0
org-catch-invisible-edits 'show-and-error org-catch-invisible-edits 'show-and-error
org-special-ctrl-a/e t
org-insert-heading-respect-content t org-insert-heading-respect-content t
;; Org styling, hide markup etc. ;; Org styling, hide markup etc.
org-hide-emphasis-markers t org-hide-emphasis-markers t
org-pretty-entities t org-pretty-entities t
org-ellipsis ""
;; Agenda styling ;; Agenda styling
org-agenda-tags-column 0 org-agenda-tags-column 0
@ -164,13 +186,62 @@ selected instead of creating a new buffer."
(800 1000 1200 1400 1600 1800 2000) (800 1000 1200 1400 1600 1800 2000)
" ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄") " ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
org-agenda-current-time-string org-agenda-current-time-string
"⌚ now ─────────────────────────────────────────────────") "◀── now ─────────────────────────────────────────────────")
;; Ellipsis styling
;; (setq org-ellipsis "…")
;; (set-face-attribute 'org-ellipsis nil :inherit 'default :box nil)
(global-org-modern-mode) (global-org-modern-mode)
(defun my-dir-to-org (dir org-file)
"Create a file ORG-FILE which has all txt files in DIR as linked headlines
and the contents of the files below the headlines."
(interactive "DDirectory to convert: \nFFilename: ")
(let ((files (directory-files
dir t ".*\\.txt\\'")))
(with-temp-file org-file
(dolist (file files)
(insert (concat "* " (file-name-nondirectory file) "\n\n"))
(insert-file-contents file)
(goto-char (point-max))
(insert "\n")))))
(defun my-dir-to-org-with-links (dir org-file)
"Create a file ORG-FILE which has all txt files in DIR as linked headlines
and the contents of the files below the headlines."
(interactive "DDirectory to convert: \nFFilename: ")
(let ((files (directory-files
dir t ".*\\.txt\\'")))
(with-temp-file org-file
(dolist (file files)
(insert (concat "* " "[[" file "][" (file-name-nondirectory file) "]]\n\n"))
(insert-file-contents file)
(goto-char (point-max))
(insert "\n")))))
(defun my-mass-conversion (source-dir target-dir)
"Create one org file per directory of SOURCE-DIR inside TARGET-DIR."
(interactive "DDirectory to convert: \nDTarget Directory:")
(let ((dirs-full
(remove-if-not #'file-directory-p
(directory-files
source-dir t
directory-files-no-dot-files-regexp))))
(mapc (lambda (dir)
(my-dir-to-org dir
(concat target-dir
(file-name-base dir) ".org")))
dirs-full)))
(setq-default org-enforce-todo-dependencies t) (setq-default org-enforce-todo-dependencies t)
(setq org-enforce-todo-checkbox-dependencies t) (setq org-enforce-todo-checkbox-dependencies t)
(require 'org-auto-tangle)
(add-hook 'org-mode-hook 'org-auto-tangle-mode)
(add-hook 'write-file-hooks 'time-stamp) (add-hook 'write-file-hooks 'time-stamp)
(add-hook 'org-mode-hook (add-hook 'org-mode-hook
(lambda () (lambda ()
@ -183,6 +254,23 @@ selected instead of creating a new buffer."
;; auto-fill mode on ;; auto-fill mode on
(auto-fill-mode 1))) (auto-fill-mode 1)))
(add-to-list 'font-lock-extra-managed-props 'display)
(font-lock-add-keywords
'org-mode
'(("\\({{{[a-zA-Z#%)(_-+0-9]+}}}\\)" 0
`(face nil display
,(format "%s"
(let* ((input-str (match-string 0))
(el (with-temp-buffer
(insert input-str)
(goto-char (point-min))
(org-element-context)))
(text (org-macro-expand el org-macro-templates)))
(if text
text
input-str)))))))
(global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ch" 'counsel-org-link) (global-set-key "\C-ch" 'counsel-org-link)
(global-set-key "\C-cne" 'elgantt-open) (global-set-key "\C-cne" 'elgantt-open)
@ -193,23 +281,37 @@ selected instead of creating a new buffer."
(global-set-key "\C-cii" '(lambda () (interactive) (global-set-key "\C-cii" '(lambda () (interactive)
(org-time-stamp-inactive '(16)))) (org-time-stamp-inactive '(16))))
(add-hook 'org-insert-heading-hook
(lambda ()
(if
(or
(string-match-p "journal.org" buffer-file-name)
(string-match-p "money" buffer-file-name)
(string-match-p "therapy.org" buffer-file-name))
((lambda ()
(interactive)
(org-time-stamp-inactive '(16))
(newline)))
(setq org-insert-heading-hook nil)
)))
(setq org-todo-keywords (setq org-todo-keywords
'((sequence '((sequence
"INBOX(i)" "INBOX(i!)"
"TASK(t)" ; A task that needs doing & is ready to do "TASK(t!)" ; A task that needs doing & is ready to do
"PROJ(p)" ; A project, which usually contains other tasks "PROJ(p!)" ; A project, which usually contains other tasks
"LOOP(r)" ; A recurring task "LOOP(r!)" ; A recurring task
"WAIT(w)" ; Something external is holding up this task "WAIT(w!)" ; Something external is holding up this task
"HOLD(h)" ; This task is paused/on hold because of me "HOLD(h!)" ; This task is paused/on hold because of me
"|" "|"
"DONE(d)" ; Task successfully completed "DONE(d!@)" ; Task successfully completed
"KILL(k)") ; Task was cancelled, aborted or is no longer applicable "KILL(k!@)") ; Task was cancelled, aborted or is no longer applicable
(sequence (sequence
"DECIDE()" ; for making decisions "DECIDE()" ; for making decisions
"|" "|"
"OKAY(o)" ; okay as-is "OKAY(o!)" ; okay as-is
"YES(y)" ; take action "YES(y!)" ; take action
"NO(n)")) ; don't take action "NO(n!)")) ; don't take action
org-todo-keyword-faces org-todo-keyword-faces
'( '(
("INBOX" :foreground "cyan" :weight bold) ("INBOX" :foreground "cyan" :weight bold)
@ -221,28 +323,14 @@ selected instead of creating a new buffer."
("DONE" :foreground "green" :weight bold) ("DONE" :foreground "green" :weight bold)
("KILL" :foreground "grey" :weight bold))) ("KILL" :foreground "grey" :weight bold)))
(add-hook 'org-insert-heading-hook (setq org-capture-templates '(("t" "inbox" entry (file+headline "~/enc/org/agenda.org" "Inbox") "* %i%?")
(lambda () ("i" "idea" entry (file+headline "~/enc/org/agenda.org" "Ideas") "* %?")
(if ("d" "reminder" entry (file+headline "~/enc/org/agenda.org" "Reminders") "* %i%? \n %U")
(or ("p" "person" entry (file+headline "~/enc/org/people.org" "Sort")
(string-match "journal.org" buffer-file-name)
(string-match "money" buffer-file-name)
(string-match "therapy.org" buffer-file-name))
((lambda ()
(interactive)
(org-time-stamp-inactive '(16))
(newline)))
(setq org-insert-heading-hook nil)
)))
(setq org-capture-templates '(("t" "inbox" entry (file+headline "~/enc/org/phil.org" "Inbox") "* TODO %i%?")
("i" "idea" entry (file+headline "~/enc/org/phil.org" "Ideas") "* %?")
("d" "reminder" entry (file+headline "~/enc/org/phil.org" "Reminders") "* %i%? \n %U")
("p" "person" entry (file+headline "~/enc/org/people.org" "People")
"* %(org-contacts-template-name) "* %(org-contacts-template-name)
:PROPERTIES: :PROPERTIES:
:EMAIL: %(org-contacts-template-email) :EMAIL: %(org-contacts-template-email)
:PHONE: %(org-contacts-template-phone) :PHONE:
:ALIAS: :ALIAS:
:NICKNAME: :NICKNAME:
:IGNORE: :IGNORE:
@ -252,11 +340,166 @@ selected instead of creating a new buffer."
:BIRTHDAY: :BIRTHDAY:
:END:"))) :END:")))
(setq org-archive-default-command #'org-archive-subtree-hierarchically)
(defun org-archive-subtree-hierarchically (&optional prefix)
(interactive "P")
(let* ((fix-archive-p (and (not prefix)
(not (use-region-p))))
(afile (car (org-archive--compute-location
(or (org-entry-get nil "ARCHIVE" 'inherit) org-archive-location))))
(buffer (or (find-buffer-visiting afile) (find-file-noselect afile))))
(org-archive-subtree prefix)
(when fix-archive-p
(with-current-buffer buffer
(goto-char (point-max))
(while (org-up-heading-safe))
(let* ((olpath (org-entry-get (point) "ARCHIVE_OLPATH"))
(path (and olpath (split-string olpath "/")))
(level 1)
tree-text)
(when olpath
(org-mark-subtree)
(setq tree-text (buffer-substring (region-beginning) (region-end)))
(let (this-command (inhibit-message t)) (org-cut-subtree)) ; we dont want to see "Cut subtree" messages
(goto-char (point-min))
(save-restriction
(widen)
(-each path
(lambda (heading)
(if (re-search-forward
(rx-to-string
`(: bol (repeat ,level "*") (1+ " ") ,heading)) nil t)
(org-narrow-to-subtree)
(goto-char (point-max))
(unless (looking-at "^")
(insert "\n"))
(insert (make-string level ?*)
" "
heading
"\n"))
(cl-incf level)))
(widen)
(org-end-of-subtree t t)
(org-paste-subtree level tree-text))))))))
(setq my-linkcolor-org "wheat3")
(setq my-linkcolor-file "MediumSeaGreen")
(setq my-linkcolor-web "DeepSkyBlue")
(defun my-set-linkcolors ()
"Defines the colors of various link colors"
(interactive)
;; Org links --------------------------------------------------------------------------
(org-link-set-parameters "id" :face `(:foreground ,my-linkcolor-org :underline t))
(org-link-set-parameters "contact" :face `(:foreground ,my-linkcolor-org :underline t))
;; File links --------------------------------------------------------------------------
(org-link-set-parameters "file" :face `(:foreground ,my-linkcolor-file :underline t))
;; defined elsewhere;; (org-link-set-parameters "tsfile" :face '`(:foreground "DarkSeaGreen" :underline t))
(org-link-set-parameters "pdf" :face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "EPA" :face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "EPAAFO" :face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "JAFO" :face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "DAKEPA" :face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "BMTSK" :face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "ISO" :face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "gemSpec_DS_Anbieter"
:face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "gemSpec_Net"
:face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "gemSpec_PKI"
:face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "gemSpec_IDP_Dienst"
:face `(:foreground ,my-linkcolor-file :underline t))
(org-link-set-parameters "messageid"
:face `(:foreground ,my-linkcolor-file :underline t))
;; Web links --------------------------------------------------------------------------
(org-link-set-parameters "http" :face `(:foreground ,my-linkcolor-web :underline t))
(org-link-set-parameters "https" :face `(:foreground ,my-linkcolor-web :underline t))
)
(defun my-set-linkcolors ()
"Defines the colors of various link colors"
(interactive)
;; Org links --------------------------------------------------------------------------
(org-link-set-parameters "id" :face '(:foreground "wheat3" :underline t))
(org-link-set-parameters "contact" :face '(:foreground "wheat3" :underline t))
;; File links --------------------------------------------------------------------------
(org-link-set-parameters "file" :face '(:foreground "MediumSeaGreen" :underline t))
;; defined elsewhere;; (org-link-set-parameters "tsfile" :face ''(:foreground "DarkSeaGreen" :underline t))
(org-link-set-parameters "pdf" :face '(:foreground "MediumSeaGreen" :underline t))
(org-link-set-parameters "EPA" :face '(:foreground "MediumSeaGreen" :underline t))
(org-link-set-parameters "EPAAFO" :face '(:foreground "MediumSeaGreen" :underline t))
(org-link-set-parameters "JAFO" :face '(:foreground "MediumSeaGreen" :underline t))
(org-link-set-parameters "DAKEPA" :face '(:foreground "MediumSeaGreen" :underline t))
(org-link-set-parameters "BMTSK" :face '(:foreground "MediumSeaGreen" :underline t))
(org-link-set-parameters "gemSpec_DS_Anbieter"
:face '(:foreground "MediumSeaGreen" :underline t))
(org-link-set-parameters "gemSpec_Net"
:face '(:foreground "MediumSeaGreen" :underline t))
(org-link-set-parameters "gemSpec_PKI"
:face '(:foreground "MediumSeaGreen" :underline t))
(org-link-set-parameters "gemSpec_IDP_Dienst"
:face '(:foreground "MediumSeaGreen" :underline t))
(org-link-set-parameters "messageid"
:face '(:foreground "MediumSeaGreen" :underline t))
;; Web links --------------------------------------------------------------------------
(org-link-set-parameters "http" :face '(:foreground "DeepSkyBlue" :underline t))
(org-link-set-parameters "https" :face '(:foreground "DeepSkyBlue" :underline t))
)
(my-set-linkcolors) ;; set colors when loading
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e/")
(setq mu4e-change-filenames-when-moving t)
(setq mu4e-update-interval (* 10 60))
(setq mu4e-get-mail-command "mbsync -a")
(setq mu4e-maildir "~/enc/.mail")
(setq mu4e-drafts-folder "/Drafts")
(setq mu4e-sent-folder "/Sent")
(setq mu4e-refile-folder "/Refile")
(setq mu4e-trash-folder "/Trash")
(mu4e t)
;; (load (expand-file-name "~/.roswell/helper.el"))
(setq inferior-lisp-program "sbcl --dynamic-space-size 8192 -Q -l ~/.sbclrc")
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
(use-package! org-transclusion (use-package! org-transclusion
:after org :after org
:init :init
(map! (map!
:map global-map "<F12>" #'org-transclusion-add :map global-map "<f12>" #'org-transclusion-add
:leader :leader
:prefix "n" :prefix "n"
:desc "Org Transclusion Mode" "t" #'org-transclusion-mode)) :desc "Org Transclusion Mode" "t" #'org-transclusion-mode))
@ -265,6 +508,17 @@ selected instead of creating a new buffer."
(with-eval-after-load 'ox-latex (with-eval-after-load 'ox-latex
(add-to-list 'org-latex-classes (add-to-list 'org-latex-classes
'("tufte-handout"
"\\documentclass[nobib]{tufte-handout}
\\usepackage{nicefrac}
\\usepackage{units}
[NO-DEFAULT-PACKAGES]
[EXTRA]"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
'("memoir" '("memoir"
"\\documentclass{memoir}" "\\documentclass{memoir}"
("\\chapter{%s}" . "\\chapter*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
@ -290,11 +544,14 @@ selected instead of creating a new buffer."
(global-set-key (kbd "C-c l r") 'org-super-links-quick-related) (global-set-key (kbd "C-c l r") 'org-super-links-quick-related)
(global-set-key (kbd "C-c l d") 'org-super-links-delete-link) (global-set-key (kbd "C-c l d") 'org-super-links-delete-link)
(org-wild-notifier-mode) (org-wild-notifier-mode)
(setq alert-default-style 'libnotify
(setq org-wild-notifier-alert-time '(10)) org-wild-notifier-alert-time '(0 5 15 60)
(setq org-wild-notifier-notification-title "Emacs org-mode agenda") org-wild-notifier-keyword-whitelist nil
(setq org-wild-notifier-keyword-whitelist '("TODO")) ;; good for testing
org-wild-notifier--alert-severity 'high
alert-fade-time 50
)
(setq org-refile-targets '((nil :maxlevel . 9) (setq org-refile-targets '((nil :maxlevel . 9)
(org-agenda-files :maxlevel . 9))) (org-agenda-files :maxlevel . 9)))
@ -303,13 +560,6 @@ selected instead of creating a new buffer."
(setq org-contacts-files '("~/enc/org/people.org")) (setq org-contacts-files '("~/enc/org/people.org"))
(define-prefix-command 'org-roam-map)
(global-set-key "\C-r" 'org-roam-map)
(define-key org-roam-map "o" 'org-roam-buffer-toggle)
(define-key org-roam-map "f" 'org-roam-node-find)
(define-key org-roam-map "i" 'org-roam-node-insert)
(define-key org-roam-map "n" 'org-roam-capture)
(setq org-roam-v2-ack t) (setq org-roam-v2-ack t)
(setq org-roam-completion-everywhere t) (setq org-roam-completion-everywhere t)
(setq org-roam-directory (setq org-roam-directory
@ -334,6 +584,13 @@ selected instead of creating a new buffer."
:empty-lines 1 :empty-lines 1
:unnarrowed))) :unnarrowed)))
(define-prefix-command 'org-roam-map)
(global-set-key "\C-r" 'org-roam-map)
(define-key org-roam-map "o" 'org-roam-buffer-toggle)
(define-key org-roam-map "f" 'org-roam-node-find)
(define-key org-roam-map "i" 'org-roam-node-insert)
(define-key org-roam-map "n" 'org-roam-capture)
(global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-ca" 'org-agenda)
(define-prefix-command 'org-agenda-map) (define-prefix-command 'org-agenda-map)
(global-set-key "\C-a" 'org-agenda-map) (global-set-key "\C-a" 'org-agenda-map)
@ -341,28 +598,25 @@ selected instead of creating a new buffer."
(define-key org-agenda-map "a" 'org-agenda) (define-key org-agenda-map "a" 'org-agenda)
(setq org-agenda-start-day nil (setq org-agenda-start-day nil
org-agenda-span '14 org-agenda-span 'day
org-agenda-dim-blocked-tasks 'invisible org-agenda-dim-blocked-tasks t
org-agenda-sorting-strategy org-agenda-sorting-strategy
'((agenda habit-down time-up priority-down category-keep) '(time-up priority-up category-keep)
(todo priority-down category-keep) org-deadline-warning-days 4
(search category-keep))
org-deadline-warning-days 3
org-agenda-insert-diary-extract-time t
org-log-into-drawer t org-log-into-drawer t
org-treat-insert-todo-heading-as-state-change t
org-clock-into-drawer t org-clock-into-drawer t
org-agenda-log-mode-items '(closed clock state) org-agenda-log-mode-items '(closed clock state)
org-agenda-prefix-format "%l %i %c %s %t") org-agenda-prefix-format '((agenda . " %l %i %c %s %t")
(todo . " %i %-12:c")
(tags . " %i $-12:c")
(search . " %i %-12:c"))
org-agenda-compact-blocks nil
org-agenda-use-tag-inheritance (quote (agenda));; agenda performance
org-agenda-block-separator "---------")
(setq org-agenda-compact-blocks t)
(setq org-agenda-use-tag-inheritance (quote (agenda)));; agenda performance
(setq org-agenda-span 1)
(add-hook 'org-agenda-mode-hook '(lambda () (hl-line-mode 1))) (add-hook 'org-agenda-mode-hook '(lambda () (hl-line-mode 1)))
(setq org-agenda-custom-commands
(quote (("x" "Phil's view" agenda ""
((org-agenda-prefix-format " %i %-12:c %s %t "))))))
(setq org-agenda-skip-deadline-if-done t) (setq org-agenda-skip-deadline-if-done t)
(setq org-agenda-skip-scheduled-if-done t) (setq org-agenda-skip-scheduled-if-done t)
@ -380,7 +634,7 @@ selected instead of creating a new buffer."
(setq org-agenda-show-all-dates t) (setq org-agenda-show-all-dates t)
(setq org-agenda-sorting-strategy (setq org-agenda-sorting-strategy
(quote ((agenda habit-down time-up user-defined-up priority-down category-keep) (quote ((agenda time-up user-defined-up priority-down category-keep)
(todo priority-down category-keep) (todo priority-down category-keep)
(tags priority-down category-keep) (tags priority-down category-keep)
(search category-keep)))) (search category-keep))))
@ -411,6 +665,17 @@ selected instead of creating a new buffer."
(org-export-string-as region 'md t '(:with-toc nil)))) (org-export-string-as region 'md t '(:with-toc nil))))
(gui-set-selection 'CLIPBOARD markdown)))) (gui-set-selection 'CLIPBOARD markdown))))
(add-to-list 'org-modules 'habit)
(setq org-habit-following-days 2
org-habit-preceding-days 7
org-habit-show-all-today nil
org-habit-show-habits-only-for-today t
org-habit-show-habits t)
(define-key org-mode-map (kbd "C-c h") 'org-habit-stats-view-habit-at-point)
(define-key org-agenda-mode-map (kbd "H") 'org-habit-stats-view-habit-at-point-agenda)
(add-hook 'org-after-todo-state-change-hook 'org-habit-stats-update-properties)
(setq doom-snippets-enable-short-helpers t) (setq doom-snippets-enable-short-helpers t)
(setq dired-open-extensions '(("gif" . "sxiv") (setq dired-open-extensions '(("gif" . "sxiv")
@ -436,3 +701,33 @@ selected instead of creating a new buffer."
;;; Auto-completion for account names ;;; Auto-completion for account names
;; For company-mode users, ;; For company-mode users,
(add-to-list 'company-backends 'hledger-company) (add-to-list 'company-backends 'hledger-company)
(use-package! gptel
:config
(setq! gptel-api-key "your key")
(setq! gptel-max-tokens 8192)
(setq
gptel-model "model"
gptel-backend (gptel-make-openai "llama-cpp"
:stream t
:protocol "http"
:host "localhost:5000"
:models '("model"))))
(gptel-make-openai "llama-cpp" ;Any name
:stream t ;Stream responses
:protocol "http"
:host "localhost:5000" ;Llama.cpp server location
:models '("model")) ;Any names, doesn't matter for Llama
(setq gptel--debug t)
;; Set our nickname & real-name as constant variables
(setq
erc-nick "phil_bb" ; Our IRC nick
erc-user-full-name "Phil B.") ; Our /whois name
;; Define a function to connect to a server
(defun erc/libera ()
(interactive)
(erc :server "irc.libera.chat"
:port "6667"))

View file

@ -1,16 +0,0 @@
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ignored-local-variable-values '((org-ql-ask-unsafe-queries)))
'(magit-todos-insert-after '(bottom) nil nil "Changed by setter of obsolete option `magit-todos-insert-at'")
'(org-safe-remote-resources
'("\\`https://lvxnox\\.com/org-html-themes/org/theme-readtheorg\\.setup\\'" "\\`https://bajsicki\\.com/org-html-themes/org/theme-readtheorg\\.setup\\'")))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(put 'narrow-to-region 'disabled nil)

View file

@ -21,7 +21,7 @@
;;layout ; auie,ctsrnm is the superior home row ;;layout ; auie,ctsrnm is the superior home row
:completion :completion
company ; the ultimate code completion backend (company +childframe) ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life ;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine... ;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life ;;ivy ; a search engine for love and life
@ -123,7 +123,7 @@
;;crystal ; ruby at the speed of c ;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans ;;csharp ; unity, .NET, and mono shenanigans
data ; config/data formats data ; config/data formats
;;(dart +flutter) ; paint ui and not much else (dart +flutter) ; paint ui and not much else
;;dhall ;;dhall
;;elixir ; erlang done right ;;elixir ; erlang done right
;;elm ; care for a cup of TEA? ;;elm ; care for a cup of TEA?
@ -142,7 +142,7 @@
;;hy ; readability of scheme w/ speed of python ;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on ;;idris ; a language you can depend on
json ; At least it ain't XML json ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome (java +lsp) ; the poster child for carpal tunnel syndrome
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here)))))) (javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
(julia +lsp) ; a better, faster MATLAB (julia +lsp) ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script) ;;kotlin ; a better, slicker Java(Script)
@ -178,7 +178,7 @@
(zig +lsp) ; C, but simpler (zig +lsp) ; C, but simpler
:email :email
;;(mu4e +org +gmail) (mu4e +org +gmail)
;;notmuch ;;notmuch
;;(wanderlust +gmail) ;;(wanderlust +gmail)

View file

@ -14,6 +14,7 @@
(package! battle-haxe) (package! battle-haxe)
(package! fish-mode) (package! fish-mode)
(package! typescript-mode) (package! typescript-mode)
(package! terraform-mode)
(package! wc-mode) (package! wc-mode)
(package! plantuml-mode) (package! plantuml-mode)
(package! csv-mode) (package! csv-mode)
@ -28,6 +29,10 @@
(package! org-auto-tangle) (package! org-auto-tangle)
(package! ox-slack) (package! ox-slack)
(package! ox-tufte) (package! ox-tufte)
(package! ox-gemini
:recipe (
:host sourcehut
:repo "abrahms/ox-gemini"))
(package! org-special-block-extras) (package! org-special-block-extras)
(package! org-transclusion) (package! org-transclusion)
(package! org-modern) (package! org-modern)
@ -42,8 +47,11 @@
(package! org-download) (package! org-download)
(package! org-cliplink) (package! org-cliplink)
(package! org-roam) (package! org-roam)
(package! org-super-agenda) ;; (package! org-super-agenda)
(package! org-wild-notifier) (package! org-wild-notifier)
(package! org-habit-stats)
(package! org-edna) (package! org-edna)
(package! org-super-links (package! org-super-links
@ -62,3 +70,12 @@
(package! qrencode) (package! qrencode)
(package! hledger-mode) (package! hledger-mode)
(package! elpher)
(package! multiple-cursors)
(package! gptel
:recipe (:host github
:repo "karthink/gptel"
:files ("*.el")))

View file

@ -24,10 +24,10 @@
# dynamic width from 0 to 300 # dynamic width from 0 to 300
# width = (0, 300) # width = (0, 300)
# constant width of 300 # constant width of 300
width = 300 width = 200
# The maximum height of a single notification, excluding the frame. # The maximum height of a single notification, excluding the frame.
height = 300 height = 200
# Position the notification in the top right corner # Position the notification in the top right corner
origin = top-right origin = top-right
@ -36,7 +36,7 @@
offset = 10x50 offset = 10x50
# Scale factor. It is auto-detected if value is 0. # Scale factor. It is auto-detected if value is 0.
scale = 2 scale = 1
# Maximum number of notification (0 means no limit) # Maximum number of notification (0 means no limit)
notification_limit = 20 notification_limit = 20
@ -58,13 +58,13 @@
progress_bar_min_width = 150 progress_bar_min_width = 150
# Set the maximum width for the progress bar # Set the maximum width for the progress bar
progress_bar_max_width = 300 progress_bar_max_width = 180
# Corner radius for the progress bar. 0 disables rounded corners. # Corner radius for the progress bar. 0 disables rounded corners.
progress_bar_corner_radius = 0 progress_bar_corner_radius = 0
# Corner radius for the icon image. # Corner radius for the icon image.
icon_corner_radius = 2 icon_corner_radius = 0
# Show how many messages are currently hidden (because of # Show how many messages are currently hidden (because of
# notification_limit). # notification_limit).
@ -123,7 +123,7 @@
### Text ### ### Text ###
font = Iosevka 24 font = Iosevka 10
# The spacing between lines. If the height is smaller than the # The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height. # font height, it will get raised to the font height.

View file

@ -9,8 +9,11 @@ This is the fish config I use. It's largely a copy of [[https://gitlab.com/dwt1]
First line removes the path; second line sets it. Without the first line, your path gets massive and fish becomes very slow. First line removes the path; second line sets it. Without the first line, your path gets massive and fish becomes very slow.
#+begin_src fish #+begin_src fish
set -e fish_user_paths set -e fish_user_paths
set -U fish_user_paths $HOME/.local/bin $HOME/Applications $HOME/.cabal/bin $HOME/.ghcup/bin $fish_user_paths set -U fish_user_paths $HOME/apps/bin $HOME/.local/bin $HOME/Applications $HOME/.cabal/bin $HOME/.ghcup/bin $HOME/.deno/bin $fish_user_paths
set -U EDITOR emacsclient -c --alternate-editor=''
set -Ux PASSWORD_STORE_DIR $HOME/enc/keys/pass/
set -U PLANTUML_LIMIT_SIZE 16384
set -e SSH_AGENT_PID set -e SSH_AGENT_PID
if not set -q gnupg_SSH_AUTH_SOCK_by or test $gnupg_SSH_AUTH_SOCK_by -ne $fish_pid if not set -q gnupg_SSH_AUTH_SOCK_by or test $gnupg_SSH_AUTH_SOCK_by -ne $fish_pid

View file

@ -1,6 +1,9 @@
set -e fish_user_paths set -e fish_user_paths
set -U fish_user_paths $HOME/.local/bin $HOME/Applications $HOME/.cabal/bin $HOME/.ghcup/bin $fish_user_paths set -U fish_user_paths $HOME/apps/bin $HOME/.local/bin $HOME/Applications $HOME/.cabal/bin $HOME/.ghcup/bin $HOME/.deno/bin $fish_user_paths
set -U EDITOR emacsclient -c --alternate-editor=''
set -Ux PASSWORD_STORE_DIR $HOME/enc/keys/pass/
set -U PLANTUML_LIMIT_SIZE 16384
set -e SSH_AGENT_PID set -e SSH_AGENT_PID
if not set -q gnupg_SSH_AUTH_SOCK_by or test $gnupg_SSH_AUTH_SOCK_by -ne $fish_pid if not set -q gnupg_SSH_AUTH_SOCK_by or test $gnupg_SSH_AUTH_SOCK_by -ne $fish_pid

View file

@ -1,6 +1,19 @@
# This file contains fish universal variable definitions. # This file contains fish universal variable definitions.
# VERSION: 3.0 # VERSION: 3.0
SETUVAR --export EDITOR:emacsclient\x20\x2dt\x20\x2da\x20\x27\x27
SETUVAR --export OPENAI_KEY:sk\x2dB0HWnLwlztPylJXMpiD2T3BlbkFJfVBvamToU5QseBlGju1s
SETUVAR --export PASSWORD_STORE_DIR:/home/phil/enc/keys/pass/
SETUVAR PLANTUML_LIMIT_SIZE:16384
SETUVAR ZO_CMD:zo
SETUVAR Z_CMD:z
SETUVAR Z_DATA:/home/phil/\x2elocal/share/z/data
SETUVAR Z_DATA_DIR:/home/phil/\x2elocal/share/z
SETUVAR Z_EXCLUDE:\x5e/home/phil\x24
SETUVAR __fish_initialized:3400 SETUVAR __fish_initialized:3400
SETUVAR _fisher_edc_2F_bass_files:\x7e/\x2econfig/fish/functions/__bass\x2epy\x1e\x7e/\x2econfig/fish/functions/bass\x2efish
SETUVAR _fisher_jethrokuan_2F_z_files:\x7e/\x2econfig/fish/functions/__z\x2efish\x1e\x7e/\x2econfig/fish/functions/__z_add\x2efish\x1e\x7e/\x2econfig/fish/functions/__z_clean\x2efish\x1e\x7e/\x2econfig/fish/functions/__z_complete\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/z\x2efish
SETUVAR _fisher_plugins:edc/bass\x1ejethrokuan/z
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_comment:red SETUVAR fish_color_comment:red
SETUVAR fish_color_cwd:green SETUVAR fish_color_cwd:green
@ -24,4 +37,4 @@ SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di
SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR fish_user_paths:/home/phil/\x2elocal/bin\x1e/home/phil/Applications\x1e/home/phil/\x2ecabal/bin\x1e/home/phil/\x2eghcup/bin SETUVAR fish_user_paths:/home/phil/apps/bin\x1e/home/phil/\x2elocal/bin\x1e/home/phil/Applications\x1e/home/phil/\x2ecabal/bin\x1e/home/phil/\x2eghcup/bin\x1e/home/phil/\x2edeno/bin

View file

@ -1,8 +1,8 @@
# monitor=eDP-1, 1920x1080@60, 1920x0, 1
monitor=eDP-2, 1920x1080@60, 1920x0, 1
monitor=HDMI-A-1, 1920x1080@60, 0x0, 1 monitor=HDMI-A-1, 1920x1080@60, 0x0, 1
monitor=eDP-1, 1920x1080@165, 1920x0, 1
monitor=eDP-2, 1920x1080@165, 1920x0, 1
monitor=DP-2, 1920x1080@60, 1920x1080, 1
monitor=DP-1, 1920x1080@60, 3840x0, 1 monitor=DP-1, 1920x1080@60, 3840x0, 1
monitor=DP-2, 1920x1080@60, 1920x1080, 1
input { input {
kb_layout = pl kb_layout = pl
@ -15,12 +15,11 @@ input {
} }
general { general {
gaps_in = 5 gaps_in = 10
gaps_out = 20 gaps_out = 20
border_size = 2 border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.active_border = rgba(33ccffee) rgba(00ff99ee) -45deg
col.inactive_border = rgba(595959aa) col.inactive_border = rgba(595959aa)
layout = master layout = master
} }
@ -28,18 +27,18 @@ decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 0 rounding = 0
blur { blur {
enabled = true enabled = false
size = 3 size = 3
passes = 1 passes = 1
} }
drop_shadow = yes drop_shadow = no
shadow_range = 4 shadow_range = 4
shadow_render_power = 3 shadow_render_power = 3
col.shadow = rgba(1a1a1aee) col.shadow = rgba(1a1a1aee)
} }
animations { animations {
enabled = yes enabled = no
bezier = myBezier, 0.05, 0.9, 0.1, 1.05 bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80% animation = windowsOut, 1, 7, default, popin 80%
@ -57,7 +56,7 @@ dwindle {
master { master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true new_is_master = false
inherit_fullscreen = true inherit_fullscreen = true
mfact = 0.65 mfact = 0.65
} }
@ -68,7 +67,26 @@ gestures {
} }
env = XCURSOR_SIZE,24 env = XCURSOR_SIZE,24
env = HYPRSHOT_DIR,"~/enc/pictures/screenshots"
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = __GL_VRR_ALLOWED,0
env = GDK_BACKEND,wayland,x11,*
env = SDL_VIDEODRIVER,wayland
env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_QPA_PLATFORMTHEME,qt5ct
env = HYPRSHOT_DIR,enc/pictures/screenshots
$mainMod = SUPER $mainMod = SUPER
bind = CTRL_SHIFT_ALT, Q, killactive, bind = CTRL_SHIFT_ALT, Q, killactive,

View file

@ -43,11 +43,11 @@ Config {
-- Ram used number and percent -- Ram used number and percent
, Run Memory ["-t", "<fn=2>\xf233</fn> mem: <used>M <usedratio>%"] 20 , Run Memory ["-t", "<fn=2>\xf233</fn> mem: <used>M <usedratio>%"] 20
-- Disk space free -- Disk space free
, Run DiskU [("/", "<fn=2>\xf0c7</fn> hdd: <free> free")] [] 60 , Run DiskU [("/", "<fn=2>\xf0c7</fn> /: <free> free")] [] 60
-- Echos an "up arrow" icon in front of the uptime output. -- Echos an "up arrow" icon in front of the uptime output.
, Run Com "echo" ["<fn=2>\xf0aa</fn>"] "uparrow" 3600 -- , Run Com "echo" ["<fn=2>\xf0aa</fn>"] "uparrow" 3600
-- Uptime -- Uptime
, Run Uptime ["-t", "uptime: <days>:<hours>:<minutes>"] 360 -- , Run Uptime ["-t", "uptime: <days>:<hours>:<minutes>"] 360
-- Echos a "bell" icon in front of the pacman updates. -- Echos a "bell" icon in front of the pacman updates.
-- , Run Com "echo" ["<fn=2>\xf0f3</fn>"] "bell" 3600 -- , Run Com "echo" ["<fn=2>\xf0f3</fn>"] "bell" 3600
-- Check for pacman updates (script found in .local/bin) -- Check for pacman updates (script found in .local/bin)
@ -64,4 +64,4 @@ Config {
] ]
, sepChar = "%" , sepChar = "%"
, alignSep = "}{" , alignSep = "}{"
, template = "%UnsafeXMonadLog% }{ <box type=Bottom width=2 mb=2 color=#b5bd68><fc=#b5bd68>%cpu%</fc></box> <box type=Bottom width=2 mb=2 color=#e6c547><fc=#e6c547>%memory%</fc></box> <box type=Bottom width=2 mb=2 color=#81a2be><fc=#81a2be>%disku%</fc></box> <box type=Bottom width=2 mb=2 color=#b294bb><fc=#b294bb>%uparrow% %uptime%</fc></box> <box type=Bottom width=2 mb=2 color=#ff3334><fc=#ff3334>%baticon% %battery%</fc></box> <box type=Bottom width=2 mb=2 color=#9ec400><fc=#9ec400>%date%</fc></box> %trayerpad%" , template = "%UnsafeXMonadLog% }{ <box type=Bottom width=2 mb=2 color=#b5bd68><fc=#b5bd68>%cpu%</fc></box> <box type=Bottom width=2 mb=2 color=#e6c547><fc=#e6c547>%memory%</fc></box> <box type=Bottom width=2 mb=2 color=#81a2be><fc=#81a2be>%disku%</fc></box> <box type=Bottom width=2 mb=2 color=#ff3334><fc=#ff3334>%baticon% %battery%</fc></box> <box type=Bottom width=2 mb=2 color=#9ec400><fc=#9ec400>%date%</fc></box> %trayerpad%"

View file

@ -0,0 +1,67 @@
-- Xmobar (http://projects.haskell.org/xmobar/)
-- This is one of the xmobar configurations for DTOS.
-- This config is packaged in the DTOS repo as 'dtos-xmobar'
-- Color scheme: Tomorrow Night
-- Dependencies:
-- otf-font-awesome
-- ttf-mononoki
-- ttf-ubuntu-font-family
-- htop
-- emacs
-- pacman (Arch Linux)
-- trayer
-- 'dtos-local-bin' (from dtos-core-repo)
Config {
font = "xft:Iosevka-12"
, additionalFonts = [ "xft:Mononoki:pixelsize=8:antialias=true:hinting=true"
, "xft:Font Awesome 6 Free Solid:pixelsize=10"
, "xft:Font Awesome 6 Brands:pixelsize=10"
]
, bgColor = "#1d1f21"
, fgColor = "#ffffff"
-- Position TopSize and BottomSize take 3 arguments:
-- an alignment parameter (L/R/C) for Left, Right or Center.
-- an integer for the percentage width, so 100 would be 100%.
-- an integer for the minimum pixel height for xmobar, so 24 would force a height of at least 24 pixels.
-- NOTE: The height should be the same as the trayer (system tray) height.
, position = TopSize L 100 16
, lowerOnStart = True
, hideOnStart = False
, allDesktops = True
, persistent = True
, iconRoot = ".config/xmonad/xpm/" -- default: "."
, commands = [
Run UnsafeXMonadLog
, Run StdinReader
-- Echos a "penguin" icon in front of the kernel output.
-- Run Com "echo" ["<fn=3>\xf17c</fn>"] "penguin" 3600
-- Get kernel version (script found in .local/bin)
-- , Run Com ".local/bin/kernel" [] "kernel" 36000
-- Cpu usage in percent
, Run Cpu ["-t", "<fn=2>\xf108</fn> cpu: <total>%","-H","50","--high","red"] 20
-- Ram used number and percent
, Run Memory ["-t", "<fn=2>\xf233</fn> mem: <used>M <usedratio>%"] 20
-- Disk space free
, Run DiskU [("/", "<fn=2>\xf0c7</fn> /: <free> free")] [] 60
-- Echos an "up arrow" icon in front of the uptime output.
-- , Run Com "echo" ["<fn=2>\xf0aa</fn>"] "uparrow" 3600
-- Uptime
-- , Run Uptime ["-t", "uptime: <days>:<hours>:<minutes>"] 360
-- Echos a "bell" icon in front of the pacman updates.
-- , Run Com "echo" ["<fn=2>\xf0f3</fn>"] "bell" 3600
-- Check for pacman updates (script found in .local/bin)
-- , Run Com ".local/bin/pacupdate" [] "pacupdate" 36000
-- Echos a "battery" icon in front of the pacman updates.
, Run Com "echo" ["<fn=2>\xf242</fn>"] "baticon" 3600
-- Battery
, Run BatteryP ["BAT0"] ["-t", "<acstatus><watts> <left>%"] 360
-- Time and date
, Run Date "<fn=2>\xf017</fn>%d.%m.%Y %H:%M " "date" 50
-- Script that dynamically adjusts xmobar padding depending on number of trayer icons.
--, Run Com ".config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20
-- Prints out the left side items such as workspaces, layout, etc.
]
, sepChar = "%"
, alignSep = "}{"
, template = "%UnsafeXMonadLog% }{ <box type=Bottom width=2 mb=2 color=#b5bd68><fc=#b5bd68>%cpu%</fc></box> <box type=Bottom width=2 mb=2 color=#e6c547><fc=#e6c547>%memory%</fc></box> <box type=Bottom width=2 mb=2 color=#81a2be><fc=#81a2be>%disku%</fc></box> <box type=Bottom width=2 mb=2 color=#ff3334><fc=#ff3334>%baticon% %battery%</fc></box> <box type=Bottom width=2 mb=2 color=#9ec400><fc=#9ec400>%date%</fc></box>"

View file

@ -0,0 +1 @@
tomorrow-night-xmobarrc-no-trayer

View file

@ -265,8 +265,11 @@ I'm Polish, so I type on a Polish layout. I also extensively use the compose key
**** Wallpaper **** Wallpaper
Randomize wallpaper. Requires /feh/. You can change the path to any directory with wallpapers for consistent variety. Randomize wallpaper. Requires /feh/. You can change the path to any directory with wallpapers for consistent variety.
#+begin_src haskell #+begin_src haskell
spawnOnce "feh --randomize --bg-fill /usr/share/backgrounds/archlinux/*" spawnOnce "feh --recursive --randomize --bg-fill /mnt/ext1/media/Images/Wallpapers/*"
#+end_src #+end_src
#+RESULTS:
**** Trayer **** Trayer
Trayer is a system tray, which works well with XMobar. This restarts it every time XMonad is reinitialized to avoid weirdness. Trayer is a system tray, which works well with XMobar. This restarts it every time XMonad is reinitialized to avoid weirdness.
#+begin_src haskell #+begin_src haskell
@ -343,8 +346,9 @@ myXmobarPP = def
#+end_src #+end_src
#+begin_src haskell #+begin_src haskell
xmobar0 = statusBarProp "xmobar -x 0 ~/.config/xmobar/xmobarrc" (pure myXmobarPP) xmobar0 = statusBarProp "xmobar -x 0 ~/.config/xmobar/xmobarrc" (pure myXmobarPP)
xmobar1 = statusBarProp "xmobar -x 1 ~/.config/xmobar/xmobarrc" (pure myXmobarPP) xmobar1 = statusBarProp "xmobar -x 1 ~/.config/xmobar/xmobarrc-no-trayer" (pure myXmobarPP)
xmobar2 = statusBarProp "xmobar -x 2 ~/.config/xmobar/xmobarrc" (pure myXmobarPP) xmobar2 = statusBarProp "xmobar -x 2 ~/.config/xmobar/xmobarrc-no-trayer" (pure myXmobarPP)
xmobar3 = statusBarProp "xmobar -x 3 ~/.config/xmobar/xmobarrc-no-trayer" (pure myXmobarPP)
#+end_src #+end_src
* Main XMonad loop * Main XMonad loop
@ -354,11 +358,12 @@ main = do
#+end_src #+end_src
** XMobar ** XMobar
Launching three instances of xmobar on their monitors. Launching four instances of xmobar on their monitors.
#+begin_src haskell :tangle no #+begin_src haskell :tangle no
xmproc0 <- spawnPipe ("xmobar -x 0 $HOME/.config/xmobar/xmobarrc") xmproc0 <- spawnPipe ("xmobar -x 0 $HOME/.config/xmobar/xmobarrc")
xmproc1 <- spawnPipe ("xmobar -x 1 $HOME/.config/xmobar/xmobarrc") xmproc1 <- spawnPipe ("xmobar -x 1 $HOME/.config/xmobar/xmobarrc-no-trayer")
xmproc2 <- spawnPipe ("xmobar -x 2 $HOME/.config/xmobar/xmobarrc") xmproc2 <- spawnPipe ("xmobar -x 2 $HOME/.config/xmobar/xmobarrc-no-trayer")
xmproc3 <- spawnPipe ("xmobar -x 3 $HOME/.config/xmobar/xmobarrc-no-trayer")
#+end_src #+end_src
** XMonad & manageHook ** XMonad & manageHook

View file

@ -139,7 +139,7 @@ myStartupHook = do
spawnOnce "gocryptfs ~/.bajsicki enc --extpass lxqt-openssh-askpass" spawnOnce "gocryptfs ~/.bajsicki enc --extpass lxqt-openssh-askpass"
spawnOnce "feh --randomize --bg-fill /usr/share/backgrounds/archlinux/*" spawnOnce "feh --recursive --randomize --bg-fill /mnt/ext1/media/Images/Wallpapers/*"
spawn "killall trayer" -- kill current trayer on each spawn "killall trayer" -- kill current trayer on each
spawn ("sleep 2 && trayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 " ++ colorTrayer ++ " --height 20") spawn ("sleep 2 && trayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 " ++ colorTrayer ++ " --height 20")
@ -192,8 +192,9 @@ myXmobarPP = def
lowWhite = xmobarColor "#bbbbbb" "" lowWhite = xmobarColor "#bbbbbb" ""
xmobar0 = statusBarProp "xmobar -x 0 ~/.config/xmobar/xmobarrc" (pure myXmobarPP) xmobar0 = statusBarProp "xmobar -x 0 ~/.config/xmobar/xmobarrc" (pure myXmobarPP)
xmobar1 = statusBarProp "xmobar -x 1 ~/.config/xmobar/xmobarrc" (pure myXmobarPP) xmobar1 = statusBarProp "xmobar -x 1 ~/.config/xmobar/xmobarrc-no-trayer" (pure myXmobarPP)
xmobar2 = statusBarProp "xmobar -x 2 ~/.config/xmobar/xmobarrc" (pure myXmobarPP) xmobar2 = statusBarProp "xmobar -x 2 ~/.config/xmobar/xmobarrc-no-trayer" (pure myXmobarPP)
xmobar3 = statusBarProp "xmobar -x 2 ~/.config/xmobar/xmobarrc-no-trayer" (pure myXmobarPP)
main :: IO () main :: IO ()
main = do main = do

View file

@ -11,8 +11,8 @@ export _JAVA_AWT_WM_NONREPARENTING=1
export XCURSOR_SIZE=24 export XCURSOR_SIZE=24
export WLR_RENDERER=vulkan export WLR_RENDERER=vulkan
export PLANTUML_LIMIT_SIZE=16384 export PLANTUML_LIMIT_SIZE=16384
export XKB_DEFAULT_LAYOUT="pl" export XKB_DEFAULT_LAYOUT="pl"
export XKB_DEFAULT_OPTIONS="compose:rctrl" export XKB_DEFAULT_OPTIONS="compose:rctrl"
sway --unsupported-gpu & val=$(udevadm info -a -n /dev/dri/card1 | grep boot_vga | rev | cut -c 2)
WLR_DRM_DEVICES="/dev/dri/card$val" sway