Computer Stuff


Please Take Your Freedom and Privacy Seriously!

This sentiment, of course, applies more generally than simply to the things I write here. If you use Facebook, please, at the very least read this. If you do not know about free software (free, here, does not refer to price but freedom), I strongly encourage you to watch this.
Here are some examples of free software I really enjoy using: Find more free software here.
For Android phones:

LaTeX

LaTeX + (Neo)Vim

If you want ideas/inspiration on writing TeX-files (quickly) with (Neo)Vim (R.I.P. Bram Moolenaar) or in a university setting you might want to check out Gilles Castels (R.I.P.) blog posts.

My TEXMFHOME

I e.g. have the following LaTeX .cls-files in my TEXMFHOME: If you are using TeX Live, don't know what TEXMFHOME is and you use custom TeX-files (e.g. .cls, .sty or .bib files), look into it! Once you have a conceptual understanding of a texmf tree the following might be useful: Find your TEXMFHOME using:
$ kpsewhich -var-value TEXMFHOME
If you add/rename files in your TEXMFHOME remember to run
$ mktexlsr /path/to/TEXMFHOME
for the changes to take effect and remember to follow the TDS!

Linux

Newcommer

If you have never tried using Linux I would recommend trying Fedora Linux if your life permits it (check e.g. This video). Just find a tutorial on how to install it (e.g. This video) and try! - it's free and open source! (The distribution does not matter as long as it is beginner-friendly)

Dotfiles

Here are some selected dotfiles.

Neovim as external editor for Evolution

The only mail-client I have ever really used on Linux is Evolution (the default GNOME mail-client). It has never really given me any problems and has just worked. Sure it may be a bit bloated and, since it is part of the GNOME-ecosystem, it can be annoying to have everything work outside GNOME. There is a plugin (installed by default through the Evolution Arch-package) which allows the use of an external composer for emails. I saw this and immediately thought of Neovim, of course. Finding any quick answers on how to do exactly what I wanted on the internet was impossible for me, so here I will share what I have done to get it working.
The plugin allows you to give a command that will open your editor. This is found in the settings (or "preferences" — <Ctrl-Shift-S>) of Evolution under plugins>External editor>Configuration, or it is the command key of the schema org.gnome.evolution.plugin.external-editor. We can set it by using
$ gsettings set org.gnome.evolution.plugin.external-editor command "<command>"
Here we will create our own script, lets call it path/to/nvim-mail.sh for Evolution to run when you begin editing an email. Evolution will run the command with the $1-argument set to the path to a file containing the content of the email you are writing (it will look like tmp/EVOakjhgka).
$ gsettings set org.gnome.evolution.plugin.external-editor command "sh path/to/nvim-mail.sh"
A very simple script, which just opens the mail in Neovim inside an Alacritty terminal would be
#!/bin/bash

# $* will be the path to a tmp file that evolution uses to write the email.

# Open Neovim in insert mode at the end of the first line
alacritty -e nvim $*
A bit more sophisticated (i.e. closer to the one I use).
#!/bin/bash

# $* will be the path to a tmp file that evolution uses to write the email.

# Check if the mail is empty
if [[ $(cat $*) == "" ]]; then
   # Add "start" to it
   echo "start" > $*
else
   # check if this is a reply by checking if the first
   # character of the second-to-last line i a ">".
   lastline=$(tail -n 2 $* | head -n 1)
   if [[ ${lastline:0:1} == ">" ]]; then
      # add "start" and empty lines since it is a reply
      sed -i '1s/^/start\n\n\n/' $*
   fi
fi

# Open Neovim in insert mode at the end of the first line
alacritty -e nvim -u /home/soren/.config/hypr/configs/mail-nvim/init.lua -c "startinsert!" $*
I add "start" to the file to be able to use a snippet. I made a /path/to/init.lua specifically for mail (that e.g. makes nvim treat the file as markdown and some snippets for writing emails). the -c "startinsert!" makes nvim open in isertmode at the end of the first line.

GPG

Here is my public GPG key. (as a .md-file)