hbspbar

bspwm status bar
git clone https://hhvn.uk/hbspbar
git clone git://hhvn.uk/hbspbar
Log | Files | Refs

commit 6154256e9ad6fcac5360755372612315374fdc21
parent 4e17f1290c9c07f8a7e91662295dc84f21f6cbae
Author: hhvn <dev@hhvn.uk>
Date:   Wed, 21 Feb 2024 18:35:26 +0000

Actual handle bar errors again

Diffstat:
Mmain.go | 18++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/main.go b/main.go @@ -31,8 +31,11 @@ func main() { defer bspc.Cleanup() state := <- bspc.NewState + for _, m := range state.Monitors { - Create(state, m.ID) + if err := Create(state, m.ID); err != nil { + common.Error("%s\n", err) + } } var blocks []*status.Block = nil @@ -70,10 +73,18 @@ func main() { case "monitor_add": fallthrough case "monitor_geometry": - Create(state, id) + err = Create(state, id) + if err != nil { + common.Error("%s\n", err) + } case "monitor_remove": - Destroy(state, id) + err = Destroy(state, id) + if err != nil { + common.Error("%s\n", err) + } } + } else { + common.Perror("Intify", err) } } case err := <-bspc.StErr: @@ -82,7 +93,6 @@ func main() { case blocks = <- status.NewBlocks: Redraw(state, blocks) case state = <- bspc.NewState: - finalstate = state Redraw(state, blocks) } }