aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-10-03 14:57:34 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-10-03 14:57:34 -0700
commit7f0fcdeea449a3ffc7a65a3024b6b5d4a1b3e93b (patch)
tree45f43e00d7bbafd122d423f96c73a5baa1f53baa /Makefile
parent97bae88a1ef368b962df5b1ee147094a0d47d43e (diff)
Removed some unnecessary +refreshes, no longer enable cursor by default,
but instead have ask() etc. make the cursor visible. Also cleaned up some of the failure cases for better feedback.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index d0c953d..b49fb9d 100644
--- a/Makefile
+++ b/Makefile
@@ -24,16 +24,16 @@ endif
ifneq (, $(PICKER))
PICKER_FLAG=-D"PICK=\"$(PICKER) --prompt=\\\"$$1\\\"\""
ifeq ($(shell which $(PICKER)),$(shell which fzy 2>/dev/null || echo '<none>'))
- PICKER_FLAG=-D'PICK="printf \"\\033[3A\" >/dev/tty; fzy --lines=3 --prompt=\"\033[1m$$1\033[0m\""'
+ PICKER_FLAG=-D'PICK="printf \"\\033[3A\\033[?25h\" >/dev/tty; fzy --lines=3 --prompt=\"\033[1m$$1\033[0m\""'
endif
ifeq ($(shell which $(PICKER)),$(shell which fzf 2>/dev/null || echo '<none>'))
- PICKER_FLAG=-D'PICK="printf \"\\033[3A\" >/dev/tty; fzf --height=4 --prompt=\"$$1\""'
+ PICKER_FLAG=-D'PICK="printf \"\\033[3A\\033[?25h\" >/dev/tty; fzf --height=4 --prompt=\"$$1\""'
endif
ifeq ($(shell which $(PICKER)),$(shell which ask 2>/dev/null || echo '<none>'))
- PICKER_FLAG=-D'PICK="/usr/bin/env ask --prompt=\"$$1\""'
+ PICKER_FLAG=-D'PICK="/usr/bin/env ask --prompt=\"$$1\033[?25h\""'
endif
ifeq ($(shell which $(PICKER)),$(shell which pick 2>/dev/null || echo '<none>'))
- PICKER_FLAG=-D'PICK="pick"'
+ PICKER_FLAG=-D'PICK="printf \"\\033[?25h\" >/dev/tty; pick"'
endif
ifeq ($(shell which $(PICKER)),$(shell which dmenu 2>/dev/null || echo '<none>'))
PICKER_FLAG=-D'PICK="dmenu -i -l 10 -p \"$$1\""'
@@ -44,8 +44,8 @@ CFLAGS += $(PICKER_FLAG)
ifneq (, $(ASKER))
PERCENT := %
ifeq ($(shell which $(ASKER)),$(shell which ask 2>/dev/null || echo '<none>'))
- CFLAGS += -D'ASK="eval \"$$1=\\$$(/usr/bin/env ask --history=bb.hist --prompt=\\\"$$2\\\" --query=\\\"$$3\\\")\""'
- CFLAGS += -D'CONFIRM="/usr/bin/env ask -n \"Is that okay?\""'
+ CFLAGS += -D'ASK="eval \"$$1=\\$$(/usr/bin/env ask --history=bb.hist --prompt=\\\"$$2\033[?25h\\\" --query=\\\"$$3\\\")\""'
+ CFLAGS += -D'CONFIRM="/usr/bin/env ask -n \"Is that okay?\033[?25h\""'
endif
ifeq ($(shell which $(ASKER)),$(shell which dmenu 2>/dev/null || echo '<none>'))
CFLAGS += -D'ASK="eval \"$$1=\\$$(echo \"$$3\" | dmenu -p \"$$2\")\""'