From 4a10cb0184a83bc1a0af694b6ea9c3875dbf5031 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 24 Aug 2023 21:06:48 +0300 Subject: osel: Fail on no output & require wofi/fzf --- .local/bin/osel | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to '.local') 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" -- cgit v1.2.3