[~] BACK



~~ XMONAD ~~

** MY NEW WM **

[PRO] | [20200628] | [0] | [0x17]







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 brought together wonderfully. The weather brings good cheer, a T470 is waiting to be configured and COVID-19 gives you plenty of time to try out bizarre things like XMonad.


XMonad is a Tiling Window Manager (WM) - which means: - no useless decoration on windows
- the keyboard as the main input device
- high configurability
- very, very little memory consumption
- stability
- optimal use of display space.


Xmonad is included in the Debian packages and can be easily installed via

shell
sudo apt-get install xmonad



The Xmonad WM is written in Haskell, don't worry the config files are still easy to read, and comes bare and pure as it was written. The most important thing to know at this point is how to open the terminal:

MOD + Enter

MOD is the left "Alt" key by default. The rest is just a normal terminal environment.
If you want to configure Xmonad (your own keyboard shortcuts, colors, behavior, etc.) you have to create an xmonad.hs.
I now have my xmonad.hs on GitHub in my dotfiles:

DOTFILES

Copy your xmonad.hs into the following directory:

/home/user/.xmonad/

Reboot and XMonad should use your xmonad.hs and look different.

xmonad.hs

The structure of the config is quite manageable.

1. IMPORTS

All modules that we want to use in our config file are loaded here.

2. CONFIG

The actual configuration begins in this section.
myFont - defines the system font (including size)
myModMask - defines the mod key (mod4Mask takes WIN/SUPER key)
myTerminal - standard terminal emulator which should be used
myTextEditor - VIM ;)
myBorderWidth - is the frame which is drawn around the active window


3. main = do

The main part of the xmonad.hs. Here the colors in which XMonad appears are defined and variables are created for later use as well as xmobar (XMonad's own system bar) is distributed across different monitors.

4. AUTOSTART

As the name suggests, this is where you put the things that should be started every time you boot. In my case, these are:
- nitrogen (to set the desktop background)
- compton (it doesn't work without transparency)


5. SET KEYS

The real workflow optimization takes place under SET KEYS. This is where you define all the key combinations you want to use. MOD+Enter = Terminal, MOD+Shift+Enter=dmenu, etc.


6. WORKSPACES

In XMonad there are nine workspaces that you can use. In connection with XMobar and displayed workspaces it makes sense to name them so that you don't lose track. This is what happens in this section.

7. LAYOUTS

Layouts define how windows are arranged in XMonad.
In my config you can use MOD+SPACE to switch between layouts and thus find the best layout for the respective task.

8. SCRATCHPADS

Scratchpads are individual programs that run in the background and can be brought to the foreground using a command - e.g. music players that you don't have to have open all the time because they would just waste space.

If you're looking for good communities where you can get plenty of information, you should take a look at the following two subreddits:
[/r/xmonad]
[/r/xmobar]

All that remains to be said is:
XMonad is one of the best WMs ever.
[~] BACK