make the help menu appear when libnotify is clicked

This commit is contained in:
Jeff Carr 2025-09-03 01:23:22 -05:00
parent ec0807ce2b
commit 262426fb44
3 changed files with 17 additions and 8 deletions

View File

@ -103,7 +103,9 @@ func theDarkness(g *gocui.Gui, v *gocui.View) error {
log.Info("you have seen the light") log.Info("you have seen the light")
} else { } else {
me.dark = true 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 return nil
} }

12
help.go
View File

@ -26,15 +26,15 @@ import (
var helpText []string = []string{"Help Menu", var helpText []string = []string{"Help Menu",
"", "",
"Tab: toggle through windows", "Tab: toggle through windows",
"O: toggle STDOUT", "'O': toggle STDOUT",
"H: toggle this gocui menu", "'H': toggle this gocui menu",
"L: toggle light/dark mode", "'D': toggle light/dark mode",
"CTRL-c: quit()", "CTRL-c: quit()",
"", "",
"Debugging:", "Debugging:",
"S: Supermouse mode", "'S': Supermouse mode",
"M: list all widget positions", "'M': list all widget positions",
"L: list all widgets in tree", "'L': list all widgets in tree",
} }
func hideHelp() { func hideHelp() {

View File

@ -154,6 +154,13 @@ func setNotifyIconText(s string) {
for _, tk := range me.allwin { for _, tk := range me.allwin {
log.Info("known window Window", tk.labelN, tk.window.active, tk.window.order) 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 // in the very end of redrawing things, this will place the help and stdout on the top or botton