'SP'ecially 'A'dapted 'D'WM 'E'nvironment
This is my repository for a basic, fully featured “desktop environment” using the DWM window manager. My goal for this repository is to have a base environment that I can quickly deploy on various workstations that I own, as well as provide a platform that makes it easy to maintain that environment and make changes over time. If you stumble upon this respository, I hope to make this environment rather easy to deploy on your end as well, but as with all things of this nature, ymmv.
Note: This repository is a work in progress as I build the environment, installation scripts, and procedure. While I intend to write scripts that will make it easy to install the environment and its dependencies, I assume this repository will always require some tweaking, and will most likely be constantly changed as I adapt my environment to my various workstations.
The starting point for deploying my environment on a workspace will be the
./deploy-spade.sh
shell script. It will run the user through a few questions
ensuring some basic utilities are already installed to the user’s liking (things
like st, dmenu, and an editor which I have seperate configured repositories for).
The script will then proceed to build the DWM environment, download the needed
dependencies, and copy their configurations to the proper places. Note, the entire
script makes the assumption that the user has a working X display server already
setup. Setting up the X display server is out of scope of this repo.
There are dependencies that need to be downloaded for both my build of DWM, as well as the peripheral applications I use for my environment. I am going to split them into dependencies needed for DWM specifically, and dependencies needed for my overall environment (other applications and their own dependencies).
To build DWM on its own, the gcc build tools need to be installed. This repo
makes an assumption that standard commands like gcc
and make
can be executed on
the target system. Other dependencies include the development files for libx11
,
libxft
and libxinerama
. The deploy script will attempt to install these dependencies,
making use of a package command variable in the shell script that can be modified
for your environment (defaults to using the xbps-install
command for void linux).
The following is a table of features that this environment provides, along with any associated dwm patches and dependencies that are used to provide the specific functionality:
Feature | dwm Patch | Description | Dependencies |
---|---|---|---|
Autoset Wallpaper | autostart | Use nitrogen to automatically start the wallpaper. | nitrogen |
Restart Signal | restartsig | Restart dwm with mod+ctrl+shift+q | n/a |
Rofi Prompt | n/a | Use rofi as a system and run prompt | rofi |
File Browsers | n/a | Use lf as terminal browser, thunar as gui browser | lf, thunar |
Note for rofi: I have included both the script used to launch rofi from DWM, as well as a whole folder of configuration of rofi themes, the latest can be found at this github repository.
Application config files for lf are included. There are additional instructions included in these configs to make the previewer work in the terminal.
Feature | dwm Patch | Description | Dependencies |
---|---|---|---|
Alternative Tags | alternativetags | Show tag numbers on key press | n/a |
Hide Vacant Tags | hide_vacant_tags | Only show those tags with clients in them | n/a |
Underline Tags | underlinetags | Underlines the current selected tag | n/a |
Rainbow Tags | rainbowtags (mod) | Modifed version of rainbow tags (color tags) | n/a |
Status(Menu) Button | statusbutton | Provides clickable button before tags | xmenu |
Layout Menu | layoutmenu | Provides a menu for layouts when clicked | xmenu |
Awesomebar Functions | awesomebar | Allows show/hiding windows clicked on bar | n/a |
Window Icons | winicon | Allows showing app icons in bar | n/a |
Focus on Urgent | focusonnetactive | Automatically Switches to Urgent Window | rofi |
Switch To Tag | switchtotag | Adds to client rules to switch to new tag automatically | n/a |
Window Gaps | vanitygaps | Adds gaps and gap logic to client windows | n/a |
Multiple Layouts | vanitygaps | Includes many different dynamic layouts | n/a |
Note, when a patch name is in bold, that indicates a config file or script should be present pertaining to that patch. When a dependency name is in bold, that indicates a config file or script shoudl be present pertaining to that dependency.
For my status bar region, I use the dwmblocks-async build to provide the status text to dwm. To accomplish this to my liking, I had to add a few additional dwm patches to support this.
Feature | dwm Patch | Description | Dependencies |
---|---|---|---|
Colored Status Text | status2d+systray | Provides the ability to enable color in status text | n/a |
System Tray | status2d+systray | Provides a system tray in the dwm bar | n/a |
Clickable Status | statuscmd | Provides ability to execute commands when clicking status regions | n/a |
My build of dwmblocks provides the system to script the functionality and contents of my status bar. To accomplish this, scripts are provided in the dwmblocks/scripts directory.
I have added files that allow me to launch emacs as a runit service. This works well because it pre-loads my emacs configuration and makes opening emacs buffers really fast.
While the service files should have been copied over, you will need to run the command that adds a new services directory, and symlink the emacs service folder to this directory so it is run.
The following is already added to the autostart script in .local/share/dwm:
runsvdir -P "${HOME}/.local/service/"
If I just sym link the emacs service folder .local/emacs to ths above directory, it should work. Comments at this link should also explain more: https://www.reddit.com/r/voidlinux/comments/uomxrx/how_to_daemonize_emacs_as_user_service/
I have added a function that works pretty well when using the hide_vacant_tags patch. Since that patch
minimizes the tags shown in the tag bar to only those that have clients associated with them, I changed
the way I select a tag to view by allowing the number keys to align to the visible tags shown in the bar.
This means, using the viewoccupied function, using Mod+1
to view a tag views the first occupied tag, not
just tag #1. Similarly, Mod+2
views the second occupied tag, and so on. This makes it really easy to
switch occupied tags matching visually to what is shown in the tag bar.
Now, if I want to select a tag # where there is a conflict (say I want to select Tag #1, but the first
occupied Tag is Tag #3), I have two choices. I can use Mod+Alt+Tag#
to force-select the tag to view,
or I can use Mod+0
to show/view all tags, and then select the specific one I want to view. This gives a
couple quality of life options, but also flexibility, in choosing the tags I want to work with.