summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/main.go b/main.go
index 0a7951c..6e8d571 100644
--- a/main.go
+++ b/main.go
@@ -7,8 +7,9 @@ import (
"os/signal"
"hhvn.uk/hbspbar/common"
- "hhvn.uk/hbspbar/bspc"
+ "hhvn.uk/hbspbar/x"
"hhvn.uk/hbspbar/bar"
+ "hhvn.uk/hbspbar/bspc"
)
func main() {
@@ -18,11 +19,12 @@ func main() {
syscall.SIGHUP,
syscall.SIGTERM)
- if bar.InitErr != nil {
- common.Error("Couldn't initialize X: %s\n", bar.InitErr)
+ defer bar.Cleanup()
+
+ if x.InitErr != nil {
+ common.Error("Couldn't initialize X: %s\n", x.InitErr)
return
}
- defer bar.Cleanup()
if bspc.InitErr != nil {
common.Error("Couldn't subscribe to bspwm: %s\n", bspc.InitErr)