Linux: I Am Lazy, Therefore I am Fast

I am talking about the only good way of being Lazy.
Where a reasonable time investment now, will save a lot of work in the future.

Try getting the time cost down

Opening a heavy GUI IDE and waiting for it to finish loading in every single file and symbol etc. certainly feels worse compared to something like VIM. NeoVim introduces multithreading and lazy loading of plugins to the VIM experience, but VIM is already faster than 90% of GUI editors.

While it runs faster, the time investment to fully configure NeoVim is massive in comparison. There are preconfigured variants, like AstroNvim, that come with all bits and pieces to get started right away. Finally, there is always the option to clone someone else’s neovim config.

Alias'

My .zshrc is a combination of useful alias’ and commands collected for over a year now. An Alias essentially replaces a very long command by a very short one. Instead of typing nvim, I can type v to open NeoVim.

alias ll="ls -la"

alias cp="cp -i"        # confirm before overwriting
alias df="df -h"        # human readable sizes
alias free="free -m"    # show sizes in MB

alias n="nano"
alias v="nvim"

# git stuff
alias gs="git status"
alias gd="git diff"
alias gup="git fetch && git pull"

# if not running interactively (rsync etc), skip neofetch
[[ $- != *i* ]] && return

neofetch | lolcat

Check out my dotfiles for more info.

Welcome to the Linux Scripting Community

If there is any task, that you or a loved one do every day, and is automatable, automate it. There might already be a script available online for you to use as a jumping off point, be it bash, python or lua.

Here is a script that upscales all images in a given folder. I mostly use it for upscaling desktop background images.

import os
import sys

# get folder path argument
path = sys.argv[1];

for file in os.listdir(path):
    print(f"UPSCALING: {file}");
    file = os.path.join(path, file)
    # construct output file name
    file_out = file.split('.')[0]
    file_out += "_up.png"
    # upscale image
    os.system(f"waifu2x-ncnn-vulkan -n 2 -s 2 -i {file} -o {file_out}")

You can find more scripts like this in my linuxnotes repository.

Shortcuts

Since Linux was made with freedom in mind, pretty much every single keyboard shortcut can be adjusted to your liking. At least in KDE this is the case. The Wind*ws shortcut for taking screenshots was already burned into my mind. I simply edited Spectacle’s shortcut to use the same one: Super+Shift+S

Another shortcut I always use is Super+CTRL, to toggle between german and english keyboard layout.

Just getting Software

Just the act of installing new software, is faster, more convenient and safer. Instead of downloading a big binary blob from a website that shows too many ads, I get to type three words into my terminal and I have new software installed.

Additional Notes

Althought this article was meant to show how to turn a normal/slow Linux install into a fast, customized and personal one, It kind of turned into a comparison between Wind*ws and Linux.

But it is true. Resuming from Sleep/Hibernation, Booting it up and opening programs, Linux feels faster. While some CPU benchmarks I recorded in Geekbench, show that Linux is about 10% faster, for Gaming its more of a mixed bag. Some games are faster, while some struggle more.

roman's lab

Technology and Engineering Blog


Do not be afraid to be Lazy

By Roman Hayn
14 March 2023

[~] ls
-r-x Linux
-r-x Workflow