From 262426fb448d8bd616d1ed687f3da7e1ed2dc6a2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 3 Sep 2025 01:23:22 -0500 Subject: [PATCH] make the help menu appear when libnotify is clicked --- eventBindings.go | 4 +++- help.go | 14 +++++++------- libnotify.go | 7 +++++++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/eventBindings.go b/eventBindings.go index 7b31570..5e06f8b 100644 --- a/eventBindings.go +++ b/eventBindings.go @@ -103,7 +103,9 @@ func theDarkness(g *gocui.Gui, v *gocui.View) error { log.Info("you have seen the light") } else { me.dark = true - log.Info("you have entered into darkness") + log.Info("you have entered into darkness (you may need to trigger SIGWINCH)") + log.Info("or maybe open a new window. notsure. This obviously isn't finished.") + log.Info("submit patches to this and you will definitely get free cloud credits at WIT") } return nil } diff --git a/help.go b/help.go index 8bdf240..21e39b1 100644 --- a/help.go +++ b/help.go @@ -25,16 +25,16 @@ import ( var helpText []string = []string{"Help Menu", "", - "Tab: toggle through windows", - "O: toggle STDOUT", - "H: toggle this gocui menu", - "L: toggle light/dark mode", + "Tab: toggle through windows", + "'O': toggle STDOUT", + "'H': toggle this gocui menu", + "'D': toggle light/dark mode", "CTRL-c: quit()", "", "Debugging:", - "S: Supermouse mode", - "M: list all widget positions", - "L: list all widgets in tree", + "'S': Supermouse mode", + "'M': list all widget positions", + "'L': list all widgets in tree", } func hideHelp() { diff --git a/libnotify.go b/libnotify.go index 7f55b46..1b2a9d8 100644 --- a/libnotify.go +++ b/libnotify.go @@ -154,6 +154,13 @@ func setNotifyIconText(s string) { for _, tk := range me.allwin { log.Info("known window Window", tk.labelN, tk.window.active, tk.window.order) } + if s == "[X]" { + log.Warn("should turn on help window here") + showHelp() + } else { + log.Warn("should turn off help window here") + hideHelp() + } } // in the very end of redrawing things, this will place the help and stdout on the top or botton