diff options
author | Jackson Taylor <jtaylormuffins@gmail.com> | 2020-04-12 14:56:03 -0400 |
---|---|---|
committer | Jackson Taylor <jtaylormuffins@gmail.com> | 2020-04-12 14:56:03 -0400 |
commit | 5fd0040bf3e6003420d3739d14eb7f8427ef7a2d (patch) | |
tree | bf9c666030c5b8aea2b93d74c9f14f6c71e30e37 | |
parent | bd54ff49b75d712a32131352a316450c07c75aaf (diff) |
Move to a suckless configuration format
Make config.go with module choices
Move Module interface to its own file
-rw-r--r-- | config.go | 13 | ||||
-rw-r--r-- | main.go | 12 | ||||
-rw-r--r-- | module.go | 6 |
3 files changed, 19 insertions, 12 deletions
diff --git a/config.go b/config.go new file mode 100644 index 0000000..27badc9 --- /dev/null +++ b/config.go @@ -0,0 +1,13 @@ +package main + +// This is the main configuration file for jasbr +// You can comment out any modules you don't want to use +// you can also add any new ones here that you make +// Order does matter + +// Modules that are displayed in the bar +var BarModules = []Module{ + DateModule{}, + BatteryModule{}, + TimeModule{}, +} @@ -10,18 +10,6 @@ import ( "fmt" ) -// Module is the interface for you to extend what your bar does. -type Module interface { - GetInfo() (string, error) -} - -// Modules that are displayed in the bar -var BarModules = []Module{ - DateModule{}, - BatteryModule{}, - TimeModule{}, -} - func main() { main := Bar{ Modules: BarModules, diff --git a/module.go b/module.go new file mode 100644 index 0000000..7370452 --- /dev/null +++ b/module.go @@ -0,0 +1,6 @@ +package main + +// Module is the interface for you to extend what your bar does. +type Module interface { + GetInfo() (string, error) +} |