Re: openbox Digest, Vol 112, Issue 2
Gary <[email protected]> Wed, 05 Dec 2018 10:26:33 +0100
| Newsgroups | gmane.comp.window-managers.openbox |
|---|---|
| Message-ID | <[email protected]> |
--===============6872386049966889714== Content-Type: multipart/alternative; boundary="=_8ddfcd1fa1064643ba15234de740bcbf" --=_8ddfcd1fa1064643ba15234de740bcbf Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII I have used an approach that I developed a few years ago to recognize and place new windows as they opened, using wmctrl and xdotool. My approach works reasonably well, but when I discovered Openbox a couple of weeks ago, I was excited to think that I could eliminate my approach and just use Openbox. So far, the programs that I use the most have now been adapted to use Openbox instead of my approach, and I am happy about that. For applications, such as Firefox, that do not provide enough information to Openbox, I can either avoid using those programs, or continue to use my approach for those applications. In summary, I am very pleased with Openbox. On 2018-12-03 18:00, [email protected] wrote: > Send openbox mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://icculus.org/mailman/listinfo/openbox > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of openbox digest..." > > Today's Topics: > > 1. Re: openbox Digest, Vol 111, Issue 9 (Jim Rees) > 2. Re: openbox Digest, Vol 111, Issue 9 (Anthony Thyssen) > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 2 Dec 2018 17:49:51 -0500 > From: Jim Rees <[email protected]> > To: openbox mailing list <[email protected]> > Subject: Re: [openbox] openbox Digest, Vol 111, Issue 9 > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > Gary wrote: > > All of the _OB_APP_ items for a Firefox window are the same for all > Firefox windows, making it impossible to have Openbox configure each > Firefox window uniquely. However, _NET_WM_VISIBLE_NAME is unique for > each Firefox window that is opening a specific webpage, in that it > displays the text from the window's title bar. > > That's one of the more annoying misfeatures of Firefox. There are various > add-ons that claim to fix this, but I haven't tried them. You could try > "Custom Titlebar Text". > > ------------------------------ > > Message: 2 > Date: Mon, 3 Dec 2018 09:26:48 +1000 > From: Anthony Thyssen <[email protected]> > To: [email protected] > Subject: Re: [openbox] openbox Digest, Vol 111, Issue 9 > Message-ID: > <CAHtp78EPzp-2JiVkFE7w7kwnvDX_yKj=Po57PQbsD+LO5rNr0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> > Content-Type: text/plain; charset="utf-8" > > You can discover and figure out the different windows without needing > openbox to do it. > This is especially relevant to the web browsers, which as Gary pointed out > do not differentiate themselves on start up. > > How I handle such applications is to use a start up script (in my case > part of the ".xinitrc" but can be any client start up script, or direct > command call). > > For this I have a 'wait for window' script "xwin_find" > http://www.ict.griffith.edu.au/anthony/software/#xwin_find > This essentially a loop that looks for a specific window using "xwininfo" > > With it I can then do things like... > > google-chrome & > if id=`xwin_find 60 "Anthony.* - Google Chrome"`; then > echo "Chrome Window Found (id=$id)" > sleep 1 # pause a moment > xwit -iconify -id $id > else > echo "ERROR: Chrome Window NOT FOUND\!" > fi > > This will wait (up to a full minute) for the specified window to appear ( > and load the appropriate startup page to identify it), then minimize > (iconify) the window, but you can also resize, position, or move to a > specific window manager desktop, using the appropriate tools. > > It works with chrome, firefox, or other tools too. > > Alternatively, if you don't mind not having a timeout, you can use "wmctrl" > > while :; do > wmctrl -l | grep -q "$string" || continue > : do what you need > break > done > > Or even "xdotool" using its "search -sync" function > > firefox & > xdotool search --sync --onlyvisible --class Firefox \ > windowsize %@ 900 900 windowminimize %@ > > I hope this helps. > > Anthony > > On Mon, Dec 3, 2018 at 2:10 AM Gary <[email protected]> wrote: > >> All of the _OB_APP_ items for a Firefox window are the same for all >> Firefox windows, making it impossible to have Openbox configure each >> Firefox window uniquely. However, _NET_WM_VISIBLE_NAME is unique for each >> Firefox window that is opening a specific webpage, in that it displays the >> text from the window's title bar. If I understand correctly, that >> information was not available to Openbox when the Firefox window opened. >> Chromium does display unique information for each window, in the form of >> the path to the profile specified on the Chromium command line, so it looks >> like I'll have to keep using Chromium and avoid using Firefox. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: <http://icculus.org/pipermail/openbox/attachments/20181203/c0dfe082/attachment-0001.html> > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > openbox mailing list > [email protected] > http://icculus.org/mailman/listinfo/openbox > > ------------------------------ > > End of openbox Digest, Vol 112, Issue 2 > *************************************** --=_8ddfcd1fa1064643ba15234de740bcbf Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset= =3DUTF-8" /></head><body style=3D'font-size: 12pt; font-family: Tahoma,Aria= l,Helvetica,sans-serif'> <p>I have used an approach that I developed a few years ago to recognize an= d place new windows as they opened, using wmctrl and xdotool. My approach w= orks reasonably well, but when I discovered Openbox a couple of weeks ago, = I was excited to think that I could eliminate my approach and just use Open= box. So far, the programs that I use the most have now been adapted t= o use Openbox instead of my approach, and I am happy about that. For applic= ations, such as Firefox, that do not provide enough information to Openbox,= I can either avoid using those programs, or continue to use my approach fo= r those applications. In summary, I am very pleased with Openbox.</p> <p>On 2018-12-03 18:00, [email protected] wrote:</p> <blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2= px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ig= nored --> <div class=3D"pre" style=3D"margin: 0; padding: 0; font-family: monospace">= Send openbox mailing list submissions to<br /> <a h= ref=3D"mailto:[email protected]">[email protected]</a><br /> <br /> To = subscribe or unsubscribe via the World Wide Web, visit<br /> &n= bsp; <a href=3D"http://icculus.org/mailman/listinfo/openbox" target=3D= "_blank" rel=3D"noopener noreferrer">http://icculus.org/mailman/listinfo/op= enbox</a><br /> or, via email, send a message with subject or body 'help' t= o<br /> <a href=3D"mailto:openbox-request@icculus= =2Eorg">[email protected]</a><br /> <br /> You can reach the pers= on managing the list at<br /> <a href=3D"mailto:ope= [email protected]">[email protected]</a><br /> <br /> When rep= lying, please edit your Subject line so it is more specific<br /> than "Re:= Contents of openbox digest..."<br /> <br /> <br /> Today's Topics:<br /> <= br /> 1. Re: openbox Digest, Vol 111, Issue 9 (Jim Rees)<= br /> 2. Re: openbox Digest, Vol 111, Issue 9 (Anthony Th= yssen)<br /> <br /> <br /> ------------------------------------------------= ----------------------<br /> <br /> Message: 1<br /> Date: Sun, 2 Dec 2018 = 17:49:51 -0500<br /> From: Jim Rees <<a href=3D"mailto:[email protected]">jim= @rees.org</a>><br /> To: openbox mailing list <<a href=3D"mailto:open= [email protected]">[email protected]</a>><br /> Subject: Re: [openbox] o= penbox Digest, Vol 111, Issue 9<br /> Message-ID: <<a href=3D"mailto:201= [email protected]">[email protected]</a>><br />= Content-Type: text/plain; charset=3Dus-ascii<br /> <br /> Gary wrote:<br /= > <br /> All of the _OB_APP_ items for a Firefox window are the= same for all<br /> Firefox windows, making it impossible to ha= ve Openbox configure each<br /> Firefox window uniquely. Howeve= r, _NET_WM_VISIBLE_NAME is unique for<br /> each Firefox window= that is opening a specific webpage, in that it<br /> displays = the text from the window's title bar.<br /> <br /> That's one of the more a= nnoying misfeatures of Firefox. There are various<br /> add-ons that claim = to fix this, but I haven't tried them. You could try<br /> "Custom Titlebar= Text".<br /> <br /> <br /> ------------------------------<br /> <br /> Mes= sage: 2<br /> Date: Mon, 3 Dec 2018 09:26:48 +1000<br /> From: Anthony Thys= sen <<a href=3D"mailto:[email protected]">anthony.thyssen@gmail= =2Ecom</a>><br /> To: <a href=3D"mailto:[email protected]">openbox@icc= ulus.org</a><br /> Subject: Re: [openbox] openbox Digest, Vol 111, Issue 9<= br /> Message-ID:<br /> <<a href=3D"mailto:CAHtp= 78EPzp-2JiVkFE7w7kwnvDX_yKj=3DPo57PQbsD+LO5rNr0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org">CAHtp78EPz= p-2JiVkFE7w7kwnvDX_yKj=3DPo57PQbsD+LO5rNr0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org</a>><br /> Co= ntent-Type: text/plain; charset=3D"utf-8"<br /> <br /> You can discover and= figure out the different windows without needing<br /> openbox to do it.<b= r /> This is especially relevant to the web browsers, which as Gary pointed= out<br /> do not differentiate themselves on start up.<br /> <br /> How I = handle such applications is to use a start up script (in my case<br /= > part of the ".xinitrc" but can be any client start up script, or direct<b= r /> command call).<br /> <br /> For this I have a 'wait for window' script= "xwin_find"<br /> <a href=3D"http://www.ict.griffi= th.edu.au/anthony/software/#xwin_find" target=3D"_blank" rel=3D"noopener no= referrer">http://www.ict.griffith.edu.au/anthony/software/#xwin_find</a><br= /> This essentially a loop that looks for a specific window using "xwininf= o"<br /> <br /> With it I can then do things like...<br /> <br /> &nb= sp;google-chrome &<br /> if id=3D`xwin_find 60 "Anthony.* -= Google Chrome"`; then<br /> echo "Chrome Window Fo= und (id=3D$id)"<br /> sleep 1 # pause a momen= t<br /> xwit -iconify -id $id<br /> els= e<br /> echo "ERROR: Chrome Window NOT FOUND\!"<br = /> fi<br /> <br /> This will wait (up to a full minute) for the= specified window to appear (<br /> and load the appropriate startup page t= o identify it), then minimize<br /> (iconify) the window, but you can= also resize, position, or move to a<br /> specific window manager desktop,= using the appropriate tools.<br /> <br /> It works with chrome, firefox, o= r other tools too.<br /> <br /> Alternatively, if you don't mind not having= a timeout, you can use "wmctrl"<br /> <br /> while :; do= <br /> wmctrl -l | grep -q "$string" || conti= nue<br /> : do what you need<br /> &nbs= p; break<br /> done<br /> <br /> Or even= "xdotool" using its "search -sync" function<br /> <br />  = ;firefox &<br /> xdotool search --sync --= onlyvisible --class Firefox \<br /> &nb= sp; windowsize %@ 900 900 windowminimize= %@<br /> <br /> I hope this helps.<br /> <br /> Anthony<br /> <br /> <br /= > On Mon, Dec 3, 2018 at 2:10 AM Gary <<a href=3D"mailto:[email protected]">g= [email protected]</a>> wrote:<br /> <br /> <blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2= px solid; margin: 0">All of the _OB_APP_ items for a Firefox window are the= same for all<br /> Firefox windows, making it impossible to have Openbox c= onfigure each<br /> Firefox window uniquely. However, _NET_WM_VISIBLE_NAME = is unique for each<br /> Firefox window that is opening a specific webpage,= in that it displays the<br /> text from the window's title bar. If I under= stand correctly, that<br /> information was not available to Openbox when t= he Firefox window opened.<br /> Chromium does display unique information fo= r each window, in the form of<br /> the path to the profile specified on th= e Chromium command line, so it looks<br /> like I'll have to keep using Chr= omium and avoid using Firefox.<br /> <br /> <br /> </blockquote> -------------- next part --------------<br /> An HTML attachment was scrubb= ed...<br /> URL: <<a href=3D"http://icculus.org/pipermail/openbox/attach= ments/20181203/c0dfe082/attachment-0001.html" target=3D"_blank" rel=3D"noop= ener noreferrer">http://icculus.org/pipermail/openbox/attachments/20181203/= c0dfe082/attachment-0001.html</a>><br /> <br /> ------------------------= ------<br /> <br /> Subject: Digest Footer<br /> <br /> ___________________= ____________________________<br /> openbox mailing list<br /> <a href=3D"ma= ilto:[email protected]">[email protected]</a><br /> <a href=3D"http://i= cculus.org/mailman/listinfo/openbox" target=3D"_blank" rel=3D"noopener nore= ferrer">http://icculus.org/mailman/listinfo/openbox</a><br /> <br /> ------= ------------------------<br /> <br /> End of openbox Digest, Vol 112, Issue= 2<br /> ***************************************</div> </blockquote> </body></html> --=_8ddfcd1fa1064643ba15234de740bcbf-- --===============6872386049966889714== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18Kb3BlbmJveCBt YWlsaW5nIGxpc3QKb3BlbmJveEBpY2N1bHVzLm9yZwpodHRwOi8vaWNjdWx1cy5vcmcvbWFpbG1h bi9saXN0aW5mby9vcGVuYm94 --===============6872386049966889714==--