Setting up DWM and Suckless tools

Da Window Manager aka the Dynamic one

Grab the official tarballs from suckless.org and some additional merged patches and configs from here: https://pub.nethence.com/bin/dwm/

Prepare a customzed terminal and window manager

wget https://dl.suckless.org/st/st-0.8.3.tar.gz
wget https://st.suckless.org/patches/scrollback/st-scrollback-20200419-72e3f6c.diff
wget https://st.suckless.org/patches/scrollback/st-scrollback-mouse-20191024-a2c479c.diff
wget https://st.suckless.org/patches/clipboard/st-clipboard-0.8.3.diff
rm -rf st-0.8.3/
tar xzf st-0.8.3.tar.gz
cd st-0.8.3/
patch -p1 < ../st-scrollback-20200419-72e3f6c.diff
patch -p1 < ../st-scrollback-mouse-20191024-a2c479c.diff
patch -p1 < ../st-clipboard-0.8.3.diff
ln -s ../stconfig.h config.h
make clean
make install
cd ../

wget https://dl.suckless.org/dwm/dwm-6.2.tar.gz
wget https://dwm.suckless.org/patches/inplacerotate/dwm-inplacerotate-6.2.diff
wget https://dwm.suckless.org/patches/attachaside/dwm-attachaside-20180126-db22360.diff
wget https://dwm.suckless.org/patches/pertag/dwm-pertag-6.2.diff
#wget https://dwm.suckless.org/patches/fancybar/dwm-fancybar-6.2.diff
rm -rf dwm-6.2/
tar xzf dwm-6.2.tar.gz
cd dwm-6.2/
patch -p1 < ../dwm-attachaside-20180126-db22360.diff
patch -p1 < ../dwm-inplacerotate-6.2.diff
patch -p1 < ../dwm-pertag-6.2.diff
patch -p1 < ../dwm-systray-6.2.diff
patch -p1 < ../dwm-fancybar-6.2.after-systray.diff
ln -s ../dwmconfig.h config.h
make clean
make install
cd ../

Prepare a better upper status bar

apt install acpi acpid acpi-support
acpi -V

git clone git://git.suckless.org/slstatus
cd slstatus/
ln -sf ../slconfig.h config.h
make clean
make
make install
cd ../

Multi-screen

   Mod1-Shift-,
          Send focused window to previous screen, if any.

   Mod1-Shift-.
          Send focused window to next screen, if any.

[Solved] dwm - move/toggle current window to second screen/projector https://bbs.archlinux.org/viewtopic.php?id=179227

Ready go to

Enable as lightdm or gdm WM of choice

vi /usr/share/xsessions/custom.desktop

[Desktop Entry]
Name=Xsession
Exec=/etc/X11/Xsession

Enable it at X login

vi ~/.Xsession

#!/bin/bash
conky -d
/usr/local/bin/slstatus &
exec /usr/local/bin/dwm

Additional notes

For the record, Terminator’s selection delimiters are

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

One cannot mix openclipboard with clipboard patches

Autolock

#xautolock -notify 10 -notifier 'notify-send "Screen will lock in 10 seconds"' \
#   -time 5 -locker "xtrlock" &

More 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" },
};

Resources

https://wiki.ubuntu.com/CustomXSession

https://dwm.suckless.org/tutorial/


HOME | GUIDES | BENCHMARKS | html