autostart app with tag in awm

Posted by nonsenz on Ask Ubuntu See other posts from Ask Ubuntu or by nonsenz
Published on 2012-06-05T18:38:57Z Indexed on 2012/07/03 3:24 UTC
Read the original article Hit count: 337

Filed under:
|
|

while giving awm a try i encounter some problems. i want to autostart some apps when awm is started with specific tags. here's the relevant config i use for that.

first my tags with layouts:

tags = {
    names = {"mail", "www", "video", "files", 5, 6, 7, 8, 9},
    layout = {layouts[11], layouts[11], layouts[11], layouts[11], layouts[1],      layouts[1], layouts[1], layouts[1], layouts[1]}
}

for s = 1, screen.count() do
    -- Each screen has its own tag table.
    tags[s] = awful.tag(tags.names, s, tags.layout)
end

now the app-autostart stuff:

awful.util.spawn("chromium-browser")
awful.util.spawn("firefox")
awful.util.spawn("vlc")
awful.util.spawn_with_shell("xterm -name files -e mc")
awful.util.spawn_with_shell("xterm -name 5term")
awful.util.spawn_with_shell("xterm -name 5term")
awful.util.spawn_with_shell("xterm -name 5term")
awful.util.spawn_with_shell("xterm -name 5term")
awful.util.spawn_with_shell("xfce4-power-manager")

i use xterm with the -name param to give them custom classes (for custom tags via rules).
and now some rules to connect apps with tags:

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] } },

    { rule = { class = "Firefox" },
            properties = { tag = tags[1][2] } },
    { rule = { class = "Chromium-browser" },
            properties = { tag = tags[1][1] } },
    { rule = { class = "Vlc"},
            properties = { tag = tags[1][3] } },
    { rule = { class = "files"},
            properties = { tag = tags[1][4] } },
    { rule = { class = "5term"},
            properties = { tag = tags[1][5] } },
 }

it works for chromium, firefox and vlc but not for the xterms with the "-name" param. when i check the xterms after they started with xprop i can see:

WM_CLASS(STRING) = "5term", "XTerm"

i think that sould work, but the xterms are placed on the first workspace/tag.

© Ask Ubuntu or respective owner

Related posts about configuration

Related posts about awesome

  • Building Awesome WM

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. After running cd awesome-3.4 && make I get the following missing dependencies error: Running… >>> More

  • Building Awesome WM

    as seen on Super User - Search for 'Super User'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. EDIT I ran: sudo apt-get install libxcb-xtest0-dev libxcb-property1-dev libxdg-basedir-dev libstartup-notification0-dev… >>> More

  • Building Awesome WM

    as seen on Server Fault - Search for 'Server Fault'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. EDIT I ran: sudo apt-get install libxcb-xtest0-dev libxcb-property1-dev libxdg-basedir-dev libstartup-notification0-dev… >>> More

  • How do I use the awesome window manager?

    as seen on Super User - Search for 'Super User'
    I've installed awesome on my Ubuntu laptop, and I like it. But I feel kind of lost. I don't know any keyboard shortcuts and the man pages aren't really any help (for instance, what does Mod4 mean?). Is there any kind of brief introduction to awesome I can read? >>> More

  • How to install Awesome WM without root access?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I want to install the Awesome window manager. In the environment where I want to configure it I don't have root access. I do have a machine were I can be root (I use for this a virtual machine in my laptop). I have tried the following: $ sudo apt-get install awesome The following packages are about… >>> More