Customizing linux for productivity

30309/01/30

Sam V.

Customizing linux for productivity can help you become a more efficient person, and you have no idea how efficient people get, it is completely off the charts.

Minimalism and living in the terminal

Minimalism is so helpful in many ways, it can help you focus on what is essential, find what you need to use quickly, and force you to organize things well. Usually I try to do everything from the terminal, it saves cpu and memory compared to using GUI apps, it is so fast, and it has all I need in one place. Avoiding to go back and forth multiple applications also saves time.

Mouse allergy and shortcuts for everything

I am allergic to mice, so I try to use the keyboard 90% of the time. Using the keyboard is so much better if you do not need to use lots of grahical application. Fingers stay at the same place, and using keyboard shortcuts is way faster than not using shortcuts at all.

Using a window manager

Using a window manager might be most important thing to gain productivity on linux. If you know how to use one well, you can save a lot of time and do things you will never be able to do with built-in window managers.

Some window manager are really good for productivity, but if you really like to dive deep and customize things, you can modify your own. I went from i3 to dwm from suckless as a window manager, I customized it myself while using multiple patches and modifying the C code myself, and it is really so useful.

An important aspect is being organized, and using a quick way to navigate between workspaces is key:

A very good aspect of window managers is to organize views and temrinal windows (this is not a fast forward video):

Alt+enter is used to spawn a new terminal window, Alt+q to quit one, Alt+j and Alt+k are vim keys to cycle throught the dwm stack window (https://dwm.suckless.org/tutorial/), and Alt+z to swap windows in the stack. This way you can be incredibly fast managing information on the screen.

Resizing and swtiching windows tiling mode directly from the keyboard is also faster:

My fingers will always stay on the center of my keyboard, and my fingers close to the ALT key, so I can be faster using my computer for all kinds of tasks related with managing windows.

The logic behind a window manager is to use shortcuts and a different way of thinking to increase productivity, if you modify your window manager yourself you can really create something tailored to you.

One really usefull feature is to map scripts and applications to shortcuts, this way with a single shortcut you can execute scripts and run programs, here I can use this functionnality to quickly run applications for example launching keypass with alt+s:

You can also map keybindings directly from the Window manager to execute scripts or applications, for example in my dwm configuration I mapped alt + S to run keepass . Another cool thing you can do with Dwm and othe riwndow manager is to spawn a specific application to a dedicated workplace. For example let’s say I always run keepass in workspace 9, then every time I spawn keepass, it will open itself in workspace 9 and I will already know where to look for.

One thing that was so important to me was to be able to get the application names and automatically put it in each of my workspace bar:

Image alt

The output can still be improved, but with it I can visually see and know what application are running on my workspaces.

Terminal

Knowing how to use a terminal is really important, some terminals have even lots of keybindings and capabilities. Personnally I use suckless terminal, it is really minimalistic but I was able to modify it to get everything I needed.

Aliases

Using aliases is really good for commands you will use all the time, but the biggest downside is that you will have to adapt when you ssh on a machine without your aliases.

Zsh

There are multiple unix like shell, personnally I use zsh for its completion feature. There even exist a plugin to highlight your linux commands with colors based on rules, for me it is green if the command is spelle dcorrectly and exists, blue for file and directories and light green for completion suggestions. Using completion suggestion is particularly efficient for very long commands:

Productivity tools

Some open source tools are really good for productivity, and sometimes the value these tools give is insane:

ROFI for menus

Rofi is a window switcher, Application launcher and dmenu replacement.

I use it on almost all the opensource tools and tools I wrote myself for tools that need a graphic output. It is really customizable and It integrates very well with other tools.

Greenclip

Greenclip is a clipboard manager, it is soooo useful to get what you copied 2 hours ago. Obviously there might security concerns if you copy passwords or sensitive information from a long time ago, that is why I restart the greenclip daemon for each Xsession.

Quickly getting a line of text or a command you used before is so powerful, especially for long commands:

Ranger

Ranger is the best minimalistic file explorer for people living in the terminal, and like almost all the other tools I use it has vim keybindings. Ranger can be really customized, and it is so fast to use ranger compared to using a graphical file explorer. it has shortcuts that you can modify to run commands, copy, delete, rename files…. Ranger is really efficient for navigating in a playlist library:

Custom scripts

Writing your own scripts and tools and combining open source tools is a really good way to get exactly what you want. For example one day I wanted to use fzf to quickly fuzz all the directories of my default user, and to directly pop a terminal with ranger. Ranger allows you to map file extensions to the corresponding tool to open them, so my tool would allow me to quickly open any file I want, and if I chose a directory it would spawn a desired number of terminals in the selected project (instead of manually opening 4 terms to the correct path):

Backups and conf management

I use a git repository to manage my files, which is really useful when I have to install my configuration on another computer or when I have to quickly grab a conf file. I just do a git clone and run install scripts to install git repositories and system packages.

Using scripts to edit and place your configuration in the right folder also saves time when you have a lots of configuration files, It allows you to reload all your conf on the fly.

There are 2 main downsides to customizing linux for productivity, the first one is that it takes a lot of time to setup (but it is really worth it in the long run) and the second one is when you cannot use your setup, and if you have to use something like windows for work, you will lose productivity and have to adapt.