How to open a program in a specific tag in AwesomeWM from command line?

371 Views Asked by At

I would like to open a program on a given tag ("virtual desktop"). I roughly know how to do it depending on a program, but now I'd like to be able to decide where to run it from command line. Is that possible? If so, how?

1

There are 1 best solutions below

0
Aire-One On

You can open a new client from the command line and make Awesome WM do something with it directly from the same command.

There are, however, multiple alternatives ways to achieve a similar result:

  • Use a rule that matches the client (e.g. from the class)
  • Use a specific identifier on the client to match a rule (e.g. urxvt has a -name parameter that you can play with. In your config, create a rule that marches cleints with name "NAMETOGOTOTAG8", then from the command line urxvt -name NAMETOGOTOTAG8)
  • Use the awesome-client program to open the program from Awesome, so you can use the awful.spawn sn_rules (e.g. awesome-client 'require("awful.spawn").spawn("kitty", { tag = 8 })'