summaryrefslogtreecommitdiff
path: root/.local/bin/osel
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/osel')
-rwxr-xr-x.local/bin/osel12
1 files changed, 9 insertions, 3 deletions
diff --git a/.local/bin/osel b/.local/bin/osel
index 885c048..c289b19 100755
--- a/.local/bin/osel
+++ b/.local/bin/osel
@@ -1,5 +1,11 @@
#!/bin/sh
-: ${OSEL_GUI:=wofi -d}
-: ${OSEL_TERM:=fzf}
-if [ -t 2 ]; then eval $OSEL_TERM; else eval $OSEL_GUI; fi
+x="`
+if [ -t 2 ]
+then
+ eval fzf $OSEL_TERM_FLAGS
+else
+ eval wofi -d $OSEL_GUI_FLAGS
+fi`"
+[ -z "$x" ] && exit 1
+printf '%s' "$x"