For the first problem try using spawn_with_shell instead of spawn and see
if it still crashes.

But if you want to do stuff with the program you started maybe you should
use spawn because if it succeeds it will return something you can use to
identify the process (
https://awesome.naquadah.org/doc/api/modules/awful.util.html#spawn).

I only use spawn with shell, but that's for starting background programs,
not stuff that I then want to move to some other tag...

Maybe you can try checking your X logs find out why it crashes (no idea
where those are thou, ask google).

Cumprimentos,
Bruno Ferreira

2014-10-05 14:42 GMT+01:00 Maytar Byle <mayt...@gmail.com>:

> Thank you for answering!
> It doesn't fully solve the second problem though because in case i want 2
> tags with terminals in them then i cant make the seperation.
> and the first question still left unanswered.
>
> 2014-10-05 16:17 GMT+03:00 David Sorkovsky <davidsorkov...@hotmail.com>:
>
>>  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:mayt...@gmail.com]
>> *Sent:* Monday, 6 October 2014 12:06 AM
>> *To:* awesome@naquadah.org
>> *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!
>>
>
>

Reply via email to