Re: [dev] run a program and display on a specific tab

From: Benoit T <benoit.triquet_AT_gmail.com>
Date: Mon, 6 Jun 2011 20:38:35 +0200

hello,

if you were referring to dwm rather than wmii...

On Mon, Jun 06, 2011 at 02:49:57PM +0100, Piotr Zalewa wrote:
> >>I want to create a script which will load my default setup (quite a
> >>few programs).
> >
> >I use .xinitrc for this.

... or .xsession

> I don't want to do it every time

then create a script that launches your programs and launch that script
from an xterm, dmenu or a shortcut in your dwm.h

> >>How to run a program so it will be displayed on a desired tab? (view,
> >>workspace - I always had a problem with that lingo)
> >
> >I assign programs to tags in config.h.
>
> It's more complicated as xterms are on many tags

it is still the right way to do what you ask for with dwm and anyway
it's the only way at least with a stock dwm.

as others suggested, you can match on several properties in rules[] in
config.h and they are not difficult to set from the command line for
your xterms.

one annoyance with the whole dwm concept is that you have to restart dwm
to try new rules, since you need to recompile.

with attached respawn.patch patch, you won't need to exit your X
session, rather dwm will respawn over itself - but with the new version
of itself as found on disk. of course if the new version crashes your X
session will terminate and if it does not work somehow, you may have to
forcibly terminate it, but if your changes are sane, you will be fine,
and anyway, hey, you have to try out the new build at some point (one
alternative being to try the new build in a nested X server such as
xephyr+xoo).

if you are interested in the respawn patch, then you will find that when
dwm starts in lieu of any other WM, including itself, all clients for
which there is no rule move to the 1st tag.

attached remember_tags.patch will solve that problem by recording tags
in an xprop for each X client, which is remembered through dwm restarts.

note: these are patches from a mercurial queue over my dwm repo, not
revisions against the dwm repo itself. apply them as unversioned diffs
or import them into your own mercurial queue and then "hg qpush" them.

most likely you found out that you don't want to install to /usr/bin/dwm
nor /usr/local/bin/dwm everytime you edit your config.h so you probably
have your own makefile variant that will install to ~/bin or something.
if you don't, well, i have a patch for that but it's a bit convoluted
due to supporting install over the same home directory for multiple
machines with different architectures, so i am not providing _that_ part
of my patch queue at this time.

cheers

-- 
Benoit Triquet <benoit.triquet at gmail.com>
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.


Received on Mon Jun 06 2011 - 20:38:35 CEST

This archive was generated by hypermail 2.2.0 : Mon Jun 06 2011 - 20:48:02 CEST