Setting up DWM

i have installed dwm and moved .xinitrc to my home dir. i have a compositor- compton and i have edited the xinitrc to exec dwm and compton and feh upon startx... when i actually use startx I’m greeted with a blank white screen and no cursor. Also could someone tell me where the dwm configs are located?
 
You actually have a bit of reading to do. :)
Short answer, you configure dwm by copying its config.def.h file to config.h and editing that file, then recompiling dwm. In FreeBSD you can use your custom config.h with make 'DWM_CONF=/path-to-your-customized-file install clean

You configure dwm by editing its configuration file, config.h. I have a page on dwm at https://srobb.net/dwm.html which goes into some basics but more importantly has a link to great article on the Debian forums about configuration. http://forums.debian.net/viewtopic.php?f=16&t=65110

To do this in FreeBSD, I think the easiest way is to do make extract, which gives you the /usr/ports/x11-wm/dwm/work/dwm-6.2 directory. I think that's the name, but there's a dwm-<version> directory in work. Take that, edit it to your liking--it's a C file but you don't really need to know C to use it, follow that Debian forums article.

I'm not sure if you have a config.h or just a config.def.h as I've had my own custom config.h hanging around for awhile. If there's no config.h, copy that config.def.h to config.h and work on it. When you're satisified, you can install the port with
make 'DWM_CONF=<where you have your customized config.h file> install clean.

If you want any of the patches from suckless.org, you can put the patch or patches in /usr/ports/x11-wm/dwm/files.
Your .xinitrc should be something like
feh --bg-scale <my-image> && exec dwm
I'm not sure about compton, never used it. It might be worth removing compton from .xinitrc and seeing if that helps. Once you have it working, you can then get compton working with it.
 
"a black screen" might very well be what you get in a done set up of dwm. That is already much better than an error from starting X!
You probably want to open a terminal next. Have a look at `config.h` under /* commands */. there you will find a `*termcmd[] = { st, NULL} `. Here `st` is just the suckless terminal. Place a terminal name from your path here (I just use the `st`, so I do not change the line).
You would probably want to open a new terminal with some key combination.
For me that is with Mod4 + Enter. You can set the "modkey" in `config.h` in the section /* key definitions */.
That should be a enough to get started. Just visit the `config.h` file every now and than, you will most likely be able to make more and more out of it.
 
Hrrm, did I mention that if you install the package, or don't edit config.h the default to open a terminal is shift+alt+enter? From there, you have a terminal where you can work. FreeBSD's default, whether package or port, installs st as default terminal. It also installs dmenu, which you can run, by default, with alt+p. With dmenu open, you can run any command. Oh, and again, if you just take defaults, firefox opens in tag 9, which you can think of as workspace or desktop 9, and can be reached by alt+9.

Hrrm, just found a nice dwm cheat sheet for defaults.
 
Back
Top