While watching DistroTube and Luke Smith’s Linux videos, I was amazed by their efficient, simple and cool desktop and Window operations. After a little research, I learned about Tiling Window Manager and Suckless software.

This article describes how to install the Suckless series of software and how to basically survive under its DWM window manager 🪵

Suckless

Suckless.org is a community I like to call the Good Organization 😂 whose minimalist philosophy is:

Software should be simple, clear, minimal, and usable.

Simplicity is at the heart of Linux’s philosophy, and the organization believes that much of today’s software is too complex and slow, so it has developed a series of programs to prove that this common phenomenon is not necessary. These programs are aimed at advanced users with some experience, allowing each user to customize his or her own real-world work scenario workflow.

It mainly includes the following works:

  • Simple terminal (ST) : terminal in X environment
  • DWM, dynamic window manager
  • Dmenu, user – defined menu, program initiator
  • Surf, browser
  • .

Installation and Startup

Start with a Linux distribution, demonstrated in Garuda KDE Dr460nized:

Garuda is a distribution based on Arch Linux, and some of the installation options mentioned below are also based on the Pacman package manager and will need to be switched to the corresponding package manager under other distributions.

Download several software sources locally:

mkdir ~/suckless
cd ~/suckless
git clone https://git.suckless.com/dmenu
git clone https://git.suckless.com/st
git clone https://git.suckless.com/dwm
Copy the code

One feature of the Suckless software is that it is source code only and requires users to compile and install it themselves. Some lighter distributions may not have the make command and require manual installation of the dependencies first.

cd ~/suckless/st
sudo make clean install

cd ~/suckless/dmenu
sudo make clean install

cd ~/suckless/dwm
sudo make clean install
Copy the code

After three make commands, several programs were successfully installed on the system. St is the default terminal under DWM environment, dMenu is the program launcher under DWM, you need to install ST or DMenu before entering DWM, otherwise it will be difficult in DWM.

Open konsole, Garuda’s default terminal, and type DWM to start. DWM: Another Window Manager is already running

The relationship between WM and DE is described in the Linux distribution and GUI introduction, because KDE’s own WM is already running in Garuda’s desktop environment and DWM cannot be turned on.

Here you need to write boot options for DWM so that DWM is started at login Manager (a software for Linux) and not the KDE desktop environment.

[Desktop Entry]
Encoding=UTF-8
Name=dwm
Comment=Dynamic Window Manager
Exec=/usr/local/bin/dwm
Icon=
Type=Application
Copy the code

Name the content dwm.desktop and save it to the /usr/share/xsessions directory. Exit the current user login state and go to the login page. The option appears in the bottom left corner (other distributions may be elsewhere) to select DWM and enter your password to log in.

Here comes the minimalist Linux world provided by the “good old buddy.”

Basic operation

    +------+----------------------------------+--------+
    | tags | title                            | status +
    +------+---------------------+------------+--------+
    |                            |                     |
    |                            |                     |
    |                            |                     |
    |                            |                     |
    |          master            |        stack        |
    |                            |                     |
    |                            |                     |
    |                            |                     |
    |                            |                     |
    +----------------------------+---------------------+
Copy the code

The DWM area is divided into the above blocks. On the top is the status bar, including tags, title and status. The main areas of the screen are divided into the master and stack areas. New Windows occupy the master area, and the previous Windows are stacked up and down in the stack area.

Below is a list of shortcuts for DWM environments.

Keybinding Action
SHIFT+ALT+ENTER Open the st
SHIFT+ALT+q Exit DWM and return to Login Manager
ALT+p Open dMenu, then you can enter the software name such as Firefox to launch the software
ALT+j/k Toggle multiple open Windows
SHIFT+ALT+n(1-9) Move the current window to tag n(default 9 tags)
SHIFT+ALT+c Close the current window
ALT+ENTER Switch the current window to master Window
ALT+m/t Switch the current window to full screen/switch back
ALT+n(1-9) Enter the tag n
CTRL+SHIFT+PAGEUP/PAGEDOWN zoom in/zoom out
ALT+b toggle status bar

How to…

