Restart emacs, fix ssh

This commit is contained in:
2023-11-23 11:07:06 +01:00
parent b3b25f1b6a
commit 5725c26fac
11 changed files with 948 additions and 415 deletions

View File

@ -1,3 +1,28 @@
;;; +agenda-fix.el --- Description -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2023 Colin Powell
;;
;; Author: Colin Powell <colin@unbl.ink>
;; Maintainer: Colin Powell <colin@unbl.ink>
;; Created: November 14, 2023
;; Modified: November 14, 2023
;; Version: 0.0.1
;; Keywords: abbrev bib c calendar comm convenience data docs emulations extensions faces files frames games hardware help hypermedia i18n internal languages lisp local maint mail matching mouse multimedia news outlines processes terminals tex tools unix vc wp
;; Homepage: https://github.com/powellc/+pdf-page-nums
;; Package-Requires: ((emacs "24.3"))
;;
;; This file is not part of GNU Emacs.
;;
;;; Commentary:
;;; Provides some helper functions that dynamically include files in a cache for org mode agenda.
;;
;; Description
;;
;;; Code:
(provide '+agenda-fix)
(defun vulpea-project-p ()
"Return non-nil if current buffer has any todo entry.
@ -14,24 +39,24 @@ tasks."
(org-element-property :todo-type h)))))
(defun vulpea-project-update-tag ()
"Update PROJECT tag in the current buffer."
(when (and (not (active-minibuffer-window))
(vulpea-buffer-p))
(save-excursion
(goto-char (point-min))
(let* ((tags (vulpea-buffer-tags-get))
(original-tags tags))
(if (vulpea-project-p)
(setq tags (cons "project" tags))
(setq tags (remove "project" tags)))
"Update PROJECT tag in the current buffer."
(when (and (not (active-minibuffer-window))
(vulpea-buffer-p))
(save-excursion
(goto-char (point-min))
(let* ((tags (vulpea-buffer-tags-get))
(original-tags tags))
(if (vulpea-project-p)
(setq tags (cons "project" tags))
(setq tags (remove "project" tags)))
;; cleanup duplicates
(setq tags (seq-uniq tags))
;; cleanup duplicates
(setq tags (seq-uniq tags))
;; update tags if changed
(when (or (seq-difference tags original-tags)
(seq-difference original-tags tags))
(apply #'vulpea-buffer-tags-set tags))))))
;; update tags if changed
(when (or (seq-difference tags original-tags)
(seq-difference original-tags tags))
(apply #'vulpea-buffer-tags-set tags))))))
(defun vulpea-buffer-p ()
"Return non-nil if the currently visited buffer is a note."
@ -41,16 +66,16 @@ tasks."
(file-name-directory buffer-file-name))))
(defun vulpea-project-files ()
"Return a list of note files containing 'project' tag." ;
(seq-uniq
(seq-map
#'car
(org-roam-db-query
[:select [nodes:file]
:from tags
:left-join nodes
:on (= tags:node-id nodes:id)
:where (like tag (quote "%\"project\"%"))]))))
"Return a list of note files containing 'project' tag." ;
(seq-uniq
(seq-map
#'car
(org-roam-db-query
[:select [nodes:file]
:from tags
:left-join nodes
:on (= tags:node-id nodes:id)
:where (like tag (quote "%\"project\"%"))]))))
(defun vulpea-agenda-files-update (&rest _)
"Update the value of `org-agenda-files'."

View File

@ -0,0 +1,60 @@
;;; +pdf-page-nums.el --- Description -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2023 Colin Powell
;;
;; Author: Colin Powell <colin@unbl.ink>
;; Maintainer: Colin Powell <colin@unbl.ink>
;; Created: November 14, 2023
;; Modified: November 14, 2023
;; Version: 0.0.1
;; Keywords: abbrev bib c calendar comm convenience data docs emulations extensions faces files frames games hardware help hypermedia i18n internal languages lisp local maint mail matching mouse multimedia news outlines processes terminals tex tools unix vc wp
;; Homepage: https://github.com/powellc/+pdf-page-nums
;; Package-Requires: ((emacs "24.3"))
;;
;; This file is not part of GNU Emacs.
;;
;;; Commentary:
;;
;; Description
;;
;;; Code:
(provide '+pdf-page-nums)
(doom-modeline-def-segment buffer-name
"Display the current buffer's name, without any other information."
(concat
doom-modeline-spc
(doom-modeline--buffer-name)))
(doom-modeline-def-segment pdf-icon
"PDF icon from nerd-icons."
(concat
doom-modeline-spc
(doom-modeline-icon 'mdicon "nf-md-file_pdf_box" nil nil
:face (if (doom-modeline--active)
'nerd-icons-red
'mode-line-inactive))))
(defun doom-modeline-update-pdf-pages ()
"Update PDF pages."
(setq doom-modeline--pdf-pages
(let ((current-page-str (number-to-string (eval `(pdf-view-current-page))))
(total-page-str (number-to-string (pdf-cache-number-of-pages))))
(concat
(propertize
(concat (make-string (- (length total-page-str) (length current-page-str)) ? )
" P" current-page-str)
'face 'mode-line)
(propertize (concat "/" total-page-str) 'face 'doom-modeline-buffer-minor-mode)))))
(doom-modeline-def-segment pdf-pages
"Display PDF pages."
(if (doom-modeline--active) doom-modeline--pdf-pages
(propertize doom-modeline--pdf-pages 'face 'mode-line-inactive)))
(doom-modeline-def-modeline 'pdf
'(bar window-number pdf-pages pdf-icon buffer-name)
'(misc-info matches major-mode process vcs))
;;; +pdf-page-nums.el ends here

View File

@ -0,0 +1,153 @@
;;; +roam.el --- Description -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2023 Colin Powell
;;
;; Author: Colin Powell <colin@unbl.ink>
;; Maintainer: Colin Powell <colin@unbl.ink>
;; Created: November 14, 2023
;; Modified: November 14, 2023
;; Version: 0.0.1
;; Keywords: abbrev bib c calendar comm convenience data docs emulations extensions faces files frames games hardware help hypermedia i18n internal languages lisp local maint mail matching mouse multimedia news outlines processes terminals tex tools unix vc wp
;; Homepage: https://github.com/powellc/+pdf-page-nums
;; Package-Requires: ((emacs "24.3"))
;;
;; This file is not part of GNU Emacs.
;;
;;; Commentary:
;;
;; Description
;;
;;; Code:
(provide '+roam-plus)
(use-package! org-roam
:after org
:init
(setq org-roam-directory (concat org-directory "/Org-roam/")
org-roam-completion-everywhere nil
;;Functions tags are special types of tags which tells what the node are for
;;In the future, this should probably be replaced by categories
hp/org-roam-function-tags '("compilation" "argument" "journal" "concept" "tool" "data" "bio" "literature" "event" "website"))
:config
;; Org-roam interface
(cl-defmethod org-roam-node-hierarchy ((node org-roam-node))
"Return the node's TITLE, as well as it's HIERACHY."
(let* ((title (org-roam-node-title node))
(olp (mapcar (lambda (s) (if (> (length s) 10) (concat (substring s 0 10) "...") s)) (org-roam-node-olp node)))
(level (org-roam-node-level node))
(filetitle (org-roam-get-keyword "TITLE" (org-roam-node-file node)))
(filetitle-or-name (if filetitle filetitle (file-name-nondirectory (org-roam-node-file node))))
(shortentitle (if (> (length filetitle-or-name) 20) (concat (substring filetitle-or-name 0 20) "...") filetitle-or-name))
(separator (concat " " (nerd-icons-octicon "nf-oct-chevron_right") " ")))
(cond
((= level 1) (concat (propertize (format "=level:%d=" level) 'display
(nerd-icons-faicon "nf-fa-file" :face 'nerd-icons-dyellow))
(propertize shortentitle 'face 'org-roam-olp) separator title))
((= level 2) (concat (propertize (format "=level:%d=" level) 'display
(nerd-icons-faicon "nf-fa-file" :face 'nerd-icons-dsilver))
(propertize (concat shortentitle separator (string-join olp separator)) 'face 'org-roam-olp)
separator title))
((> level 2) (concat (propertize (format "=level:%d=" level) 'display
(nerd-icons-faicon "nf-fa-file" :face 'org-roam-olp))
(propertize (concat shortentitle separator (string-join olp separator)) 'face 'org-roam-olp) separator title))
(t (concat (propertize (format "=level:%d=" level) 'display
(nerd-icons-faicon "nf-fa-file" :face 'nerd-icons-yellow))
(if filetitle title (propertize filetitle-or-name 'face 'nerd-icons-dyellow)))))))
(cl-defmethod org-roam-node-functiontag ((node org-roam-node))
"Return the FUNCTION TAG for each node. These tags are intended to be unique to each file, and represent the note's function.
journal data literature"
(let* ((tags (seq-filter (lambda (tag) (not (string= tag "ATTACH"))) (org-roam-node-tags node))))
(concat
;; Argument or compilation
(cond
((member "argument" tags)
(propertize "=f:argument=" 'display
(nerd-icons-mdicon "nf-md-forum" :face 'nerd-icons-dred)))
((member "compilation" tags)
(propertize "=f:compilation=" 'display
(nerd-icons-mdicon "nf-md-format_list_text" :face 'nerd-icons-dyellow)))
(t (propertize "=f:empty=" 'display
(nerd-icons-codicon "nf-cod-remove" :face 'org-hide))))
;; concept, bio, data or event
(cond
((member "concept" tags)
(propertize "=f:concept=" 'display
(nerd-icons-mdicon "nf-md-blur" :face 'nerd-icons-dblue)))
((member "tool" tags)
(propertize "=f:tool=" 'display
(nerd-icons-mdicon "nf-md-tools" :face 'nerd-icons-dblue)))
((member "bio" tags)
(propertize "=f:bio=" 'display
(nerd-icons-octicon "nf-oct-people" :face 'nerd-icons-dblue)))
((member "event" tags)
(propertize "=f:event=" 'display
(nerd-icons-codicon "nf-cod-symbol_event" :face 'nerd-icons-dblue)))
((member "data" tags)
(propertize "=f:data=" 'display
(nerd-icons-mdicon "nf-md-chart_arc" :face 'nerd-icons-dblue)))
(t (propertize "=f:nothing=" 'display
(nerd-icons-codicon "nf-cod-remove" :face 'org-hide))))
;; literature
(cond
((member "literature" tags)
(propertize "=f:literature=" 'display
(nerd-icons-mdicon "nf-md-bookshelf" :face 'nerd-icons-dcyan)))
((member "website" tags)
(propertize "=f:website=" 'display
(nerd-icons-mdicon "nf-md-web" :face 'nerd-icons-dsilver)))
(t (propertize "=f:nothing=" 'display
(nerd-icons-codicon "nf-cod-remove" :face 'org-hide))))
;; journal
)))
(cl-defmethod org-roam-node-othertags ((node org-roam-node))
"Return the OTHER TAGS of each notes."
(let* ((tags (seq-filter (lambda (tag) (not (string= tag "ATTACH"))) (org-roam-node-tags node)))
(specialtags hp/org-roam-function-tags)
(othertags (seq-difference tags specialtags 'string=)))
(propertize
(string-join
(append '(" ") othertags)
(propertize "#" 'display
(nerd-icons-faicon "nf-fa-hashtag" :face 'nerd-icons-dgreen)))
'face 'nerd-icons-dgreen)))
(cl-defmethod org-roam-node-backlinkscount ((node org-roam-node))
(let* ((count (caar (org-roam-db-query
[:select (funcall count source)
:from links
:where (= dest $s1)
:and (= type "id")]
(org-roam-node-id node)))))
(if (> count 0)
(concat (propertize "=has:backlinks=" 'display
(nerd-icons-mdicon "nf-md-link" :face 'nerd-icons-blue)) (format "%d" count))
(concat " " (propertize "=not-backlinks=" 'display
(nerd-icons-mdicon "nf-md-link" :face 'org-hide)) " "))))
(cl-defmethod org-roam-node-directories ((node org-roam-node))
(if-let ((dirs (file-name-directory (file-relative-name (org-roam-node-file node) org-roam-directory))))
(concat
(if (string= "journal/" dirs)
(nerd-icons-mdicon "nf-md-fountain_pen_tip" :face 'nerd-icons-dsilver)
(nerd-icons-mdicon "nf-md-folder" :face 'nerd-icons-dsilver))
(propertize (string-join (f-split dirs) "/") 'face 'nerd-icons-dsilver) " ")
""))
(defun +marginalia--time-colorful (time)
(let* ((seconds (float-time (time-subtract (current-time) time)))
(color (doom-blend
(face-attribute 'marginalia-on :foreground nil t)
(face-attribute 'marginalia-off :foreground nil t)
(/ 1.0 (log (+ 3 (/ (+ 1 seconds) 345600.0)))))))
;; 1 - log(3 + 1/(days + 1)) % grey
(propertize (marginalia--time time) 'face (list :foreground color :slant 'italic))))
(setq org-roam-node-display-template
(concat "${backlinkscount:16} ${functiontag} ${directories}${hierarchy}${othertags} ")
org-roam-node-annotation-function
(lambda (node) (+marginalia--time-colorful (org-roam-node-file-mtime node))))
)

View File

@ -1,115 +1,31 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
(setq user-full-name "Colin Powell"
user-mail-address "colin@unbl.ink")
;;(setq ivy-read-action-function #'ivy-hydra-read-action)
(add-to-list 'load-path "~/.config/doom/")
(defun file-notify-rm-all-watches ()
"Remove all existing file notification watches from Emacs."
(interactive)
(maphash
(lambda (key _value)
(file-notify-rm-watch key))
file-notify-descriptors))
(pixel-scroll-precision-mode t)
(nyan-mode) ;; progress in the form of a rainbow cat.
(setq doom-theme 'moe-dark
doom-font (font-spec :family "IBM Plex Mono" :size 13 :weight 'regular)
doom-big-font (font-spec :family "IBM Plex Mono" :size 17 :weight 'regular)
(setq doom-theme 'doom-one
doom-font (font-spec :family "Iosevka" :size 14 :weight 'regular)
doom-big-font (font-spec :family "Iosevka" :size 18 :weight 'regular)
doom-variable-pitch-font (font-spec :family "Overpass" :size 12))
;; Applies to current frame
;(set-frame-parameter nil 'internal-border-width 10) ; applies to the current frame
;; If we create new frames (via emacsclient) this will do the trick
;(add-to-list 'default-frame-alist '(internal-border-width . 10))
(nyan-mode) ;; progress in the form of a rainbow cat.
(add-hook 'after-init-hook #'global-emojify-mode) ;; emojis?!
(add-hook 'prog-mode-hook #'goto-address-mode) ;; linify links!
(setq eww-search-prefix "https://search.unbl.ink/?q=")
(map! ;; Easier window movement
:n "C-h" 'evil-window-left
:n "C-j" 'evil-window-down
:n "C-k" 'evil-window-up
:n "C-l" 'evil-window-right
:n "C-h" 'evil-window-left
:n "C-j" 'evil-window-down
:n "C-k" 'evil-window-up
:n "C-l" 'evil-window-right
(:map evil-treemacs-state-map
"C-h" 'evil-window-left
"C-l" 'evil-window-right)
(:map evil-treemacs-state-map
"C-h" 'evil-window-left
"C-l" 'evil-window-right))
:leader
(:prefix "f"
:desc "Find file in dotfiles" "t" #'+hlissner/find-in-dotfiles
:desc "Browse dotfiles" "T" #'+hlissner/browse-dotfiles)
(:prefix "o"
:desc "(H)ckrnews" "H" #'hackernews
:desc "(R)SS" "R" #'=rss
:desc "(M)ail" "M" #'=notmuch
:desc "(L)obste.rs" "L" #'ivy-lobsters)
(:prefix "b"
:desc "Black format buffer" "f" #'blacken-buffer
:desc "isort buffer" "I" #'py-isort-buffer
:desc "Links in buffer" "l" #'ace-link-org)
(:prefix "s"
:desc "Copy link hints" "c" #'link-hint-copy-link
:desc "Search the web" "w" #'web-search
:desc "Goto URL in eww" "u" #'eww-browse-url
:desc "Search in eww" "3" #'eww-search-words
:desc "Search all the things" "g" #'deadgrep))
(setq libmpdel-hostname "mpd.play.unbl.ink")
(defun mpdel-playlist-play ()
"Start playing the song at point."
(interactive)
(if (derived-mode-p 'mpdel-playlist-current-playlist-mode)
(libmpdel-play-song (navigel-entity-at-point))
(mpdel-core-insert-current-playlist)))
(map! :leader
(:prefix "-"
:desc "MPD Open playlist" "-" #'mpdel-playlist-open
:desc "MPD Remove at point" "d" #'mpdel-playlist-delete
:desc "MPD Start at point" "s" #'mpdel-playlist-play
:desc "MPD Next track" "n" #'libmpdel-playback-next
:desc "MPD Previous track" "p" #'libmpdel-playback-previous))
(setq elfeed-protocol-fever-maxsize 100)
(setq elfeed-feeds '(("fever+https://secstate@rss.unbl.ink"
:api-url "https://rss.unbl.ink/fever/"
:password "password"
:autotags '(("rss.unbl.ink")))))
;(setq elfeed-protocol-log-trace t)
(setq elfeed-protocol-fever-maxsize 50)
;(setq elfeed-log-level 'debug)
(elfeed-protocol-enable)
(map! :leader
(:prefix "r"
:desc "Open Elfeed" "r" #'elfeed
:desc "Update Elfeed" "u" #'elfeed-update))
;; Schedule feed update for every 15 minutes
(run-at-time 300 300
(lambda () (when (= elfeed-curl-queue-active 0)
(elfeed-update))))
;;;;; Database auto-save
;; Save elfeed db automatically, because if Emacs crashes or is killed (which happens to me
;; occasionally, especially since I develop packages in a single instance), we'd lose the db
;; updates not saved.
(unless (cl-loop for timer in timer-idle-list
thereis (equal (aref timer 5) #'elfeed-db-save))
(run-with-idle-timer 400 'repeat #'elfeed-db-save))
(setq elfeed-search-filter "@2-days-ago +unread")
(defun elfeed-search-format-date (date)
(format-time-string "%Y-%m-%d %H:%M" (seconds-to-time date)))
; Serif font in Elfeed
(add-hook! 'elfeed-mode-hook 'variable-pitch-mode)
(add-hook! 'elfeed-show-mode-hook (text-scale-set 1.2))
(defun unfill-paragraph ()
"Takes a multi-line paragraph and makes it into a single line of text."
@ -119,106 +35,49 @@
(define-key global-map "\M-z" 'unfill-paragraph)
(flycheck-define-checker vale
"A checker for prose"
:command ("vale" "--output" "line"
source)
:standard-input nil
:error-patterns
((error line-start (file-name) ":" line ":" column ":" (id (one-or-more (not (any ":")))) ":" (message) line-end))
:modes (markdown-mode org-mode text-mode)
)
(add-to-list 'flycheck-checkers 'vale 'append)
(defun file-notify-rm-all-watches ()
"Remove all existing file notification watches from Emacs."
(interactive)
(maphash
(lambda (key _value)
(file-notify-rm-watch key))
file-notify-descriptors))
(setq +format-on-save-enabled-modes
'(not emacs-lisp-mode ; elisp's mechanisms are good enough
sql-mode ; sqlformat is currently broken
tex-mode ; latexindent is broken
org-mode
html-mode
latex-mode))
'(not
emacs-lisp-mode ; elisp's mechanisms are good enough
sql-mode ; sqlformat is currently broken
tex-mode ; latexindent is broken
org-mode
html-mode
latex-mode))
(setq frame-title-format
'(""
(:eval
(if (s-contains-p org-roam-directory (or buffer-file-name ""))
(replace-regexp-in-string
".*/[0-9]*-?" ""
(subst-char-in-string ?_ ? buffer-file-name))
"%b"))
(:eval
(let ((project-name (projectile-project-name)))
(unless (string= "-" project-name)
(format (if (buffer-modified-p) " ◉ %s" "  ●  %s") project-name))))))
(load! "+agenda-fix")
(defun vulpea-agenda-files-update (&rest _)
(setq org-agenda-files vulpea-project-files))
(setq org-roam-directory "~/var/org/"
org-roam-dailies-directory "dailies")
(advice-add 'org-agenda :before #'vulpea-agenda-files-update)
(advice-add 'org-todo-list :before #'vulpea-agenda-files-update)
(add-hook 'org-mode-hook #'doom-disable-line-numbers-h)
(after! org
(setq org-directory (expand-file-name "~/var/org/")
org-ellipsis ""
org-image-actual-width '(600)
org-log-done 'time
org-fontify-quote-and-verse-blocks t
org-agenda-dim-blocked-tasks nil
org-pretty-entities t
org-fancy-priorities-list '("🅰" "🅱" "🅲" "🅳" "🅴")
org-modules '(ol-eshell
ol-notmuch
ob-eval
ob-exp
ob-http
org-id)))
;; Refiling
(setq org-refile-targets '((vulpea-project-files :maxlevel . 9)))
(setq org-outline-path-complete-in-steps nil) ; Refile in a single go
(setq org-refile-use-outline-path t) ; Show full paths for refiling
(setq +inbox-file "~/var/org/index.org")
(defun +open-inbox-file ()
(interactive)
"Opens the inbox file"
(find-file +inbox-file))
(map!
:leader
:desc "Open inbox" "I" #'+open-inbox-file
:desc "Open today" "d" #'org-roam-dailies-goto-today
:desc "Save all org buffers" "A" #'org-save-all-org-buffers)
(setq org-roam-directory "~/var/org/")
(setq org-roam-dailies-directory "dailies")
(require 'justify-kp)
;(setq nov-text-width t)
(setq nov-text-width 100)
(defun my-nov-window-configuration-change-hook ()
(my-nov-post-html-render-hook)
(remove-hook 'window-configuration-change-hook
'my-nov-window-configuration-change-hook
t))
(defun my-nov-post-html-render-hook ()
(if (get-buffer-window)
(let ((max-width (pj-line-width))
buffer-read-only)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(when (not (looking-at "^[[:space:]]*$"))
(goto-char (line-end-position))
(when (> (shr-pixel-column) max-width)
(goto-char (line-beginning-position))
(pj-justify)))
(forward-line 1))))
(add-hook 'window-configuration-change-hook
'my-nov-window-configuration-change-hook
nil t)))
(add-hook 'nov-post-html-render-hook 'my-nov-post-html-render-hook)
(defun my-nov-font-setup ()
(face-remap-add-relative 'variable-pitch :family "Noto Serif Regular"
:height 1.0
:size 16))
(add-hook 'nov-mode-hook 'my-nov-font-setup)
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
;(add-hook 'nov-mode-hook 'variable-pitch-mode)
(setq display-line-numbers-type 'normal)
(remove-hook! '(org-mode-hook) #'display-line-numbers-mode)
(setq mm-text-html-renderer 'w3m)
(setq w3m-fill-column 88)
@ -246,17 +105,17 @@
)
(map! :leader
(:prefix "e"
:desc "(s)end queued mail" "s" #'smtpmail-send-queued-mail
:desc "Open (i)nbox" "i" #'=notmuch
:desc "Open (n)otmuch" "n" #'notmuch
:desc "(C)ompose mail" "c" #'notmuch-mua-new-mail))
(:prefix "e"
:desc "(s)end queued mail" "s" #'smtpmail-send-queued-mail
:desc "Open (i)nbox" "i" #'=notmuch
:desc "Open (n)otmuch" "n" #'notmuch
:desc "(C)ompose mail" "c" #'notmuch-mua-new-mail))
(after! eshell
(set-eshell-alias!
"djtest" "DJANGO_SETTINGS_MODULE=ff.settings.ci python manage.py test $*"
"djsh" "~/src/github.com/sureapp/surepreme/make shell"
"djpytest" "DJANGO_SETTINGS_MODULE=ff.settings.ci pytest --reuse-db --black --flake8 --isort --durations=3 $*"
"ffsh" "python ~/src/github.com/15five/fifteen5/manage.py shell_plus"
"surep" "cd ~/src/github.com/sureapp/surepreme/"
"ffdev" "ssh dev-ff.local "
"f" "(other-window 1) && find-file $1"
"l" "ls -lh"
@ -272,75 +131,4 @@
lsp-modeline-code-actions-enable 1
lsp-modeline-diagnostics-enable 1
lsp-completion-show-detail 1
lsp-file-watch-threshold nil
)
(use-package lsp-mode
:commands lsp
:diminish lsp-mode
:hook
(elixir-mode . lsp)
:init
(add-to-list 'exec-path "~/.emacs.d/var/elixir-ls"))
(setq mastodon-instance-url "https://fosstodon.org"
mastodon-active-user "colin@unbl.ink")
(map! :leader
(:prefix "="
:desc "Open mastodon" "=" #'mastodon
:desc "Update Mastodon timeline" "u" #'mastodon-tl--update
:desc "More Mastodon timeline" "m" #'mastodon-tl--more
:desc "Toot to Mastodon" "t" #'mastodon-toot))
(load! "beancount")
(require 'beancount)
(add-to-list 'auto-mode-alist '("\\.beancount\\'" . beancount-mode))
(define-derived-mode
pandoc-view-mode
markdown-mode
"pandoc-view-mode"
"View pandoc processing of docx file using markdown mode."
(erase-buffer)
(let* ((pandoc (executable-find "pandoc")))
(insert (shell-command-to-string
(concat pandoc " --wrap=none " (shell-quote-argument (buffer-file-name)) " -t markdown"))))
(not-modified)
(read-only-mode t))
(add-to-list 'auto-mode-alist '("\\.docx\\'" . pandoc-view-mode))
(after! magit
(magit-wip-after-save-mode t)
(magit-wip-after-apply-mode t)
(setq magit-save-repository-buffers 'dontask
magit-repository-directories '(("~/src/" . 3)
("~/.dotfiles/" . 0))
magit-popup-display-buffer-action nil ;; Not sure why this is here, wonder what it does
magit-display-file-buffer-function #'switch-to-buffer-other-window
magithub-clone-default-directory "~/src" ;; I want my stuff to clone to ~/projects
magithub-preferred-remote-method 'ssh_url)) ;; HTTPS cloning is awful, i authenticate with ssh keys.
; Show gravatars in magit
(setq magit-revision-show-gravatars '("^Author: " . "^Commit: "))
(when (require 'openwith nil 'noerror)
(setq openwith-associations
(list
(list (openwith-make-extension-regexp
'("mpg" "mpeg" "mp3" "mp4"
"avi" "wmv" "wav" "mov" "flv"
"ogm" "ogg" "mkv"))
"vlc"
'(file))
(list (openwith-make-extension-regexp
'("pdf" "ps" "ps.gz" "dvi"))
"zathura"
'(file))
))
(openwith-mode 1))
(setq org-reveal-root "file:///path-to-reveal.js")
(setq org-reveal-title-slide nil)
lsp-file-watch-threshold nil)

View File

@ -0,0 +1,348 @@
(setq user-full-name "Colin Powell"
user-mail-address "colin@unbl.ink")
;;(setq ivy-read-action-function #'ivy-hydra-read-action)
(defun file-notify-rm-all-watches ()
"Remove all existing file notification watches from Emacs."
(interactive)
(maphash
(lambda (key _value)
(file-notify-rm-watch key))
file-notify-descriptors))
(setq doom-theme 'moe-dark
doom-font (font-spec :family "IBM Plex Mono" :size 13 :weight 'regular)
doom-big-font (font-spec :family "IBM Plex Mono" :size 17 :weight 'regular)
doom-variable-pitch-font (font-spec :family "Overpass" :size 12))
;; Applies to current frame
;(set-frame-parameter nil 'internal-border-width 10) ; applies to the current frame
;; If we create new frames (via emacsclient) this will do the trick
;(add-to-list 'default-frame-alist '(internal-border-width . 10))
(nyan-mode) ;; progress in the form of a rainbow cat.
(add-hook 'after-init-hook #'global-emojify-mode) ;; emojis?!
(add-hook 'prog-mode-hook #'goto-address-mode) ;; linify links!
(setq eww-search-prefix "https://search.unbl.ink/?q=")
(map! ;; Easier window movement
:n "C-h" 'evil-window-left
:n "C-j" 'evil-window-down
:n "C-k" 'evil-window-up
:n "C-l" 'evil-window-right
(:map evil-treemacs-state-map
"C-h" 'evil-window-left
"C-l" 'evil-window-right)
:leader
(:prefix "f"
:desc "Find file in dotfiles" "t" #'+hlissner/find-in-dotfiles
:desc "Browse dotfiles" "T" #'+hlissner/browse-dotfiles)
(:prefix "o"
:desc "(H)ckrnews" "H" #'hackernews
:desc "(R)SS" "R" #'=rss
:desc "(M)ail" "M" #'=notmuch
:desc "(L)obste.rs" "L" #'ivy-lobsters)
(:prefix "b"
:desc "Black format buffer" "f" #'blacken-buffer
:desc "isort buffer" "I" #'py-isort-buffer
:desc "Links in buffer" "l" #'ace-link-org)
(:prefix "s"
:desc "Copy link hints" "c" #'link-hint-copy-link
:desc "Search the web" "w" #'web-search
:desc "Goto URL in eww" "u" #'eww-browse-url
:desc "Search in eww" "3" #'eww-search-words
:desc "Search all the things" "g" #'deadgrep))
(setq libmpdel-hostname "mpd.play.unbl.ink")
(defun mpdel-playlist-play ()
"Start playing the song at point."
(interactive)
(if (derived-mode-p 'mpdel-playlist-current-playlist-mode)
(libmpdel-play-song (navigel-entity-at-point))
(mpdel-core-insert-current-playlist)))
(map! :leader
(:prefix "-"
:desc "MPD Open playlist" "-" #'mpdel-playlist-open
:desc "MPD Remove at point" "d" #'mpdel-playlist-delete
:desc "MPD Start at point" "s" #'mpdel-playlist-play
:desc "MPD Next track" "n" #'libmpdel-playback-next
:desc "MPD Previous track" "p" #'libmpdel-playback-previous))
(setq elfeed-protocol-fever-maxsize 100)
(setq elfeed-feeds '(("fever+https://secstate@rss.unbl.ink"
:api-url "https://rss.unbl.ink/fever/"
:password "delegator flaxseed request washer"
:autotags '(("rss.unbl.ink")))))
;(setq elfeed-protocol-log-trace t)
(setq elfeed-protocol-fever-maxsize 50)
;(setq elfeed-log-level 'debug)
(elfeed-protocol-enable)
(map! :leader
(:prefix "r"
:desc "Open Elfeed" "r" #'elfeed
:desc "Update Elfeed" "u" #'elfeed-update))
;; Schedule feed update for every 15 minutes
(run-at-time 300 300
(lambda () (when (= elfeed-curl-queue-active 0)
(elfeed-update))))
;;;;; Database auto-save
;; Save elfeed db automatically, because if Emacs crashes or is killed (which happens to me
;; occasionally, especially since I develop packages in a single instance), we'd lose the db
;; updates not saved.
(unless (cl-loop for timer in timer-idle-list
thereis (equal (aref timer 5) #'elfeed-db-save))
(run-with-idle-timer 400 'repeat #'elfeed-db-save))
(setq elfeed-search-filter "@2-days-ago +unread")
(defun elfeed-search-format-date (date)
(format-time-string "%Y-%m-%d %H:%M" (seconds-to-time date)))
; Serif font in Elfeed
(add-hook! 'elfeed-mode-hook 'variable-pitch-mode)
(add-hook! 'elfeed-show-mode-hook (text-scale-set 1.2))
(defun unfill-paragraph ()
"Takes a multi-line paragraph and makes it into a single line of text."
(interactive)
(let ((fill-column (point-max)))
(fill-paragraph nil)))
(define-key global-map "\M-z" 'unfill-paragraph)
(flycheck-define-checker vale
"A checker for prose"
:command ("vale" "--output" "line"
source)
:standard-input nil
:error-patterns
((error line-start (file-name) ":" line ":" column ":" (id (one-or-more (not (any ":")))) ":" (message) line-end))
:modes (markdown-mode org-mode text-mode)
)
(add-to-list 'flycheck-checkers 'vale 'append)
(setq +format-on-save-enabled-modes
'(not emacs-lisp-mode ; elisp's mechanisms are good enough
sql-mode ; sqlformat is currently broken
tex-mode ; latexindent is broken
org-mode
html-mode
latex-mode))
(load! "+agenda-fix")
(defun vulpea-agenda-files-update (&rest _)
(setq org-agenda-files vulpea-project-files))
(advice-add 'org-agenda :before #'vulpea-agenda-files-update)
(advice-add 'org-todo-list :before #'vulpea-agenda-files-update)
(add-hook 'org-mode-hook #'doom-disable-line-numbers-h)
(after! org
(setq org-directory (expand-file-name "~/var/org/")
org-ellipsis ""
org-image-actual-width '(600)
org-log-done 'time
org-fontify-quote-and-verse-blocks t
org-agenda-dim-blocked-tasks nil
org-pretty-entities t
org-fancy-priorities-list '("🅰" "🅱" "🅲" "🅳" "🅴")
org-modules '(ol-eshell
ol-notmuch
ob-eval
ob-exp
ob-http
org-id)))
;; Refiling
(setq org-refile-targets '((vulpea-project-files :maxlevel . 9)))
(setq org-outline-path-complete-in-steps nil) ; Refile in a single go
(setq org-refile-use-outline-path t) ; Show full paths for refiling
(setq +inbox-file "~/var/org/index.org")
(defun +open-inbox-file ()
(interactive)
"Opens the inbox file"
(find-file +inbox-file))
(map!
:leader
:desc "Open inbox" "I" #'+open-inbox-file
:desc "Open today" "d" #'org-roam-dailies-goto-today
:desc "Save all org buffers" "A" #'org-save-all-org-buffers)
(setq org-roam-directory "~/var/org/")
(setq org-roam-dailies-directory "dailies")
(require 'justify-kp)
;(setq nov-text-width t)
(setq nov-text-width 100)
(defun my-nov-window-configuration-change-hook ()
(my-nov-post-html-render-hook)
(remove-hook 'window-configuration-change-hook
'my-nov-window-configuration-change-hook
t))
(defun my-nov-post-html-render-hook ()
(if (get-buffer-window)
(let ((max-width (pj-line-width))
buffer-read-only)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(when (not (looking-at "^[[:space:]]*$"))
(goto-char (line-end-position))
(when (> (shr-pixel-column) max-width)
(goto-char (line-beginning-position))
(pj-justify)))
(forward-line 1))))
(add-hook 'window-configuration-change-hook
'my-nov-window-configuration-change-hook
nil t)))
(add-hook 'nov-post-html-render-hook 'my-nov-post-html-render-hook)
(defun my-nov-font-setup ()
(face-remap-add-relative 'variable-pitch :family "Noto Serif Regular"
:height 1.0
:size 16))
(add-hook 'nov-mode-hook 'my-nov-font-setup)
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
;(add-hook 'nov-mode-hook 'variable-pitch-mode)
(setq mm-text-html-renderer 'w3m)
(setq w3m-fill-column 88)
(setq message-kill-buffer-on-exit t)
(setq message-auto-save-directory "~/Mail/colin@unbl.ink/Drafts/")
(setq message-directory "~/Mail/colin@unbl.ink/")
;; sendmail-program "/usr/local/bin/msmtpq" <--- this doesn't work as advertised right now
(setq send-mail-function 'sendmail-send-it
sendmail-program "/usr/local/bin/msmtp"
mail-specify-envelope-from t
message-sendmail-f-is-evil t
message-sendmail-envelope-from 'header
message-sendmail-extra-arguments '("--read-envelope-from")
mail-envelope-from 'header)
(setq notmuch-saved-searches '((:name "inbox" :query "tag:inbox" :key "i")
(:name "unread" :query "tag:inbox and tag:unread" :key "u")
(:name "jira" :query "tag:jira and date:yesterday..today" :key "j")
(:name "github" :query "tag:github and date:yesterday..today" :key "g")))
(after! notmuch
(set-popup-rule! "^\\*notmuch*" :ignore t)
)
(map! :leader
(:prefix "e"
:desc "(s)end queued mail" "s" #'smtpmail-send-queued-mail
:desc "Open (i)nbox" "i" #'=notmuch
:desc "Open (n)otmuch" "n" #'notmuch
:desc "(C)ompose mail" "c" #'notmuch-mua-new-mail))
(after! eshell
(set-eshell-alias!
"djtest" "DJANGO_SETTINGS_MODULE=ff.settings.ci python manage.py test $*"
"djpytest" "DJANGO_SETTINGS_MODULE=ff.settings.ci pytest --reuse-db --black --flake8 --isort --durations=3 $*"
"ffsh" "python ~/src/github.com/15five/fifteen5/manage.py shell_plus"
"ffdev" "ssh dev-ff.local "
"f" "(other-window 1) && find-file $1"
"l" "ls -lh"
"d" "dired $1"
"gl" "(call-interactively 'magit-log-current)"
"gs" "magit-status"
"gc" "magit-commit"))
(setq lsp-lens-enable 1
lsp-ui-sideline-enable 1
lsp-enable-links 1
lsp-headerline-breadcrumb-enable 1
lsp-modeline-code-actions-enable 1
lsp-modeline-diagnostics-enable 1
lsp-completion-show-detail 1
lsp-file-watch-threshold nil
)
(use-package lsp-mode
:commands lsp
:diminish lsp-mode
:hook
(elixir-mode . lsp)
:init
(add-to-list 'exec-path "~/.emacs.d/var/elixir-ls"))
(setq mastodon-instance-url "https://fosstodon.org"
mastodon-active-user "colin@unbl.ink")
(map! :leader
(:prefix "="
:desc "Open mastodon" "=" #'mastodon
:desc "Update Mastodon timeline" "u" #'mastodon-tl--update
:desc "More Mastodon timeline" "m" #'mastodon-tl--more
:desc "Toot to Mastodon" "t" #'mastodon-toot))
(load! "beancount")
(require 'beancount)
(add-to-list 'auto-mode-alist '("\\.beancount\\'" . beancount-mode))
(define-derived-mode
pandoc-view-mode
markdown-mode
"pandoc-view-mode"
"View pandoc processing of docx file using markdown mode."
(erase-buffer)
(let* ((pandoc (executable-find "pandoc")))
(insert (shell-command-to-string
(concat pandoc " --wrap=none " (shell-quote-argument (buffer-file-name)) " -t markdown"))))
(not-modified)
(read-only-mode t))
(add-to-list 'auto-mode-alist '("\\.docx\\'" . pandoc-view-mode))
(after! magit
(magit-wip-after-save-mode t)
(magit-wip-after-apply-mode t)
(setq magit-save-repository-buffers 'dontask
magit-repository-directories '(("~/src/" . 3)
("~/.dotfiles/" . 0))
magit-popup-display-buffer-action nil ;; Not sure why this is here, wonder what it does
magit-display-file-buffer-function #'switch-to-buffer-other-window
magithub-clone-default-directory "~/src" ;; I want my stuff to clone to ~/projects
magithub-preferred-remote-method 'ssh_url)) ;; HTTPS cloning is awful, i authenticate with ssh keys.
; Show gravatars in magit
(setq magit-revision-show-gravatars '("^Author: " . "^Commit: "))
(when (require 'openwith nil 'noerror)
(setq openwith-associations
(list
(list (openwith-make-extension-regexp
'("mpg" "mpeg" "mp3" "mp4"
"avi" "wmv" "wav" "mov" "flv"
"ogm" "ogg" "mkv"))
"vlc"
'(file))
(list (openwith-make-extension-regexp
'("pdf" "ps" "ps.gz" "dvi"))
"zathura"
'(file))
))
(openwith-mode 1))
(setq org-reveal-root "file:///path-to-reveal.js")
(setq org-reveal-title-slide nil)
;(require 'chatgpt-shell)

View File

@ -118,7 +118,7 @@ Here were going to use Miniflux as a back-end store for our RSS feeds.
(setq elfeed-protocol-fever-maxsize 100)
(setq elfeed-feeds '(("fever+https://secstate@rss.unbl.ink"
:api-url "https://rss.unbl.ink/fever/"
:password "password"
:password "delegator flaxseed request washer"
:autotags '(("rss.unbl.ink")))))
;(setq elfeed-protocol-log-trace t)
@ -490,3 +490,8 @@ Here we are trying to auto-translate Word and PDF files to be viewed in Emacs.
(setq org-reveal-root "file:///path-to-reveal.js")
(setq org-reveal-title-slide nil)
#+end_src
* ChatGPT
#+begin_src emacs-lisp
;(require 'chatgpt-shell)
#+end_src

View File

@ -9,15 +9,9 @@
;; 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.
'(package-selected-packages
'(moe-theme vulpea exec-path-from-shell org-fancy-priorities hackernews selectrum))
'(when
(or
(not
(boundp 'ansi-term-color-vector))
(not
(facep
(aref ansi-term-color-vector 0))))))
'(magit-todos-insert-after '(bottom) nil nil "Changed by setter of obsolete option `magit-todos-insert-at'")
'(package-selected-packages '(vulpea org-appear olivetti))
'(safe-local-variable-values '((pytest-global-name . "docker-compose run --rm test --"))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.

View File

@ -4,94 +4,146 @@
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find information about all of Doom's
;; modules and what flags they support.
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c g k' for non-vim users) to view its documentation. This works on
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c g d') on a module to browse its
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;chinese
;;japanese
:completion
company ; the ultimate code completion backend
(vertico +icons)
company ; the ultimate code completion backend
(vertico +icons) ; the search engine of the future
:ui
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
(emoji +unicode) ;
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
ligatures ;
;;hydra
;;indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
nav-flash ; blink cursor line after big motions
neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
(vc-gutter +pretty) ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
(dired +icons) ; making dired pretty [functional]
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
undo ;+tree) ; persistent, smarter undo for your inevitable mistakes
ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
(spell +flyspell) ; tasing you for misspelling mispelling
(spell +flyspell) ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs
direnv
docker
editorconfig ; let someone else argue about tabs vs spaces
editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup
lsp
(magit +forge) ; a git porcelain for Emacs
make ; run make tasks from Emacs
;;(pass +auth) ; password manager for nerds
pdf ; pdf enhancements
gist ; interacting with github gists
lookup ; navigate your code and its documentation
lsp ; M-x vscode
magit ; a git porcelain for Emacs
make ; run make tasks from Emacs
pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;crystal ; ruby at the speed of c
data ; config/data formats
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;(elixir +lsp) ; erlang done right
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
(go +lsp) ; the hipster dialect
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
json ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
ledger ; an accounting system in Emacs
lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org ; organize your plain life in plain text
@ -101,34 +153,46 @@
+ipython ; ipython support for babel
+journal
+pretty
+roam2
+roam
+pandoc ; pandoc integration into org's exporter
+pomodoro
+present) ; using Emacs for presentations
;;perl ; write code no one else can comprehend
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(graphql +lsp)
(python +lsp +pyright) ; beautiful is better than ugly
(python +lsp +pyright) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
rest ; Emacs as a REST client
rst ; ReST in peace
;;(ruby +rails +lsp) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
sh ; she sells {ba,z,fi}sh shells on the C xor
(web +lsp) ; the tubes
yaml ; JSON, but readable
;;(zig +lsp)
;;raku ; the artist formerly known as perl6
rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
;;yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
notmuch
;;(wanderlust +gmail)
:app
irc ; how neckbeards socialize
rss ; emacs as an RSS reader
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
literate
;;literate
(default +bindings +smartparens))

View File

@ -0,0 +1,134 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find information about all of Doom's
;; modules and what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c g k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c g d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;chinese
;;japanese
:completion
company ; the ultimate code completion backend
(vertico +icons)
:ui
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
(emoji +unicode) ;
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
ligatures ;
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
workspaces ; tab emulation, persistence & separate workspaces
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
multiple-cursors ; editing in many places at once
snippets ; my elves. They type so I don't have to
:emacs
(dired +icons) ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
undo ;+tree) ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
eshell ; the elisp shell that works everywhere
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
(spell +flyspell) ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;debugger ; FIXME stepping through code, to help you add bugs
direnv
docker
editorconfig ; let someone else argue about tabs vs spaces
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup
lsp
(magit +forge) ; a git porcelain for Emacs
make ; run make tasks from Emacs
(pass +auth) ; password manager for nerds
pdf ; pdf enhancements
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;crystal ; ruby at the speed of c
data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;(elixir +lsp) ; erlang done right
emacs-lisp ; drown in parentheses
(go +lsp) ; the hipster dialect
json ; At least it ain't XML
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
ledger ; an accounting system in Emacs
lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org ; organize your plain life in plain text
+hugo
+dragndrop
+gnuplot
+ipython ; ipython support for babel
+journal
+pretty
+roam2
+pandoc ; pandoc integration into org's exporter
+pomodoro
+present) ; using Emacs for presentations
;;perl ; write code no one else can comprehend
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(graphql +lsp)
(python +lsp +pyright) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
rest ; Emacs as a REST client
rst ; ReST in peace
;;(ruby +rails +lsp) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
sh ; she sells {ba,z,fi}sh shells on the C xor
(web +lsp) ; the tubes
yaml ; JSON, but readable
;;(zig +lsp)
:email
notmuch
:app
irc ; how neckbeards socialize
rss ; emacs as an RSS reader
:config
literate
(default +bindings +smartparens))

View File

@ -1,12 +1,12 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;;;
; For making Nov.el look nice
(package! justify-kp
:recipe (:host github
:repo "Fuco1/justify-kp"))
; For making Nov.el look nice
;(package! justify-kp
; :recipe (:host github
; :repo "Fuco1/justify-kp"))
;(package! hydra)
;(package! hydra)
;; python stuffs
(package! blacken)
@ -20,12 +20,10 @@
;; handy tools
(package! w3m)
(package! nov)
;(package! nov)
(package! git-link)
;(package! ivy-lobsters)
(package! web-search)
(package! mpdel)
(package! ivy-mpdel)
;(package! mpdel)
(package! elfeed-protocol)
(package! deadgrep)
(package! mastodon)
@ -33,7 +31,7 @@
(package! openwith)
(package! pdf-tools)
;; slack ... okay one more time
;(package! slack)
;(package! slack)
(package! direnv)
(package! frameshot)
(package! keycast)

View File

@ -4,7 +4,13 @@
Host *
IdentitiesOnly=yes
Host bastion.unbl.ink
Port 33
User powellc
IdentityFile ~/.ssh/jails
Host *.local
IdentityFile ~/.ssh/2022_h2_powellc
ServerAliveInterval 300
ServerAliveCountMax 2
AddKeysToAgent yes
@ -17,7 +23,7 @@ Host github.com
IdentityFile ~/.ssh/2022_git
# Home Gitea account:
Host code.unbl.ink git.service gogs*
Host code.unbl.ink git.service 192.168.40.118 gogs*
Port 2222
User git
IdentityFile ~/.ssh/2022_git
@ -25,6 +31,9 @@ Host code.unbl.ink git.service gogs*
PasswordAuthentication no
IdentitiesOnly yes
Host gogs*
Port 2222
# Mailinabox uses root by default
Host box.unbl.ink
IdentityFile ~/.ssh/box_unbl_ink
@ -63,67 +72,22 @@ Host snap2*.local
User powellc
# ChicagoVPS
Host pandora.unbl.ink
Host pandora.unbl.ink bt2.unbl.ink
IdentityFile ~/.ssh/pandora
User root
# Rackedge VPS
Host greip.unbl.ink
IdentityFile ~/.ssh/greip
User root
# Inside our network, skip strict host key checking
Host *.local *.service
StrictHostKeyChecking no
# LibreELEC
Host ymir.local gerd.local skoll.local
User root
# Bare metal hosts
Host gerd.local
User powellc
Host hati.local
User powellc
Host ymir.local
User powellc
Host aegir.local
User powellc
Host tarqeq.local
User powellc
Host fenrir.local
User powellc
Host daphnis.local
User powellc
Host hyperion.local
User powellc
Host loge.local
Host hati.local aegir.local tarqeq.local daphnis.local loge.local hyperion.local dione.local phoebe.local iapetus.local titan.local paaliaq.local kiviuq.local kari.local atlas.local siarnaq.local skathi.local tarvos.local rhea.local
User powellc
IdentitiesOnly yes
Host dione.local
User powellc
Host rhea.local
User powellc
Host phoebe.local
User powellc
Host prometheus.local
User powellc
Host iapetus.local
User powellc
Host titan.local
User powellc
Host paaliaq.local
User powellc
Host kiviuq.local
User powellc
Host kari.local
User powellc
Host skoll.local
User powellc
Host atlas.local
User powellc
Host siarnaq.local
User powellc
Host skathi.local
User powellc
Host tarvos.local
User powellc
# PBP uses root user
Host penobscotbaypress.com