aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/services/time.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/awesome/services/time.lua')
-rw-r--r--.config/awesome/services/time.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/.config/awesome/services/time.lua b/.config/awesome/services/time.lua
new file mode 100644
index 0000000..ec33b31
--- /dev/null
+++ b/.config/awesome/services/time.lua
@@ -0,0 +1,18 @@
+local gobject = require "gears.object"
+
+local current = os.date "*t"
+
+local M = gobject {
+ class = {
+ update_current_date = function(self)
+ current = os.date "*t"
+ self:emit_signal("current", current)
+ end,
+ get_current_date = function()
+ return current
+ end
+ },
+ enable_properties = true,
+}
+
+return M