Short update - A lot has happened since the last article. Summer is here, my MacBook Pro has given way to a Thinkpad T470 and, oh yes COVID-19.
All three can be wonderfully reconciled. The weather brings good mood, a T470 is waiting for its configuration and by COVID-19 you have plenty of time to try out quirky things like XMonad.
XMonad is a Tiling WindowManager (WM) - which means as much as: - no useless decoration on windows
- the keyboard as the main input device
- high configurability
- very very low memory consumption
- Optimal use of space of the display.
Xmonad is in the packages of Debian and can be conveniently installed via
sudo apt-get install xmonad
The Xmonad WM is written in Haskell, don't worry the config files are still readable, and comes naked and pure as written. The most important thing to know at this point is how to open the terminal:
MOD + Enter
Where MOD is by default the left "Alt" key. The rest is first normal terminal environment.
If you want to configure Xmonad now (own keyboard shortcuts, colors, behavior etc.) you have to create a xmonad.hs.
I have my xmonad.hs meanwhile on GitHub in my dotfiles:
Copy your xmonad.hs into the following directory:
Reboot and XMonad should use your xmonad.hs and look different.
xmonad.hsThe structure of the config is quite straightforward.
Here we load all the modules we want to use in our config file.
In this section begins the actual configuration.
myFont - defines the system font (incl. size)
myModMask - defines the mod key (mod4Mask takes WIN/SUPER key)
myTerminal - default terminal emulator which should be used
myTextEditor - VIM ;)
myBorderWidth - Is the border that will be drawn around the active window
3. main = do
The main part of xmonad.hs. Here the colors are defined in which XMonad appears and variables for later use are created as well as xmobar (the XMonad own system bar) is distributed to different monitors.
As the name already says, the things come in here which should be started with every boot. In my case these are:
- nitrogen (to set the desktop background)
- compton (without transparency it does not go completely then)
5. SET KEYS
SET KEYS is where the real workflow optimization takes place. Here all key combinations are specified which one would like to use. MOD+Enter = Terminal, MOD+Shift+Enter=dmenu etc.
In XMonad there are nine workspaces that can be used. In connection with XMobar and displayed workspaces, it makes sense to name them, so that you don't lose the overview. This happens in this section.
Layouts defines how windows are arranged in XMonad.
In my config you can use MOD+SPACE to switch back and forth between layouts to find the best layout for the task at hand.
Scratchpads are individual programs that run in the background and can be called to the foreground by command - for example, music players that you do not have to have open all the time because they would only waste space.
Who is looking for good communities in which you get plenty of info, should take a look at the following two subreddits:
Remains only to say:
XMonad one of the best WMs ever.