Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've just got dwm configured to my liking in terms of colors and tags. I'm just looking for one more thing: the ability to have certain applications automatically start with dwm on certain tags.

For example, I have a irc tag, I would like irssi to be run in that tag when I start my machine up. Is this possible? What would it look like in config.h?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

dwm is a minimalist window manager that just manages windows. What you are asking requires a bit of a workaround. There are two separate, but related steps.

First, set up your rules for irrsi in config.h - specifying the tag in which you would like it to appear and whether it should be floating or not. Something like this will open irssi in the first tag:

{ NULL, NULL, "irssi",       1 << 0,       False,       -1 },

(explanation of what 1 << 0 means)

If you would like to specify the layout of this tag when dwm opens, you would need to apply the pertag patch and recompile.

The second step is to start the application when you login to X. If you are not using a login manager, you could add an entry to your ~/.xinitrc - something like:

(sleep 5 && xterm -title "irssi" -e irssi ) &

The sleep is to allow X to start and dwm to load: 5 is ample, you can experiment how little you need...

If you are using a login manager, you will have a .desktop file that you can put the commands in.

I prefer a simpler approach using rules and keybinds. So once dwm is open, I just hit, for example, CtrlAltm and mutt opens in tag 3.

You can see my config.h to get a better idea of how this works: https://bitbucket.org/jasonwryan/dwm-patchset/src/tip/base.config.customizations

share|improve this answer
    
I remember seeing a pic of a desktop you had ing dwm/tmux. It was really nice (this was a couple months back, I think I emailed you about it). Small world :) Thanks for the link to your dotfile, I'll take a look. –  maxmackie Aug 14 '11 at 2:20
    
No problem: have fun with dwm. –  jasonwryan Aug 14 '11 at 2:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.