![¿Cómo generar un proceso/cmd en una etiqueta específica en Awesome?](https://rvso.com/image/1304096/%C2%BFC%C3%B3mo%20generar%20un%20proceso%2Fcmd%20en%20una%20etiqueta%20espec%C3%ADfica%20en%20Awesome%3F.png)
Seguí el rc.lua predeterminado y creé una lista de etiquetas propia.
for s = 1, screen.count() do
-- Each screen has its own tag table.
tags[s] = awful.tag({ "main", "web", 3, 4, 5, 6, 7, 8, 9 }, s, layouts[2])
end
Ahora quiero iniciar algunas aplicaciones en las etiquetas de forma predeterminada. por ejemplo, etiquetas ['principal'] = etiquetas de terminal ['web'] = navegador web
Revisé el documento API, pero no puedo encontrar una manera de obtener las etiquetas y generar un proceso en la etiqueta.
Respuesta1
Awesome se deriva de dwm, ¿verdad? En dwm, agregarías 'reglas' para ciertos programas (de forma predeterminada, hay una regla para gimp y firefox en el código fuente de dwm).
Parece que también ocurre lo mismo con awesome-wm.
Puede agregar reglas coincidentes a su tabla horrible.rules.rules. El rc.lua predeterminado ya tiene varios ejemplos, pero aquí hay algunos más:
-- Set Firefox to always map on tag number 2 of screen 1
{ rule = { class = "Firefox" }, properties = {tag = tags[1][2]}},
-- Set Smplayer to tag 4 of screen 1
{ rule = { class = "Smplayer" }, properties = {tag = tags[1][4]}},
-- Set Emacs to tag 5 of screen 2
{ rule = { class = "Emacs", instance = "emacs" }, properties = {tag = tags[2][5]}},
-- Set Alpine to tag 6 of the last screen
{ rule = { name = "Alpine" }, properties = {tag = tags[screen.count()][6]}},
-- Set Akregator to tag 8 of the last screen and add a titlebar trough callback
{ rule = { class = "Akregator" },properties = {tag = tags[screen.count()][8]}, callback = awful.titlebar.add},
-- Set Xterm to multiple tags on screen 1
{ rule = { class = "XTerm" }, callback = function(c) c:tags({tags[1][5], tags[1][6]}) end},
-- Set ROX-Filer to tag 2 of the currently selected and active screen
{ rule = { class = "ROX-Filer" }, callback = function(c) awful.client.movetotag(tags[mouse.screen][2], c) end},
-- Set ROX-Filer to tag 8 on screen 1 and switch to that tag imidiatelly
{ rule = { class = "ROX-Filer" }, properties = { tag = tags[1][8], switchtotag = true } }
-- Set Geeqie to the currently focused tag, as floating
{ rule = { instance = "geeqie" }, properties = {floating = true}},
-- Set Xterm as floating with a fixed position
{ rule = { class = "XTerm" }, properties = {floating = true}, callback = function(c) c:geometry({x=0, y=0}) end},