Copy the default config file to config.h then open it.
Use whatever editor you prefer to modify config.h, but I would recommend using one that allows syntax highlighting to help you understand what you’re doing :)
It’s pretty well commented, but we’ll take a look through it bit by bit:
You can define the font the way you would for an xterm. The bottom two lines define whether it will be hidden and where it will be. Easy huh?
The selected window has a one-pixel border by default, of color #0066ff (blue, I think)
The background and foreground colors refer to the status bar.
Dwm has multiple desktops, but they’re called tags and work slightly differently. By default they are numbered 1-9, but you can rename them however you want, just put the names in quotes.
The rules define how certain windows get treated, e.g. Gimp is always floating (not tiled or monocle/fullscreen) as it doesn’t work properly otherwise.
The “tags mask” defines which tag the window appears on. Basically read the << as “+”, so 1 << 8 means Firefox will be on tag 9.
0 means any tag.
Dwm has three layouts: tiling, floating (normal ‘Windows’ mode) and monocle (fullscreen). Here you can set the default layout, and the funky little symbol that will appear in the status bar.
Above that you can select the amount of the screen that the master window takes up.
By default the modifier key is Alt (“Mod1Mask”). You could change it to Super/Windows by using “Mod4Mask” if you preferred.
The TAGKEYS set what happens if you press the number for a tag along with a modifier, so Alt-3 will take you to tag 3, while Alt-Shift-3 will tag (attach) a window to tag 3.
I think this part speaks for itself :)
Now we get to the guts of it, the commands:
The first two commands in the long list spawn commands; note how those commands are defined above that, with each separate part of the command in quotes and with NULL at the end. So any commands you wanted to add would need to be defined under ‘commands’, then called in the ‘keys’ section.
XK_p means the button ’p’, etc.
If instead of ‘MODKEY’ you put ‘0’, that would mean ‘no modifier’.
‘focusstack’ means next or previous window, depending on the +1 or -1
‘setmfact’ means set the size of the master window in tiling mode
‘zoom’ is move a window to the master window in tiling mode
‘setlayout’ chooses a layout based on the order defined earlier, starting numbering from 0
The TAGKEYS select the tags - note that the tags as far as dwm is concerned number from 0-8.
Lastly, Alt-Shift-q quits dwm and takes you back to a tty.
Here you define what happens when you click in various places, with and without the mod keys.
‘ClkLtSymbol’ means ‘click layout symbol’.
This web site uses third's cookies and the Google's cookies to offer services, personalize ads and analyze traffic (Google analytics).
The information on the use of the this web site is shared with Google and another ads provider platforms. When you using this web site, you accept cookies use. See more about the Cookies
Caution!: This site is not liable for any damage caused to people or equipment with the information it is exposed. All content is purely informational purposes and is not intended to be a guide. The presented material has been used solely for training purposes and/or entertainment. Viewer discretion is advised.