Awesome의 특정 태그에 프로세스/cmd를 생성하는 방법은 무엇입니까?

Awesome의 특정 태그에 프로세스/cmd를 생성하는 방법은 무엇입니까?

나는 기본 rc.lua를 따라 나만의 태그 목록을 만들었습니다.

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

이제 기본적으로 태그에서 일부 애플리케이션을 시작하고 싶습니다. 예: 태그['main'] = 터미널 태그['web'] = 웹 브라우저

API 문서를 확인했지만 태그를 가져오고 태그에서 프로세스를 생성하는 방법을 찾을 수 없습니다.

답변1

Awesome은 dwm에서 파생된 것입니다. 그렇죠? dwm에서는 특정 프로그램에 대한 '규칙'을 추가합니다(기본적으로 dwm 소스에는 gimp 및 firefox에 대한 규칙이 있습니다).

awesome-wm도 마찬가지인 것 같습니다.

끔찍한.rules.rules 테이블에 일치하는 규칙을 추가할 수 있습니다. 기본 rc.lua에는 이미 여러 가지 예가 있지만 여기에 몇 가지 예가 더 있습니다:

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

관련 정보