Skip to content
/ dwm Public

DWM patches with my custom config πŸ› οΈ

License

Notifications You must be signed in to change notification settings

harilvfs/dwm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Terminal

DWM is a lightweight and dynamic window manager based on X11. It is minimalistic, efficient, and designed to be customized by editing its source code. ✨


 
 Dependencies 
 
    
 Fonts 
 
    
 Wallpapers 
 
    
 Configs 
 
    
 Tmux 
 
    
 Picom 
 
    
 Systray 
 
    
 SDDM 
 
    
 Grub 
 
    
 DWM 
 
    
 TTY 
 
    
 Contributing 
 



Discord Telegram Channel

Terminal


Note

This guide features DWM patches from Chris Titus Tech, tweaked to suit my personal workflow while remaining simple for anyone to use.

πŸš€ Dependencies

Arch Linux

sudo pacman -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb git unzip flameshot lxappearance feh mate-polkit meson libev uthash libconfig meson ninja gnome-keyring

Debian/Ubuntu

sudo apt install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev libx11-xcb-dev libfontconfig1 libx11-6 libxft2 libxinerama1 libxcb-res0-dev git unzip flameshot lxappearance feh mate-polkit meson ninja-build gnome-keyring

Fedora

sudo dnf install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel unzip flameshot lxappearance feh mate-polkit meson ninja-build gnome-keyring

openSUSE

sudo zypper install libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel unzip flameshot lxappearance feh mate-polkit meson ninja-build gnome-keyring

πŸ”  Nerd Fonts

Why Nerd Fonts?

Nerd Fonts enhance font rendering and ensure proper alignment of icons in slstatus. For this setup, the MesloLGS Nerd Font is recommended.

✨ Installation

Arch Linux

sudo pacman -S --needed --noconfirm ttf-meslo-nerd noto-fonts-emoji ttf-joypixels

Other Distributions

  • Download from: nerdfonts.com
  • Place the font files in ~/.fonts or ~/.local/share/fonts.
  • Refresh font cache:
    fc-cache -vf

🎨 Wallpapers

Directory Setup

Store wallpapers in ~/Pictures/wallpapers. Use the following command to clone a curated wallpaper collection:

git clone https://github.com/harilvfs/wallpapers ~/Pictures

βš™οΈ Configuration Files

Preconfigured package settings are included in this repository under the config folder. These settings enhance the DWM experience and can be installed based on your workflow and distribution.

Steps to Install Configurations

  • Install the necessary packages for your distribution.
  • Copy the preconfigured files to your ~/.config directory.

Package Installation by Distribution

Arch Linux

sudo pacman -S --needed --noconfirm kitty alacritty kvantum dunst fastfetch fish helix neovim picom rofi starship bash zsh
  • BetterDiscord: Install as an AppImage or via AUR using paru or yay.
    yay -S betterdiscord-installer

Fedora

sudo dnf install kitty alacritty kvantum dunst fastfetch fish helix neovim picom rofi bash zsh
  • Starship: Install using the official script:
    curl -sS https://starship.rs/install.sh | sh
  • BetterDiscord: Download the AppImage from the official website.

Debian/Ubuntu

sudo apt install -y kitty alacritty qt5-style-kvantum fish neovim rofi dunst picom bash zsh
  • Fastfetch: Download the appropriate .deb package from Fastfetch's release page and install it:
    sudo dpkg -i fastfetch-linux-<architecture>.deb
  • Helix: Install from source using the Helix documentation.
  • BetterDiscord: Download the AppImage from the official website.
  • Starship: Install using the official script:
    curl -sS https://starship.rs/install.sh | sh

openSUSE

sudo zypper install kitty alacritty kvantum-manager fish neovim rofi fastfetch dunst picom starship bash zsh

Using Preconfigured Files

Once the required packages are installed, copy the preconfigured files to your .config directory:

