author | Fabien Ninoles <fabien@tzone.org> |
Sat, 20 Jun 2015 20:32:45 -0400 | |
changeset 13 | e9e2f624cd99 |
parent 12 | ffc02bf394cb |
child 14 | 6348b9f842b2 |
permissions | -rw-r--r-- |
12 | 1 |
local os = require("os") |
2 |
local io = require("io") |
|
3 |
local debug = require("debug") |
|
13
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
4 |
local table = require("table") |
12 | 5 |
local awesome = require("awesome") |
11 | 6 |
local naughty = require("naughty") |
7 |
local awful = require("awful") |
|
8 |
local vicious = require("vicious") |
|
9 |
local wicked = require("wicked") |
|
10 |
local beautiful = require("beautiful") |
|
11 |
local timer = require("timer") |
|
12 |
local wibox = require("wibox") |
|
7 | 13 |
|
14 |
local ipairs = ipairs |
|
15 |
local pairs = pairs |
|
16 |
||
17 |
local capi = { |
|
12 | 18 |
keygrabber = require("keygrabber"), |
19 |
client = require("client"), |
|
20 |
string = require("string"), |
|
7 | 21 |
} |
22 |
||
23 |
module("my") |
|
24 |
||
12 | 25 |
--- Stolen from shifty: Shows a popup and logs to a file |
26 |
-- @param message The text message. |
|
27 |
-- @param log_level 1 = INFO, 2 = WARN, 3 = ERROR, if nothting is provided 1 is used. |
|
28 |
function log(message, log_level) |
|
29 |
if log_level == nil then |
|
30 |
log_level = 1 |
|
31 |
end |
|
32 |
||
33 |
local log_table = { |
|
34 |
{ level = "INFO", bg_colour = "#18F92C", fg_colour = "#0E0E0E" }, |
|
35 |
{ level = "WARN", bg_colour = "#9E731F", fg_colour = "#0E0E0E" }, |
|
36 |
{ level = "ERROR", bg_colour = "#FF0015", fg_colour = "#000000" } |
|
37 |
} |
|
38 |
-- %c eg: Wed Jan 30 14:25:13 2013 |
|
39 |
local time = os.date("%c") |
|
40 |
message = time .. " - " .. log_table[log_level].level .. " - " .. message .. "\n" .. debug.traceback() |
|
41 |
||
42 |
local home = os.getenv("HOME") |
|
43 |
local log_file = io.open(home .. "/.awesome.log", "a+") |
|
44 |
log_file:write(message .."\n") |
|
45 |
log_file:close() |
|
46 |
||
47 |
naughty.notify({ preset = naughty.config.presets.critical, text = message, bg = log_table[log_level].bg_colour, fg = log_table[log_level].fg_colour}) |
|
11 | 48 |
end |
49 |
||
7 | 50 |
local in_error = false |
12 | 51 |
function mk_notify_error_dialog(level) |
52 |
return function(msg) |
|
53 |
-- Make sure we don't go into an endless error loop |
|
54 |
if in_error then return end |
|
55 |
in_error = true |
|
7 | 56 |
|
12 | 57 |
log(msg, level) |
58 |
||
59 |
in_error = false |
|
60 |
end |
|
61 |
end |
|
62 |
||
63 |
notify_error = mk_notify_error_dialog(3) |
|
64 |
||
13
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
65 |
local function get_gradient_colors(c1, c2) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
66 |
return { type = "linear", from = { 0, 0 }, to = { 0, 20 }, stops = { { 0, c2 }, { 1, c1 } }} |
7 | 67 |
end |
68 |
||
69 |
function mkspawn(p) |
|
70 |
return function () awful.util.spawn(p) end |
|
71 |
end |
|
72 |
||
73 |
function setxkbmap(kb) |
|
74 |
XKBDIR="$HOME/.xkb" |
|
75 |
-- Strange bug on xkbcomp: pushing directly the output to the display |
|
76 |
-- lead to an error; We need to convert it first to .xkb and then feed |
|
77 |
-- xkbcomp again for setting the x display |
|
78 |
p = 'setxkbmap "' .. kb .. " -print | xkbcomp -xkb -a -I" .. XKBDIR .. " - - | kxbcomp - $DISPLAY" |
|
79 |
awful.util.spawn_with_shell(p) |
|
80 |
end |
|
81 |
||
82 |
function kill_all(rule) |
|
83 |
for c in awful.client.iterate(rule) do |
|
84 |
c:kill() |
|
85 |
end |
|
86 |
end |
|
87 |
||
88 |
function quit() |
|
12 | 89 |
kill_all(function (c) return true end) |
7 | 90 |
awesome.quit() |
91 |
end |
|
92 |
||
93 |
function show_clients() |
|
94 |
if instance then |
|
95 |
instance:hide() |
|
96 |
instance = nil |
|
97 |
else |
|
98 |
instance = awful.menu.clients({width=250}) |
|
99 |
end |
|
100 |
end |
|
101 |
||
102 |
local function widgets_cpu() |
|
103 |
local w = awful.widget.graph() |
|
104 |
-- Graph properties |
|
105 |
w:set_width(30) |
|
13
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
106 |
w:set_background_color(beautiful.bg_normal) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
107 |
w:set_color(get_gradient_colors(beautiful.bg_focus, beautiful.bg_urgent)) |
7 | 108 |
-- Register widget |
109 |
vicious.register(w, vicious.widgets.cpu, "$1", 1) |
|
110 |
return w |
|
111 |
end |
|
112 |
||
113 |
local function widgets_mdp() |
|
114 |
-- Initialize widget |
|
11 | 115 |
local w = wibox.widget.textbox() |
7 | 116 |
-- Register widget |
117 |
vicious.register(w, vicious.widgets.mpd, |
|
118 |
function (widget, args) |
|
119 |
if args["{state}"] == "Stop" then |
|
120 |
return " - " |
|
121 |
else |
|
122 |
return args["{Artist}"]..' - '.. args["{Title}"] |
|
123 |
end |
|
124 |
end, 10) |
|
125 |
return w |
|
126 |
end |
|
127 |
||
128 |
local function widgets_mem(monitor) |
|
129 |
-- Initialize widget |
|
130 |
local w = awful.widget.progressbar() |
|
131 |
-- Progressbar properties |
|
132 |
w:set_width(10) |
|
133 |
w:set_vertical(true) |
|
13
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
134 |
w:set_background_color(beautiful.bg_normal) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
135 |
w:set_color(get_gradient_colors(beautiful.bg_focus, beautiful.bg_urgent)) |
7 | 136 |
-- Register widget |
137 |
vicious.register(w, vicious.widgets.mem, "$1", 5) |
|
138 |
return w |
|
139 |
end |
|
140 |
||
141 |
local function widgets_net(device) |
|
11 | 142 |
local w = wibox.widget.textbox() |
7 | 143 |
-- w:set_vertical(true) |
144 |
w.width = 150 |
|
145 |
w.align = 'center' |
|
146 |
vicious.register(w, wicked.widgets.net, |
|
147 |
'${' .. device .. ' up} / ${' .. device .. ' down}', |
|
148 |
1) |
|
149 |
return w |
|
150 |
end |
|
151 |
||
152 |
local function widgets_mode() |
|
12 | 153 |
local bg = wibox.widget.background() |
11 | 154 |
local w = wibox.widget.textbox() |
12 | 155 |
bg:set_widget(w) |
7 | 156 |
widgets.mode_widget = w |
12 | 157 |
widgets.mode_widget_bg = bg |
158 |
return bg |
|
7 | 159 |
end |
160 |
||
161 |
local function widgets_keyboard() |
|
11 | 162 |
local w = wibox.widget.textbox() |
7 | 163 |
widgets.keyboard_widget = w |
164 |
return w |
|
165 |
end |
|
166 |
||
167 |
local function widgets_decorated(w, onclick) |
|
168 |
local wg = w |
|
169 |
if w.widget then |
|
170 |
wg = w.widget |
|
171 |
end |
|
172 |
wg:buttons(awful.util.table.join( |
|
173 |
awful.button({}, 1, onclick))) |
|
174 |
return w |
|
175 |
end |
|
176 |
||
177 |
widgets = { |
|
178 |
cpu = widgets_cpu, |
|
179 |
mem = widgets_mem, |
|
180 |
net = widgets_net, |
|
181 |
mdp = widgets_mdp, |
|
182 |
mode = widgets_mode, |
|
183 |
keyboard = widgets_keyboard, |
|
184 |
decorated = widgets_decorated, |
|
185 |
} |
|
186 |
||
187 |
function make_key(k, n, f) |
|
188 |
return { key = k, name = n, func = f} |
|
189 |
end |
|
190 |
||
191 |
function show_kt(keytable, title) |
|
192 |
-- todo: replace with a menu ? |
|
193 |
text = "" |
|
194 |
for _, k in ipairs(keytable) do |
|
195 |
text = text .. "\'" .. k.key .. "\'\t" .. k.name .. "\n" |
|
196 |
end |
|
197 |
naughty.notify({text = text, |
|
198 |
title = title, |
|
199 |
position = "top_left", |
|
200 |
}) |
|
201 |
end |
|
202 |
||
203 |
local keynames = { |
|
204 |
[" "] = "space", |
|
205 |
["\t"] = "tab", |
|
206 |
} |
|
207 |
||
8 | 208 |
local ignored_mods = { |
209 |
["Mod2"] = true, |
|
210 |
} |
|
211 |
||
7 | 212 |
local function translate_key(mod, key) |
213 |
local skey = "" |
|
214 |
for m,v in pairs(mod) do |
|
8 | 215 |
if not ignored_mods[v] then |
7 | 216 |
skey = skey .. v .. "+" |
217 |
end |
|
218 |
end |
|
219 |
skey = skey .. (keynames[key] or key) |
|
220 |
return skey |
|
221 |
end |
|
222 |
||
223 |
local function kt_handler(keytable, mod, key, event) |
|
224 |
if event == "release" then |
|
225 |
return true |
|
226 |
end |
|
13
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
227 |
widgets.mode_widget_bg:set_bg(beautiful.bg_focus) |
7 | 228 |
if key == "Escape" then |
229 |
return false |
|
230 |
end |
|
231 |
local skey = capi.string.lower(translate_key(mod, key)) |
|
232 |
if skey == "control+h" or skey == "shift+?" then |
|
233 |
show_kt(keytable, "Current binding") |
|
234 |
return true |
|
235 |
end |
|
236 |
for _,k in ipairs(keytable) do |
|
237 |
if skey == capi.string.lower(k.key) then |
|
238 |
return k.func(c) |
|
239 |
end |
|
240 |
end |
|
241 |
-- notify_error("Nothing for " .. skey) |
|
13
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
242 |
widgets.mode_widget_bg:set_bg(beautiful.bg_urgent) |
7 | 243 |
return true |
244 |
end |
|
245 |
||
246 |
local function stop_kt() |
|
247 |
capi.keygrabber.stop() |
|
12 | 248 |
widgets.mode_widget:set_text("") |
7 | 249 |
end |
250 |
||
251 |
function mkinteractive(f) |
|
252 |
return function (c) |
|
253 |
stop_kt() |
|
254 |
return f(c) |
|
255 |
end |
|
256 |
end |
|
257 |
||
258 |
||
259 |
-- local is_in_run_kt = false |
|
260 |
function run_kt(c, keytable, title) |
|
12 | 261 |
widgets.mode_widget:set_text("Mode: " .. title) |
262 |
-- widgets.mode_widget:show() |
|
13
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
263 |
widgets.mode_widget_bg:set_bg(beautiful.bg_focus) |
7 | 264 |
widgets.mode_widget:buttons( |
265 |
awful.util.table.join( |
|
266 |
awful.button({}, 1, function () show_kt(keytable, "Binding") end), |
|
267 |
awful.button({}, 3, stop_kt))) |
|
268 |
capi.keygrabber.run(function (mod, key, event) |
|
269 |
if not kt_handler(keytable, mod, key, event) then |
|
270 |
stop_kt() |
|
271 |
return false |
|
272 |
end |
|
273 |
return true |
|
274 |
end) |
|
275 |
end |
|
276 |
||
277 |
function make_kt(keytable, title) |
|
278 |
return function (c) |
|
279 |
-- if is_in_run_kt then |
|
280 |
-- -- notify_error("Already in run_kt:\n" .. debug.traceback()) |
|
281 |
-- is_in_run_kt = false -- reset |
|
282 |
-- return false |
|
283 |
-- end |
|
284 |
return run_kt(c, keytable, title) |
|
285 |
end |
|
286 |
end |
|
287 |
||
288 |
function make_focus_bydirection(direction) |
|
289 |
return function () |
|
290 |
awful.client.focus.bydirection(direction) |
|
291 |
if capi.client.focus then capi.client.focus:raise() end |
|
292 |
return true |
|
293 |
end |
|
294 |
end |
|
295 |
||
296 |
function make_globalkeys(modifiers, keytable) |
|
297 |
local t = {} |
|
298 |
for _,k in ipairs(keytable) do |
|
299 |
t = awful.util.table.join(t, awful.key(modifiers, k.key, k.func)) |
|
300 |
end |
|
301 |
return t |
|
302 |
end |
|
303 |
||
8 | 304 |
-- Install a sloppy-like focus with a timeout. |
305 |
||
306 |
function sloppy_toggle() |
|
307 |
sloppy = not sloppy |
|
308 |
end |
|
309 |
||
310 |
function sloppy_mouse_enter(c) |
|
311 |
if sloppy and |
|
312 |
c ~= sloppy_last_client and |
|
313 |
awful.client.focus.filter(c) and |
|
314 |
awful.layout.get(c.screen) ~= awful.layout.suit.magnifier |
|
315 |
then |
|
9
56e80afa3e1c
Only start sloppy timer on a mouse_enter.
Fabien Ninoles <fabien@tzone.org>
parents:
8
diff
changeset
|
316 |
if sloppy_timer.started |
56e80afa3e1c
Only start sloppy timer on a mouse_enter.
Fabien Ninoles <fabien@tzone.org>
parents:
8
diff
changeset
|
317 |
then |
56e80afa3e1c
Only start sloppy timer on a mouse_enter.
Fabien Ninoles <fabien@tzone.org>
parents:
8
diff
changeset
|
318 |
sloppy_timer:again() |
56e80afa3e1c
Only start sloppy timer on a mouse_enter.
Fabien Ninoles <fabien@tzone.org>
parents:
8
diff
changeset
|
319 |
else |
56e80afa3e1c
Only start sloppy timer on a mouse_enter.
Fabien Ninoles <fabien@tzone.org>
parents:
8
diff
changeset
|
320 |
sloppy_timer:start() |
56e80afa3e1c
Only start sloppy timer on a mouse_enter.
Fabien Ninoles <fabien@tzone.org>
parents:
8
diff
changeset
|
321 |
end |
8 | 322 |
sloppy_last_client = c |
323 |
end |
|
324 |
end |
|
325 |
||
326 |
function sloppy_on_timeout() |
|
327 |
if sloppy |
|
328 |
then |
|
329 |
local c = awful.mouse.client_under_pointer() |
|
330 |
if c and |
|
331 |
c == sloppy_last_client |
|
332 |
then |
|
333 |
capi.client.focus = c |
|
9
56e80afa3e1c
Only start sloppy timer on a mouse_enter.
Fabien Ninoles <fabien@tzone.org>
parents:
8
diff
changeset
|
334 |
sloppy_timer:stop() |
8 | 335 |
end |
336 |
end |
|
337 |
end |
|
338 |
||
339 |
sloppy = true |
|
340 |
sloppy_last_client = nil |
|
341 |
sloppy_timer = nil |
|
342 |
||
343 |
function sloppy_install(delay) |
|
344 |
sloppy_timer = timer({ timeout = delay }) |
|
11 | 345 |
sloppy_timer:connect_signal("timeout", sloppy_on_timeout) |
8 | 346 |
sloppy_timer:start() |
11 | 347 |
capi.client.connect_signal("manage", function (c) |
348 |
c:connect_signal("mouse::enter", sloppy_mouse_enter) |
|
8 | 349 |
end) |
12 | 350 |
capi.client.connect_signal("focus", function () |
351 |
if sloppy_timer.started then |
|
352 |
sloppy_timer:stop() |
|
353 |
end |
|
354 |
end) |
|
8 | 355 |
end |
13
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
356 |
|
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
357 |
-- theme menu |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
358 |
function theme_load(theme) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
359 |
local cfg_path = awful.util.getdir("config") |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
360 |
awful.util.spawn("ln -sfn " .. cfg_path .. "/themes/" .. theme .. " " .. cfg_path .. "/current_theme") |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
361 |
awesome.restart() |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
362 |
end |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
363 |
|
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
364 |
function theme_menu() |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
365 |
-- List your theme files and feed the menu table |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
366 |
local cmd = "ls -1 " .. awful.util.getdir("config") .. "/themes/" |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
367 |
local f = io.popen(cmd) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
368 |
|
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
369 |
local themes = {} |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
370 |
for l in f:lines() do |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
371 |
local item = { l, function () theme_load(l) end } |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
372 |
table.insert(themes, item) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
373 |
end |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
374 |
|
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
375 |
f:close() |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
376 |
return themes |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
377 |
end |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
378 |
|
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
379 |
function set_wallpaper(wallpaper) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
380 |
local cfg_path = awful.util.getdir("config") |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
381 |
local source_path = cfg_path .. "/wallpapers/" .. wallpaper |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
382 |
local default_path = cfg_path .. "/default" |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
383 |
awful.util.spawn("ln -sfn " .. source_path .. " " .. default_path ) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
384 |
awful.util.spawn("fbsetbg -a " .. default_path) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
385 |
end |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
386 |
|
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
387 |
function wallpaper_menu() |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
388 |
local cmd = "ls " .. awful.util.getdir("config") .. "/wallpapers/" |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
389 |
local f = io.popen(cmd) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
390 |
local wallpapers = {} |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
391 |
for l in f:lines() do |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
392 |
local name, ext = capi.string.match(l, "(.-)(%.[^%.]+)$") |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
393 |
local item = { name, function () set_wallpaper(l) end } |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
394 |
table.insert(wallpapers, item) |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
395 |
end |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
396 |
|
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
397 |
f:close() |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
398 |
return wallpapers |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
399 |
end |
e9e2f624cd99
Add themes and wallpapers menus.
Fabien Ninoles <fabien@tzone.org>
parents:
12
diff
changeset
|
400 |