Skip to content

Barless

A bar is used on a Linux Window Manager to display information like the date, time, volume information and maybe most importantly, on which desktop you are. Most people add way more to their bar, like CPU usage, memory usage, system temperature, hard drive space usage, connection state and many many more. It’s also a part of the look of your desktop which you’re supposed to rice, screenshot and put on /r/unixporn1. ...

Hyper

From day one on the Macbook I looked at how I could make this thing work for me in a way I was accustomed to. I come from Linux, a world of endless possibilities. In the 15+ years I used it as my main system, I got a certain workflow that was my own. People used to joke that I didn’t need to lock my laptop when I was away, as it was unusable to anyone else. I didn’t use a bar. A logged in system would show nothing but the wallpaper. Pressing the super (Windows) key did nothing. Right clicking the desktop did nothing. Sure, a Linux window manager user would press super + enter and they would be greeted by Kitty, my terminal emulator, but no Windows user would press that combination. ...

Clean $HOME, Clean Mind

I don’t like a messy home. Home is where all your stuff lives and if you want to find something, it’s easier if there’s not a bunch of clutter in the way. This is true in your physical home and your digital $HOME. Most Linux distributions and macOS populate your $HOME with directories you never asked for. The difference is whether you can rid yourself of them. On Linux they come from xdg-user-dirs. You can remove or disable it, delete the directories, and they stay gone. macOS has no such switch: delete its home directories and the system quietly recreates them. So on the Mac you can’t remove them… but you can hide them. ...

LUKS

LUKS, Linux Unified Key Setup, is a way to encrypt partitions on Linux. It’s a good way to store sensitive data on a flash drive or on your main system. Usage is super simple. You issue a command to unlock it and it will prompt you for your passphrase. After entering the right one, you can mount the partition and use it as normal. When you’re done with it, you umount the partition and lock it with another command. Without the right passphrase the data on the partition is just noise. ...

Rsync

Rsync is an amazing utility to copy (or sync) stuff from one place to another without having to worry about the command getting cut. With a plain cp, an interrupted transfer means starting over from scratch. Rsync compares source and destination, skipping files that are already there, and with --partial it can even resume a file that was only halfway through. It can also remember ownership and permissions, and even copy over ssh. That is, with the right flags, which I can never remember. Hence this post. ...

Terminal Abbreviations

Typing takes time. Typing without typos is an art. Fixing mistakes in a terminal command is a pain in the neck. Luckily there’s such a thing as aliases. An alias lets you set a keyword and a command it should expand to. For example, I have set a super simple one, which is widely used: alias ..='cd ..'. This allows me to write .. in terminal and it will act like cd .., saving me typing a c, a d and a space. This seems minor, but when you imagine how often I need to go up a directory in terminal, it’s a huge timesaver. ...

Permissions On Shared ZFS Dataset

I have a ZFS dataset named data, mounted at /data, which I bind-mount into my LXC containers. The dataset is a three drive set with a lot of storage space. Basically, this huge pool of gigabytes is shared by all LXC containers that need to store serious amounts of data. Think Immich, for photo storage, or Jellyfin and all the movies, series and music it has to be able to play. As you may imagine, having several different LXCs write to the same “drive” may cause permission issues. ...

The Best Function I Ever Stole

Extracting archives is a pain on Linux. There are just so many types and so many programs to extract each type. A .tar.gz file is extracted using the program GNU tar1, but for a .zip file, you’d need unzip2. What’s that? You’ve got a .7z file? Yeah-no, can’t use either of the before mentioned extractors, you need 7-zip3. Got a .rar, you’d need… well, you get the point. What’s more, some of these programs require flags you’ll need to use to actually extract an archive. For example, to extract a tar file, you might do something like tar xvf <filename>. For a 7z file though, it’d be 7z x <filename>. Other extraction programs don’t require flags at all though, just the name of the extraction program followed by the file to extract. This sounds simple enough, but wait… what was the name of the program to unzip .bz2 files again? ...

Compose Key

In many languages there’s a need to add decorations, or glyphs to characters, like for example é or č. These are called diacritics1. These characters don’t exist on a US Standard qwerty keyboard. There is the US International version with dead keys, which allow for crafting these special characters by pressing the desired diacritic key followed by the character to apply it to. So for example pressing ~ followed by n results in an ñ. ...