• Install packages and get dev libraries
sudo apt install dwm suckless-tools
sudo apt install stterm

mkdir /opt
cd /opt

git clone git://git.suckless.org/dwm
cd dwm

sudo apt install libx11-dev libxft-dev libxinerama-dev
  • Make changes in source files:
diff --git a/config.def.h b/config.def.h
index 1c0b587..fc42d00 100644
--- a/config.def.h
+++ b/config.def.h
@@ -44,7 +44,7 @@ static const Layout layouts[] = {
};

/* key definitions */
-#define MODKEY Mod1Mask
+#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
@@ -57,7 +57,7 @@ static const Layout layouts[] = {
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
-static const char *termcmd[] = { "st", NULL };
+static const char *termcmd[] = { "stterm", NULL };

static Key keys[] = {
/* modifier key function argument */
diff --git a/config.mk b/config.mk
index 25e2685..b599bf2 100644
--- a/config.mk
+++ b/config.mk
@@ -7,8 +7,8 @@ VERSION = 6.1
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man

-X11INC = /usr/X11R6/include
-X11LIB = /usr/X11R6/lib
+X11INC = /usr/include/X11
+X11LIB = /usr/lib/X11

# Xinerama, comment if you don't want it
XINERAMALIBS = -lXinerama

 

  • Create file ~/.xinitrc
exec nitrogen --restore &
while true ; do xsetroot -name "`date '+%Y-%m-%d %H:%M.%S'` `uptime |sed 's/.*,//'`"; sleep 1 ; done &
exec /opt/dwm/dwm
  • Run commands:
ln -s ~/.xinitrc ~/.xsession
chmod 755 ~/.xinitrc
  • Create file /usr/share/xsessions/custom-dwm.desktop
[Desktop Entry]
Name=Custom-DWM
Exec=/etc/X11/Xsession
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s