Updates, loads of updates!
This commit is contained in:
@@ -1,38 +0,0 @@
|
|||||||
#+title: RSS Feeds
|
|
||||||
#+author: Aryadev Chavali
|
|
||||||
#+date: 2025-02-17
|
|
||||||
|
|
||||||
* News :news:
|
|
||||||
** [[https://www.archlinux.org/feeds/news/][Arch Linux]]
|
|
||||||
** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCEDEqT7DeUJyVNc5QpwSTgQ][Barely Informed]]
|
|
||||||
* Social :social:
|
|
||||||
** [[https://news.ycombinator.com/rss][Hacker News]] :tech:
|
|
||||||
** [[https://www.theonion.com/rss][The Onion]]
|
|
||||||
** [[https://www.hackerfactor.com/blog/index.php?/feeds/index.rss2][Hacker Factor]] :tech:
|
|
||||||
* Blogs :blogs:
|
|
||||||
** [[https://protesilaos.com/master.xml][Protesilaos]]
|
|
||||||
* YouTube :youtube:
|
|
||||||
** Educational :educational:
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g][Protesilaos Stavrou]] :tech:
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg][Tsoding Daily]] :tech:
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCrqM0Ym_NbK1fqeQG2VIohg][Tsoding]] :tech:
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCaTznQhurW5AaiYPbhEA-KA][Molly Rocket]] :tech:
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw][3B1B]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UC6_J0wZdqcoRVs0Mck922SQ][Sheafification of G]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCr_Q-bPpcw5fJ-Oow1BW1NQ][Kraut]] :news:
|
|
||||||
** Tech :tech:
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCfJRkBBiPtKZyZn_3PxWaiQ][Internet of Bugs]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA][Mental Outlaw]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCgBVkKoOAr3ajSdFFLp13_A][KRAZAM]]
|
|
||||||
** Stories :stories:
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCbWcXB0PoqOsAvAdfzWMf0w][Fredrik Knusden]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UC9PIn6-XuRKZ5HmYeu46AIw][Barely Sociable]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCn8OYopT9e8tng-CGEWzfmw][Atrocity Guide]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UC7dHBh9QmYF1L0TOeGIzZgw][Lazy Masquerade]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCjDQKxiTVpXutZc2Ra9wCAg][Oki's Weird Stories]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCyNtlmLB73-7gtlBz00XOQQ][Folding Ideas]]
|
|
||||||
** Misc :misc:
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCZ1q3ZqXAFCvym4jrGozdRg][The Elephant Graveyard]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UC3cpN6gcJQqcCM6mxRUo_dA][Wendigoon]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCm22FAXZMw1BaWeFszZxUKw][Kitboga]]
|
|
||||||
*** [[https://www.youtube.com/feeds/videos.xml?channel_id=UCxSwqqnJp9HsW0hBrHcp1FQ][Flesh Simulator]]
|
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
Welcome to my Emacs configuration. You may be confused by the fact
|
Welcome to my Emacs configuration. You may be confused by the fact
|
||||||
it's a readable document with prose; this file serves as both
|
it's a readable document with prose; this file serves as both
|
||||||
documentation *and* code. Here's an example of some Emacs Lisp code:
|
documentation *and* code. Here's an example of some Emacs Lisp code:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;;; config.el --- Compiled configuration from config.org -*- lexical-binding: t; -*-
|
;;; config.el --- Compiled configuration from config.org -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
@@ -270,9 +271,8 @@ forcefully adjust the font size.
|
|||||||
|
|
||||||
(defun +oreo/font-reset (&optional theme)
|
(defun +oreo/font-reset (&optional theme)
|
||||||
(let ((font-size (thread-first
|
(let ((font-size (thread-first
|
||||||
(pcase (system-name)
|
(system-name)
|
||||||
("rhmaiden" 140)
|
(pcase ("rhmaiden" 140) (_ 120))
|
||||||
(_ 120))
|
|
||||||
(* (+oreo/--font-multiplier))
|
(* (+oreo/--font-multiplier))
|
||||||
floor)))
|
floor)))
|
||||||
(set-face-attribute 'default nil :height font-size)
|
(set-face-attribute 'default nil :height font-size)
|
||||||
@@ -429,6 +429,7 @@ set of examples on how to use general.
|
|||||||
"SPC" #'execute-extended-command
|
"SPC" #'execute-extended-command
|
||||||
"R" #'revert-buffer
|
"R" #'revert-buffer
|
||||||
":" (proc-int (switch-to-buffer "*scratch*"))
|
":" (proc-int (switch-to-buffer "*scratch*"))
|
||||||
|
";" #'eval-expression
|
||||||
"!" #'async-shell-command
|
"!" #'async-shell-command
|
||||||
"h" #'help-command)
|
"h" #'help-command)
|
||||||
|
|
||||||
@@ -733,8 +734,8 @@ vertico for specific forms.
|
|||||||
*** Embark
|
*** Embark
|
||||||
I'm very late to the party here - mostly because I didn't see much
|
I'm very late to the party here - mostly because I didn't see much
|
||||||
point in this. However, after seeing that [[*empv][empv]] had some
|
point in this. However, after seeing that [[*empv][empv]] had some
|
||||||
embark bindings for cool behaviours (such as altering playlists) I had
|
embark bindings for cool behaviours (such as moving tracks around on
|
||||||
to try it out - and I was not disappointed.
|
the live playlist) I had to try it out - and I was not disappointed.
|
||||||
|
|
||||||
~embark-act~ is the entry point to using embark, and you can use it
|
~embark-act~ is the entry point to using embark, and you can use it
|
||||||
basically anywhere to great effect. Searching a buffer via
|
basically anywhere to great effect. Searching a buffer via
|
||||||
@@ -765,7 +766,7 @@ embark act more like how you wish, which I've barely touch on here.
|
|||||||
(side . bottom)
|
(side . bottom)
|
||||||
(window-height . 0.25)
|
(window-height . 0.25)
|
||||||
(window-parameters (mode-line-format . none)))
|
(window-parameters (mode-line-format . none)))
|
||||||
embark-prompter 'embark-completing-read-prompter
|
embark-prompter 'embark-keymap-prompter
|
||||||
embark-indicators '(embark-highlight-indicator)
|
embark-indicators '(embark-highlight-indicator)
|
||||||
embark-help-key "?"
|
embark-help-key "?"
|
||||||
embark-keymap-prompter-key "#"
|
embark-keymap-prompter-key "#"
|
||||||
@@ -788,7 +789,13 @@ search system.
|
|||||||
:init
|
:init
|
||||||
(setq consult-preview-excluded-buffers nil
|
(setq consult-preview-excluded-buffers nil
|
||||||
consult-preview-excluded-files '("\\`/[^/|:]+:")
|
consult-preview-excluded-files '("\\`/[^/|:]+:")
|
||||||
consult-preview-key "M-'")
|
consult-preview-key 'any
|
||||||
|
consult-ripgrep-args "rg --null --line-buffered --color=never \
|
||||||
|
--max-columns=1000 --path-separator / \
|
||||||
|
--smart-case --no-heading \
|
||||||
|
--with-filename --line-number \
|
||||||
|
--search-zip --hidden"
|
||||||
|
consult-fd-args "fd --full-path --color=never -H")
|
||||||
:general
|
:general
|
||||||
([remap imenu] #'consult-imenu
|
([remap imenu] #'consult-imenu
|
||||||
[remap switch-to-buffer] #'consult-buffer
|
[remap switch-to-buffer] #'consult-buffer
|
||||||
@@ -796,7 +803,11 @@ search system.
|
|||||||
(leader
|
(leader
|
||||||
"'" #'consult-register)
|
"'" #'consult-register)
|
||||||
(search-leader
|
(search-leader
|
||||||
"s" #'consult-line)
|
"s" #'consult-line
|
||||||
|
"r" #'consult-ripgrep
|
||||||
|
"f" #'consult-fd
|
||||||
|
"o" #'consult-org-agenda
|
||||||
|
"e" #'consult-compile-error)
|
||||||
:config
|
:config
|
||||||
(with-eval-after-load "vertico-multiform"
|
(with-eval-after-load "vertico-multiform"
|
||||||
(add-multiple-to-list vertico-multiform-commands
|
(add-multiple-to-list vertico-multiform-commands
|
||||||
@@ -949,25 +960,20 @@ other themes in a list.
|
|||||||
:hook (after-init-hook . +oreo/load-theme)
|
:hook (after-init-hook . +oreo/load-theme)
|
||||||
:init
|
:init
|
||||||
(setq custom-theme-directory (concat user-emacs-directory "elisp/"))
|
(setq custom-theme-directory (concat user-emacs-directory "elisp/"))
|
||||||
(defvar +oreo/theme-list `(personal-solarized tsdh-light))
|
(defvar +oreo/theme-list `(personal-solarized leuven))
|
||||||
(defvar +oreo/theme 0)
|
(defvar +oreo/theme 0)
|
||||||
:config
|
:config
|
||||||
(defun +oreo/load-theme ()
|
(defun +oreo/load-theme ()
|
||||||
"Load `+oreo/theme', disabling all other themes to reduce conflict."
|
"Load `+oreo/theme', disabling all other themes to reduce conflict."
|
||||||
(mapc #'disable-theme custom-enabled-themes)
|
(mapc #'disable-theme custom-enabled-themes)
|
||||||
(cl-loop
|
|
||||||
for theme in +oreo/theme-list
|
|
||||||
for i from 0
|
|
||||||
if (not (= i +oreo/theme))
|
|
||||||
do (disable-theme theme))
|
|
||||||
(load-theme (nth +oreo/theme +oreo/theme-list) t))
|
(load-theme (nth +oreo/theme +oreo/theme-list) t))
|
||||||
|
|
||||||
(defun +oreo/switch-theme ()
|
(defun +oreo/switch-theme ()
|
||||||
"Flip between different themes set in `+oreo/theme-alist'."
|
"Flip between different themes set in `+oreo/theme-alist'."
|
||||||
(setq +oreo/theme (mod (+ 1 +oreo/theme) (length +oreo/theme-list)))
|
(thread-last (length +oreo/theme-list)
|
||||||
(+oreo/load-theme))
|
(mod (+ 1 +oreo/theme))
|
||||||
|
(setq +oreo/theme))
|
||||||
(+oreo/load-theme))
|
(+oreo/load-theme)))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Startup screen
|
** Startup screen
|
||||||
The default startup screen is quite bad in all honesty. While for a
|
The default startup screen is quite bad in all honesty. While for a
|
||||||
@@ -1130,10 +1136,16 @@ I also setup the ~pixel-scroll-mode~ to make scrolling nicer looking.
|
|||||||
(pixel-scroll-precision-mode t))
|
(pixel-scroll-precision-mode t))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Display line numbers
|
** Display line numbers
|
||||||
I don't really like line numbers, I find them similar to
|
Line numbers are nice - not for referencing specific lines by hand
|
||||||
[[*Fringes][fringes]] (useless space), but at least it provides some
|
(why not use [[*compile-mode][compile-mode]] or ~M-x goto-line~?) but
|
||||||
information. Sometimes it can help with doing repeated commands so a
|
for relative vim motions: for example, d3j deletes 3 lines down and
|
||||||
toggle option is necessary.
|
having the number of lines directly in front of you can be invaluable.
|
||||||
|
|
||||||
|
2025-06-02: there's a specific option,
|
||||||
|
~display-line-numbers-width-start~, which when set to ~t~
|
||||||
|
automatically calculates the maximum width required to display all
|
||||||
|
line numbers. This solves all the weird artifacting issues I was
|
||||||
|
having with really large documents (such as this one).
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package display-line-numbers
|
(use-package display-line-numbers
|
||||||
@@ -1144,7 +1156,8 @@ toggle option is necessary.
|
|||||||
(mode-leader
|
(mode-leader
|
||||||
"l" #'display-line-numbers-mode)
|
"l" #'display-line-numbers-mode)
|
||||||
:init
|
:init
|
||||||
(setq-default display-line-numbers-type 'relative))
|
(setq-default display-line-numbers-type 'relative
|
||||||
|
display-line-numbers-width-start t))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Pulsar
|
** Pulsar
|
||||||
Similar to how [[*Evil goggles][Evil goggles]] highlights Evil
|
Similar to how [[*Evil goggles][Evil goggles]] highlights Evil
|
||||||
@@ -1965,7 +1978,6 @@ most distribution nowadays.
|
|||||||
:general
|
:general
|
||||||
(search-leader
|
(search-leader
|
||||||
"g" #'grep-this-file
|
"g" #'grep-this-file
|
||||||
"c" #'grep-config-file
|
|
||||||
"d" #'rgrep)
|
"d" #'rgrep)
|
||||||
(nmmap
|
(nmmap
|
||||||
:keymaps 'grep-mode-map
|
:keymaps 'grep-mode-map
|
||||||
@@ -1982,23 +1994,18 @@ most distribution nowadays.
|
|||||||
;; Without this wgrep doesn't work properly
|
;; Without this wgrep doesn't work properly
|
||||||
(evil-set-initial-state 'grep-mode 'normal)
|
(evil-set-initial-state 'grep-mode 'normal)
|
||||||
|
|
||||||
(defun grep-file (query filename)
|
(defmacro grep-file (query filename)
|
||||||
(grep (format "grep --color=auto -nIiHZEe \"%s\" -- %s"
|
`(grep (format "grep --color=auto -nIiHE --null -e \"%s\" %s"
|
||||||
query filename)))
|
,query ,filename)))
|
||||||
|
|
||||||
(defun grep-this-file ()
|
(defun grep-this-file ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((query (read-string "Search for: ")))
|
(let ((query (read-string "Search for: "))
|
||||||
(if (buffer-file-name (current-buffer))
|
(filename (or (buffer-file-name (current-buffer))
|
||||||
(grep-file query (buffer-file-name (current-buffer)))
|
|
||||||
(let ((temp-file (make-temp-file "temp-grep")))
|
(let ((temp-file (make-temp-file "temp-grep")))
|
||||||
(write-region (point-min) (point-max) temp-file)
|
(write-region (point-min) (point-max) temp-file)
|
||||||
(grep-file query temp-file)))))
|
temp-file))))
|
||||||
|
(grep-file query filename))))
|
||||||
(defun grep-config-file ()
|
|
||||||
(interactive)
|
|
||||||
(let ((query (read-string "Search for: " "^[*]+ .*")))
|
|
||||||
(grep-file query (concat user-emacs-directory "config.org")))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
*** rg
|
*** rg
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -2012,7 +2019,7 @@ most distribution nowadays.
|
|||||||
(window-height . 0.35))
|
(window-height . 0.35))
|
||||||
:general
|
:general
|
||||||
(search-leader
|
(search-leader
|
||||||
"r" #'rg)
|
"R" #'rg-menu)
|
||||||
(:keymaps 'project-prefix-map
|
(:keymaps 'project-prefix-map
|
||||||
"t" #'+rg/project-todo)
|
"t" #'+rg/project-todo)
|
||||||
(nmmap
|
(nmmap
|
||||||
@@ -2093,14 +2100,14 @@ to elfeed for loading the system.
|
|||||||
(funcall option url)))))
|
(funcall option url)))))
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Elfeed-org
|
*** Elfeed-org
|
||||||
|
A small self-written package to load an org file as a set of elfeed
|
||||||
|
feeds.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package elfeed-org
|
(use-package elfeed-org
|
||||||
:load-path "elisp/"
|
:load-path "elisp/"
|
||||||
:after elfeed
|
:after elfeed
|
||||||
:init
|
:init
|
||||||
(thread-last "elfeed/feeds.org"
|
(setq elfeed-org/file (concat org-directory "feeds.org"))
|
||||||
no-littering-expand-etc-file-name
|
|
||||||
(setq elfeed-org/file))
|
|
||||||
:config
|
:config
|
||||||
(elfeed-org))
|
(elfeed-org))
|
||||||
#+end_src
|
#+end_src
|
||||||
@@ -2705,11 +2712,10 @@ description I give won't do it justice.
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package aggressive-indent
|
(use-package aggressive-indent
|
||||||
:straight t
|
:straight t
|
||||||
:hook (emacs-lisp-mode-hook . aggressive-indent-mode)
|
:hook ((scheme-mode-hook lisp-mode-hook emacs-lisp-mode-hook)
|
||||||
:hook (scheme-mode-hook . aggressive-indent-mode)
|
. aggressive-indent-mode))
|
||||||
:hook (lisp-mode-hook . aggressive-indent-mode))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** Compilation
|
** compile-mode
|
||||||
Compilation mode is an incredibly useful subsystem of Emacs which
|
Compilation mode is an incredibly useful subsystem of Emacs which
|
||||||
allows one to run arbitrary commands. If those commands produce
|
allows one to run arbitrary commands. If those commands produce
|
||||||
errors (particularly errors that have a filename, column and line)
|
errors (particularly errors that have a filename, column and line)
|
||||||
@@ -2758,12 +2764,12 @@ so you can actually read the text.
|
|||||||
(add-hook 'compilation-filter-hook #'ansi-color-compilation-filter))
|
(add-hook 'compilation-filter-hook #'ansi-color-compilation-filter))
|
||||||
#+end_src
|
#+end_src
|
||||||
** xref
|
** xref
|
||||||
Find definitions, references and general objects using tags without
|
Find definitions, references, and general objects using TAGS without
|
||||||
external packages. Provided out of the box with Emacs, but requires a
|
external packages. Provided out of the box with Emacs, but requires a
|
||||||
way of generating a =TAGS= file for your project (look at
|
way of generating a =TAGS= file for your project (look at
|
||||||
[[*Project.el][Project.el]] for my way of doing so). A critical
|
[[*Project.el][Project.el]] for my way of doing so). The heaviest
|
||||||
component in a minimal setup for programming without heavier systems
|
lifter in a minimal setup for programming without more extensive
|
||||||
like [[*Eglot][Eglot]].
|
systems like [[*Eglot][Eglot]].
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package xref
|
(use-package xref
|
||||||
@@ -2792,11 +2798,10 @@ like [[*Eglot][Eglot]].
|
|||||||
#+end_src
|
#+end_src
|
||||||
** devdocs
|
** devdocs
|
||||||
When man pages aren't enough, you need some documentation lookup
|
When man pages aren't enough, you need some documentation lookup
|
||||||
system (basically whenever your using anything but C/C++/Bash).
|
system. [[https://devdocs.io][Devdocs]] is a great little website
|
||||||
[[https://devdocs.io][Devdocs]] is a great little website that
|
that provides a ton of documentation sets. There's an Emacs package
|
||||||
provides a ton of documentation sets. There's an Emacs package for it
|
for it which works well and downloads documentation sets to my
|
||||||
which works well and downloads documentation sets to my machine, which
|
machine, which is nice.
|
||||||
is nice.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package devdocs
|
(use-package devdocs
|
||||||
@@ -2808,7 +2813,7 @@ is nice.
|
|||||||
#+end_src
|
#+end_src
|
||||||
** rainbow-delimiters
|
** rainbow-delimiters
|
||||||
Makes colours delimiters (parentheses) based on their depth in an
|
Makes colours delimiters (parentheses) based on their depth in an
|
||||||
expression. Rainbow flag in your Lisp source code.
|
expression. LGBTQIA+ flag in your Lisp source code.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
@@ -2817,7 +2822,8 @@ expression. Rainbow flag in your Lisp source code.
|
|||||||
:general
|
:general
|
||||||
(mode-leader "r" #'rainbow-delimiters-mode)
|
(mode-leader "r" #'rainbow-delimiters-mode)
|
||||||
:hook
|
:hook
|
||||||
((lisp-mode-hook emacs-lisp-mode-hook racket-mode-hook) . rainbow-delimiters-mode))
|
((lisp-mode-hook emacs-lisp-mode-hook racket-mode-hook)
|
||||||
|
. rainbow-delimiters-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Licensing
|
** Licensing
|
||||||
Loads [[file:elisp/license.el][license.el]] for inserting licenses.
|
Loads [[file:elisp/license.el][license.el]] for inserting licenses.
|
||||||
@@ -3129,10 +3135,9 @@ todo file directly.
|
|||||||
:defer t
|
:defer t
|
||||||
:init
|
:init
|
||||||
(setq
|
(setq
|
||||||
org-default-notes-file (concat org-directory "todo.org")
|
|
||||||
org-capture-templates
|
org-capture-templates
|
||||||
'(("t" "Todo" entry
|
'(("t" "Todo" entry
|
||||||
(file "")
|
(file "general.org")
|
||||||
"* TODO %?
|
"* TODO %?
|
||||||
%T
|
%T
|
||||||
%a")
|
%a")
|
||||||
@@ -4488,8 +4493,7 @@ with abstracting a few things away.
|
|||||||
(use-package abbrev
|
(use-package abbrev
|
||||||
:defer t
|
:defer t
|
||||||
:hook
|
:hook
|
||||||
(prog-mode-hook . abbrev-mode)
|
((prog-mode-hook text-mode-hook) . abbrev-mode)
|
||||||
(text-mode-hook . abbrev-mode)
|
|
||||||
:init
|
:init
|
||||||
(defmacro +abbrev/define-abbrevs (abbrev-table &rest abbrevs)
|
(defmacro +abbrev/define-abbrevs (abbrev-table &rest abbrevs)
|
||||||
`(progn
|
`(progn
|
||||||
@@ -4513,7 +4517,11 @@ with abstracting a few things away.
|
|||||||
("smon"
|
("smon"
|
||||||
(format-time-string "%B" (current-time)))
|
(format-time-string "%B" (current-time)))
|
||||||
("swho"
|
("swho"
|
||||||
(format "%s <%s>" user-full-name user-mail-address))))
|
(format "%s <%s>" user-full-name user-mail-address))
|
||||||
|
("stodo"
|
||||||
|
(thread-last (current-time)
|
||||||
|
(format-time-string "%Y-%m-%d %H:%M")
|
||||||
|
(format "TODO(%s)[%s]:" user-login-name)))))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Amx
|
** Amx
|
||||||
Amx is a fork of Smex that works to enhance the
|
Amx is a fork of Smex that works to enhance the
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
(vertical-scroll-bars . nil)
|
(vertical-scroll-bars . nil)
|
||||||
(left-fringe . 0)
|
(left-fringe . 0)
|
||||||
(right-fringe . 0)
|
(right-fringe . 0)
|
||||||
(alpha . (90 80)))
|
(alpha . (80 70)))
|
||||||
menu-bar-mode nil
|
menu-bar-mode nil
|
||||||
tool-bar-mode nil
|
tool-bar-mode nil
|
||||||
scroll-bar-mode nil)
|
scroll-bar-mode nil)
|
||||||
|
|||||||
@@ -29,11 +29,12 @@
|
|||||||
(defun elfeed-org/--parse-link (context)
|
(defun elfeed-org/--parse-link (context)
|
||||||
(thread-last (org-element-property :title context)
|
(thread-last (org-element-property :title context)
|
||||||
search-forward)
|
search-forward)
|
||||||
(let ((title-context (org-element-context)))
|
(org-element-property :raw-link (org-element-context)))
|
||||||
(org-element-property :raw-link title-context)))
|
|
||||||
|
|
||||||
(defun elfeed-org/--parse-tags ()
|
(defun elfeed-org/--parse-tags ()
|
||||||
(mapcar #'intern (org-get-tags)))
|
(thread-last
|
||||||
|
(org-get-tags)
|
||||||
|
(mapcar #'intern)))
|
||||||
|
|
||||||
(defun elfeed-org/--parse-headline ()
|
(defun elfeed-org/--parse-headline ()
|
||||||
(if-let* ((ctx (org-element-context))
|
(if-let* ((ctx (org-element-context))
|
||||||
@@ -43,14 +44,15 @@
|
|||||||
nil))
|
nil))
|
||||||
|
|
||||||
(defun elfeed-org/--parse-headlines ()
|
(defun elfeed-org/--parse-headlines ()
|
||||||
(cl-remove-if
|
(thread-last
|
||||||
#'null
|
(org-map-entries #'elfeed-org/--parse-headline t)
|
||||||
(org-map-entries #'elfeed-org/--parse-headline t)))
|
(cl-remove-if #'null)))
|
||||||
|
|
||||||
(defun elfeed-org ()
|
(defun elfeed-org ()
|
||||||
(setq elfeed-feeds
|
(thread-last
|
||||||
(with-current-buffer (find-file-noselect elfeed-org/file)
|
(elfeed-org/--parse-headlines)
|
||||||
(elfeed-org/--parse-headlines))))
|
(with-current-buffer (find-file-noselect elfeed-org/file))
|
||||||
|
(setq elfeed-feeds)))
|
||||||
|
|
||||||
(provide 'elfeed-org)
|
(provide 'elfeed-org)
|
||||||
;;; elfeed-org.el ends here
|
;;; elfeed-org.el ends here
|
||||||
|
|||||||
@@ -41,14 +41,23 @@
|
|||||||
"Change to directory `project-root'"
|
"Change to directory `project-root'"
|
||||||
(if (project-current)
|
(if (project-current)
|
||||||
(eshell/cd (list (project-root (project-current))))
|
(eshell/cd (list (project-root (project-current))))
|
||||||
|
(setq eshell-last-command-status 1)
|
||||||
(eshell/echo
|
(eshell/echo
|
||||||
(format "[%s]: No project in current directory"
|
(format "[%s]: No project in current directory"
|
||||||
(propertize "Error" 'font-lock-face '(:foreground "red"))))))
|
(propertize "Error" 'font-lock-face '(:foreground "red"))))))
|
||||||
|
|
||||||
(defun eshell/sudo-switch (&rest args)
|
(defun eshell/sudo-switch (&rest args)
|
||||||
"Switch to a tramp connection sudo in the current directory"
|
"Switch to and from administrative (sudo) mode in Eshell.
|
||||||
|
Uses tramp to figure out if we're in sudo mode or not. "
|
||||||
|
(let ((user (file-remote-p default-directory 'user)))
|
||||||
|
(cond
|
||||||
|
((null user)
|
||||||
(let ((wrapped-dir (concat "/sudo::" default-directory)))
|
(let ((wrapped-dir (concat "/sudo::" default-directory)))
|
||||||
(eshell/cd wrapped-dir)))
|
(eshell/cd wrapped-dir)))
|
||||||
|
((string= user "root")
|
||||||
|
(thread-last 'localname
|
||||||
|
(file-remote-p default-directory)
|
||||||
|
eshell/cd)))))
|
||||||
|
|
||||||
;; Additional functions
|
;; Additional functions
|
||||||
(defun +eshell/at-cwd (&optional arg)
|
(defun +eshell/at-cwd (&optional arg)
|
||||||
|
|||||||
@@ -19,25 +19,29 @@
|
|||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;; We provide a function +eshell-prompt which generates a prompt on
|
;; We provide a function ep which generates a prompt on
|
||||||
;; demand.
|
;; demand.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defvar +eshell-prompt/user-prompt "𝜆> "
|
(defvar ep/user-prompt " λ "
|
||||||
"Prompt for user to input.")
|
"Prompt for user to input.")
|
||||||
|
|
||||||
(defvar +eshell-prompt/dir-colour "deepskyblue")
|
(defvar ep/dir-colour "deepskyblue")
|
||||||
(defvar +eshell-prompt/success-colour "forestgreen")
|
(defvar ep/success-colour "forestgreen")
|
||||||
(defvar +eshell-prompt/failure-colour "red")
|
(defvar ep/failure-colour "red")
|
||||||
|
(defvar ep/branch-name-colour "LightSalmon")
|
||||||
|
(defvar ep/pipe-colour "green2")
|
||||||
|
(defvar ep/ahead-colour "dodger blue")
|
||||||
|
(defvar ep/remote-colour "DarkGoldenrod")
|
||||||
|
|
||||||
(defun +eshell-prompt/--colour-on-last-command ()
|
(defun ep/--colour-on-last-command ()
|
||||||
"Returns an Emacs colour based on ESHELL-LAST-COMMAND-STATUS."
|
"Returns an Emacs colour based on ESHELL-LAST-COMMAND-STATUS."
|
||||||
(if (zerop eshell-last-command-status)
|
(if (zerop eshell-last-command-status)
|
||||||
+eshell-prompt/success-colour
|
ep/success-colour
|
||||||
+eshell-prompt/failure-colour))
|
ep/failure-colour))
|
||||||
|
|
||||||
(defun +eshell-prompt/--git-remote-status ()
|
(defun ep/--git-remote-status ()
|
||||||
"Returns a propertized string for the status of a repository
|
"Returns a propertized string for the status of a repository
|
||||||
in comparison to its remote. 3 differing strings are returned
|
in comparison to its remote. 3 differing strings are returned
|
||||||
dependent on:
|
dependent on:
|
||||||
@@ -53,17 +57,17 @@ behind or ahead the local repository is."
|
|||||||
(status (nth 3 branch-status))
|
(status (nth 3 branch-status))
|
||||||
(diff (cl-position "by" branch-status :test #'string=)))
|
(diff (cl-position "by" branch-status :test #'string=)))
|
||||||
(if (null diff)
|
(if (null diff)
|
||||||
(propertize "=" 'font-lock-face `(:foreground ,+eshell-prompt/success-colour))
|
(propertize "=" 'font-lock-face `(:foreground ,ep/success-colour))
|
||||||
(let ((n (nth (+ 1 diff) branch-status)))
|
(let ((n (nth (+ 1 diff) branch-status)))
|
||||||
(concat
|
(concat
|
||||||
(cond
|
(cond
|
||||||
((string= status "ahead")
|
((string= status "ahead")
|
||||||
(propertize "→" 'font-lock-face '(:foreground "dodger blue")))
|
(propertize "→" 'font-lock-face `(:foreground ,ep/ahead-colour)))
|
||||||
((string= status "behind")
|
((string= status "behind")
|
||||||
(propertize "←" 'font-lock-face '(:foreground "red"))))
|
(propertize "←" 'font-lock-face `(:foreground ,ep/failure-colour))))
|
||||||
n)))))
|
n)))))
|
||||||
|
|
||||||
(defun +eshell-prompt/--git-change-status ()
|
(defun ep/--git-change-status ()
|
||||||
"Returns a propertized string for the condition of the worktree in
|
"Returns a propertized string for the condition of the worktree in
|
||||||
a repository. If there are no changes i.e. the worktree is clean
|
a repository. If there are no changes i.e. the worktree is clean
|
||||||
then a green tick is returned, but if there are changes then the
|
then a green tick is returned, but if there are changes then the
|
||||||
@@ -74,12 +78,13 @@ number of files affected are returned in red."
|
|||||||
(if (= changed-files 0)
|
(if (= changed-files 0)
|
||||||
(propertize "✓"
|
(propertize "✓"
|
||||||
'font-lock-face
|
'font-lock-face
|
||||||
`(:foreground ,+eshell-prompt/success-colour))
|
`(:foreground ,ep/success-colour))
|
||||||
(propertize (number-to-string changed-files)
|
(propertize (number-to-string changed-files)
|
||||||
'font-lock-face
|
'font-lock-face
|
||||||
`(:foreground ,+eshell-prompt/failure-colour)))))
|
`(:foreground ,ep/failure-colour)))))
|
||||||
|
|
||||||
(defun +eshell-prompt/--git-branch-name ()
|
(defun ep/--git-branch-name ()
|
||||||
|
"Get the branch name of the current working directory. W"
|
||||||
(let* ((branch-name (thread-last
|
(let* ((branch-name (thread-last
|
||||||
(split-string (shell-command-to-string "git branch") "\n")
|
(split-string (shell-command-to-string "git branch") "\n")
|
||||||
(cl-remove-if (lambda (s) (= (length s) 0)))
|
(cl-remove-if (lambda (s) (= (length s) 0)))
|
||||||
@@ -89,23 +94,34 @@ number of files affected are returned in red."
|
|||||||
(cond
|
(cond
|
||||||
((null branch-name) nil)
|
((null branch-name) nil)
|
||||||
((string= "(" (substring branch-name 0 1))
|
((string= "(" (substring branch-name 0 1))
|
||||||
(replace-regexp-in-string "\\(.*at \\)\\|)" "" branch-name))
|
(replace-regexp-in-string
|
||||||
|
"\n$" ""
|
||||||
|
(shell-command-to-string "git rev-parse --short HEAD")))
|
||||||
(t branch-name))))
|
(t branch-name))))
|
||||||
|
|
||||||
(defun +eshell-prompt/--git-status ()
|
(defun ep/--git-status ()
|
||||||
"Returns a completely formatted string of
|
"Returns a completely formatted string of
|
||||||
form (BRANCH-NAME<CHANGES>[REMOTE-STATUS])."
|
form (BRANCH-NAME<CHANGES>[REMOTE-STATUS])."
|
||||||
(let ((git-branch (+eshell-prompt/--git-branch-name)))
|
(let ((git-branch (ep/--git-branch-name)))
|
||||||
(if (null git-branch)
|
(if (null git-branch)
|
||||||
""
|
""
|
||||||
(format
|
(format
|
||||||
"(%s<%s>[%s])"
|
"%s(%s)(%s)"
|
||||||
git-branch
|
(propertize git-branch 'font-lock-face `(:foreground ,ep/branch-name-colour))
|
||||||
(+eshell-prompt/--git-change-status)
|
(ep/--git-remote-status)
|
||||||
(+eshell-prompt/--git-remote-status)))))
|
(ep/--git-change-status)))))
|
||||||
|
|
||||||
(defun +eshell-prompt/make-prompt ()
|
(defun ep/--user-and-remote ()
|
||||||
(let ((git (+eshell-prompt/--git-status)))
|
(if (file-remote-p default-directory)
|
||||||
|
(let ((user (file-remote-p default-directory 'user))
|
||||||
|
(host (file-remote-p default-directory 'host)))
|
||||||
|
(if user
|
||||||
|
(format "%s@%s " user host)
|
||||||
|
(concat host " ")))
|
||||||
|
""))
|
||||||
|
|
||||||
|
(defun ep/make-prompt ()
|
||||||
|
(let ((git (ep/--git-status)))
|
||||||
(mapconcat
|
(mapconcat
|
||||||
(lambda (item)
|
(lambda (item)
|
||||||
(if (listp item)
|
(if (listp item)
|
||||||
@@ -115,15 +131,26 @@ form (BRANCH-NAME<CHANGES>[REMOTE-STATUS])."
|
|||||||
'rear-nonsticky '(font-lock-face read-only))
|
'rear-nonsticky '(font-lock-face read-only))
|
||||||
item))
|
item))
|
||||||
(list
|
(list
|
||||||
|
`("┌──"
|
||||||
|
:foreground ,ep/pipe-colour)
|
||||||
"["
|
"["
|
||||||
`(,(abbreviate-file-name (eshell/pwd)) :foreground ,+eshell-prompt/dir-colour)
|
`(,(ep/--user-and-remote)
|
||||||
"]"
|
:foreground ,ep/remote-colour)
|
||||||
|
`(,(abbreviate-file-name (tramp-file-local-name (eshell/pwd)))
|
||||||
|
:foreground ,ep/dir-colour)
|
||||||
(if (string= git "")
|
(if (string= git "")
|
||||||
""
|
""
|
||||||
(concat " " git))
|
(concat "]─[" git))
|
||||||
|
"]"
|
||||||
"\n"
|
"\n"
|
||||||
(list "𝜆> " ':foreground (+eshell-prompt/--colour-on-last-command))))))
|
`("└─>"
|
||||||
|
:foreground ,ep/pipe-colour)
|
||||||
|
(list ep/user-prompt ':foreground (ep/--colour-on-last-command))))))
|
||||||
|
|
||||||
|
|
||||||
(provide 'eshell-prompt)
|
(provide 'eshell-prompt)
|
||||||
;;; eshell-prompt.el ends here
|
;;; eshell-prompt.el ends here
|
||||||
|
|
||||||
|
;; Local Variables:
|
||||||
|
;; read-symbol-shorthands: (("ep" . "+eshell-prompt"))
|
||||||
|
;; End:
|
||||||
|
|||||||
@@ -81,6 +81,19 @@
|
|||||||
'(org-quote ((t (:slant italic))))
|
'(org-quote ((t (:slant italic))))
|
||||||
'(org-verbatim ((t (:foreground "red3"))))
|
'(org-verbatim ((t (:foreground "red3"))))
|
||||||
'(query-replace ((t (:inherit (isearch)))))
|
'(query-replace ((t (:inherit (isearch)))))
|
||||||
|
'(rainbow-delimiters-base-error-face ((t (:extend t :foreground "white"
|
||||||
|
:background "red1"))))
|
||||||
|
'(rainbow-delimiters-depth-1-face ((t (:extend t :foreground "red"))))
|
||||||
|
'(rainbow-delimiters-depth-2-face ((t (:extend t :foreground "darkorange"))))
|
||||||
|
'(rainbow-delimiters-depth-3-face ((t (:extend t :foreground "yellow"))))
|
||||||
|
'(rainbow-delimiters-depth-4-face ((t (:extend t :foreground "green"))))
|
||||||
|
'(rainbow-delimiters-depth-5-face ((t (:extend t :foreground "DeepSkyBlue"))))
|
||||||
|
'(rainbow-delimiters-depth-6-face ((t (:extend t :foreground "purple"))))
|
||||||
|
'(rainbow-delimiters-depth-7-face ((t (:extend t :foreground "violet"))))
|
||||||
|
'(rainbow-delimiters-mismatched-face ((t (:extend t :foreground "white"
|
||||||
|
:background "red4"))))
|
||||||
|
'(rainbow-delimiters-unmatched-face ((t (:extend t :foreground "white"
|
||||||
|
:background "red3"))))
|
||||||
'(region ((t (:extend t :background "#C2D5E9"))))
|
'(region ((t (:extend t :background "#C2D5E9"))))
|
||||||
'(secondary-selection ((((class color) (min-colors 88) (background light)) (:extend t :background "yellow1")) (((class color) (min-colors 88) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 16) (background light)) (:extend t :background "yellow")) (((class color) (min-colors 16) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 8)) (:extend t :foreground "black" :background "cyan")) (t (:inverse-video t))))
|
'(secondary-selection ((((class color) (min-colors 88) (background light)) (:extend t :background "yellow1")) (((class color) (min-colors 88) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 16) (background light)) (:extend t :background "yellow")) (((class color) (min-colors 16) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 8)) (:extend t :foreground "black" :background "cyan")) (t (:inverse-video t))))
|
||||||
'(shadow ((((class color grayscale) (min-colors 88) (background light))
|
'(shadow ((((class color grayscale) (min-colors 88) (background light))
|
||||||
|
|||||||
@@ -3,5 +3,5 @@
|
|||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
"vim-tmux-navigator": { "branch": "master", "commit": "ad4c04239d970981942d6a3e1195a770df09d0d7" }
|
"vim-tmux-navigator": { "branch": "master", "commit": "96da8e10ce83b754f442c3e25d1bf74451d220f2" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
personal_ws-1.1 en 183
|
personal_ws-1.1 en 186
|
||||||
Architecting
|
Architecting
|
||||||
Aryadev
|
Aryadev
|
||||||
Automorphism
|
Automorphism
|
||||||
@@ -48,6 +48,9 @@ anonymised
|
|||||||
anonymises
|
anonymises
|
||||||
architected
|
architected
|
||||||
arity
|
arity
|
||||||
|
artifact
|
||||||
|
artifacting
|
||||||
|
artifacts
|
||||||
automorphism
|
automorphism
|
||||||
automorphisms
|
automorphisms
|
||||||
biconnected
|
biconnected
|
||||||
|
|||||||
Reference in New Issue
Block a user