Personal built of Dynamic Window Manager from suckless.org
Continued from dwm version 6.2
dwm is an extremely fast, small, and dynamic window manager for X.
Most suckless utilities like st
, dmenu
, dwm
etc can be build with make install
and hence I use easy way to install and save the configuration neatly. If you use any suckless utility, this method can come handy to you as well. 😃
bsa() {
[ $1 ] && cd $HOME/pnl/github/$1
sudo make clean install >/dev/null &&
echo "$1 build successful." &&
echo "Last built on commit ID $(git log |head -n1 | cut -f2 -d ' ') with changes:" > .build &&
git diff >> .build &&
git diff --cached >> .build
}
dwm
, st
are kept inside ~/pnl/github/
directory. So if I give any argument to bsa
, then it will cd
into that directory and then build it. If no argument is given, then function assumes that you are in one of the suckless directories and want to build current utility.git
directory (which it should be :P ), then some details as described further, are stored in a .build
file whenever build is success. Maybe you want to add .build
in your .gitignore
.bsa
and compiled successfully.This comes handy when you need to track why your current build is failing by looking at the last successful build status stored in .build
file.
bsa [OPTIONAL: Utility name]
~/pnl/github/dwm$ bsa dwm
dwm build successful.
~/pnl/github/dwm$ bsa st
4 entries written to /etc/terminfo
st build successful.
~/pnl/github/st$ cd ~/pnl/github/dwm
~/pnl/github/dwm$ bsa
build successful.
In order to build dwm you need the Xlib header files.
Edit config.mk to match your local setup (dwm is installed into
the /usr/local namespace by default).
Afterwards enter the following command to build and install dwm (if
necessary as root):
make clean install
Add the following line to your .xinitrc to start dwm using startx:
exec dwm
In order to connect dwm to a specific display, make sure that
the DISPLAY environment variable is set correctly, e.g.:
DISPLAY=foo.bar:1 exec dwm
(This will start dwm on display :1 of the host foo.bar.)
In order to display status info in the bar, you can do something
like this in your .xinitrc:
while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
do
sleep 1
done &
exec dwm
The configuration of dwm is done by creating a custom config.h
and (re)compiling the source code.
The file include_patches.h
contains macros which enable/disable some of the patches. To enable a patch, set the value of corresponding macro to 1
. And similarly to disable, set to 0
.
Note that there are 10 tags in this dwn fork rather default 9. 10th tag is binded with “0” key.
nm-applet
.layout
, mwfact
and nmaster
separate for each tag. barpos
remains same for every tag.ru_gaps
adds gaps to it.Modified patch activetagindicatorbar. Changed bar length and position from top to bottom. Indication is slimmer now 😎.
After modified activetagindicatorbar:
HOLDKEY
is pressed. Some modifications in this patch. When bar is hidden, holdbar
will be active and when bar is visible (after using togglebar
), holdbar
will not work. This is actually the default behavior of the patch when HOLDKEY
is not MODKEY
. But now this will work even when HOLDKEY
is MODKEY
. See this thread.systray
patch, a variable needs to be updated to get correct clicked location.Scripts used in config.h
can be found here.
After all the pathces, view appears as follows.