summaryrefslogtreecommitdiff
path: root/eventBindings.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventBindings.go')
-rw-r--r--eventBindings.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/eventBindings.go b/eventBindings.go
index 5b39457..121f95f 100644
--- a/eventBindings.go
+++ b/eventBindings.go
@@ -33,8 +33,9 @@ func registerHandlers(g *gocui.Gui) {
g.SetKeybinding("", keyForced, modForced, handle_ctrl_z) // CTRL-Z :cleverly let's you background gocui (breaks cursor mouse on return)
// regular keys
- g.SetKeybinding("", 'H', gocui.ModNone, theHelp) // '?' toggles on and off the help menu
- g.SetKeybinding("", 'O', gocui.ModNone, theStdout) // 'o' toggle the STDOUT window
+ g.SetKeybinding("", 'H', gocui.ModNone, theHelp) // 'H' toggles on and off the help menu
+ g.SetKeybinding("", 'O', gocui.ModNone, theStdout) // 'O' toggle the STDOUT window
+ g.SetKeybinding("", 'D', gocui.ModNone, theDarkness) // 'D' toggles light/dark mode
g.SetKeybinding("", 'q', gocui.ModNone, doExit) // 'q' exit
g.SetKeybinding("", gocui.KeyTab, gocui.ModNone, tabCycleWindows) // '2' use this to test new ideas
g.SetKeybinding("", gocui.KeyPgup, gocui.ModNone, stdoutPgup) // Pgup scroll up the Stdout buffer
@@ -108,6 +109,17 @@ func theNotsure(g *gocui.Gui, v *gocui.View) error {
return nil
}
+func theDarkness(g *gocui.Gui, v *gocui.View) error {
+ if me.dark {
+ me.dark = false
+ log.Info("you have seen the light")
+ } else {
+ me.dark = true
+ log.Info("you have entered into darkness")
+ }
+ return nil
+}
+
func stdoutPgup(g *gocui.Gui, v *gocui.View) error {
me.stdout.pager -= 40
if me.stdout.pager < 0 {