From 5fd0040bf3e6003420d3739d14eb7f8427ef7a2d Mon Sep 17 00:00:00 2001 From: Jackson Taylor Date: Sun, 12 Apr 2020 14:56:03 -0400 Subject: Move to a suckless configuration format Make config.go with module choices Move Module interface to its own file --- config.go | 13 +++++++++++++ main.go | 12 ------------ module.go | 6 ++++++ 3 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 config.go create mode 100644 module.go 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) +} -- cgit v1.2.3