cp -r config/* ~/.config/

Important

If you don’t have a preconfigured setup, it’s recommended to use the provided configurations for better compatibility with the DWM patches.

Tmux Setup

Install Tmux for terminal multiplexing.

Installation Commands

Arch Linux

sudo pacman -S tmux

Debian/Ubuntu

sudo apt install tmux

Fedora

sudo dnf install tmux

openSUSE

sudo zypper install tmux

Clone Tmux Plugin Manager [TPM]

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Configuration

Create the configuration directory:

mkdir ~/.config/tmux

Download the tmux configuration file:

wget -O ~/.config/tmux/tmux.conf https://raw.githubusercontent.com/harilvfs/dwm/refs/heads/main/config/tmux/tmux.conf

Install Plugins

cd ~/.tmux/plugin/tpm/scripts/ &&
chmod +x install_plugins.sh &&
./install_plugins.sh

Install TPM

cd ~/.tmux/plugins/tpm &&
chmod +x tpm &&
./tpm

Update Plugins

cd ~/.tmux/plugin/tpm/scripts/ &&
chmod +x update_plugin.sh &&
./update_plugin.sh

⚑ Picom Configuration

Picom provides window transparency and animations.

πŸ–₯️ System Tray Icons

Install system tray applets for network, Bluetooth, and sound management.

  • Packages:
    Install the necessary packages for your distribution:

Arch Linux

sudo pacman -S --needed --noconfirm network-manager-applet blueman pasystray

Fedora

sudo dnf install network-manager-applet blueman pasystray

Debian/Ubuntu

sudo apt install network-manager-applet blueman pasystray

openSUSE

sudo zypper install NetworkManager-applet blueman pasystray

Notes πŸ“œ : For other distributions, refer to the respective package manager documentation.

✨ SDDM Theme

The setup uses the Astronaut Theme for SDDM.

🌌 GRUB Theme [OPTIONAL]

Customize your bootloader appearance with GRUB themes.

Note: Ensure GRUB customization aligns with your workflow and is applied carefully to avoid bootloader issues.

πŸ›  Installation Script

For a simplified setup process, run the script:

bash <(curl -L https://raw.githubusercontent.com/harilvfs/dwm/refs/heads/main/setup.sh)

Note

This script is optimized for Arch Linux. Manual installation is recommended for other distributions or customized setups.

πŸ”§ DWM Installation

Clone and install DWM:

git clone https://github.com/harilvfs/dwm ~/
cd ~/dwm
sudo make clean install

Install slstatus

cd ~/dwm/slstatus
sudo make clean install

Add this to your ~/.xinitrc & ~/.xsession

exec dwm

Important

After installation, remember to adjust some keybindings in config.h to fit your use case.


Note

Default keybinding for terminal is mod + x and for rofi is mod + r.

Note

Some distributions may require additional dependencies or configuration.Feel free to explore your distribution’s community for guidance on missing dependencies.

πŸ“œ TTY Login for DWM (Remove SDDM & Auto-Login) [Optional]

This guide explains how to remove SDDM, set up TTY login for DWM, configure .xinitrc/.xsession, install dependencies, and add security using slock.

πŸš€ Step 1: Remove SDDM & Enable TTY Login

To completely remove sddm and use TTY login for dwm, run:

sudo systemctl disable sddm
sudo systemctl stop sddm
sudo pacman -Rns sddm

Warning

This will remove SDDM completely. You will now need to log in via TTY and start dwm manually.

πŸ“Œ Step 2: Install Required Dependencies

Before proceeding, ensure you have the required packages installed:

sudo pacman -S xorg-server xorg-xinit dmenu

Tip

dmenu is commonly used for launching apps in dwm, but you can also use rofi as an alternative. Install either to avoid issues.

πŸ“ Step 3: Configure .xinitrc for DWM

Create or edit ~/.xinitrc:

vim ~/.xinitrc

Note

You can also use nano as an alternative text editor.

Add this:

#!/bin/sh
exec dwm

Then, make it executable:

chmod +x ~/.xinitrc

Note

If using a display manager, .xsession should also contain exec dwm.

β–Ά Step 4: Start DWM Manually

Now, after logging into TTY (Ctrl + Alt + F3), start dwm with:

startx

Tip

If startx fails, check logs using:

cat ~/.local/share/xorg/Xorg.0.log | grep "(EE)"

πŸ”’ Step 5: (Optional) Enable Auto-Login in TTY

If you want to automatically log in to TTY (no password required), create a systemd override:

sudo mkdir -p /etc/systemd/system/[email protected]
sudo vim /etc/systemd/system/[email protected]/autologin.conf

Note

You can also use nano as an alternative text editor.

Add the following:

[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin your_username --noclear %I 38400 linux

Replace your_username with your actual username.

Then, reload systemd:

sudo systemctl daemon-reexec

Warning

Auto-login bypasses password authentication. Anyone with access to your machine can log in.

πŸ’» Step 6: Start DWM Automatically on Login

Edit ~/.bash_profile ~/.bashrc (or ~/.zprofile ~/.zshrc if using Zsh):

vim ~/.bash_profile

Note

You can also use nano as an alternative text editor.

Add this at the bottom:

if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
    exec startx
fi

Tip

This ensures dwm starts automatically only on TTY1.

πŸ” Step 7: Add Security with slock

To lock the screen after inactivity or manually, install slock:

sudo pacman -S slock xautolock

Edit ~/.xinitrc to auto-lock after 5 minutes:

xautolock -time 5 -locker slock &

πŸ”‘ To manually lock the screen, press Mod+u or run:

slock

πŸ—‘ Step 8: Remove Auto-Login (If Needed)

If you enabled auto-login but want to remove it, delete the config file:

sudo rm -rf /etc/systemd/system/[email protected]

Then reload systemd:

sudo systemctl daemon-reexec

Note

This will restore normal login behavior and require a password.

πŸ”„ Step 9: Reboot & Test

Restart your system to apply changes:

sudo reboot

Now, after reboot:
βœ… Log in via TTY (no display manager).
βœ… Run startx to launch dwm.
βœ… Auto-login or security settings (if enabled) should work.

🎯 Final Thoughts

By following this, you have successfully:
βœ… Removed SDDM and switched to TTY login.
βœ… Configured .xinitrc to launch dwm manually or automatically.
βœ… Enabled/Disabled auto-login as needed.
βœ… Added security with slock (if required).

πŸ› οΈ Contributing

For more detailed contribution guidelines, please check our CONTRIBUTING.md.

🀝 Code of Conduct

We aim for a welcoming environment for all contributors. Please read our Code of Conduct for a better experience.

πŸ“¬ Contact

For questions or suggestions, feel free to reach out via:

🌟 Contributors

Thank you to all contributors! Your efforts and input are truly invaluable. πŸ’–

Contributors