From 4c90d1d9e4092f9ee0106d316829144653a276ea Mon Sep 17 00:00:00 2001 From: Filip Wandzio Date: Tue, 30 Dec 2025 02:45:11 +0100 Subject: 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 --- README.md | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 15a362f..c72d929 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,48 @@ ## Installation ------------- -Edit config.mk to match your local setup (dwm is installed into -the /usr/local namespace by default). -Afterwards enter the following command to build and install dwm (if -necessary as root): +Hit command below in the root dir ```bash make clean install ``` -## Running dwm -Add the following line to your .xinitrc to start dwm using startx: +Or if you use arch-based distro and like pacman + ```bash - exec dwm + makepkg -si ``` -In order to connect dwm to a specific display, make sure that -the DISPLAY environment variable is set correctly, e.g.: +## Execution + +Probably the best way is to use your xinitrc config file and do something like ```bash - DISPLAY=foo.bar:1 exec dwm + dbus-run-session dwm ``` -In order to display status info in the bar, you can do something -like this in your .xinitrc: + +If you fancy having system stuff in your status bar you need to do something like this or use your own **better** +statusbar. ```bash - while xsetroot -name "`date` `uptime | sed 's/.*,//'`" - do - sleep 1 - done & - exec dwm +while + mem_used=$(free -h | awk '/^Mem:/ {print $3}') + cpu_load=$(top -bn1 | grep "Cpu(s)" | awk '{print $2 + $4"%"}') + battery_capacity=$(cat /sys/class/power_supply/BAT0/capacity) + volume_level=$(wpctl get-volume @DEFAULT_AUDIO_SINK@) + disk_usage=$(df -h / | awk 'NR==2 {print $3 "/" $2}') + + xsetroot -name "$volume_level | Btr: $battery_capacity% | RAM: $mem_used | CPU: $cpu_load | Disk: $disk_usage | $(date '+%d.%m.%Y (%a) %T')" +do + sleep 5 +done & + ``` ## Configuration -The configuration of dwm is done by creating a custom config.h -and (re)compiling the source code. + +You can customize looks via `Xresources` and keybindings via `config.h`. After you're done hit `super` + `r` to restart +the dwm process. ## Additional resources -Restart patch pulled from (gist.github.org/bpsuntrup)[bpsuntrup's gist] +Swallow, Xresources, Gaps, Systray pulled from [suckless.org](https://dwm.suckless.org/patches/) -- cgit v1.2.3