Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/elken/dwm

dwm
https://github.com/elken/dwm

dwm

Last synced: about 2 months ago
JSON representation

dwm

Awesome Lists containing this project

README

        

* DWM - Dynamic Window Manager
dwm is an extremely fast, small and dynamic window manager for X.

This repository exists as my fork of [[https://git.suckless.org/dwm][dwm]] (currently just 6.1), and as such has references and links to my own config.

*CAVEAT EMPTOR*

** Requirements

I mostly use [[https://archlinux.org][Arch Linux]], as such package names/file paths will be tied to Arch's. If you wish to fork this, it should be quite simple to get working.

** Dependencies

The following packages are needed to build:

- =libx11=
- =libxft=
- =libxinerama=

A full running version also depends on the following packages:

- =xorg-xsetroot= (for status and dwm needs it)
- =xorg-setxkbmap= (for startup)
- =xorg-xset= (for startup)
- =nitrogen= (setting wallpaper)
- =network-manager-applet= (network management)
- =dunst= (notification daemon)
- =picom= (compositor)
- =gnome-screensaver= (for screen lock)

And for the status:

- =sysstat=
- =acpi=

** Installation
You /might/ have to modify =config.mk= to match any local changes (although I haven't had to). This is also /currently/ where the theme flags are specified.

After making any changes, run =sudo make install clean= to install dwm and create a =dwm.desktop= file for working with login managers.

** Running DWM

This dwm setup depends on a number of other utilities which get run from the [[file:bin/start.sh][Startup]] and [[file:bin/status.sh][Status]] scripts.

It also assumes it's being run through a login manager, but passing the [[file:bin/start.sh][Startup]] script to =xinit= should work.

** Customisation

For simplicity, my =dwm.c= is already patched with everything in =patches/= but all the ordered patches should apply from a base 6.1.

There also exists a number of themes (shown below)

| [[assets/nord.png]] | [[assets/gruvbox.png]] | [[assets/solarized_dark.png]] | [[assets/solarized_light.png]] |
| *Nord* (-DNORD) | *Gruvbox* (-DGRUVBOX) | *Solarized Dark* (-DSOLARIZED_DARK) | *Solarized Light* (-DSOLARIZED_LIGHT) |

Which can be displayed with the associated flag in =config.mk=. All included themes also styles clients appropriately, as well as dmenu.

*** Adding a theme

If you wish to contribute your own theme, add an appropriate =#IFDEF THEMENAME= block in [[file:config.h][config.h]] to specify the colours, and further down for dmenu.

You also need to adjust the block in =dwm.c= within =updatesystray= to specify the background.

** Status

The status area is a simple script with a number of functions, currently just CPU, RAM, time, speaker status and battery (unless full).

It relies on =xsetroot= to echo a large formatted string. I accept that this isn't the best way to write this /however/ programmers are lazy.

** Screen Locking

I use =gdm= as my login manager because it's simple, clean and it just works.

Along with the below config, closing the lid locks and suspends the computer.

*/etc/systemd/logind.conf*:
#+name: /etc/systemd/logind.conf
#+begin_src conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
HandlePowerKey=poweroff
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=ignore

#+end_src