72
96
awful.layout.suit.floating,
73
awful.layout.suit.magnifier,
74
97
awful.layout.suit.tile,
75
awful.layout.suit.tile.left,
76
98
awful.layout.suit.tile.bottom,
77
awful.layout.suit.tile.top,
78
awful.layout.suit.fair,
79
awful.layout.suit.fair.horizontal,
80
awful.layout.suit.spiral,
81
awful.layout.suit.spiral.dwindle,
82
awful.layout.suit.max,
83
awful.layout.suit.max.fullscreen
86
timTagsInitial = { "m", "e", "p", "w", "o",
87
"i", "a", "c", "b", "g",
99
awful.layout.suit.magnifier,
100
awful.layout.suit.max.fullscreen,
101
awful.layout.suit.max
104
-- {{{ My custom tags
110
-- "m", "c", "w", "o",
111
-- "b", "i", "f", "t"
115
"Main", "Console", "WWW", "Other",
116
"Browser", "IM", "Floating", "Temp"
121
layouts[2], layouts[6], layouts[1], layouts[1],
122
layouts[1], layouts[1], layouts[1], layouts[1]
127
tags_screen2 = { "Main", "Read", "WWW", "Other" }
130
layouts[1], layouts[1], layouts[1], layouts[1]
91
136
-- Define a tag table which hold all screen tags.
94
-- names = { "main", "www", "office", "im", "background", "coding",
95
-- "browser", "graphics", "tmp" },
96
names = timTagsInitial,
97
layout = { layouts[3], layouts[2], layouts[2],
98
layouts[11], layouts[2], layouts[1],
99
layouts[1], layouts[11], layouts[11],
100
layouts[2], layouts[3], layouts[3],
143
names = tags_screen1,
144
layout = layouts_screen1
147
names = tags_screen2,
148
layout = layouts_screen2
105
153
-- Create tags for all screens
154
-- -- Tag table for screen 1
155
-- tags[1] = awful.tag(tags.names, 1, tags.layout)
156
-- -- Tag table for screen 2
157
-- tags[2] = awful.tag(tags)
106
159
for s = 1, screen.count() do
107
-- Each screen has its own tag table
108
tags[s] = awful.tag(tags.names, s, tags.layout)
160
tags[s] = awful.tag(tags.settings[s].names,
162
tags.settings[s].layout)
169
-- Modal mode for tags keybinding
176
m = function(screen_num, c) timTagViewOnly(screen_num, 1)(c) end,
177
c = function(screen_num, c) timTagViewOnly(screen_num, 2)(c) end,
178
w = function(screen_num, c) timTagViewOnly(screen_num, 3)(c) end,
179
o = function(screen_num, c) timTagViewOnly(screen_num, 4)(c) end,
180
b = function(screen_num, c) timTagViewOnly(screen_num, 5)(c) end,
181
i = function(screen_num, c) timTagViewOnly(screen_num, 6)(c) end,
182
f = function(screen_num, c) timTagViewOnly(screen_num, 7)(c) end,
183
t = function(screen_num, c) timTagViewOnly(screen_num, 8)(c) end,
186
M = function(screen_num, c) timTagViewToggle(screen_num, 1)(c) end,
187
C = function(screen_num, c) timTagViewToggle(screen_num, 2)(c) end,
188
W = function(screen_num, c) timTagViewToggle(screen_num, 3)(c) end,
189
O = function(screen_num, c) timTagViewToggle(screen_num, 4)(c) end,
190
B = function(screen_num, c) timTagViewToggle(screen_num, 5)(c) end,
191
I = function(screen_num, c) timTagViewToggle(screen_num, 6)(c) end,
192
F = function(screen_num, c) timTagViewToggle(screen_num, 7)(c) end,
193
T = function(screen_num, c) timTagViewToggle(screen_num, 8)(c) end
114
196
-- Bind all key numbers to tags.
117
199
globalkeys = globalkeys or { }
119
for i = 1, #timTagsInitial do
120
globalkeys = awful.util.table.join(
123
awful.key({ modkey, "Mod1" }, timTagsInitial[i],
124
timTagViewOnly(mouse.screen, i)),
126
awful.key({ modkey, "Shift" }, timTagsInitial[i],
127
timTagViewToggle(mouse.screen, i)),
129
awful.key({ modkey, "Shift", "Mod1" }, timTagsInitial[i],
130
timMoveClientToTag(i)),
131
-- Toggle tag-name for the client
132
awful.key({ modkey, "Shift", "Control", "Mod1" }, timTagsInitial[i],
201
-- Bind the modal mode
202
globalkeys = awful.util.table.join(
204
awful.key({ modkey, "Control" }, "space",
208
function (mod, key, event)
209
if string.find(key, "Super") then
210
showNotification("Modal mode",
211
"Waiting for the next key...")
214
if event == "release" then
218
if not string.find(key, "Shift") then
222
if modaltagkeys[key] then
223
modaltagkeys[key](mouse.screen, c)
232
for screen_idx = 1, screen.count() do
233
local tag_names = getTagsAbbr(tags.settings[screen_idx].names)
234
for i = 1, #tag_names do
235
globalkeys = awful.util.table.join(
238
awful.key({ modkey, "Shift" }, tag_names[i],
239
timTagViewToggle(screen_idx, i)),
241
awful.key({ modkey, "Shift", "Mod1" }, tag_names[i],
242
timMoveClientToTag(screen_idx, i)),
243
-- Toggle tag-name for the client
244
awful.key({ modkey, "Shift", "Control", "Mod1" }, tag_names[i],
245
timToggleTag(screen_idx, i))
142
254
clientkeys = clientkeys or {}
143
255
clientkeys = awful.util.table.join(
257
awful.key( { modkey }, ",",
260
awful.titlebar.remove(c)
261
debug_notify(c.name .. "\ntitlebar " .. colored_off)
263
awful.titlebar.add(c, { altkey = "Mod1" })
264
debug_notify(c.name .. "\ntitlebar " .. colored_on)
145
awful.key({ modkey, }, "f",
146
function (c) c.fullscreen = not c.fullscreen end),
268
awful.key({ modkey }, "f",
270
c.screen = mouse.screen
271
c.fullscreen = not c.fullscreen
148
274
awful.key({ modkey }, "x",
149
275
function (c) c:kill() end),
150
276
-- Toggle floating
151
awful.key({ modkey, "Control" }, "space",
277
awful.key({ modkey, "Control", "Mod1" }, "space",
152
278
awful.client.floating.toggle ),
153
279
-- Swap with masters
154
awful.key({ modkey, }, "Return",
280
awful.key({ modkey, "Shift" }, "Return",
155
281
function (c) c:swap(awful.client.getmaster()) end),
156
282
-- Move to screen
157
283
awful.key({ modkey, }, "o",
165
291
-- Toggle maximize
166
292
awful.key({ modkey, }, "m",
294
c.screen = mouse.screen
168
295
c.maximized_horizontal = not c.maximized_horizontal
169
296
c.maximized_vertical = not c.maximized_vertical
172
299
awful.key({ modkey, }, "End",
174
awful.client.moveresize(0, 0, 20, 20)
301
awful.client.moveresize(0, 0, 0, 20)
177
304
awful.key({ modkey, }, "Home",
179
awful.client.moveresize(0, 0, -20, -20)
306
awful.client.moveresize(0, 0, 0, -20)
309
awful.key({ modkey, }, "Prior",
311
awful.client.moveresize(0, 0, -20, 0)
314
awful.key({ modkey, }, "Next",
316
awful.client.moveresize(0, 0, 20, 0)
181
318
-- Increase transparency
182
319
awful.key({ modkey, "Mod1", "Shift" }, "Down",
218
355
local tmp = tim_centralize(c)
219
356
c:geometry({ x = tmp.new_x, y = tmp.new_y,
220
357
width = tmp.new_width, height = tmp.new_height })
221
-- awful.client.property.set(c, "geometry", { width=800, height=600 })
360
awful.key({ modkey, "Control" }, "t",
362
local tmp = tim_halfmaxwidth(c)
363
c:geometry({ x = tmp.new_x, y = tmp.new_y,
364
width = tmp.new_width, height = tmp.new_height })
367
awful.key({ modkey, "Control" }, "n",
369
local tmp = tim_halfmaxheight(c)
370
c:geometry({ x = tmp.new_x, y = tmp.new_y,
371
width = tmp.new_width, height = tmp.new_height })
374
awful.key({ modkey, "Control" }, "Left",
376
local tmp = tim_leftfull(c)
377
c:geometry({ x = tmp.new_x, y = tmp.new_y,
378
width = tmp.new_width, height = tmp.new_height })
381
awful.key({ modkey, "Control" }, "Right",
383
local tmp = tim_rightfull(c)
384
c:geometry({ x = tmp.new_x, y = tmp.new_y,
385
width = tmp.new_width, height = tmp.new_height })