about summary refs log tree commit diff
path: root/.config/luastatus/time-date.lua
blob: 8d5bfe7116be671ce26b4909ed53004cbf23e1e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
local months = {'Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Sep', 'Out', 'Nov', 'Dez'}
local days = {'Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', ''}

widget = {
    plugin = 'timer',
    cb = function()
        local d = os.date('*t')
        return {
            {full_text = string.format('%s %d %s', days[d.wday] , d.day, months[d.month])},
            {full_text = string.format('%02d:%02d ', d.hour, d.min)},
        }
    end,
}