dwm
dwm is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts. This page covers installing the binary packages and installing from source along with dependencies for dwm (dynamic window manager), dmenu (dynamic menu) and st (simple terminal) along with configuration information.
Prerequisites
- Internet connectivity, unless the packages have been pre-fetched into a local cache.
- Install appropriate Graphics driver drivers for your hardware. Without graphics drivers, errors are likely to occur when starting your desktop.
- A non-root user account.
- The community repository must be enabled.
- Set up eudev.
- Install and enable D-Bus. Without D-Bus, icons and keyboard shortcuts may be missing.
- Install Xorg
Installation
Alpine Linux provides binary packages for dwm (dynamic window manager), dmenu (dynamic menu), st (simple terminal). This allows new users to experience dwm without compiling software. To install the following binary packages dwm, dmenu and st, issue the command:
# apk add dwm dmenu st
Proceed to configuration to configure and start using dwm immediately with default settings. If you are new to dwm, refer to the official dwm tutorial.
To customize dwm, the source code must be edited and compiled for the changes to take effect. Refer Installing from source for complete instructions.
Installing from source
Install dependencies
The following Alpine Linux packages are needed to install and compile suckless tools. git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses libxft-dev
dbus-x11 package is needed for the dbus system as it enables Firefox running in dwm to open in a tile.
The adwaita-gtk2-theme adwaita-icon-theme font-dejavu are optional, but recommended for a nicer looking firefox.
The command to install all the dependencies:
# apk add git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses libxft-dev dbus-x11 firefox-esr adwaita-gtk2-theme adwaita-icon-theme font-dejavu
Installing suckless tools
Create a directory /usr/src directory using the command:
# mkdir -p /usr/src/suckless
Change to the /usr/src/suckless directory:
$ cd /usr/src/suckless
Download and install dwm
:
# git clone https://git.suckless.org/dwm # cd dwm # make clean install
Next, go up one directory level
# cd ..
Download and install dmenu
launcher:
# git clone https://git.suckless.org/dmenu # cd dmenu # make clean install
Finally, go up one more directory level:
# cd ..
Download and install st
terminal:
# git clone https://git.suckless.org/st # cd st # make clean install
Configuration
Set up your profile
Change to your home directory:
$ cd ~
Create or edit .xinitrc with at least the following:
Contents of ~/.xinitrc
Next, create or edit .profile with at least the following:
Contents of ~/.profile
Contents of ~/.profile
Log out or reboot. dwm will run the next time you log in. Press Alt+p to launch dmenu. Type firefox then press enter. Firefox will load and run in tile 9.
See also
- Official dwm website
- Alpine Suck Desktop installer for Alpine Linux based on the suckless philosophy
- gentoo wiki page on dwm
- Dwm - Archwiki page on dwm
- Raspberry Pi 3 - Browser Client - A guide which omits dwm, but uses similar steps to install firefox in a diskless install on ARM. dwm is not used on the RPI3, due to tmpfs limitations.