mirror of https://github.com/lcpz/lain.git
widget.calendar: some cleaning; #379
This commit is contained in:
parent
558622c1ec
commit
4073bd7cdf
|
@ -10,9 +10,8 @@ local markup = require("lain.util.markup")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
local mouse = mouse
|
local mouse = mouse
|
||||||
local os = { date = os.date }
|
local os = os
|
||||||
local string = { format = string.format,
|
local string = string
|
||||||
gsub = string.gsub }
|
|
||||||
local ipairs = ipairs
|
local ipairs = ipairs
|
||||||
local tonumber = tonumber
|
local tonumber = tonumber
|
||||||
local setmetatable = setmetatable
|
local setmetatable = setmetatable
|
||||||
|
@ -40,10 +39,8 @@ function calendar.show(t_out, inc_offset, scr)
|
||||||
calendar.icon = calendar.icons:len() > 0 and string.format("%s%s.png", calendar.icons, tonumber(os.date("%d")))
|
calendar.icon = calendar.icons:len() > 0 and string.format("%s%s.png", calendar.icons, tonumber(os.date("%d")))
|
||||||
f = calendar.cal
|
f = calendar.cal
|
||||||
else -- no current month showing, no day to highlight
|
else -- no current month showing, no day to highlight
|
||||||
local month = tonumber(os.date("%m"))
|
|
||||||
local year = tonumber(os.date("%Y"))
|
local year = tonumber(os.date("%Y"))
|
||||||
|
local month = tonumber(os.date("%m")) + calendar.offset
|
||||||
month = month + calendar.offset
|
|
||||||
|
|
||||||
while month > 12 do
|
while month > 12 do
|
||||||
month = month - 12
|
month = month - 12
|
||||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
||||||
Subproject commit 2268c893712e579f1b68f25be8ff9caf9767312f
|
Subproject commit 89f3d98e339f07545aec31e94a3ecf42245b6316
|
Loading…
Reference in New Issue