Have you considered Rules?
Default rc.lua - Note the firefox entry.
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "MPlayer" },
properties = { floating = true } },
{ rule = { class = "pinentry" },
properties = { floating = true } },
{ rule = { class = "gimp" },
properties = { floating = true } },
-- Set Firefox to always map on tags number 2 of screen 1.
-- { rule = { class = "Firefox" },
-- properties = { tag = tags[1][2] } },
}
_____
From: Maytar Byle [mailto:[email protected]]
Sent: Monday, 6 October 2014 12:06 AM
To: [email protected]
Subject: Automatically open processes on startup
Hello!
I'm running awesome 3.4 and i wanted to add a feature that on startup - a
list of processes will be loaded to their designated tags.
For example: terminal will be loaded to the first tag, music player will be
loaded to the fifth etc..
The code i added to rc.lua goes like this:
tag_apps = { { terminal, terminal } , { terminal } }
for i = 1, #tag_apps do
for j = 1, #tag_apps[i] do
awful.util.spawn(tag_apps[i][j])
--awful.client.movetotag(i, c)
end
end
teminal is the terminal command.
My problems are those:
1. spawn makes the xserver crash and i don't understand why.
2. Even if it would work, how do i get the client object for the process i
just opened so i can move it to the correct tag with movetotag?
Thank you!