diff options
| author | Filip Wandzio <contact@philw.dev> | 2025-12-30 02:45:11 +0100 |
|---|---|---|
| committer | Filip Wandzio <contact@philw.dev> | 2025-12-30 02:45:11 +0100 |
| commit | 4c90d1d9e4092f9ee0106d316829144653a276ea (patch) | |
| tree | cba5e7697a1334da068c5fa5e5951e00696fb903 /README.md | |
| parent | 11b1ff4691ff3e0f8346e7431fa3f90cc846fc5d (diff) | |
| download | dwm-4c90d1d9e4092f9ee0106d316829144653a276ea.tar.gz dwm-4c90d1d9e4092f9ee0106d316829144653a276ea.zip | |
Split monolithic dwm.h into modular headers and group them by it's functionalities
The new plan of refactoring this project is to split entire monolithic codebase into separate, (kind of) independent modules. This will help with understanding the code by turning off modules and deciding which ones require some work.
Signed-off-by: Filip Wandzio <contact@philw.dev>
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 48 |
1 files changed, 27 insertions, 21 deletions
| @@ -1,42 +1,48 @@ | |||
| 1 | ## Installation | 1 | ## Installation |
| 2 | ------------ | ||
| 3 | Edit config.mk to match your local setup (dwm is installed into | ||
| 4 | the /usr/local namespace by default). | ||
| 5 | 2 | ||
| 6 | Afterwards enter the following command to build and install dwm (if | 3 | Hit command below in the root dir |
| 7 | necessary as root): | ||
| 8 | 4 | ||
| 9 | ```bash | 5 | ```bash |
| 10 | make clean install | 6 | make clean install |
| 11 | ``` | 7 | ``` |
| 12 | 8 | ||
| 13 | ## Running dwm | 9 | Or if you use arch-based distro and like pacman |
| 14 | Add the following line to your .xinitrc to start dwm using startx: | 10 | |
| 15 | ```bash | 11 | ```bash |
| 16 | exec dwm | 12 | makepkg -si |
| 17 | ``` | 13 | ``` |
| 18 | 14 | ||
| 19 | In order to connect dwm to a specific display, make sure that | 15 | ## Execution |
| 20 | the DISPLAY environment variable is set correctly, e.g.: | 16 | |
| 17 | Probably the best way is to use your xinitrc config file and do something like | ||
| 21 | 18 | ||
| 22 | ```bash | 19 | ```bash |
| 23 | DISPLAY=foo.bar:1 exec dwm | 20 | dbus-run-session dwm |
| 24 | ``` | 21 | ``` |
| 25 | In order to display status info in the bar, you can do something | 22 | |
| 26 | like this in your .xinitrc: | 23 | If you fancy having system stuff in your status bar you need to do something like this or use your own **better** |
| 24 | statusbar. | ||
| 27 | 25 | ||
| 28 | ```bash | 26 | ```bash |
| 29 | while xsetroot -name "`date` `uptime | sed 's/.*,//'`" | 27 | while |
| 30 | do | 28 | mem_used=$(free -h | awk '/^Mem:/ {print $3}') |
| 31 | sleep 1 | 29 | cpu_load=$(top -bn1 | grep "Cpu(s)" | awk '{print $2 + $4"%"}') |
| 32 | done & | 30 | battery_capacity=$(cat /sys/class/power_supply/BAT0/capacity) |
| 33 | exec dwm | 31 | volume_level=$(wpctl get-volume @DEFAULT_AUDIO_SINK@) |
| 32 | disk_usage=$(df -h / | awk 'NR==2 {print $3 "/" $2}') | ||
| 33 | |||
| 34 | xsetroot -name "$volume_level | Btr: $battery_capacity% | RAM: $mem_used | CPU: $cpu_load | Disk: $disk_usage | $(date '+%d.%m.%Y (%a) %T')" | ||
| 35 | do | ||
| 36 | sleep 5 | ||
| 37 | done & | ||
| 38 | |||
| 34 | ``` | 39 | ``` |
| 35 | 40 | ||
| 36 | ## Configuration | 41 | ## Configuration |
| 37 | The configuration of dwm is done by creating a custom config.h | 42 | |
| 38 | and (re)compiling the source code. | 43 | You can customize looks via `Xresources` and keybindings via `config.h`. After you're done hit `super` + `r` to restart |
| 44 | the dwm process. | ||
| 39 | 45 | ||
| 40 | ## Additional resources | 46 | ## Additional resources |
| 41 | 47 | ||
| 42 | Restart patch pulled from (gist.github.org/bpsuntrup)[bpsuntrup's gist] | 48 | Swallow, Xresources, Gaps, Systray pulled from [suckless.org](https://dwm.suckless.org/patches/) |
