-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinc_rules_2screen.lua
150 lines (124 loc) · 7.27 KB
/
inc_rules_2screen.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
rule_smplayer = {
rule = { class = "Smplayer" },
properties = {
tag = tags[2][2],
switchtotag = true,
opacity = 1 },
--callback = choose_screen
}
rule_smplayer2 = {
rule = { class = "Smplayer2" },
properties = {
tag = tags[2][2],
switchtotag = true,
opacity = 1 },
--callback = choose_screen
}
screen_pos = 2
function choose_screen(client_in, args)
naughty.notify{text="Choose Screen", timeout=0}
client_in:add_signal("property::minimized", my_screen)
client_in:add_signal("tagged", my_screen)
my_screen(client_in, args)
end
function my_screen(my_client, args)
naughty.notify{text="My Screen", timeout=0}
if not awful.rules.match(my_client, rule_smplayer.rule) then
return
end
for k, c in pairs(client.get(1)) do
naughty.notify{text="Move to Screen" .. my_client .."\nTest:"..c, timeout=0}
awful.client.movetotag(tags[screen_pos][5], c)
end
naughty.notify{text="Tag: " .. t, timeout=0}
end
rule_defaults={
rule = { },
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
--floating = false,
placement = centered,
keys = clientkeys,
buttons = clientbuttons,
opacity = 0.95 }
}
rule_mplayer = {
rule = { class = "MPlayer" },
properties = {
tag = tags[1][8],
switchtotag = true,
floating = true }
}
rule_mythfrontend = {
rule = { class = "Mythfrontend" },
properties = {
tag = tags[2][1],
switchtotag = true,
--fullscreen = false,
--floating = false,
size_hints_honor = false,
opacity = 1 }
}
awful.rules.rules = {
-- All clients will match this rule.
rule_defaults,
-- My Definitions --
{ rule = { class = "Plasma-desktop" }, properties = { floating = true } },
{ rule = { class = "Plasma" }, properties = { floating = true } },
{ rule = { class = "Wine" }, properties = { floating = true } },
{ rule = { class = "Xmessage" }, properties = { floating = true } },
{ rule = { class = "ij-ImageJ" }, properties = { floating = true } },
-- { rule = { instance = "sun-awt-X11-XFramePeer" }, properties = { floating = true } },
{ rule = { name = "ImageJ" }, properties = { floating = true } },
{ rule = { name = "Figure 1" }, properties = { floating = true } },
{ rule = { name = "Minecraft" }, properties = { floating = true } },
-- Screen 1 --
{ rule = { class = "Chrome" }, properties = { tag = tags[1][1] } },
{ rule = { class = "Google-chrome" }, properties = { tag = tags[1][1], opacity = 0.98 } },
{ rule = { class = "Chromium-browser-live" }, properties = { tag = tags[1][1], opacity = 1 } },
{ rule = { class = "Chromium-browser" }, properties = { tag = tags[1][1], opacity = 1 } },
{ rule = { class = "Firefox" }, properties = { tag = tags[1][1], switchtotag = true } },
{ rule = { class = "Exe" }, properties = { tag = tags[1][1], opacity = 1, fullscreen = true, floating=false, fix_buggy_fullscren = true } },
{ rule = { class = "XTerm" }, properties = { opacity = 0.85 } },
{ rule = { class = "XTerm", name = "xterm - root@mae" }, properties = { tag = tags[1][2], floating = false } },
{ rule = { class = "XTerm", name = "xterm - joe@mae" }, properties = { tag = tags[1][3], floating = false } },
{ rule = { class = "XTerm", name = "xterm - root@miranda" }, properties = { tag = tags[1][4], floating = false } },
{ rule = { class = "XTerm", name = "xterm - root@michelle" }, properties = { tag = tags[1][4], floating = false } },
{ rule = { class = "Pidgin" }, properties = { tag = tags[1][5], floating = true } },
{ rule = { class = "Pidgin", role = "buddy_list" }, properties = { tag = tags[1][5], floating = false } },
{ rule = { class = "Pidgin", role = "smiley_dialog" }, properties = { tag = tags[1][5], placement = centered } },
{ rule = { class = "Pidgin", name = "Neuer Alarm" }, properties = { tag = tags[1][5], floating = false } },
{ rule = { class = "Pidgin", role = "conversation" }, properties = { tag = tags[1][5], floating = false, opacity = 0.80 } },
{ rule = { class = "Skype" }, properties = { tag = tags[1][5], floating = false } },
{ rule = { class = "Skype", name="Skype™ Chat" }, properties = { tag = tags[1][5], floating = false } },
{ rule = { class = "Kate" }, properties = { tag = tags[1][6], switchtotag = true, opacity = 1 } },
{ rule = { class = "Python2.7" }, properties = { tag = tags[1][6], switchtotag = true, opacity = 1 } },
{ rule = { class = "Eclipse" }, properties = { tag = tags[1][6], switchtotag = true, opacity = 0.98 } },
{ rule = { class = "Acroread" }, properties = { tag = tags[1][6], switchtotag = true, opacity = 1 } },
{ rule = { class = "Okular" }, properties = { tag = tags[1][6], switchtotag = true, opacity = 1 } },
{ rule = { class = "Konqueror" }, properties = { tag = tags[1][7] } },
{ rule = { class = "Konqueror", name = "Fortschrittsdialog" }, properties = { tag = tags[1][7] } },
{ rule = { class = "Konqueror", name = "Kopiervorgang" }, properties = { tag = tags[1][7] } },
{ rule = { class = "Amarok" }, properties = { tag = tags[1][8], switchtotag = true, floating = false } },
{ rule = { class = "Gimp" }, properties = { tag = tags[1][8], floating = true }, callback = gimp_init },
{ rule = { class = "Gimp", role = "gimp-toolbox"}, properties = { floating = false }, callback = awful.client.setslave },
{ rule = { class = "Gimp", role = "gimp-dock" }, properties = { floating = false }, callback = awful.client.setslave },
{ rule = { class = "Gimp", role = "gimp-image-window" }, properties = { floating = false } },
{ rule = { class = "Firefox", name = "Downloads" }, properties = { tag = tags[1][9], floating = true } },
{ rule = { class = "Deluge" }, properties = { tag = tags[1][9] } },
{ rule = { class = "Vncviewer" }, properties = { tag = tags[1][9], floating = true } },
{ rule = { class = "Vncviewer", name = "TightVNC: joe's X desktop (michelle:1)"}, properties = { tag = tags[1][9] } },
-- Screen 2 --
rule_mythfrontend,
rule_mplayer,
rule_smplayer,
rule_smplayer2,
{ rule = { name = "rygel" }, properties = { tag = tags[2][2], switchtotag = true } },
{ rule = { class = "Amarok", name = "Schmale Werkzeugleiste" }, properties = { tag = tags[2][3], switchtotag = true, floating = false, placement = top } },
{ rule = { class = "Amarok", name = "&Medienquellen" }, properties = { tag = tags[2][3], switchtotag = true, floating = false } },
{ rule = { class = "Amarok", name = "&Kontext" }, properties = { tag = tags[2][3], switchtotag = true, floating = false } },
{ rule = { class = "Gwenview" }, properties = { tag = tags[2][5] } },
{ rule = { class = "Kuickview" }, properties = { tag = tags[2][5] } },
}