An open API service indexing awesome lists of open source software.

https://github.com/harilvfs/dwm

DWM patches with my custom config ๐Ÿ› ๏ธ
https://github.com/harilvfs/dwm

dwm dwm-desktop linux

Last synced: 25 days ago
JSON representation

DWM patches with my custom config ๐Ÿ› ๏ธ

Awesome Lists containing this project

README

        


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. โœจ


โ€ƒ
โ€ƒManual Setup [ Including All ]โ€ƒ
โ€ƒ
โ€‚โ€‚
โ€ƒ
โ€ƒInstall Scriptโ€ƒ
โ€ƒ
โ€‚โ€‚
โ€ƒ
โ€ƒTTY Stuffs [ Optional ]โ€ƒ
โ€ƒ
โ€‚โ€‚
โ€ƒ
โ€ƒContributingโ€ƒ
โ€ƒ




[![Discord](https://img.shields.io/discord/757266205408100413.svg?label=Discord&logo=Discord&style=for-the-badge&color=8bd5ca&logoColor=e78284&labelColor=1c1c29)](https://discord.com/invite/8NJWstnUHd) [![Telegram Channel](https://img.shields.io/badge/harilvfs-Telegram-c6a0f6?style=for-the-badge&logo=telegram&labelColor=1c1c29)](https://t.me/harilvfs)

![Terminal](https://github.com/harilvfs/assets/blob/main/dwm/dwm.png)


> [!NOTE]
> **This guide features DWM patches from [Chris Titus Tech](https://github.com/ChrisTitusTech/dwm-titus), tweaked to suit my personal workflow while remaining simple for anyone to use.**

**I recommend to use manual way to setup and install dwm. But if you perfer a easy way then, Check Installation Script Guide [here](#-installation-script)**

## Setup Manually

### Arch Linux
>

```bash
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 thunar trash-cli
```

### Debian/Ubuntu
>

```bash
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 thunar trash-cli
```

### Fedora
>

```bash
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 thunar trash-cli
```

### openSUSE
>

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


## ๐Ÿ”  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.

### Arch Linux
>
```bash
sudo pacman -S --needed --noconfirm ttf-meslo-nerd noto-fonts-emoji ttf-joypixels ttf-cascadia-mono-nerd ttf-cascadia-code-nerd ttf-jetbrains-mono-nerd ttf-jetbrains-mono
```

### Other Distributions
- **Download** from: [nerdfonts.com](https://www.nerdfonts.com/font-downloads)
- Place the font files in `~/.fonts` or `~/.local/share/fonts`.
- Refresh font cache:
```bash
fc-cache -vf
```

## ๐ŸŽจ Wallpapers

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

```bash
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
>

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

#### Fedora
>

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

> **Ghostty**: Download Ghostty Terminal
> ```bash
> dnf copr enable pgdev/ghostty
> dnf install ghostty
>```

#### Debian/Ubuntu
>

```bash
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](https://github.com/fastfetch-cli/fastfetch/releases) and install it:
```bash
sudo dpkg -i fastfetch-linux-.deb
```
- **Helix**: Install from source using the [Helix documentation](https://docs.helix-editor.com/install.html).
- **BetterDiscord**: Download the AppImage from the [official website](https://betterdiscord.app/).
- **Starship**: Install using the official script:
```bash
curl -sS https://starship.rs/install.sh | sh
```
> **Ghostty**: Download Ghostty Terminal
> ```bash
> echo 'deb http://download.opensuse.org/repositories/home:/clayrisser:/bookworm/Debian_12/ /' | sudo tee /etc/apt/sources.list.d/home:clayrisser:bookworm.list
> curl -fsSL https://download.opensuse.org/repositories/home:clayrisser:bookworm/Debian_12/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_clayrisser_bookworm.gpg > /dev/null
> sudo apt update
> sudo apt install ghostty
> ```

#### openSUSE
>

```bash
sudo zypper install kitty alacritty kvantum-manager fish neovim rofi fastfetch dunst picom starship bash zsh ghostty
```
- **BetterDiscord**: Download the AppImage from the [official website](https://betterdiscord.app/).

### **Using Preconfigured Files**

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

```bash
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.

## Picom Configuration

Picom provides window transparency and animations.

- **Config File**: [Picom Config](https://raw.githubusercontent.com/harilvfs/i3wmdotfiles/main/picom/picom.conf)
- **Animations**: Check out [FT-LABS](https://github.com/FT-Labs/picom).

## System Tray Icons

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

- **Packages**:
Install the necessary packages for your distribution:

### Arch Linux
>

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

### Fedora
>

```bash
sudo dnf install network-manager-applet blueman pasystray
```

### Debian/Ubuntu
>

```bash
sudo apt install network-manager-applet blueman pasystray
```

### openSUSE
>

```bash
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.

- **Installation**:
Clone the theme repository and follow the instructions to install:
[Keyitdev/sddm-astronaut-theme](https://github.com/Keyitdev/sddm-astronaut-theme)

## GRUB Theme [OPTIONAL]
Customize your bootloader appearance with GRUB themes.

- Explore themes from ChrisTitusTech's repository:
[Top-5-Bootloader-Themes](https://github.com/ChrisTitusTech/Top-5-Bootloader-Themes)

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

## Tmux
Incase if you want tmux or if you are already familiar with tmux then follow this step to setup:

Assuming you have tmux installed in your system.

### Clone Tmux Plugin Manager [TPM]

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

### Configuration

#### Create the configuration directory:

```bash
mkdir ~/.config/tmux
```

#### Download the tmux configuration file:

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

#### Install Plugins

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

#### Install TPM

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

#### Update Plugins [ Optional ]

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

## Clone and install DWM

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

Install slstatus

```bash
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`.

## ๐Ÿ›  Installation Script

**For a one click setup process, run the script:**

> [!NOTE]
> Before running this script, make sure `fzf` and `curl` are installed.
>
> **For Arch-based distros:**
> ```sh
> sudo pacman -S fzf curl --noconfirm
> ```
>
> **For Fedora-based distros:**
> ```sh
> sudo dnf install fzf curl -y
> ```

**After that, run this command in your terminal.**

```bash
bash <(curl -L https://chalisehari.com.np/dwm)
```

> [!NOTE]
> Btw Remember this script is only for Arch & Fedora Based* Distros. Manual installation is recommended for other distributions or customized setups.

---

**If you want to be a chad guy than follow this : just joking this is optional**

## TTY Login Setup for DWM (No SDDM) [ Optional ]

### Remove SDDM

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

### Set Up `.xinitrc`

Create or edit `~/.xinitrc`:

```bash
vim ~/.xinitrc
```

Add this:

```sh
#!/bin/sh
exec dwm
```

Then, **make it executable**:

```bash
chmod +x ~/.xinitrc
```

### Start DWM Manually

After logging into TTY:

```bash
startx
```

If it fails:

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

*or if you want auto start dwm on tty then:*

### Auto-Start `dwm` on Login [ optional ]

Edit `~/.bashrc` (or `~/.zshrc` for Zsh):

```bash
vim ~/.bashrc
```

Add this at the bottom:

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

---

## (Optional) Enable TTY Auto-Login

Create override config:

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

Add the following:

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

Replace `your_username`. Then reload:

```bash
sudo systemctl daemon-reexec
```

> Auto-login skips the password โ€” only use on trusted machines.

### (Optional) Add Screen Lock

Install `slock`:

```bash
sudo pacman -S slock
```

To lock after 5 minutes, add to `.xinitrc` **before** `exec dwm`:

```bash
xautolock -time 5 -locker slock &
```

> Manually lock with this command or if you already have install my dwm then press `mod+u` [ mod refers to window key ( eww window ) ] :
> ```bash
> slock
> ```

### Remove Auto-Login (If Needed)

Delete config:

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

Then reload systemd:

```bash
sudo systemctl daemon-reexec
```

### Reboot & Test

Restart your system to apply changes:

```
sudo reboot
```

After reboot:

โœ… Login via TTY
โœ… `startx` launches `dwm`
โœ… Auto-login and lock work if enabled

---

## ๐Ÿ› ๏ธ Contributing

For more detailed contribution guidelines, please check our [CONTRIBUTING.md](https://github.com/harilvfs/dwm/blob/main/.github/CONTRIBUTING.md).

## ๐Ÿค Code of Conduct

We aim for a welcoming environment for all contributors. Please read our **[Code of Conduct](https://github.com/harilvfs/dwm/blob/main/.github/CODE_OF_CONDUCT.md)** for a better experience.

## ๐Ÿ“ฌ Contact
For questions or suggestions, feel free to reach out via:

- ๐Ÿ“ง Email: **[email protected]**

## ๐ŸŒŸ Contributors
Thank you to all contributors! Your efforts and input are truly invaluable. ๐Ÿ’–

[![Contributors](https://contrib.rocks/image?repo=harilvfs/dwm)](https://github.com/harilvfs/dwm/graphs/contributors)