Lecture & Notes
Neovim + Syncthing + Markor
Gentoo Packages:
app-editors/neovim
,net-p2p/syncthing
F-Droid Link(s):
https://f-droid.org/en/packages/com.nutomic.syncthingandroid/
,https://f-droid.org/en/packages/net.gsantner.markor/
- Neovim: My text editor on desktop/laptop. It’s lightweight, quick, and extensible.
- I go over my Neovim configuration near the bottom of this post
- Syncthing: Used to Sync my notes across all my devices. I have a laptop running Syncthing 24/7 so that my changes always propagate. This reduces the need for conflict resolution
- Markor: Used to edit my notes on my phone.
I previously used Joplin, but disliked both being locked-in to their app and the slow sync + bad conflict resolution1.
Anki + Ankidroid
Gentoo Package:
app-misc/anki-bin
F-Droid Link:
https://f-droid.org/en/packages/com.ichi2.anki/
Anki is a flashcard program that uses the spaced repetition technique for effective and convenient studying. Being able to sync my cards and practice progress across my phone, desktop, and laptop is incredibly convenient. Plus, they’re easier to edit and search2 through than paper.
Ankidroid is just an Android client for Anki, it works perfectly.
I also use the following add-ons (on the desktop client):
- No Distractions Full Screen: Slight modifications to the UI to make it less cluttered while in fullscreen.
- ReColor: Theme Anki to match my system theme (Catppuccin Mocha)
- Review Heatmap: A GitHub-like heatmap of your progress/practice. If I could only use one addon, this is the one I’d use. It’s very useful to see your practice (or, lack thereof) and gauge yourself at a glance.
Auto Editor
Python Package:
auto-editor
Auto-editor chops out silent portions of videos, which can save anywhere from a couple seconds to a few minutes depending on a lecturer’s presentation style3.
auto-editor --download-format "mp4" "<YOUR_YOUTUBE_URL>"
and auto-editor "<PATH_TO_VIDEO>"
are two invaluable commands. Note that Auto Editor is super-duper slow on .webms compared to .mp4s (hence --download-format "mp4"
).
Writing
LibreOffice Writer (Suite)
Gentoo Package:
app-office/libreoffice
LibreOffice Calc, Impress, and Writer are great programs that allow me to right essays, reports, et cetera.
I was also able to set custom colors to have all my LibreOffice applications match my system theme; and this doesn’t have any effect on the colors of exported documents! (as long as text colors are set to “automatic”)
LanguageTool
Gentoo Package:
app-text/languagetool
(Optional) Ngram Data:
https://languagetool.org/download/ngram-data/
I use LanguageTool with n-gram support for grammar and spell checking in LibreOffice, Neovim, and Firefox. I also used it with VSCodium and Thunderbird, back when I used those programs.
The n-gram data takes up 8gb of space and should be on a SSD, but it’s good for common grammatical errors like “Don’t forget to put on the breaks”.
On Arch Linux there is a convenient AUR package for the ngram data, but on Gentoo you’ll just have to manually install it. Luckily it is a one-time thing, as the data was created in 2015 and the type of stuff we write that requires a grammar checker won’t move as fast as slang.
Anyways, I have LanguageTool start automatically with:
languagetool --http --port 8081 --allow-origin "*" --languageModel "/usr/share/ngrams/"
Beware that LanguageTool will eat up a half a gigabyte of memory when idle and more than a gigabyte once it’s parsing data.
Search
uBlacklist
Git Repo: https://github.com/iorate/ublacklist
This browser extension lets you apply filter lists to search results from various search engines. Like how uBlock lets you avoid ads, uBlacklist lets you avoid bad results.
It’s great at reducing SEO / AI / content mirror spam sites.
I use these rulesets:
# AI Spam
https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list_uBlacklist.txt
# Copycat Sites
https://raw.githubusercontent.com/quenhus/uBlock-Origin-dev-filter/main/dist/other_format/uBlacklist/global.txt
# SEO Spam & Junk
https://raw.githubusercontent.com/NotaInutilis/Super-SEO-Spam-Suppressor/main/ublacklist.txt
Startpage / Firefox Search Shortcuts
Used to use Searxng, switched to Whoogle for ease, fled to Duckduckgo after Google killed JS, and looped all the way back by Startpage, a search engine owned by an ad company that runs Google queries.
Kagi search seems interesting to me, but I’m unsure if I will even benefit, as I’ve replaced a lot of my search engine searches with Firefox search Shortcuts (about:preferences
-> Search)
These are my Firefox Search shortcuts:
- “@w” for Wikipedia,
- “@g” for the Gentoo Wiki,
- “@a” for the Arch Wiki,
- “@git” for GitHub4,
- “@p” for ProtonDb5,
- “@w” used to be Whoogle (rest in peace),
- “@f” for the Factorio Wiki,
- “@y” for YouTube,
- “@l” for Library Genesis
- “@s” for Stack Overflow
- “@star” for the Stardew Valley Wiki
- “@t” for the Terraria Wiki
- “@o” for the Old School Runescape Wiki
- “@d” for DuckDuckDuck Go Lite
Every time I find a wiki, I try to give it a Firefox Search shortcut. It’s the same collector’s urge behind subscribing to RSS feeds. Speaking of, I have a RSS feed if you’ve read this far and want to be notified when I post again in 2 years.
Kiwix
GitHub Link: https://github.com/kiwix/kiwix-desktop
Kiwix is an offline reader for highly-compressed ZIM archives of web pages.
It’s not a replacement for search engines, as the ZIM archives still stack-up if you download big ones (e.g., Wikipedia with pictures), but it is occasionally helpful for some topics[^fnTopics].
[^fnTopics] Not most.
To-Do List
Todo.txt + Todo.txt-cli + Markor
GitHub Links:
https://github.com/todotxt/todo.txt
,https://github.com/todotxt/todo.txt-cli
F-Droid Link:
https://f-droid.org/packages/net.gsantner.markor/
Todo.txt is a simple plaintext format for maintaining a to-do list. It looks like this:
Mini Exam II (Chapters 6-8) +physics due:2023-03-31
Final corrections +math due:2023-04-05
(A) Register for Fall 2023 classes due:2023-04-27
Weekly response paper due:2023-04-02 rec:+1w +history
todo.txt-cli is a shell script that lets me cat the Todo.txt with filters and sorting. Markor is a text editor for Android with Todo.txt syntax highlighting support.
I spent a ton of time trying out different to-do lists, but every single one had one of these problems:
- Uncustomizable theming
- Unnecessary built-in features (e.g., Pomodoro timer, daily mood journal, etc.)
- Different formats (todo.txt vs iCalendar format)
- And no, conversion between formats sucks a lot
- “All or nothing” syncing that overwrites every entry if something conflicts
- “All or nothing” syncing that constantly requires manual intervention to solve conflicts that aren’t really conflicts
- Lack of support for tags
- Lack of support for nested to-do items
A todo.txt file’s biggest weakness for me is the lack of nested to-do items, but its biggest strength is how easy it is to use with todo.txt-cli. It also benefits from the same “smaller syncs faster” approach that keeping my notes in Markdown has had, because it means you can sync rapidly with Syncthing and avoid conflicts.
Claws Mail
Gentoo Package:
mail-client/claws-mail
Claws Mail is a lightweight, quick email client.
I used to use Thunderbird hardened and debloated with a fork of Arkenfox.js (to remove all the telemetry and non-email client stuff), but that didn’t solve the fundamental problem of having a web browser running in the background 24/7 just to get my emails.
Of course, when it comes to extensibility, Thunderbird blows Claws Mail away because it’s a web browser with extensions and add-ons for everything. I also miss the modern UI.
However, being able to have all my email accounts synced with only 35.2 MB of RAM consumed is a good deal for me, and I’ve gotten used to Claws Mail.
Ad-Block
uBlock Origin
GitHub Link:
https://github.com/gorhill/uBlock
uBlock Origin is a terrific ad and annoyances blocker.
I enabled the built-in filterlists under “Built-in”, “Ads”, “Privacy”, “Malware Domains”, and “Annoyances” and rarely get any broken websites. Websites break because of my Firefox privacy settings way more often than uBlock.
https://raw.githubusercontent.com/DandelionSprout/adfilt/master/ClearURLs%20for%20uBo/clear_urls_uboified.txt
https://raw.githubusercontent.com/DandelionSprout/adfilt/master/LegitimateURLShortener.txt
- ClearURLs: Filters based on the rules used by the ClearURLs extension to remove tracking codes from URLs.
- Legitimate URL Shortener: Filters to remove unnecessary parameters from URLs for readability and privacy.
hBlock
GitHub Link:
https://github.com/hectorm/hblock
hBlock is a system-wide adblocker that works by creating a hosts file to block domains that serve ads.
Mouse
Piper + KDE Keyboard Daemon
Gentoo Package:
app-misc/piper
I have a love/hate relationship with my Logitech G600 multi-button mouse. You’ll see why once you read about my setup.
To explain the tool combo:
- Piper lets me access and modify my G600’s onboard storage; limitations and all.
- KDE’s Keyboard Daemon can be thought of as my on-computer storage. It fills the gaps with what Piper/My Mouse can do.
Altogether, this is what my setup looks like:
- Piper:
- Kronkite Window Tiling: Changing The Active Window (these keys are arranged intuitively on my mouse, like arrow keys)
- G10 button is bound to
META+K
- G13 button is bound to
META+J
- G12 button is bound to
META+H
- G14 button is bound to
META+L
- G10 button is bound to
- KDE Window Tiling: Minimize/Fullscreen Windows (meta key is pressed separately)
- G9 button is bound to
PAGEDOWN
- G11 button is bound to
PAGEUP
- G9 button is bound to
- KDE Window Tiling: Closing Windows/Applications
- G18 button is bound to
ALT+F4
- G19 button is bound to
CTRL+W
- G18 button is bound to
- Hacks for KDE Keyboard Daemon:
- Rightmost-click is bound to
COMPOSE
key - G15 button is bound to
CAPSLOCK
key
- Rightmost-click is bound to
- Kronkite Window Tiling: Changing The Active Window (these keys are arranged intuitively on my mouse, like arrow keys)
- KDE Keyboard Daemon:
COMPOSE
=>META
CAPSLOCK
=>CTRL
RIGHTALT
=>COMPOSE
You may be wondering what “Hacks for KDE Keyboard Daemon” is doing:
CAPSLOCK
andCOMPOSE
are valid single-key macros on my G600’s onboard storage unlikeCTRL
orMETA
, which don’t work.- I never use
CAPSLOCK
and rarely useCOMPOSE
, so they’re great dummy keys- Though, this could theoretically be improved by using dummy keys that aren’t even on my keyboard via a tool like Input Remapper (which I previously used before discovering that KDE already enough for me)6
- I do occasionally use the
COMPOSE
key, but it is in such an unergonomic place that I’ve rebound it toRIGHTALT
.
- KDE Keyboard Daemon rebinds the dummy keys to their respective special characters.
- In KDE I love using
META+LEFTCLICK+DRAG
andMETA+RIGHTCLICK+DRAG
to move and resize windows with quick, general, intuitive movements. Combined with my tiling windows’ auto-snapping and auto-resizing, this results in lightspeed movement that only requires me to use my ring finger that’s already resting on the rightmost-click rather than holdingMETA
with my left hand
- In KDE I love using
Despite my troubles and duct-tape with the dummy keys, the benefits have been worth it.
It’s funny because I have a tiling WM, but instead of hitting META+SHIFT+K to “grow [a window] up”, I can just apply pressure to my resting index finger and move and resize windows incredibly easily, while still getting the visual-efficiency of a tiling WM.7 The keys I hit most-often on my mouse are META (index finger) and ALT+F4 (thumb)8.
Cleaning
Filelight
Gentoo Package:
kde-apps/filelight
Shows your disk usage as an intuitive map of segmented rings, extremely useful for seeing what’s eating up space (the answer is Steam).
BleachBit
Gentoo Package:
sys-apps/bleachbit
I run BleachBit once every couple of months to delete junk files and free up space.
There’s really not much more to say about it, BleachBit is very easy to use and difficult to mess up.
Though, beware of applications that use ~/.cache
inappropriately. I had to whitelist ~/.cache/lutris/banners
and ~/.cache/lutris/coverart
after BleachBit deleted my cover art from my Lutris library.
Tangent on Lutris: If you want slightly less-pixelated Lutris banners, resize your covers to 184x69 before adding them! Personally I did this to a bunch of banners downloaded from SteamDB.info with
mogrify -resize 184x69 header.jpg
.Alternatively, you can increase Lutris’s zoom until the covers change from banners into vertical coverart, which take up more space but look a lot better (especially for my DS game library). You can download vertical covers from https://www.steamgriddb.com/.
eclean
Gentoo Package:
app-admin/eclean-kernel
I have this cronjob in /etc/cron.daily/eclean
:
#!/usr/bin/env bash
sudo eclean-kernel --num 1
sudo eclean-dist
Not related, but way back I also made this other daily cronjob to emerge --sync
for me every-other-day.9
#!/usr/bin/env bash
day_of_week=$(date +%u)
(( day_of_week % 2 )) && exit 0
sudo emaint sync -a
Neovim
My
init.vim
: https://github.com/inevitabby/dotfiles/blob/master/.config/nvim/init.vim
The following plugins / tools are just the “most notable” highlights from my dotfiles:
Vim Plug
GitHub Link: https://github.com/junegunn/vim-plug
Vim Plug is my plugin manager.
Zen-mode + Twilight
GitHub Link: https://github.com/folke/zen-mode.vim
GitHub Link: https://github.com/folke/twilight.vim
Zen-mode turns off line numbers and other UI elements and Twilight dims lines except the ones near the cursor.
Together, they can provide a more focused environment (which I use mainly for writing).
Markdown Preview.nvim
GitHub Link: https://github.com/iamcco/markdown-preview.nvim
Markdown Preview provides an in-browser Markdown preview with support for a slew of Markdown extensions (e.g., KaTeX, Mermaid, Chart.js, etc.)
I don’t use it anymore ever since I wrote integration for my own Pandoc daemon, but I did use it plenty of times in the past, and it was useful for seeing my KaTeX in math classes.
Bullets.vim
GitHub Link: https://github.com/dkarter/bullets.vim
This plugin adds intuitive bullet-point behavior to Markdown files. These changes are incredibly useful when editing Markdown (e.g., automatically-numbered ordered lists, continue a list by pressing enter or o
, add support for toggling GitHub-style checkboxes with <LEADER>+x
, etc.)
Vim Pandoc + Vim Pandoc Syntax
GitHub Link: https://github.com/vim-pandoc/vim-pandoc
GitHub Link: https://github.com/vim-pandoc/vim-pandoc-syntax
These plugins provide easy integration with Pandoc, a tool for converting markup into various file formats.
This is useful for doing things like exporting my markdown notes into a wide variety of formats with immense customizability, or exporting markdown into MLA-formatted PDFs
For example, you could do pandoc "example.md" --pdf-engine=xelatex -o "example.pdf"
and set up an alias or keybind, or you could just do :Pandoc pdf
in Neovim.
Nvim Treesitter
GitHub Link: https://github.com/nvim-treesitter/nvim-treesitter
Nvim Treesitter provides fast and slick syntax highlighting for a wide variety of formats with treesitter.
Vim Fugitive
GitHub Link: https://github.com/tpope/vim-fugitive
Fugitive provides Git integration in Neovim’s non-interactive shell console. Do :G
to run arbitrary Git commands, sit back, and relax.
Telescope
GitHub Link: https://github.com/nvim-telescope/telescope.nvim
Telescope provides a fuzzy finder with live grep functionality. Useful for notes, code, etc.
Mason.nvim & Friends
GitHub Link: https://github.com/neovim/nvim-lspconfig
GitHub Link: https://github.com/mason-org/mason.nvim
GitHub Link: https://github.com/mason-org/mason-lspconfig.nvim
My full LSP imports is:
" == LSP Support ==
Plug 'neovim/nvim-lspconfig'
Plug 'mason-org/mason.nvim'
Plug 'mason-org/mason-lspconfig.nvim'
" == Autocompletion ==
Plug 'hrsh7th/nvim-cmp'
Plug 'windwp/nvim-ts-autotag'
" Completions based on the current buffer
Plug 'hrsh7th/cmp-buffer'
" Completions based on the filesystem
Plug 'hrsh7th/cmp-path'
" Completions based on built-in LSP
Plug 'hrsh7th/cmp-nvim-lsp'
" Completions based on built-in spellsuggest (dictionary)
Plug 'f3fora/cmp-spell'
" == Snippet Engine ==
Plug 'L3MON4D3/LuaSnip'
Plug 'saadparwaiz1/cmp_luasnip'
Mason makes it easy to install new LSPs as I need them. It’s essentially one big convenient wrapper around Neovim’s built-in lspconfig
.
Everything else is just more autocompletion and snippet sources that stack on-top lspconfig
.
Gentoo
Distro-hopping is good for learning, bad for getting fully comfortable with your PC.
It’s fun to tinker, but you eventually have to settle-in and actually use your PC.
Settling-In
I haven’t touched my make.conf
or manually ran emerge --sync
in years.
My update procedure is a single Zsh alias:
update() {
echo "Running update [1/3]"
e --update --deep --newuse --verbose @world --keep-going --ask --backtrack=1000
echo "Running preserved-rebuild [2/3]"
e @preserved-rebuild
echo "Running depclean [3/3]"
e --depclean
}
I don’t even type in my sudo password to update or install anything.10
alias emerge="doas emerge"
alias e="doas emerge"
alias es="emerge --search" # (shorter + doesn't require lockfile like doas emerge --search)
alias eq="equery"
I haven’t changed my color-scheme in years, and my background is a single color (#1e1e2e
).
Settling-in to your PC, whatever that means for you, is one of the best things you can do.
Parting Thoughts
I hope that you were able to take away something that will help you in your own life. Kinda like reading someone’s dotfiles and adapting the bits that interest you.
If there’s one thing you should take away from this all, it’s to find what you like and settle-in.
Footnotes
Turns out, a 1 KB markdown file syncs faster than a X MB database. ↩
I once took a class so rote that I was able to take notes entirely in Anki. We had open-note quizzes, midterms, and finals. I felt like I had superpowers. ↩
Math lectures are the best ones to use this on, and—in my opinion—greatly improves the communication of the concept. Previously, the dead space of the lecturer writing would be annoying because you’d have two options: (1) pause the video now, or (2) try to work in tandem while semi-focusing (and you’ll never be in tandem). Cutting out the gaps means you can just hit pause and unpause on the information itself. ↩
“@g” somehow gets stolen by the default “@google”, no matter how many times I disable it. ↩
Use Steam? Check out the SteamDB extension, it adds price history data directly into the store webpage. ↩
The best resource for finding dummy keys is https://usb.org/sites/default/files/documents/hut1_12v2.pdf (starting at page 53). A lot of AL (application launch) keys could be used as dummy keys (e.g.,
"AL Voicemail"
,"AL Telephony/Dialer"
,"AL Customized Corporate News Browser""
, etc.) ↩If you use a tiling WM that supports mouse movement like KWin + Kronhite, you gotta buy a 3-button mouse. Mixing up your use will also greatly reduce repetitive strain, which I’m sure your editor of choice gives you enough-of. ↩
Just be wary of clutching your mouse in high-stress gaming, and/or make another profile if your mouse supports that, like mine. ↩
Why every-other-day? Because I put my sibling on alternating days as me, as I couldn’t be bothered to set up a Git repo and sync to that. ↩
Yeah it’s “bad for security”, but if someone is already able to run
e
on my PC, I think it doesn’t matter anymore. ↩