DEV Community

Cover image for Installing ST, DMENU and DWM
Vikki
Vikki

Posted on

Installing ST, DMENU and DWM

Dwm with Arch

Introduction

So Let's Start, we will be require to install two things. A window system of some sort and a layout manager. For this installation I'm going with Xorg and dwm. For those that are not aware dwm is dynamic window manager for Xorg that has been developed by Suckless. Since by default dwm expects st to be installed as the system's terminal and also makes use dmenu using which we launch applications I will installed both of them in addition to dwm.

Install Dependencies

Firt off We need to install the dependencies required by st, dmenu and dwm.

For Arch Linux

$ sudo pacman -S base-devel git libx11 libxft xorg-server xorg-xinit libxinerama terminus-font
Enter fullscreen mode Exit fullscreen mode
  • base-devel Since I will be installing from source this package contains various tools to compile software.
  • git Is needed to get the source code from the suckless git repositories.
  • libx11, libxinerama and libxft Dependanices required by dwm otherwise it will fail when trying to compile it.
  • xorg-server Is the display server that provides the windows that dwm will manage.
  • xorg-xinit Allows us to start the display server.
  • terminus-font Dwm is configured to use a monospaced font and since I installed a barebones system I need to install such a font now.

For Debian/Ubuntu Linux

$ sudo at install build-essential  git libx11-dev libxft-dev xorg libxinerama-dev
Enter fullscreen mode Exit fullscreen mode
  • build-essential Since I will be installing from source this package contains various tools to compile software.
  • git Is needed to get the source code from the suckless git repositories.
  • libx11-dev, libxinerama-dev and libxft-dev Dependanices required by dwm otherwise it will fail when trying to compile it.
  • xorg Is the display server that provides the windows that dwm will manage.
  • xorg-xinit Allows us to start the display server. it is merged in xorg

Download Git Repositories

The source code for the software is avialable from the Suckless git repositories so I simply clone them.

$ mkdir suckless 
$ cd suckless/
$ git clone git://git.suckless.org/st 
$ git clone git://git.suckless.org/dmenu
$ git clone git://git.suckless.org/dwm 
Enter fullscreen mode Exit fullscreen mode

Install ST

I install st by first moving to the directory created when cloning the repository.

$ cd st
Enter fullscreen mode Exit fullscreen mode

Compile and install as usual.

$ make clean
$ sudo make install
Enter fullscreen mode Exit fullscreen mode

Install DMENU

$ cd dmenu
Enter fullscreen mode Exit fullscreen mode

Again compiling and installing is done with the below commands.

$ make clean
$ sudo make install
Enter fullscreen mode Exit fullscreen mode

Install DWM

$ cd dwm/
Enter fullscreen mode Exit fullscreen mode

Compile and install as usual.

$ make clean
$ sudo make install
Enter fullscreen mode Exit fullscreen mode

Starting DWM

Since we have installed xorg-xinit I need to create a .xinitrc in my home folder. I am using Neovim Editor, You can use any You Like.

$ nvim ~/.xinitrc
Enter fullscreen mode Exit fullscreen mode

The contents of this file is just.

exec dwm
Enter fullscreen mode Exit fullscreen mode

I can now start xorg and dwm with the below command.

$ startx
Enter fullscreen mode Exit fullscreen mode

Now, We have got our basic minimal dwm setup.

Note : If you don't want any mess and don't have time you can directly go to my GitHub and use the script to install the beautiful Customised dwm with dmenu,st, and other stuff directly with a single command.

Steps to Install My Configaration

$ mkdir suckless 
$ cd suckless/
$ git clone https://github.com/vikalsingh777/dotfiles
$ cd dotfiles/
# Copy the folder to your home and follow the instructions from Top
Enter fullscreen mode Exit fullscreen mode

Now Sit Back and Relax.
You just have to select Yes at some places and this script will give you a beautiful Dwm setup with dmenu, st, alacritty, slstatus, Brave browser, mpv, audio setup and other daily required packages.

Links

Top comments (0)