On Sun, Oct 28, 2012 at 04:16:21PM +0100, Andre Klärner wrote:
> On Sun, Oct 28, 2012 at 11:52:00AM +0100, Uli Schlachter wrote:
> > On 28.10.2012 11:14, Claudio Kozický wrote:
> > > On Sun, Oct 28, 2012 at 09:44:02AM +0100, Uli Schlachter wrote:
> > >> On 28.10.2012 09:19, Claudio Kozický wrote:
> > >>> I'm autorunning chromium and want the autorun window to be moved to tag
> > >>> 3. After the chromium window is moved to tag 3, all additionally opened
> > >>> chromium windows get moved to tag 3 as well (I don't want that). To
> > >>> solve the problem, I have to change chromium's instance after the
> > >>> autorun chromium gets moved to tag 3.
> > >>
> > >> So you autorun chromium and it starts up with instance 
> > >> "chromium-autorun",
> > >> right? And non-autorun chromiums have instance "chromium". At least the 
> > >> rule
> > >> from your original mail suggests so.
> > >>
> > >> That means you can make a rule that just moves chromium-autorun to tag 3 
> > >> and
> > >> doesn't move other chromiums...?
> > > 
> > > Yes I autorun chromium with instance set to "chromium-autorun". When I
> > > decide to open another chromium window on a tag different from tag 3, I
> > > execute "chromium" on that tag. But the problem is that when I execute
> > > "chromium", chromium opens a new window which inherits instance set to
> > > "chromium-autorun" and therefore gets moved from whatever tag I executed
> > > the "chromium" command to tag 3.
> > 
> > Isn't it somehow possible to make chromium start a new process instead of
> > letting the already-running one handle the new page? :-/
> 
> I guess starting chromium with --temp-profile or another profile should do
> the trick, right?
> 
> regards, Andre
> 
> -- 
> Andre Klärner

I've looked through chromium command line swiches and haven't found a
single swich to launch a _proper_ new window. Apart from the
--temp-profile way to launch a separate session, it's also possible to
set --user-data-dir to a directory other than the default and thus
launch a new session. But launching a new session has dissadvantages
like not been able to move tabs between them, having separate history,
bookmarks and so on (although it probably could be possible to sync the
history and bookmarks) - so launching a separate instance isn't really
the best way to go.

I've also tried to change the chromium window instance name to a
different name with xdotool. Although xdotool did manage to change the
window instance name, if I opened another window in chromium, it still
had the old instance name.

So I need to somehow detect, if the chromium window Awesome is about to
move was autorun or not.  Came up with this - autorun chromium with a
command like "echo 1 > .chromium-autorun && chromium", then when Awesome
sees a newly spawned chromium window, it checks .chromium-autorun (it's
a file) and if it finds "1" there, moves the chromium window to tag 3
and deletes the .chromium-autorun file, therefore preventing multiple
windows being moved. But the problem is that I have no idea how to make
Awesoem check the file *before* moving the window and removing the file.
Does anyone know how?

-- 
Claudio Kozický

-- 
To unsubscribe, send mail to [email protected].

Reply via email to