You are not logged in.

#1 2010-04-01 12:42:21

debaser
Member
Registered: 2010-04-01
Posts: 3

Awesome - Autorun programs on desktops

Hey, my first post, and what better day for it. smile

Totally failed trying to get xmonad working. In a fit of despair last night I gave up and quite easily got an awesome session installed to kdm last night.

Having looked at KDE for a month, man am I relieved.

I'm getting a little excited at the configuration options and I wanted to ask a really simple question before I get stuck into it.

It seems straightforward to autorun programs and also to preset tags (window layouts) on the 1-9 'desktops'.

Is it posssible to combine these and configure Awesome so that when you start a new awesome session it automatically launches a browser full size window on desktop '1', 4 terminals tiled on '2', vlc full screen on '3' etc

In other words if you autorun programs can you specify where they appear?

Sorry if this is too noobish for words, and I know probably should just give it a go first. However I have been fixing my own sh*t on Arch for a few weeks now and this is really just an excuse to finally say hello on the forums. smile

Thanks hopefully for some responses then!


"Fuck 'Em If They Can't Take A Joke." (http://en.wikipedia.org/wiki/Church_of_the_SubGenius)

Offline

#2 2010-04-01 15:55:15

the_isz
Member
Registered: 2009-04-14
Posts: 280

Re: Awesome - Autorun programs on desktops

Hi and welcome to Arch!

There are several ways to solve this problem - as you probably already figured
out - but here's mine:

Start the programs you want automatically started from your .xinitc before you
start awesome. Then configure where each application is supposed to be put by
editing your rc.lua. There is already a commented area in the default config
which you can change/extend to achieve what you want:

-- {{{ Rules
awful.rules.rules = {
-- ...
    -- Set Firefox to always map on tags number 2 of screen 1.
    -- { rule = { class = "Firefox" },
    --   properties = { tag = tags[1][2] } },
    }
-- }}}

Good luck and have fun!

Last edited by the_isz (2010-04-01 15:55:53)

Offline

#3 2010-04-01 17:39:37

debaser
Member
Registered: 2010-04-01
Posts: 3

Re: Awesome - Autorun programs on desktops

I'll give that a go, thanks!


"Fuck 'Em If They Can't Take A Joke." (http://en.wikipedia.org/wiki/Church_of_the_SubGenius)

Offline

#4 2010-04-01 18:11:33

renato_garcia
Member
From: Brazil
Registered: 2009-08-14
Posts: 24

Re: Awesome - Autorun programs on desktops

I prefer put the starting programs in bottom of rc.lua, sounds more natural to me.

awful.util.spawn("emacs --daemon")

This has the drawback that the programs load a new instance when a new screen is created. To fix this start the programs using a function like:

function run_once(command)
    if not command then
        do return nil end
    end
    local program = command:match("[^ ]+")

    -- If program is not running
    if math.fmod(os.execute("pgrep -x " .. program),255) == 1 then
        awful.util.spawn(command)
    end
end
run_once("conky")

Last edited by renato_garcia (2010-04-01 18:12:36)

Offline

#5 2010-04-02 06:07:08

Vegita
Member
Registered: 2009-10-06
Posts: 111

Re: Awesome - Autorun programs on desktops

Time fi salute the don wink

Offline

#6 2010-04-02 06:35:36

barzam
Member
From: Sweden
Registered: 2009-01-27
Posts: 277

Re: Awesome - Autorun programs on desktops

I use .xinitrc to start up programs. Makes it easier if you switch WM.

Offline

#7 2010-08-07 15:16:27

Aximand
Member
From: Russia
Registered: 2009-11-15
Posts: 21

Re: Awesome - Autorun programs on desktops

the_isz wrote:

Hi and welcome to Arch!

-- {{{ Rules
awful.rules.rules = {
-- ...
    -- Set Firefox to always map on tags number 2 of screen 1.
    -- { rule = { class = "Firefox" },
    --   properties = { tag = tags[1][2] } },
    }
-- }}}

With this code firefox will be always launch on tag 2. Can I launch it once on tag 2 on _autostart_?

Offline

Board footer

Powered by FluxBB