From d70fe40f9de2a10ccd5892b7886a559b181748cc Mon Sep 17 00:00:00 2001 From: Jackson Taylor Date: Tue, 31 Mar 2020 22:35:25 -0400 Subject: Add initial files for status bar Add main function loop Add a battery module for laptops Add a date module --- dateModule.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 dateModule.go (limited to 'dateModule.go') diff --git a/dateModule.go b/dateModule.go new file mode 100644 index 0000000..baabe5a --- /dev/null +++ b/dateModule.go @@ -0,0 +1,16 @@ +package main + +import ( + "time" +) + +type DateModule struct { +} + +// getDate formats a string for the status bar +func (_ DateModule) GetInfo() (string, error) { + now := time.Now() + // return string([]rune(now.Weekday().String()[0:3])) + // return now.Format(time.Stamp) + return string([]rune(now.Month().String())) + " " + now.Format(time.Kitchen), nil +} -- cgit v1.2.3