Hi Javier, sorry for the late reply. Would something like this be
what you're after?
-- Assign a priority to each window. Higher priorities will be placed
-- farther to the right.
function mypriority(c)
-- Test c.class or c.instance as necessary...
if (c is Vim) then
return 1
elseif (c is Terminal) then
return 2
elseif (c is Chrome) then
return 3
else
return 99
end
end
Then in your client "manage" signal, add:
local delta = 0
while mypriority(c) > mypriority(awful.client.next(delta+1, c)) do
delta = delta + 1
end
awful.client.swap.byidx(delta, c)
This might cause a juttering effect as windows open, but it should do
the job.
Cheers,
Bryan
On Mon, 3 Sep 2012 23:20:30 +0200
Javier Garcia <[email protected]> wrote:
> Hi again, any idea about my questions.
>
> Actuallly my only target is to have apps on the taskbar always in the
> same order. Do you know any way to open apps always in the same
> position of the taskbar?
>
> I would like to have always this order below, even if the app is
> relaunched (close and open again):
>
> Vim - Terminal - Chrome
>
> Javi
>
>
> 2012/9/2 Javier Garcia <[email protected]>
>
> > Thanks David, but none of them worked, that is, none of them put
> > the new task at the right of the others, they are still put on the
> > left. Here you have my part of rc.lua you mention:
> >
> > -- Add widgets to the wibox - order matters
> > mywibox[s].widgets = {
> > {
> > mylauncher,
> > mytaglist[s],
> > mypromptbox[s],
> > layout = awful.widget.layout.horizontal.leftright
> > },
> > mylayoutbox[s],
> > mytextclock,
> > s == 1 and mysystray or nil,
> > mytasklist[s],
> > layout = awful.widget.layout.horizontal.rightleft
> > }
> >
> > Javi
> > 2012/8/31 David Gomes <[email protected]>
> >
> >> mywibox[s].widgets = {{ mytaglist[s], mypromptbox[s],
> >> layout =
> >> awful.widget.layout.horizontal.leftright },
> >> --mylayoutbox[s],
> >> mytextclock,
> >> myvolumewidget,
> >> mybatterywidget,
> >> s == 1 and mysystray or nil,
> >> mytasklist[s],
> >> layout =
> >> awful.widget.layout.horizontal.rightleft}
> >>
> >> You should have something like that on your rc.lua. As you can see,
> >> mytasklist[s] has a layout that aligns it to the right left.
> >>
> >> Try this:
> >>
> >> mywibox[s].widgets = {{ mytaglist[s], mypromptbox[s],
> >> mytasklist[s], layout =
> >> awful.widget.layout.horizontal.leftright },
> >> --mylayoutbox[s],
> >> mytextclock,
> >> myvolumewidget,
> >> mybatterywidget,
> >> s == 1 and mysystray or nil,
> >> layout =
> >> awful.widget.layout.horizontal.rightleft}
> >>
> >> If that doesn't work try this:
> >>
> >> mywibox[s].widgets = {{ mytaglist[s], mytasklist[s],
> >> mypromptbox[s], layout =
> >> awful.widget.layout.horizontal.leftright },
> >> --mylayoutbox[s],
> >> mytextclock,
> >> myvolumewidget,
> >> mybatterywidget,
> >> s == 1 and mysystray or nil,
> >> layout =
> >> awful.widget.layout.horizontal.rightleft}
> >>
> >>
> >> On Fri, Aug 31, 2012 at 10:50 AM, Javier Garcia
> >> <[email protected]>wrote:
> >>
> >>> Hi,
> >>>
> >>> I would like to have in the same order the apps in the task bar.
> >>>
> >>> Terminal - Vim - Chromium - ...
> >>>
> >>> I have this lines in rc.lua:
> >>>
> >>> awful.util.spawn("run_once xterm")
> >>> awful.util.spawn("run_once thunderbird")
> >>> awful.util.spawn("run_once terminator")
> >>>
> >>> Other question: now when I open an app it is opened on the left
> >>> part of the task bar, is there any way to open it on the right of
> >>> the open apps in the task bar?
> >>>
> >>> Javi
> >>>
> >>>
> >>>
> >>
> >
--
To unsubscribe, send mail to [email protected].