From 1df42bb708cfa0dc523439ca411fae9e746760bf Mon Sep 17 00:00:00 2001 From: Swarsel Date: Wed, 11 Dec 2024 01:45:42 +0100 Subject: [PATCH] chore: increase TOC level to 6 --- SwarselSystems.org | 2 + index.html | 1487 ++++++++++++++++++++++++++-------------- programs/emacs/init.el | 1 + 3 files changed, 977 insertions(+), 513 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index 796abf4..bb18865 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -2,6 +2,7 @@ #+PROPERTY: header-args:emacs-lisp :tangle programs/emacs/init.el :mkdirp yes #+PROPERTY: header-args:nix :mkdirp yes #+EXPORT_FILE_NAME: index.html +#+OPTIONS: toc:6 #+macro: revision-date (eval (format-time-string "%F %T %z")) #+macro: count-words (eval (count-words (point-min) (point-max))) #+macro: count-lines (eval (count-lines (point-min) (point-max))) @@ -11212,6 +11213,7 @@ This part of the configuration mostly makes some aesthetic changes, enables neat ;; (setq org-log-done 'time) ;; (setq org-log-into-drawer t) (setq org-startup-with-inline-images t) + (setq org-export-headline-levels 6) (setq org-image-actual-width nil) (setq org-format-latex-options '(:foreground "White" :background default :scale 2.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))) diff --git a/index.html b/index.html index 836a827..1331d61 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + SwarselSystems: NixOS + Emacs Configuration @@ -228,31 +228,245 @@ @@ -268,7 +482,27 @@
  • 5.2. Personal settings -
      -
    1. gaming
      +
      +
      4.3.4.1. gaming

      This opens a few gaming ports and installs the steam configuration suite for gaming. There are more options in Gaming (home-manager side). @@ -7155,8 +7548,9 @@ This opens a few gaming ports and installs the steam configuration suite for gam

      -
    2. -
    3. VirtualBox
      + +
      +
      4.3.4.2. VirtualBox

      This sets the VirtualBox configuration. Guest should not be enabled if not direly needed, it will make rebuilds unbearably slow. I only use this privately to run an old editor that does not run well under wine, so I put it into it's own specialisation. @@ -7187,8 +7581,9 @@ This sets the VirtualBox configuration. Guest should not be enabled if not direl

      -
    4. -
    5. VmWare
      + +
      +
      4.3.4.3. VmWare

      This sets the VirtualBox configuration. Guest should not be enabled if not direly needed, it will make rebuilds unbearably slow. @@ -7204,8 +7599,9 @@ This sets the VirtualBox configuration. Guest should not be enabled if not direl

      -
    6. -
    7. Auto-login
      + +
      +
      4.3.4.4. Auto-login

      Auto login for the initial session. @@ -7222,8 +7618,9 @@ Auto login for the initial session.

      -
    8. -
    9. nswitch-rcm
      + +
      +
      4.3.4.5. nswitch-rcm

      This smashes Atmosphere 1.3.2 on the switch, which is what I am currenty using. @@ -7243,8 +7640,9 @@ This smashes Atmosphere 1.3.2 on the switch, which is what I am currenty using.

      -
    10. -
    11. work
      + +
      +
      4.3.4.6. work

      Options that I need specifically at work. There are more options at Work (home-manager side). @@ -7381,8 +7779,9 @@ in

      -
    12. -
    13. Minimal Install
      + +
      +
      4.3.4.7. Minimal Install

      These options are really only to be used on the iso image in order to run nixos-anywhere. @@ -7453,8 +7852,7 @@ These options are really only to be used on the iso image in order to run nixos-

      -
    14. -
    +
    @@ -7468,8 +7866,8 @@ The general structure is the same as in the 4.4.1. Common
    -
      -
    1. Imports
      +
      +
      4.4.1.1. Imports

      This section sets up all the imports that are used in the home-manager section. @@ -7517,8 +7915,9 @@ This section sets up all the imports that are used in the home-manager section.

      -
    2. -
    3. General home-manager-settings
      +
    +
    +
    4.4.1.2. General home-manager-settings

    Again, we adapt nix to our needs, enable the home-manager command for non-NixOS machines (NixOS machines are using it as a module) and setting user information that I always keep the same. @@ -7554,8 +7953,9 @@ Again, we adapt nix to our needs, enable the home-manager command f

    -
  • -
  • Installed packages
    + +
    +
    4.4.1.3. Installed packages

    Here are defined some packages that I would like to use across all my machines. Most of these should not require further setup. Notably the cura package is severely outdated on nixpkgs, so I just fetch a more recent AppImage and run that instead. @@ -7569,8 +7969,8 @@ Also, I define some useful shell scripts here. Programming languages and default lsp's are defined here: System Packages

    -
      -
    1. Packaged
      +
      +
      4.4.1.3.1. Packaged

      This holds packages that I can use as provided, or with small modifications (as in the texlive package that needs special configuration). @@ -7740,8 +8140,9 @@ This holds packages that I can use as provided, or with small modifications (as

      -
    2. -
    3. Self-defined
      +
    +
    +
    4.4.1.3.2. Self-defined

    This is just a separate container for derivations defined in Packages. This is a good idea so that I do not lose track of package names I have defined myself, as this was once a problem in the past already. @@ -7806,10 +8207,10 @@ This is just a separate container for derivations defined in sops
    +

    +
    +
    +
    4.4.1.4. sops

    I use sops-nix to handle secrets that I want to have available on my machines at all times. Procedure to add a new machine: @@ -7855,8 +8256,9 @@ in

    -
  • -
  • SSH Machines
    + +
    +
    4.4.1.5. SSH Machines

    It is very convenient to have SSH aliases in place for machines that I use. This is mainly used for some server machines and some university clusters. We also enable agent forwarding to have our Yubikey SSH key accessible on the remote host. @@ -7907,8 +8309,9 @@ It is very convenient to have SSH aliases in place for machines that I use. This

    -
  • -
  • Theme (stylix)
    + +
    +
    4.4.1.6. Theme (stylix)

    These section allows home-manager to allow theme settings, and handles some other appearance-related settings like cursor styles. Interestingly, system icons (adwaita) still need to be setup on system-level, and will break if defined here. @@ -7982,8 +8385,9 @@ This section has been notably empty ever since switching to stylix. Only Emacs i

    -
  • -
  • Desktop Entries, MIME types (xdg)
    + +
    +
    4.4.1.7. Desktop Entries, MIME types (xdg)

    Some programs lack a dmenu launcher - I define them myself here. @@ -8082,8 +8486,9 @@ _:

    -
  • -
  • Linking dotfiles
    + +
    +
    4.4.1.8. Linking dotfiles

    This section should be used in order to symlink already existing configuration files using `home.file` and setting session variables using `home.sessionVariables`. @@ -8137,8 +8542,9 @@ Also in firefox `about:config > toolkit.legacyUserProfileCustomizations.style

    -
  • -
  • Sourcing environment variables
    + +
    +
    4.4.1.9. Sourcing environment variables

    Sets environment variables. Here I am only setting the EDITOR variable, most variables are set in the Sway section. @@ -8156,8 +8562,9 @@ Sets environment variables. Here I am only setting the EDITOR variable, most var

    -
  • -
  • General Programs: bottom, imv, sioyek, bat, carapace, wlogout, swayr, yt-dlp, mpv, jq, nix-index, ripgrep, pandoc, fzf
    + +
    +
    4.4.1.10. General Programs: bottom, imv, sioyek, bat, carapace, wlogout, swayr, yt-dlp, mpv, jq, nix-index, ripgrep, pandoc, fzf

    This section is for programs that require no further configuration. zsh Integration is enabled by default for these. @@ -8186,8 +8593,9 @@ This section is for programs that require no further configuration. zsh Integrat

    -
  • -
  • nix-index
    + +
    +
    4.4.1.11. nix-index

    nix-index provides a way to find out which packages are provided by which derivations. By default it also comes with a replacement for command-not-found.sh, however, the implementation is based on a channel based setup. I like consistency, so I replace the command with one that provides a flakes-based output. @@ -8218,8 +8626,9 @@ nix-index provides a way to find out which packages are provided by which deriva

    -
  • -
  • password-store
    + +
    +
    4.4.1.12. password-store

    Enables password store with the pass-otp extension which allows me to store and generate one-time-passwords. @@ -8239,8 +8648,9 @@ Enables password store with the pass-otp extension which allows me

    -
  • -
  • direnv
    + +
    +
    4.4.1.13. direnv

    Enables direnv, which I use for nearly all of my nix dev flakes. @@ -8257,8 +8667,9 @@ Enables direnv, which I use for nearly all of my nix dev flakes.

    -
  • -
  • eza
    + +
    +
    4.4.1.14. eza

    Eza provides me with a better ls command and some other useful aliases. @@ -8280,8 +8691,9 @@ Eza provides me with a better ls command and some other useful alia

    -
  • -
  • git
    + +
    +
    4.4.1.15. git

    Here I set up my git config, automatic signing of commits, useful aliases for my ost used commands (for when I am not using Magit) as well as a git template defined in Linking dotfiles. @@ -8330,8 +8742,9 @@ Here I set up my git config, automatic signing of commits, useful aliases for my

    -
  • -
  • Fuzzel
    + +
    +
    4.4.1.16. Fuzzel

    Here I only need to set basic layout options - the rest is being managed by stylix. @@ -8355,8 +8768,9 @@ Here I only need to set basic layout options - the rest is being managed by styl

    -
  • -
  • Starship
    + +
    +
    4.4.1.17. Starship

    Starship makes my zsh look cooler! I have symbols for most programming languages and toolchains, also I build my own powerline. @@ -8472,8 +8886,9 @@ Starship makes my zsh look cooler! I have symbols for most programm

    -
  • -
  • Kitty
    + +
    +
    4.4.1.18. Kitty

    Kitty is the terminal emulator of choice for me, it is nice to configure using nix, fast, and has a nice style. @@ -8499,8 +8914,9 @@ The theme is handled by stylix.

    -
  • -
  • zsh
    + +
    +
    4.4.1.19. zsh

    zsh is the most convenient shell for me and it happens to be super neat to configure within home manager. @@ -8632,8 +9048,9 @@ Here we set some aliases (some of them should be shellApplications instead) as w

    -
  • -
  • zellij
    + +
    +
    4.4.1.20. zellij
    _:
    @@ -8840,8 +9257,9 @@ Here we set some aliases (some of them should be shellApplications instead) as w
     
    -
  • -
  • tmux
    + +
    +
    4.4.1.21. tmux
    @@ -8947,8 +9365,9 @@ in
     
    -
  • -
  • Mail
    + +
    +
    4.4.1.22. Mail

    Normally I use 4 mail accounts - here I set them all up. Three of them are Google accounts (sadly), which are a chore to setup. The last is just a sender account that I setup SMTP for here. @@ -9091,8 +9510,9 @@ Normally I use 4 mail accounts - here I set them all up. Three of them are Googl

    -
  • -
  • Home-manager: Emacs
    + +
    +
    4.4.1.23. Home-manager: Emacs

    By using the emacs-overlay NixOS module, I can install all Emacs packages that I want to use right through NixOS. This is done by passing my init.el file to the configuration which will then be parsed upon system rebuild, looking for use-package sections in the Elisp code. Also I define here the style of Emacs that I want to run - I am going with native Wayland Emacs here (emacs-pgtk). All of the nice options such as tree-sitter support are enabled by default, so I do not need to adjust the build process. @@ -9176,8 +9596,9 @@ Lastly, I am defining some more packages here that the parser has problems findi

    -
  • -
  • Waybar
    + +
    +
    4.4.1.24. Waybar

    Again I am just using the first bar option here that I was able to find good understandable documentation for. Of note is that the `cpu` section's `format` is not defined here, but in section 1 (since not every machine has the same number of cores) @@ -9459,8 +9880,9 @@ The rest of the related configuration is found here:

    -
  • -
  • Firefox
    + +
    +
    4.4.1.25. Firefox

    Setting up firefox along with some policies that are important to me (mostly disabling telemetry related stuff as well as Pocket). I also enable some integrations that enable super useful packages, namely tridactyl and browserpass. @@ -9762,15 +10184,16 @@ in

    -
  • -
  • Services
    + +
    +
    4.4.1.26. Services

    Services that can be defined through home-manager should be defined here.

    -
      -
    1. gnome-keyring
      +
      +
      4.4.1.26.1. gnome-keyring

      Used for storing sessions in e.g. Nextcloud @@ -9786,8 +10209,9 @@ Used for storing sessions in e.g. Nextcloud

      -
    2. -
    3. KDE Connect
      +
    +
    +
    4.4.1.26.2. KDE Connect

    This enables phone/computer communication, including sending clipboard, files etc. Sadly on Wayland many of the features are broken (like remote control). @@ -9805,8 +10229,9 @@ This enables phone/computer communication, including sending clipboard, files et

    -
  • -
  • Mako
    + +
    +
    4.4.1.26.3. Mako

    Desktop notifications! @@ -9851,8 +10276,9 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi

    -
  • -
  • yubikey-touch-detector
    + +
    +
    4.4.1.26.4. yubikey-touch-detector
    { pkgs, ... }:
    @@ -9887,10 +10313,10 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
  • - - -
  • Sway
    + + +
    +
    4.4.1.27. Sway

    I am currently using SwayFX, which adds some nice effects to sway, like rounded corners and hiding the separator between title and content of a window. @@ -10194,8 +10620,9 @@ in

    -
  • -
  • gpg-agent
    + +
    +
    4.4.1.28. gpg-agent

    Settinfs that are needed for the gpg-agent. Also we are enabling emacs support for unlocking my Yubikey here. @@ -10220,8 +10647,9 @@ Settinfs that are needed for the gpg-agent. Also we are enabling emacs support f

    -
  • -
  • gammastep
    + +
    +
    4.4.1.29. gammastep

    This service changes the screen hue at night. I am not sure if that really does something, but I like the color anyways. @@ -10240,15 +10668,14 @@ This service changes the screen hue at night. I am not sure if that really does

    -
  • - +

    4.4.2. Server

    -
      -
    1. Imports
      +
      +
      4.4.2.1. Imports

      This section sets up all the imports that are used in the home-manager section. @@ -10268,8 +10695,9 @@ in

      -
    2. -
    3. Linking dotfiles
      +
    +
    +
    4.4.2.2. Linking dotfiles

    This section should be used in order to symlink already existing configuration files using `home.file` and setting session variables using `home.sessionVariables`. @@ -10292,15 +10720,14 @@ As for the `home.sessionVariables`, it should be noted that environment variable

    - - +

    4.4.3. Darwin

    -
      -
    1. Imports
      +
      +
      4.4.3.1. Imports

      This section sets up all the imports that are used in the home-manager section. @@ -10319,8 +10746,7 @@ in

      -
    2. -
    +

    4.4.4. Optional

    @@ -10329,8 +10755,8 @@ in Akin to the optional NixOS modules.

    -
      -
    1. Gaming
      +
      +
      4.4.4.1. Gaming

      The rest of the settings is at gaming. @@ -10370,8 +10796,9 @@ The rest of the settings is at

      -
    2. -
    3. Work
      + +
      +
      4.4.4.2. Work

      The rest of the settings is at work. Here, I am setting up the different firefox profiles that I need for the SSO sites that I need to access at work as well as a few ssh shorthands. @@ -10501,8 +10928,7 @@ The rest of the settings is at

      -
    4. -
    + @@ -10670,8 +11096,8 @@ This section is used to define my own functions, own variables, and own keybindi In this section I define extra functions that I need. Some of these functions I wrote myself, some I found after internet reseach. For functions I found on the internet, I will link the original source I found it in.

    -
      -
    1. Emacs/Evil state toggle
      +
      +
      5.2.1.1. Emacs/Evil state toggle

      Since I am rebinding the C-z hotkey for emacs-evil-state toggling, I want to have a function that still lets me perform this action quickly. @@ -10688,8 +11114,9 @@ Since I am rebinding the C-z hotkey for emacs-evil-state toggling,

      -
    2. -
    3. Switching to last used buffer
      + +
      +
      5.2.1.2. Switching to last used buffer

      I often find myself bouncing between two buffers when I do not want to use a window split. This funnction simply jumps to the last used buffer. @@ -10702,8 +11129,9 @@ I often find myself bouncing between two buffers when I do not want to use a win

      -
    4. -
    5. mu4e functions
      + +
      +
      5.2.1.3. mu4e functions

      I use these functions to let me switch between my main email accounts, as mu4e by itself has trouble doing so. mu4e-switch-account allows for manual choosing of the sender account, while mu4e-rfs--matching-address and mu4e-send-from-correct-address are used when replying to a mail; they switch the sender account to the one that received the mail. @@ -10754,8 +11182,9 @@ Used here: mu4e

      -
    6. -
    7. Create non-existant directories when finding file
      + +
      +
      5.2.1.4. Create non-existant directories when finding file

      This function will check if a directory for which a file we want to open exists; if not, it will offer to create the directories for me. @@ -10774,8 +11203,9 @@ This function will check if a directory for which a file we want to open exists;

      -
    8. -
    9. [crux] Duplicate Lines
      + +
      +
      5.2.1.5. [crux] Duplicate Lines

      When programming, I like to be able to duplicate a line. There are easier functions than the one below, but they either @@ -10842,8 +11272,9 @@ there's a region, all lines that region covers will be duplicated."

      -
    10. -
    11. [prot] org-id-headings
      + +
      +
      5.2.1.6. [prot] org-id-headings

      These functions by protesilaos generate heading links in an org-file similar to the normal org-store-link approach when not using properties. This approach has a weakness however - if the heading name is changed, the link breaks. These functions generate a unique identifier for each heading which will not break and also works when exporting the file to html, for example. @@ -10879,8 +11310,9 @@ create a new one."

      -
    12. -
    13. Inhibit Messages in Echo Area
      + +
      +
      5.2.1.7. Inhibit Messages in Echo Area

      Emacs likes to send messages to the echo area; this is generally a good thing. However, it bothers me a lot when I am currently working in minibuffer where I receive an echo area message that is actually important and it is then overwritten by e.g. the mu4e update message. This section makes it possible to find the root function calling the message function and disabling it here. @@ -10950,8 +11382,9 @@ Lastly, individual messages can be reenabled using the (advice-remove '<

      -
    14. -
    15. Move up one directory for find-file
      + +
      +
      5.2.1.8. Move up one directory for find-file

      I find it very annoying that the standard behavior for M-DEL only deletes one word when using find-file. This function makes it so that we always go up by one directory level instead. @@ -10978,8 +11411,9 @@ This function was found here: org-mode: General setup
      +

      +
      +
      5.2.1.9. org-mode: General setup

      Sets up the basic settings that I want to have active in org-mode buffers. @@ -11006,8 +11440,9 @@ Used here: General org-mode

      -
    16. -
    17. org-mode: Visual-fill column
      + +
      +
      5.2.1.10. org-mode: Visual-fill column

      This function sets the width of buffers in org-mode. @@ -11027,8 +11462,9 @@ Used in: Centered org-mode Buf

      -
    18. -
    19. org-mode: Upon-save actions (Auto-tangle, export to html, formatting)
      + +
      +
      5.2.1.11. org-mode: Upon-save actions (Auto-tangle, export to html, formatting)

      This section handles everything that shoudld happen when I save SwarselSystems.org. It: @@ -11068,8 +11504,9 @@ We set a hook that runs everytime we save the file. It would be a bit more effic

      -
    20. -
    21. org-mode: Fold current heading
      + +
      +
      5.2.1.12. org-mode: Fold current heading

      Normally emacs cycles between three states: @@ -11098,8 +11535,9 @@ However, I want to be able to fold a single heading consistently.

      -
    22. -
    23. corfu: Do not interrupt navigation
      + +
      +
      5.2.1.13. corfu: Do not interrupt navigation

      These three functions allow me to keep using the normal navigation keys even when a corfu completion pops up. @@ -11130,8 +11568,9 @@ These functions are used here:

      -
    24. -
    25. python shell reloading
      + +
      +
      5.2.1.14. python shell reloading

      The standard Emacs behaviour for the Python process shell is a bit annoying. This is my attempt at making it show automatically on opening a python buffer and making it refresh on its own as well. This does not nicely work yet. @@ -11171,8 +11610,9 @@ The standard Emacs behaviour for the Python process shell is a bit annoying. Thi

      -
    26. -
    27. Nix common prefix bracketer
      + +
      +
      5.2.1.15. Nix common prefix bracketer

      This function searches for common delimiters in region and removes them, summarizing all captured lines by it. @@ -11204,8 +11644,9 @@ This function searches for common delimiters in region and removes them, summari

      -
    28. -
    29. Nix formatters
      + +
      +
      5.2.1.16. Nix formatters

      This formats the org code block at point in accordance to the nixpkgs-fmt formatter @@ -11240,8 +11681,9 @@ This formats the org code block at point in accordance to the

      -
    30. -
    31. Disable garbace collection while minibuffer is active
      + +
      +
      5.2.1.17. Disable garbace collection while minibuffer is active
      @@ -11258,8 +11700,7 @@ This formats the org code block at point in accordance to the 
       
      -
    32. -
    +

    5.2.2. Custom Keybindings

    @@ -11714,8 +12155,8 @@ By default, emacs scrolls half a page when reaching the bottom of the buffer. Th

    5.3.7. Evil

    -
      -
    1. General evil
      +
      +
      5.3.7.1. General evil

      This setups up evil, which brings vim-like keybindings to emacs. In the same location, I also unbind the C-z key (I am very unhappy with this implementation, but it is the only thing that works consistently so far) to make it available for cape later. @@ -11771,8 +12212,9 @@ Also, I setup initial modes for several major-modes depending on what I deem fit

      -
    2. -
    3. evil-collection
      +
    +
    +
    5.3.7.2. evil-collection

    This gives support for many different modes, and works beautifully out of the box. @@ -11788,8 +12230,9 @@ This gives support for many different modes, and works beautifully out of the bo

    - -
  • evil-snipe
    + +
    +
    5.3.7.3. evil-snipe

    This package changes the char-search commands like f by showing the results in a more visual manner. It also gives a 2-character search using s and S. @@ -11807,8 +12250,9 @@ This package changes the char-search commands like f by showing the

    -
  • -
  • evil-cleverparens
    + +
    +
    5.3.7.4. evil-cleverparens

    This helps keeping parentheses balanced which is useful when writing in languages like Elisp. I do not activate this by default, as most languages do not profit from this enough in my eyes. @@ -11821,8 +12265,9 @@ This helps keeping parentheses balanced which is useful when writing in language

    -
  • -
  • evil-surround
    + +
    +
    5.3.7.5. evil-surround

    This minor-mode adds functionality for doing better surround-commands; for example ci[ will let you change the word within square brackets. @@ -11838,8 +12283,7 @@ This minor-mode adds functionality for doing better surround-commands; for examp

    -
  • - +

    5.3.8. ispell

    @@ -11982,8 +12426,8 @@ Here I set up the modeline with some information that I find useful. Specficiall

    5.3.14. Helper Modes

    -
      -
    1. Vertico, Orderless, Marginalia, Consult, Embark
      +
      +
      5.3.14.1. Vertico, Orderless, Marginalia, Consult, Embark

      This set of packages uses the default emacs completion framework and works together to provide a very nice user experience: @@ -12001,8 +12445,8 @@ This set of packages uses the default emacs completion framework and works toget Nerd icons is originally enabled here: Icons

      -
        -
      1. vertico
        +
        +
        5.3.14.1.1. vertico
        @@ -12022,8 +12466,9 @@ Nerd icons is originally enabled here: vertico-directory
        +
        +
        +
        5.3.14.1.2. vertico-directory

        This package allows for Ido-like directory navigation. @@ -12043,8 +12488,9 @@ This package allows for Ido-like directory navigation.

        -
      2. -
      3. orderless
        +
      +
      +
      5.3.14.1.3. orderless

      When first installing orderless, I often times faced the problem, that when editing long files and calling consult-line, Emacs would hang when changing a search term in the middle (e.g. from servicse.xserver to servic.xserver in order to fix the typo). The below orderless rules have a more strict matching that has a positive impact on performance. @@ -12072,8 +12518,9 @@ When first installing orderless, I often times faced the problem, that when edit

      -
    2. -
    3. consult
      +
    +
    +
    5.3.14.1.4. consult

    The big winner here are the convenient keybinds being setup here for general use. Also, I setup vim-navigation for minibuffer completions. consult-buffer is set twice because I am still used to that weird C-M-j command that I chose for ivy-switch-buffer when I first started using Emacs. I want to move to the other command but for now it is not feasible to delete the other one. @@ -12101,8 +12548,9 @@ The big winner here are the convenient keybinds being setup here for general use

    - -
  • embark
    + +
    +
    5.3.14.1.5. embark

    I have stripped down the embark keybinds heavily. It is very useful to me even in it's current state, but it quickly becomes overwhelming. embark-dwim acts on a candidate without closing the minibuffer, which is very useful. embark-act lets the user choose from all actions, but has an overwhelming interface. @@ -12128,8 +12576,9 @@ I have stripped down the embark keybinds heavily. It is very useful to me even i

    -
  • -
  • embark-consult
    + +
    +
    5.3.14.1.6. embark-consult

    Provides previews for embark. @@ -12147,8 +12596,9 @@ Provides previews for embark.

    -
  • -
  • marginalia
    + +
    +
    5.3.14.1.7. marginalia

    I set the annotation-mode of marginalia to heavy. This gives even more information on the stuff that you are looking at. One thing I am missing from ivy is the highlighting on mode-commands based on the current state of the mode. Also, I do not understand all the shorthands used by marginalia yet. @@ -12164,8 +12614,9 @@ I set the annotation-mode of marginalia to heavy. This gives even m

    -
  • -
  • nerd-icons-completion
    + +
    +
    5.3.14.1.8. nerd-icons-completion

    As stated above, this simply provides nerd-icons to the completion framework. @@ -12183,10 +12634,10 @@ As stated above, this simply provides nerd-icons to the completion framework.

    -
  • - - -
  • Helpful + which-key: Better help defaults
    + + +
    +
    5.3.14.2. Helpful + which-key: Better help defaults

    This pair of packages provides information on keybinds in addition to function names, which makes it easier to remember keybinds (which-key). The helpful package provides a better Help framework for Emacs. For some reason, the Help windows are always being focused by the cursor even though I have set help-window-select to nil. I do not understand why. @@ -12211,8 +12662,7 @@ This pair of packages provides information on keybinds in addition to function n

    -
  • - +

    5.3.15. Ligatures

    @@ -12355,8 +12805,8 @@ org-mode is probably my most-used mode in Emcas. It acts as my organizer, config Note that nearly all headings within the Org-mode heading are coded within the use-package setup, so be very careful about moving stuff about here.

    -
      -
    1. General org-mode
      + -
    2. -
    3. org-agenda
      + +
      +
      5.4.1.2. org-agenda

      Here I setup a plethora of keywords, keybinds and paths to give my org-agenda more power. @@ -12460,8 +12912,9 @@ Here I setup a plethora of keywords, keybinds and paths to give my org-agenda mo

      -
    4. -
    5. org capture templates
      + +
      +
      5.4.1.3. org capture templates

      I wrote these capture templates to allow myself to quickly create Anki cards from within Emacs. I nearly never use this feature, but it cannot hurt to have. @@ -12488,8 +12941,9 @@ I wrote these capture templates to allow myself to quickly create Anki cards fro

      -
    6. -
    7. Font Faces
      + +
      +
      5.4.1.4. Font Faces

      Again, my understanding of the font-faces in Emacs is limited. This is mostly just tuned so that my org-files look acceptable. @@ -12523,8 +12977,9 @@ Again, my understanding of the font-faces in Emacs is limited. This is mostly ju

      -
    8. -
    9. org-appear
      + +
      +
      5.4.1.5. org-appear

      This package makes emphasis-markers appear when the cursor moves over them. Very useful as I enjoy the clean look of not always seeing them, but it is annoying not to be able to edit them properly. @@ -12543,8 +12998,9 @@ This package makes emphasis-markers appear when the cursor moves over them. Very

      -
    10. -
    11. Centered org-mode Buffers
      + +
      +
      5.4.1.6. Centered org-mode Buffers

      I like org-mode buffers to be centered, as I do not find that enormous lines are of big use. @@ -12562,8 +13018,9 @@ Function definition in: Visual

      -
    12. -
    13. Fix headings not folding sometimes
      + +
      +
      5.4.1.7. Fix headings not folding sometimes

      There is a weird bug in org-mode that makes it so that headings were not folding correctly sometimes. This setting seems to fix it. @@ -12576,8 +13033,9 @@ There is a weird bug in org-mode that makes it so that headings were not folding

      -
    14. -
    15. Babel
      + +
      +
      5.4.1.8. Babel

      org-babel allows to run blocks in other programming languages within an org-mode buffer, similar to what e.g. jupyterhub offers for python. @@ -12587,8 +13045,8 @@ org-babel allows to run blocks in other programming languages within an org-mode It also offers a very useful utility of exporting org-mode buffers to different formats; the feature I enjoy most is what makes this file useful: the tangling functionality.

      -
        -
      1. Language Configuration
        +
        +
        5.4.1.8.1. Language Configuration
        • This configures the languages that babel recognizes.
        • @@ -12613,8 +13071,9 @@ It also offers a very useful utility of exporting org-mode buffers to different
        -
      2. -
      3. old easy structure templates
        +
      +
      +
      5.4.1.8.2. old easy structure templates
      • @@ -12637,10 +13096,10 @@ Usage: Type <, followed by one of the below keywords and press <

    16. - -
    - -
  • aucTex
    + + +
    +
    5.4.1.9. aucTex

    This provides several utilities for LaTeX in Emacs, including many completions and convenience functions for math-mode. @@ -12666,8 +13125,9 @@ This provides several utilities for LaTeX in Emacs, including many completions a

    -
  • -
  • org-download
    + +
    +
    5.4.1.10. org-download

    This package allows to download and copy images into org-mode buffers. Sadly it does not work in a very stable manner - if you copy images that are also links to another page (like is often the case in a Google image search), Emacs might crash from this. @@ -12693,8 +13153,9 @@ This package allows to download and copy images into org-mode buffers. Sadly it

    -
  • -
  • org-fragtog
    + +
    +
    5.4.1.11. org-fragtog

    This package automatically toggles LaTeX-fragments in org-files. It seems to also work in markdown-files which is a nice addition, as my Obsidian notes are held in markdown. @@ -12709,8 +13170,9 @@ This package automatically toggles LaTeX-fragments in org-files. It seems to als

    -
  • -
  • org-modern
    + +
    +
    5.4.1.12. org-modern

    This just makes org-mode a little bit more beautiful, mostly by making the begin_src and end_src tags in source-blocks turn into more beautiful icons, as well as hiding #+ tags before them, as well as in the properties section of the file. @@ -12727,8 +13189,9 @@ This just makes org-mode a little bit more beautiful, mostly by making the

    -
  • -
  • Presentations
    + +
    +
    5.4.1.13. Presentations

    Recently I have grown fond of holding presentations using Emacs :) @@ -12841,8 +13304,7 @@ Recently I have grown fond of holding presentations using Emacs :)

    -
  • - +

    5.4.2. Nix Mode

    @@ -12971,8 +13433,8 @@ Adds functions for formatting shellscripts.

    5.4.9. Markdown Mode

    -
      -
    1. Mode
      +
      +
      5.4.9.1. Mode
      @@ -12988,8 +13450,9 @@ Adds functions for formatting shellscripts.
       
      -
    2. -
    3. LaTeX in Markdown
      +
    +
    +
    5.4.9.2. LaTeX in Markdown
    @@ -13002,8 +13465,7 @@ Adds functions for formatting shellscripts.
     
    - - +

    5.4.10. Olivetti

    @@ -13712,8 +14174,8 @@ I used to run this together with the yasnippet-snippets package, bu
    -
      -
    1. yasnippet math-snippets
      +
      +
      5.4.32.0.1. yasnippet math-snippets

      The following block is mostly inspired from https://code.kulupu.party/thesuess/WTFmacs/ and sets up a few prefixes that make LaTeX-math-mode nicer to use even with auctex and cape enabled. @@ -13775,8 +14237,7 @@ The following block is mostly inspired from

      5.4.33. eglot

      @@ -14036,8 +14497,8 @@ Hydra allows for the writing of macro-style functions. I have not yet looked int
      -
        -
      1. Text scaling
        +
        +
        5.4.41.1. Text scaling

        I only wrote this in order to try out hydra; rarely do I really need this. However, it can be useful for Presentations. It simply scales the text size. @@ -14056,15 +14517,14 @@ I only wrote this in order to try out hydra; rarely do I really need this. Howev

        -
      2. -
      +

      5.4.42. External Applications

      -
        -
      1. Obsidian
        +
        +
        5.4.42.1. Obsidian

        This provides an interface to Obsidian for Emacs - as much as I want to like it, I actually enjoy using the official Obsidian app more - even though that cannot be used by Emacs directly. @@ -14108,15 +14568,16 @@ I hope that this package will improve, then I will come back to it one day.

        -
      2. -
      3. Anki
        +
      +
      +
      5.4.42.2. Anki

      This section is here to make Anki usable from within Emacs - an endeavour that I have mostly given up on.

      -
        -
      1. Basic Anki setup
        +
        +
        5.4.42.2.1. Basic Anki setup
        @@ -14161,8 +14622,9 @@ This section is here to make Anki usable from within Emacs - an endeavour that I
         
        -
      2. -
      3. Own Anki functions
        +
      +
      +
      5.4.42.2.2. Own Anki functions
      • These functions enable you to quickly set the destination note type and deck
      • @@ -14203,17 +14665,15 @@ This section is here to make Anki usable from within Emacs - an endeavour that I
      -
    2. -
    - - + +

    5.4.43. Email

    -
      -
    1. make sure mu4e is found
      +
      +
      5.4.43.1. make sure mu4e is found

      This seems not to be needed - I do not yet dare to delete it though. @@ -14235,8 +14695,9 @@ This seems not to be needed - I do not yet dare to delete it though.

      -
    2. -
    3. mu4e
      +
    +
    +
    5.4.43.2. mu4e

    In this section we are setting up mu4e, a mail client for emacs using mu with mbsync as backend. The mail accounts themselves are setup in the NixOS configuration, so we only need to add Emacs specific settings here. @@ -14296,8 +14757,9 @@ The hook functions are defined here: mu4e-alert
    +

    +
    +
    5.4.43.3. mu4e-alert

    This adds the simple utility of sending desktop notifications whenever a new mail is received. I am using libnotify because I want to use this with notify-send. @@ -14315,8 +14777,7 @@ This adds the simple utility of sending desktop notifications whenever a new mai

    - - +

    5.4.44. Calendar

    @@ -14583,7 +15044,7 @@ Prints a reasuring message to proove good faith."

    Author: Leon Schwarzäugl

    -

    Created: 2024-12-11 Mi 01:25

    +

    Created: 2024-12-11 Mi 01:50

    Validate

    diff --git a/programs/emacs/init.el b/programs/emacs/init.el index 39632de..10a8258 100644 --- a/programs/emacs/init.el +++ b/programs/emacs/init.el @@ -891,6 +891,7 @@ create a new one." ;; (setq org-log-done 'time) ;; (setq org-log-into-drawer t) (setq org-startup-with-inline-images t) + (setq org-export-headline-levels 6) (setq org-image-actual-width nil) (setq org-format-latex-options '(:foreground "White" :background default :scale 2.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")))