Building DWM and Suckless tools

prepare a customzed window manager

requirementsrequirements

# all empty
dpkg -l | grep dwm
dpkg -l | grep suckless-tools
dpkg -l | grep stterm

apt install build-essential libx11-dev libxft-dev libxinerama-dev
apt install alsa-utils brightnessctl

# acpi acpid
# acpi-support is deprecated ==> use pm-utils instead?
#acpi -V

which amixer
which brightnessctl
which scrot

sourcessources

grab the official dwm dmenu st tarballs

wget https://dl.suckless.org/dwm/dwm-6.6.tar.gz
wget https://dl.suckless.org/tools/dmenu-5.4.tar.gz
wget https://dl.suckless.org/st/st-0.9.3.tar.gz

and some patches (see below)

dmenu

#apt purge suckless-tools

tar xzf dmenu-5.4.tar.gz
cd dmenu-5.4/
make clean install
cd ../

st terminal emulator

https://st.suckless.org/patches/clipboard/

https://st.suckless.org/patches/scrollback/

tar xzf st-0.9.3.tar.gz
cd st-0.9.3/
patch -p1 < ../st-clipboard-0.8.3.diff
patch -p1 < ../st-scrollback-ringbuffer-0.9.2.diff

# patches config.def.h
patch -p1 < ../st-scrollback-mouse-0.9.2.diff

# patches config.def.h
patch -p1 < ../st-scrollback-mouse-increment-0.9.2.diff

cp -i config.def.h config.h
vi config.h

wchar_t *worddelimiters = L" `'\"()[]{}‘’=";

char *termname = "xterm-256color";

       { XK_ANY_MOD,       Button3, clippaste,      {.i = 0},      1 },

make clean install
cd ../

dwm

see dwm-source-dwm

slstatus

prepare a better upper status bar

git clone git://git.suckless.org/slstatus
cd slstatus/
cp -i config.def.h config.h
vi config.h

that amixer command for e.g. MSI Bravo 17 and amixer version 1.2.14

/* function format    argument */
{ run_command, "%s ", "brightnessctl -m | cut -f4 -d," },
{ battery_state, "%s ", "BAT1" },
{ battery_perc, "%s%% ", "BAT1" },
{ run_command, "%s ", "amixer -c1 sget Master | awk '/Mono:/ {print $4, $6}'" },
{ datetime, "%s", "%a %d %b %Y %T %Z" },

and otherwise e.g. for MSI Alpha 15 and amixer version 1.2.6

{ run_command, "%s ", "amixer -D pulse sget Master | awk '/Front Left:/ {print $5, $6}'" },

proceed

make clean install
cd ../

Ready go toReady go to

see dwm

Additional notesAdditional notes

mouse auto-select

For the record, Terminator’s selection delimiters are

" -,./?%&#:_"

You will still be able to reach the Ubuntu settings as such

gnome-control-center

–or– Mint MATE settings for that matter

mate-control-center

moar on slstatus

Every 5 seconds to ease that iostat call, hence removing seconds from the date

vi config.h

const unsigned int interval = 5000;
static const char unknown_str[] = "n/a";
#define MAXLEN 2048

static const struct arg args[] = {
    /* function format        argument */
    { load_avg, "%s ",        NULL },
    { cpu_perc, "CPU:%2s%% ",       NULL },
    { ram_perc, "RAM:%2s%% ",       NULL },
    { run_command, "I/O:%s ",       "iostat -x -p /dev/sda | grep '^sda ' | awk '{print $NF}'" },
    { netspeed_tx, "TX:%6s ",       "eth0" },
    { netspeed_rx, "RX:%6s ",       "eth0" },
    { datetime, "%s",          "%F %H:%M" },
};

resourcesresources

https://suckless.org/


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Licensed under MIT