mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-26 15:14:58 +08:00
Use os.date instead of running system date binary
This commit is contained in:
parent
c085888cb5
commit
7cb6b0ccbd
1 changed files with 5 additions and 13 deletions
|
|
@ -67,19 +67,11 @@ local day_of_the_week = wibox.widget {
|
|||
}
|
||||
|
||||
local update_dotw = function ()
|
||||
awful.spawn.easy_async_with_shell("date +%u", function (out)
|
||||
local index = tonumber(out)
|
||||
for i=1,7 do
|
||||
dotw_containers[i].bg = "#00000000"
|
||||
-- dotw_textboxes[i].markup =
|
||||
-- "<span foreground='" .. x.color8 .."'>"
|
||||
-- .. dotw_initials[i] .. "</span>"
|
||||
end
|
||||
dotw_containers[index].bg = dotw_colors[index]
|
||||
-- dotw_textboxes[index].markup =
|
||||
-- "<span foreground='" .. dotw_colors[index] .."'>"
|
||||
-- .. dotw_initials[index] .. "</span>"
|
||||
end)
|
||||
local index = tonumber(os.date("%u"))
|
||||
for i=1,7 do
|
||||
dotw_containers[i].bg = "#00000000"
|
||||
end
|
||||
dotw_containers[index].bg = dotw_colors[index]
|
||||
end
|
||||
|
||||
-- Initialize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue