summaryrefslogtreecommitdiff
path: root/status/05-time.go
diff options
context:
space:
mode:
Diffstat (limited to 'status/05-time.go')
-rw-r--r--status/05-time.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/status/05-time.go b/status/05-time.go
new file mode 100644
index 0000000..0bdfbf7
--- /dev/null
+++ b/status/05-time.go
@@ -0,0 +1,19 @@
+package status // import "hhvn.uk/hbspbar/status"
+
+import (
+ "time"
+
+ "hhvn.uk/hbspbar/config"
+)
+
+// TODO: twilight / weather
+func timef(u *Block) error {
+ _, err := u.drawText(0, config.Fg, time.Now().Local().Format("15:04:05"))
+ if err != nil { return err }
+
+ return nil
+}
+
+func init() {
+ register("time", timef, 1)
+}