Re: [dev] run a program and display on a specific tab
Ok, this makes sense On Tue, Jun 7, 2011 at 15:14, Andrew Hills wrote: > > He's saying wmii (and the process of configuring it) is complicated > beyond reasonable. >
Re: [dev] run a program and display on a specific tab
On Mon, Jun 6, 2011 at 9:26 PM, hiro <23h...@googlemail.com> wrote: >> The problem has become insoluble. Even locating all possible >> solutions is NP-hard. > > I don't get it. He's saying wmii (and the process of configuring it) is complicated beyond reasonable. --Andrew Hills
Re: [dev] run a program and display on a specific tab
> The problem has become insoluble. Even locating all possible > solutions is NP-hard. I don't get it.
Re: [dev] run a program and display on a specific tab
On 06/06/11 23:03, Ruben Gonzalez Arnau wrote: On 06/06/11 12:20, Piotr Zalewa wrote: Hi, I want to create a script which will load my default setup (quite a few programs). How to run a program so it will be displayed on a desired tab? (view, workspace - I always had a problem with that lingo) thanks, zalun Assuming you are using sh version of wmii. (<= 3.9.2) ${HOME}/.wmii/wmiirc_local wmiir write /tagrules < tag /XTerm/ -> sel /Firefox/ -> 9 /Xmms/ -> music etc ! sel is current tag you can use letters "www" or numbers "1" for your custom apps tags. Hope it helps. Configuration options was the thing which I liked from the start. I used wihack in the end. I haven't found a way to manage the columns yet (open two programs in one tag and move one of them to the other column), but it's already great. I think wmiir will do it, haven't investigated too much yet. Great software. Thanks zalun I use quite new vaio laptop and it's not always perfect with switching screen to external and back... sometimes X restart is needed...
Re: [dev] run a program and display on a specific tab
On 06/06/11 12:20, Piotr Zalewa wrote: Hi, I want to create a script which will load my default setup (quite a few programs). How to run a program so it will be displayed on a desired tab? (view, workspace - I always had a problem with that lingo) thanks, zalun Assuming you are using sh version of wmii. (<= 3.9.2) ${HOME}/.wmii/wmiirc_local wmiir write /tagrules < tag /XTerm/ -> sel /Firefox/ -> 9 /Xmms/ -> music etc ! sel is current tag you can use letters "www" or numbers "1" for your custom apps tags. Hope it helps. -- r...@sdf.lonestar.org
Re: [dev] run a program and display on a specific tab
On 06/06/11 12:20, Piotr Zalewa wrote: Hi, I want to create a script which will load my default setup (quite a few programs). How to run a program so it will be displayed on a desired tab? (view, workspace - I always had a problem with that lingo) thanks, zalun Assuming you are using sh version of wmii. ${HOME}/.wmii/wmiirc_local wmiir write /tagrules < tag /XTerm/ -> sel /Firefox/ -> 9 /Xmms/ -> music etc ! sel is current tag you can use letters "www" or numbers "1" for your custom apps tags. Hope it helps.
Re: [dev] run a program and display on a specific tab
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 .''`. : :' : We are debian.org. Lower your prices, surrender your code. `. `' We will add your hardware and software distinctiveness to `-our own. Resistance is futile. diff -r c19e2f20ca69 config.def.h --- a/config.def.h Thu Oct 29 15:39:12 2009 +0100 +++ b/config.def.h Thu Oct 29 15:43:42 2009 +0100 @@ -80,7 +80,8 @@ TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7) TAGKEYS(XK_9, 8) - { MODKEY|ShiftMask, XK_q, quit, {0} }, + { MODKEY|ShiftMask|ControlMask, XK_q, quit, {.i = 0 } }, + { MODKEY|ShiftMask, XK_q, quit, {.i = 1 } }, }; /* button definitions */ diff -r c19e2f20ca69 dwm.c --- a/dwm.c Thu Oct 29 15:39:12 2009 +0100 +++ b/dwm.c Thu Oct 29 15:43:42 2009 +0100 @@ -270,6 +270,7 @@ static Monitor *mons = NULL, *selmon = NULL; static Window root; +static char **args; /* configuration, allows nested code to access above variables */ #include "config.h" @@ -1292,6 +1293,8 @@ void quit(const Arg *arg) { + if(arg->i) /* restart dwm, if fails just fall through and exit */ + execv(args[0], args); running = False; } @@ -2008,6 +2011,7 @@ fputs("warning: no locale support\n", stderr); if(!(dpy = XOpenDisplay(NULL))) die("dwm: cannot open display\n"); + args = argv; checkotherwm(); setup(); scan(); # HG changeset patch # Parent 3b5f9910413a84c53905b237e5fbf0728bb1081c diff -r 3b5f9910413a dwm.c --- a/dwm.c Wed Oct 27 15:43:16 2010 +0200 +++ b/dwm.c Wed Oct 27 15:46:10 2010 +0200 @@ -275,6 +275,7 @@ static Monitor *mons = NULL, *selmon = NULL; static Window root; static char **args; +static Atom dwmatom_tags; /* configuration, allows nested code to access above variables */ #include "config.h" @@ -1104,8 +1105,15 @@ c->tags = t->tags; } else { + Atom atom; int format; unsigned long n, extra; unsigned int *ptags; c->mon = selmon; - applyrules(c); + if(XGetWindowProperty(dpy, w, dwmatom_tags, 0L, 1L, False, XA_CARDINAL, + &atom, &format, &n, &extra, (unsigned char **)&ptags)==Success && n==1 && *ptags!=0) + c->tags = *ptags; /* override rule tags with memorized tags */ + else { + applyrules(c); + XChangeProperty(dpy, w, dwmatom_tags, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&c->tags, 1); + } }
Re: [dev] run a program and display on a specific tab
On Mon, Jun 6, 2011 at 11:52 AM, Piotr Zalewa wrote: > wmii The problem has become insoluble. Even locating all possible solutions is NP-hard. -- # Kurt H Maier
Re: [dev] run a program and display on a specific tab
On 06/06/11 15:41, Connor Lane Smith wrote: Hey, 2011/6/6 Piotr Zalewa: How to run a program so it will be displayed on a desired tab? (view, workspace - I always had a problem with that lingo) So are we talking about wmii or dwm or what? wmii zalun
Re: [dev] run a program and display on a specific tab
2011/6/6 Piotr Zalewa : > Hi, > > I want to create a script which will load my default setup (quite a few > programs). > > 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 have used xdotool for this. I've been lazy and just put arbitrary sleeps between launching programs though, when really I should be waiting until a window with the appropriate name or class appears. Alex
Re: [dev] run a program and display on a specific tab
On Mon, 6 Jun 2011 10:04:57 -0400 Kurt H Maier wrote: > > It's more complicated as xterms are on many tags > > Window class is not the only thing tags can use. Even if it was, xterms have more than one way to set window class. -T was always my favourite.
Re: [dev] run a program and display on a specific tab
Hey, 2011/6/6 Piotr Zalewa : > How to run a program so it will be displayed on a desired tab? (view, > workspace - I always had a problem with that lingo) So are we talking about wmii or dwm or what? cls
Re: [dev] run a program and display on a specific tab
2011/6/6 Piotr Zalewa : > I don't want to do it every time You are allowed to have more than one .xinitrc on a system. > It's more complicated as xterms are on many tags Window class is not the only thing tags can use. -- # Kurt H Maier
Re: [dev] run a program and display on a specific tab
On 06/06/11 11:40, ilf wrote: On 06-06 11:20, Piotr Zalewa wrote: I want to create a script which will load my default setup (quite a few programs). I use .xinitrc for this. I don't want to do it every time 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
Re: [dev] run a program and display on a specific tab
On 06/06/11 14:47, Erik Hahn wrote: On Mon, Jun 06, 2011 at 11:20:29AM +0100, Piotr Zalewa wrote: Hi, I want to create a script which will load my default setup (quite a few programs). How to run a program so it will be displayed on a desired tab? (view, workspace - I always had a problem with that lingo) In wmii, you can either use wihack or create some tag rules in wmiirc. Thanks - wihack is the way to go I run terminals on different tags ... zalun
Re: [dev] run a program and display on a specific tab
On Mon, Jun 06, 2011 at 11:20:29AM +0100, Piotr Zalewa wrote: > Hi, > > I want to create a script which will load my default setup (quite a > few programs). > > How to run a program so it will be displayed on a desired tab? > (view, workspace - I always had a problem with that lingo) In wmii, you can either use wihack or create some tag rules in wmiirc.
Re: [dev] run a program and display on a specific tab
On 06-06 11:20, Piotr Zalewa wrote: I want to create a script which will load my default setup (quite a few programs). I use .xinitrc for this. 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. -- ilf Über 80 Millionen Deutsche benutzen keine Konsole. Klick dich nicht weg! -- Eine Initiative des Bundesamtes für Tastaturbenutzung signature.asc Description: Digital signature
[dev] run a program and display on a specific tab
Hi, I want to create a script which will load my default setup (quite a few programs). How to run a program so it will be displayed on a desired tab? (view, workspace - I always had a problem with that lingo) thanks, zalun