Several new scripts added

This commit is contained in:
Alexander Gehrke 2020-07-29 14:58:50 +02:00
parent 1809ffacb3
commit cdbcc9692a
5 changed files with 82 additions and 0 deletions

13
misc/txmenu Executable file
View file

@ -0,0 +1,13 @@
#!/bin/zsh
# A simple wrapper around fzf and rofi, choosing based on if called from a terminal
zparseopts -D -E i=ignorecase l:=rofi_lines p:=listprompt -prompt:=listprompt
if test -t || [[ $TERM ]]; then
fzf $ignorecase ${listprompt:+--prompt} ${listprompt[2]} "$@"
elif [[ -n $DISPLAY ]]; then
dmenu $ignorecase $rofi_lines $listprompt "$@"
else
echo "Error: neither terminal nor X display" >&2
fi