You are not logged in.

#1 2013-10-11 12:04:41

stkts
Member
From: Italy
Registered: 2013-10-11
Posts: 8

[SOLVED] Awesome WM: Autostart programs in specific tabs

Hello,

I installed awesome-wm 3.5.1 and I would like to be able to autostart some programs in specific tabs (like opening a terminal and other things in the "main" tab, a browser in the "web" tab, an editor and a terminal in the "dev" tab and so on..).

I tried using rules in rc.lua but I want the programs I manually start to be placed normally in the current tab and also they should not mess up when I hit the "restart" button of Awesome WM.

How can I do this?
Thanks.

Last edited by stkts (2013-12-09 13:01:26)

Offline

#2 2013-10-11 17:49:47

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 326

Re: [SOLVED] Awesome WM: Autostart programs in specific tabs

I don't really think you are going to get what you want easily but still I have programs that open on certain tabs (check my dot files for configs)

You may be able to get that kind of behaviour from a script wrapper of some kind ...possibly.


Aurora R10 (0TYR0X) - Ryzen 7 5800X - 16GB - RX6700XT 12GB - Hyprland (occasionally XFCE) - AOC Q27G3XMN 1440P
EFI Stub Boot
PROUD XLIBRE USER
Linux User: 401820  Steam-Reddit

Offline

#3 2013-12-09 13:00:35

stkts
Member
From: Italy
Registered: 2013-10-11
Posts: 8

Re: [SOLVED] Awesome WM: Autostart programs in specific tabs

I solved setting some rules like that:

...
    { rule = { instance = "hTerm" },
      properties = { }, callback = function (c)
        if not skipMovingHT then
          awful.client.movetotag(tags[1][1], c)
          skipMovingHT = true
        end
      end },
    { rule = { class = "Google-chrome-stable" },
      properties = { }, callback = function (c)
        if not skipMovingGC then
          awful.client.movetotag(tags[1][2], c)
          skipMovingGC = true
        end
      end },
    { rule = { class = "sublime-text" },
      properties = { }, callback = function (c)
        if not skipMovingST then
          awful.client.movetotag(tags[1][3], c)
          skipMovingST = true
        end
      end },
    { rule = { class = "Thunar" },
      properties = { }, callback = function (c)
        if not skipMovingTH then
          awful.client.movetotag(tags[1][4], c)
          skipMovingTH = true
        end
      end },
...

And then to autostart programs:

awful.util.spawn_with_shell("xterm -name hTerm -e htop")
awful.util.spawn("google-chrome-stable")
awful.util.spawn("thunar")
awful.util.spawn("subl")

In this way the rule will be applied only the first time a program is launched.
Source: https://bbs.archlinux.org/viewtopic.php … 9#p1041479

Offline

Board footer

Powered by FluxBB