Emacs creates a lot of files relative to ~user-emacs-directory~, these files are not part of this immutable configuration and do not belong in the emacs directory.
Set the browser to the flatpak currently installed.
#+begin_src emacs-lisp
#+begin_src emacs-lisp
(defvar dotfiles/home user-emacs-directory)
(setenv "BROWSER" "flatpak run org.mozilla.firefox")
#+end_src
#+end_src
How can we solve this issue?
Add the modules you want to initialize to the ~dotfiles/modules~ variable.
#+begin_src emacs-lisp
(defvar dotfiles/modules '(core
desktop
writing
projects
interface))
#+end_src
Specify the cache directory.
#+begin_src emacs-lisp
#+begin_src emacs-lisp
(defvar dotfiles/cache "~/.cache/emacs")
(defvar dotfiles/cache "~/.cache/emacs")
#+end_src
#+end_src
Functionality like =completion= and =hints= can be delayed to avoid popups for common manuevers. Adjust this value to your personal taste.
#+begin_src emacs-lisp
(defvar dotfiles/idle 0.0)
#+end_src
Avoid the infamous *Emacs pinky* by binding =SPC= as a leader key, utilizing the thumb instead of the weaker pinky finger. You may change this value if you want to use something else.
#+begin_src emacs-lisp
(defvar dotfiles/leader-key "SPC")
(defvar dotfiles/leader-key-global "C-SPC")
#+end_src
Define where the source repositories are stored, with most projects being relative from that directory.
Emacs creates a lot of files relative to ~user-emacs-directory~, these files are not part of this immutable configuration and do not belong in the emacs directory.
How can we solve this issue?
Shortly after initialization, before most packages are loaded, we change the value to ~dotfiles/cache~. I elaborate more on the technique in my post [[https://chrishayward.xyz/posts/immutable_emacs/][Immutable Emacs]].
Shortly after initialization, before most packages are loaded, we change the value to ~dotfiles/cache~. I elaborate more on the technique in my post [[https://chrishayward.xyz/posts/immutable_emacs/][Immutable Emacs]].
#+begin_src emacs-lisp
#+begin_src emacs-lisp
@ -66,7 +127,7 @@ Because this project uses version-control, we can disable more unwanted features
make-backup-files nil)
make-backup-files nil)
#+end_src
#+end_src
** Package management
*** Package management
Download and install packages using [[https://github.com/raxod502/straight.el][straight.el]], a functional package manager that integrates with =use-package=, giving us more control over where packages are sourced from.
Download and install packages using [[https://github.com/raxod502/straight.el][straight.el]], a functional package manager that integrates with =use-package=, giving us more control over where packages are sourced from.
@ -103,7 +164,7 @@ Complete the integration with ~use-package~ by installing it with =straight=.
(straight-use-package 'use-package)
(straight-use-package 'use-package)
#+end_src
#+end_src
** Hermetic evaluation
*** Hermetic evaluation
Despite having our *stateful* and *immutable* configurations seperate, it's good practice to make efforts to reduce the trash created by Emacs.
Despite having our *stateful* and *immutable* configurations seperate, it's good practice to make efforts to reduce the trash created by Emacs.
@ -124,7 +185,7 @@ Emacs' default user interface is horrendous, but with less than 10 lines of code
(tooltip-mode -1)
(tooltip-mode -1)
#+end_src
#+end_src
** Literate programming
*** Literate programming
*Organize your plain life in plain text*
*Organize your plain life in plain text*
@ -162,7 +223,7 @@ Emacs' default user interface is horrendous, but with less than 10 lines of code
#+end_src
#+end_src
#+begin_src emacs-lisp
#+begin_src emacs-lisp
(defun core/tangle (dir)
(defun dotfiles/tangle (dir)
"Recursively tangle the Org files within a directory."
"Recursively tangle the Org files within a directory."
(interactive)
(interactive)
(let ((org-files (directory-files-recursively dir "org")))
(let ((org-files (directory-files-recursively dir "org")))
@ -170,7 +231,7 @@ Emacs' default user interface is horrendous, but with less than 10 lines of code
(org-babel-tangle-file f))))
(org-babel-tangle-file f))))
#+end_src
#+end_src
** Custom keybindings
*** Custom keybindings
Make the =ESC= key quit (most) prompts, instead of the default =C-g=.
Make the =ESC= key quit (most) prompts, instead of the default =C-g=.
@ -178,12 +239,6 @@ Make the =ESC= key quit (most) prompts, instead of the default =C-g=.
Functionality like =completion= and =hints= can be delayed to avoid popups for common manuevers. Adjust this value to your personal taste.
#+begin_src emacs-lisp
(defvar dotfiles/idle 0.0)
#+end_src
Download [[https://github.com/justbur/emacs-which-key][which-key]], a package that displays the current incomplete keybinding input in a mini-buffer, showing available completion options.
Download [[https://github.com/justbur/emacs-which-key][which-key]], a package that displays the current incomplete keybinding input in a mini-buffer, showing available completion options.
#+begin_src emacs-lisp
#+begin_src emacs-lisp
@ -193,14 +248,8 @@ Download [[https://github.com/justbur/emacs-which-key][which-key]], a package th
Avoid the infamous *Emacs pinky* by binding =SPC= as a leader key, utilizing the thumb instead of the weaker pinky finger. You may change this value if you want to use something else.
#+begin_src emacs-lisp
(defvar dotfiles/leader-key "SPC")
(defvar dotfiles/leader-key-global "C-SPC")
#+end_src
Implement the *leader* key mentioned above using [[https://github.com/noctuid/general.el][general.el]], letting us easily configure prefixed keybindings in a much cleaner manner than the default methods.
Implement the *leader* key using [[https://github.com/noctuid/general.el][general.el]], letting us easily configure prefixed keybindings in a much cleaner manner than the default methods.
#+begin_src emacs-lisp
#+begin_src emacs-lisp
(use-package general
(use-package general
@ -314,7 +363,7 @@ Place runtime tweaks behind =SPC t=.
"t" '(:ignore t :which-key "Tweaks"))
"t" '(:ignore t :which-key "Tweaks"))
#+end_src
#+end_src
** Version control
*** Version control
Another hallmark feature is [[https://github.com/magit/magit][Magit]], a complete git porcelain within Emacs.
Another hallmark feature is [[https://github.com/magit/magit][Magit]], a complete git porcelain within Emacs.
@ -338,7 +387,7 @@ Open the *status* page for the current repository with =SPC g=.
"g" '(magit-status :which-key "Magit"))
"g" '(magit-status :which-key "Magit"))
#+end_src
#+end_src
** Terminal emulation
*** Terminal emulation
While not a traditional terminal emulator, =eshell= provides me with all of the functionality I expect and require from one. Some users may be left wanting more, I would recommend they look into =vterm=.
While not a traditional terminal emulator, =eshell= provides me with all of the functionality I expect and require from one. Some users may be left wanting more, I would recommend they look into =vterm=.
@ -358,7 +407,7 @@ Open an =eshell= buffer with =SPC e=.
"e" '(eshell :which-key "Shell"))
"e" '(eshell :which-key "Shell"))
#+end_src
#+end_src
** File management
*** File management
Emacs' can feel more modern when icon-fonts are installed and prioritized. I feel that this makes navigation of folders much faster, given that file types may be quickly identified by their corresponding icons.
Emacs' can feel more modern when icon-fonts are installed and prioritized. I feel that this makes navigation of folders much faster, given that file types may be quickly identified by their corresponding icons.
@ -403,7 +452,7 @@ Open a dired buffer with =SPC d=.
[[https://github.com/org-roam/org-roam-server][Org-roam-server]] is a web application that visualizes the =Org roam= database, available when Emacs' running at [[http://localhost:8080][localhost:8080]].
[[https://github.com/org-roam/org-roam-server][Org-roam-server]] is a web application that visualizes the =Org roam= database, available when Emacs' running at [[http://localhost:8080][localhost:8080]].
@ -615,12 +660,7 @@ Configure the default capture template for daily entries.
@ -713,7 +753,7 @@ Configure the default capture template for daily entries.
:END:\n\n"))
:END:\n\n"))
#+end_src
#+end_src
** Agenda
*** Agenda
Configure agenda sources.
Configure agenda sources.
+ Dailies ~~/.local/source/brain/daily/~
+ Dailies ~~/.local/source/brain/daily/~
@ -731,7 +771,7 @@ Open an agenda buffer with =SPC a=.
"a" '(org-agenda :which-key "Agenda"))
"a" '(org-agenda :which-key "Agenda"))
#+end_src
#+end_src
** Blogging
*** Blogging
I use [[https://gohugo.io][Hugo]] for my personal [[https://chrishayward.xyz][website]], which I write in =Org-mode= before compiling to =hugo-markdown=.
I use [[https://gohugo.io][Hugo]] for my personal [[https://chrishayward.xyz][website]], which I write in =Org-mode= before compiling to =hugo-markdown=.
@ -754,7 +794,7 @@ Creaate a capture template for blog posts in the =posts= sub directory.
#+HUGO_SECTION: posts\n"))
#+HUGO_SECTION: posts\n"))
#+end_src
#+end_src
** Screencasts
*** Screencasts
Create screencasts with =one-frame-per-action= GIF recording via [[https://github.com/takaxp/emacs-gif-screencast][emacs-gif-screencast]].
Create screencasts with =one-frame-per-action= GIF recording via [[https://github.com/takaxp/emacs-gif-screencast][emacs-gif-screencast]].
Configure [[https://projectile.mx][projectile]], a project interaction library for Emacs. It provides a nice set of features for operating on a project level without introducing external dependencies.
Configure [[https://projectile.mx][projectile]], a project interaction library for Emacs. It provides a nice set of features for operating on a project level without introducing external dependencies.
@ -840,13 +880,13 @@ Configure [[https://projectile.mx][projectile]], a project interaction library f
(projectile-mode))
(projectile-mode))
#+end_src
#+end_src
** Passwords
*** Passwords
Pass makes managing passwords extremely easy, encrypring them in a file structure and providing easy commands for generating, modify, and copying passwords. =password-store.el= provides a wrapper for the functionality within Emacs.
Pass makes managing passwords extremely easy, encrypring them in a file structure and providing easy commands for generating, modify, and copying passwords. =password-store.el= provides a wrapper for the functionality within Emacs.
Handled through the [[https://microsoft.github.io/debug-adapter-protocol/][Debug Adapter Protocol]], an open source initiative from *Microsoft* for the *VSCode* editor.
Handled through the [[https://microsoft.github.io/debug-adapter-protocol/][Debug Adapter Protocol]], an open source initiative from *Microsoft* for the *VSCode* editor.
@ -872,7 +912,7 @@ Handled through the [[https://microsoft.github.io/debug-adapter-protocol/][Debug
(use-package dap-mode)
(use-package dap-mode)
#+end_src
#+end_src
** Completion
*** Completion
Text completion framework via =company= aka *Complete Anything*.
Text completion framework via =company= aka *Complete Anything*.
Configure the system font with a single ~font-family~ and define the size, of which variations to the font size are relative to this value.
Configure the system font with a single ~font-family~ and define the size, of which variations to the font size are relative to this value.
@ -1010,7 +1050,7 @@ Increase the font size in buffers with =SPC t f=.
"tf" '(hydra-text-scale/body :which-key "Font"))
"tf" '(hydra-text-scale/body :which-key "Font"))
#+end_src
#+end_src
** Lines
*** Lines
Relative line numbers are important when using =VI= emulation keys. You can prefix most commands with a *number*, allowing you to jump up / down by a line count.
Relative line numbers are important when using =VI= emulation keys. You can prefix most commands with a *number*, allowing you to jump up / down by a line count.
Cherry pick a few modules from =doom-emacs=. High quality and modern colour themes are provided in the [[https://github.com/hlissner/emacs-doom-themes][doom-themes]] package.
Cherry pick a few modules from =doom-emacs=. High quality and modern colour themes are provided in the [[https://github.com/hlissner/emacs-doom-themes][doom-themes]] package.
@ -1070,13 +1117,7 @@ Load a theme with =SPC t t=.
"tt" '(load-theme t t :which-key "Theme"))
"tt" '(load-theme t t :which-key "Theme"))
#+end_src
#+end_src
** Browser
#+begin_src emacs-lisp
(setenv "BROWSER" "flatpak run org.mozilla.firefox")
#+end_src
** Ligatures
*** Ligatures
Enable font ligatures via [[https://github.com/jming422/fira-code-mode][fira-code-mode]], perform this action *only* when ~Fira Code~ is set as the current font.
Enable font ligatures via [[https://github.com/jming422/fira-code-mode][fira-code-mode]], perform this action *only* when ~Fira Code~ is set as the current font.
@ -1091,7 +1132,7 @@ Enable font ligatures via [[https://github.com/jming422/fira-code-mode][fira-cod