In DWM, the mouse is almost useless, and clicking on the volume button in the desktop environment to adjust the volume of the system is no longer feasible. Geeks use command line tools instead, and this section gives some examples of how this can be done in specific scenarios.

Browse pictures

To install the Sxiv, go to the folder where the image resides and enter: sxiv *. You can switch between displayed images by clicking left and right.

Set the wallpaper

Install xwallpeper on the command line and determine the image path you want to set, such as ~/.config/wall.png

xwallpaper --zoom ~/.config/wall.png
Copy the code

Adjust the volume

To install PauseAudio from the command line, the following commands are some of the possible operations on volume:

Command Action
pactl set-sink-volume 0 +20% Increase volume by 20%
pactl set-sink-volume 0 -20% 20% reduction in volume
pactl set-sink-mute 0 toggle The mute switch
pactl get-sink-volume 0 Gets the current volume value

screenshots

Command line to install scrot, open dMenu and enter scroTV to save the current desktop screenshots in the current folder.

To take a screenshot of a specific window, add the -s parameter and click on the desired window with the mouse. Instructions for the use of other specific instructions are in the SCROT documentation.

St Experience optimization

St’s implementation is only more than 2000 lines of C code, its own functions are very limited, so that all kinds of users “accustomed to” ability it does not have, including copy/paste, scrolling and other functions are not supported by default, after all, “simple”.

Suckless’s software does not provide configuration files. All configuration items are in its source code config.def.h. After modification, run sudo cp config.def.h config.h && sudo make clean install to compile and install again.

Copy/Paste

Add two lines in ~/st/config.def.h ShortCut:

{ MODKEY, XK_c, clipcopy,  {.i=0}},
{ MODKEY, XK_v, clippaste, {.i=0}},
Copy the code

Re-install, that is, you can use SHIFT+CTRL+ C/V in ST for copy/paste.

emoji

St does not support emoji display, for example, 🤣 is found in ohmyarch’s readme. md. Running cat readme. md will cause ST to crash directly, and a specific dependency is needed to solve this problem:

yay -S libxft-bgra
Copy the code

transparent

A degree of transparency on the terminal after setting up a nice wallpaper is a visual delight.

Command line install picom, configuration files written in ~ /. / config/picom picom. Conf

opacity-rule = [ "90:class_g = 'st-256color'" ]; wintypes: { normal = { blur-background = true; }; splash = { blur-background = false; }; }; # Fading fading = false; Fade - in - step = 0.07; Fade - out - step = 0.07;Copy the code

While st’s own source code does not support transparent display, Suckless provides patches to enhance its functionality, similar to plugins found in other software.

Copy alpha Patch diff to ST source directory, run patch < ST-alpha-0.8.2. Diff is still re-compiled and installed. Then run picom-B to achieve the transparency effect.

In addition to the alpha, Suckless offers a number of other patches to extend the functionality for further exploration.

Dmenu’s imagination

All executable files under path can be found and run by DMenu. You can write shell scripts and save them in /usr/local/bin to be executed by DMenu.

For example a simple example of implementing a shutdown/restart option:

choices="shutdown\nreboot"

chosen=$(echo -e "$choices" | dmenu -i -p "Operation:")

case "$chosen" in
    shutdown) shutdown;;
    reboot) reboot;;
esac
Copy the code

Save the file as sysop.sh in the PATH to select the sysop option in dMenu and proceed to the next step.

The script itself doesn’t make a lot of sense, but with this mechanism, you can do a lot of things like adjust volume, switch wallpaper, and quickly open browser tabs, and I think it’s more customizable and imaginative than Alfred on MacOS.

DWM status bar

The default DWM status bar is very plain. The status section shows only DWM-6.2. The “good guys” provide a basic mechanism for changing the status display, such as changing DWM-6.2 to Hello World by running:

xsetroot -name "hello world"
Copy the code

With this simple mechanism, you can retrieve the current volume information from other software such as PauseAudio and display it in the Status bar; Get the current time information through date software and display it.

Suckless has a list of DWM status bars configured by others for your reference.

What’s Next

Many experienced Linux users have their suckless software versions available right out of the box. Try using their mature configurations to further feel the suckless software’s appeal:

  • ohmyarch
  • DistroTube
  • Luke Smith
  • TheNiceBoy