summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Taylor <jtaylormuffins@gmail.com>2020-04-12 14:56:03 -0400
committerJackson Taylor <jtaylormuffins@gmail.com>2020-04-12 14:56:03 -0400
commit5fd0040bf3e6003420d3739d14eb7f8427ef7a2d (patch)
treebf9c666030c5b8aea2b93d74c9f14f6c71e30e37
parentbd54ff49b75d712a32131352a316450c07c75aaf (diff)
Move to a suckless configuration format
Make config.go with module choices Move Module interface to its own file
-rw-r--r--config.go13
-rw-r--r--main.go12
-rw-r--r--module.go6
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{},
+}
diff --git a/main.go b/main.go
index 37f1bb2..87ca582 100644
--- a/main.go
+++ b/main.go
@@ -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)
+}