~geb/numen

ce9e8329a28ad536ea715c72b3f34dda6652869f — John Gebbie 1 year, 1 month ago 2e68d9e
trim space of more arguments
1 files changed, 4 insertions(+), 3 deletions(-)

M handler.go
M handler.go => handler.go +4 -3
@@ 122,6 122,7 @@ func handle(handler *Handler, action string) {
		} else if s, ok := cutWord(line, "eval"); ok {
			handle(handler, shell(s))
		} else if s, ok := cutWord(line, "handler"); ok {
			s = strings.TrimSpace(s)
			if s == "gadget" {
				h.Close()
				*handler = NewGadgetHandler(h.Load)


@@ 144,7 145,7 @@ func handle(handler *Handler, action string) {
		} else if s, ok := cutWord(line, "load"); ok {
			h.Load(strings.Fields(s))
		} else if s, ok := cutWord(line, "mod"); ok {
			h.Mod(s)
			h.Mod(strings.TrimSpace(s))
		} else if s, ok := cutWord(line, "mousemove"); ok {
			s = strings.TrimSpace(s)
			var x, y float64


@@ 174,8 175,7 @@ func handle(handler *Handler, action string) {
			h.Mod("clear")
			h.Cache("press " + chords)
		} else if s, ok := cutWord(line, "repeat"); ok {
			s = strings.TrimSpace(s)
			times, err := strconv.Atoi(s)
			times, err := strconv.Atoi(strings.TrimSpace(s))
			if err == nil {
				for i := 0; i < times; i++ {
					handle(handler, h.Cached())


@@ 196,6 196,7 @@ func handle(handler *Handler, action string) {
			env, cmd, _ := strings.Cut(s, " ")
			os.Setenv(env, shell(cmd))
		} else if s, ok := cutWord(line, "stick"); ok {
			s = strings.TrimSpace(s)
			if s == "on" {
				h.Stick(true)
			} else if s == "off" {