You are not logged in.

#1 2012-01-11 18:44:00

m44nny
Member
Registered: 2012-01-11
Posts: 2

Awesome WM: Application at startup

Hey guys!

I've been trying to find out the whole afternoon how to startup applications on specific tags on startup. I mean, only on startup, which means no "rules."
I tried hardcoding my stuff in rc.lua in different ways:

Define rules so that Firefox opens up in tag 2 and Xterm in tag 1
Spawn Firefox and Xterms
Define rules so that Xterm opens in tag 3
Spawn Xterm -e irssi (for example)
Re-define the default rules (excluding firefox & Xterm then)

The problem here is that this seems to use the same set of rules. It seems to me like rc.lua is not read sequentially, or the applications are started up after the file has been read. Do you have any clue on this?

I also tried something like:

Define tag 1 as the current tag
Spawn the stuff I want in tag 1
Define tag 2 as the current tag
Spawn the stuff I want in tag 2
[...]

Once again, awesome only considers the last settings (right here the tag 2 as the current tag) and then spawns all my stuff in tag 2.

I would be thankful for any insights about how to achieve this you might have.
Thanks for reading,

manny

Offline

#2 2012-01-13 03:59:48

kandros
Member
From: italy
Registered: 2011-09-20
Posts: 20

Re: Awesome WM: Application at startup

someone suggested me to use shifty for this, but i havent tried that already https://awesome.naquadah.org/wiki/Shifty

Offline

#3 2012-01-15 12:42:15

greyscale
Member
From: Sweden
Registered: 2011-01-02
Posts: 59

Re: Awesome WM: Application at startup

don't know if it works but one thing that came in mind while reading this post was:

Add a rule that matches firefox and add a callback to it.

In the callback function check a variable and if that returns false then move the firefox window to where you like
and then set that variable to true.

Next time you open firefox that variable would be true and firefox should remain where you opened it.

if not ffRule then
  -- Move the window
  ffRule = true
end

Last edited by greyscale (2012-01-15 12:43:51)


A tiling window manager simply manages your windows, not just letting you have em
:: Configs etc @GitHub

Offline

#4 2012-01-15 23:02:25

greyscale
Member
From: Sweden
Registered: 2011-01-02
Posts: 59

Re: Awesome WM: Application at startup

Got some time over so here's one way to move firefox to tag 6 on the first screen
the first time you run it. After that it starts on the tag you launch it from.

{ rule = { class = "Firefox" },                                                                                        
properties = { }, callback = function (c)                                                                          
                                 if not skipMovingFF then                                                              
                                     awful.client.movetotag(tags[1][6], c)                                            
                                     skipMovingFF = true                                                                 
                                 end                                                                                
                             end },

A tiling window manager simply manages your windows, not just letting you have em
:: Configs etc @GitHub

Offline

#5 2012-01-16 05:32:45

m44nny
Member
Registered: 2012-01-11
Posts: 2

Re: Awesome WM: Application at startup

Thanks a lot guys, I didn't know about the callback field. Your solution is working great greyscale, thanks again!

Offline

Board footer

Powered by FluxBB