about summary refs log tree commit diff
path: root/.config/luastatus/time-date.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/luastatus/time-date.lua')
-rw-r--r--.config/luastatus/time-date.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/luastatus/time-date.lua b/.config/luastatus/time-date.lua
new file mode 100644
index 0000000..8d5bfe7
--- /dev/null
+++ b/.config/luastatus/time-date.lua
@@ -0,0 +1,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,
+}