Skip to content

Instantly share code, notes, and snippets.

@tur1ngb0x
Last active January 23, 2026 05:13
Show Gist options
  • Select an option

  • Save tur1ngb0x/df45d958410f0a27f95d4cc47868887d to your computer and use it in GitHub Desktop.

Select an option

Save tur1ngb0x/df45d958410f0a27f95d4cc47868887d to your computer and use it in GitHub Desktop.
ubuntu-dwm.sh
#!/usr/bin/env bash
# refresh sources
sudo apt-get update
# install requirements
sudo apt-get install build-essential libx11-dev libxft-dev libxinerama-dev stterm suckless-tools wget
# create build folder
mkdir -v -p ~/src/dwm
# download archive
wget -4 -O /tmp/dwm.tar.gz https://dl.suckless.org/dwm/dwm-6.7.tar.gz
# extract archive
tar -v -xz --strip-components 1 -f /tmp/dwm.tar.gz -C ~/src/dwm
# fix permissions
sudo chown -v -R "${USER}":"${USER}" ~/src/dwm
# compile
sudo make clean install -C ~/src/dwm
# desktop entry
printf "[Desktop Entry]\nName=DWM\nExec=dwm\nType=XSession\n" | sudo tee /usr/share/xsessions/dwm.desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment