summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-03-03 22:21:39 -0600
committerJeff Carr <[email protected]>2025-03-03 22:21:39 -0600
commitb373eab346cc96c8c790d9713824a9208e435748 (patch)
tree44693df571033a1f46b1d29000966fc8c0165436
parente73cfaf490774b80f15790ae3f04af44fa2adde1 (diff)
set help window offset
-rw-r--r--help.go7
-rw-r--r--init.go3
-rw-r--r--structs.go1
-rw-r--r--treeAdd.go1
4 files changed, 11 insertions, 1 deletions
diff --git a/help.go b/help.go
index 36731b2..e6294e8 100644
--- a/help.go
+++ b/help.go
@@ -65,7 +65,12 @@ func showHelp() error {
}
}
- help, err := g.SetView("help", maxX-(newW+me.FramePadW), 0, maxX-1, len(helpText)+me.FramePadH, 0)
+ a := maxX - (newW + me.FramePadW)
+ b := me.notify.help.offsetH
+ c := maxX - 1
+ d := me.notify.help.offsetH + len(helpText) + me.FramePadH
+
+ help, err := g.SetView("help", a, b, c, d, 0)
if err != nil {
if !errors.Is(err, gocui.ErrUnknownView) {
return err
diff --git a/init.go b/init.go
index fa6c3f0..5153c12 100644
--- a/init.go
+++ b/init.go
@@ -193,6 +193,9 @@ func initPlugin() {
me.notify.menu.wId = -6
me.notify.menu.offsetH = 0
+ me.notify.help.wId = -7
+ me.notify.help.offsetH = 3
+
Set(&me.dropdown, "default")
// s := fmt.Sprintln("fake default check =", me.FakeW, "dropdown.Id", me.dropdown.Id)
// me.stdout.Write([]byte(s))
diff --git a/structs.go b/structs.go
index 5d94d50..d3fce8e 100644
--- a/structs.go
+++ b/structs.go
@@ -151,6 +151,7 @@ type libnotify struct {
clock internalTK // widget for the clock
menu internalTK // libnotify menu icon
window internalTK // the libnotify menu
+ help internalTK // the help menu
}
// this is the gocui way
diff --git a/treeAdd.go b/treeAdd.go
index 884b86c..6bb459b 100644
--- a/treeAdd.go
+++ b/treeAdd.go
@@ -59,6 +59,7 @@ func addWidget(n *tree.Node) {
tk.labelN = "moreSTDOUT"
n.State.ProgName = "moreSTDOUT"
n.State.Label = "moreSTDOUT"
+ tk.isFake = true
return
case widget.Tab:
// tk.color = &colorTab