aboutsummaryrefslogtreecommitdiff
path: root/1337x
diff options
context:
space:
mode:
Diffstat (limited to '1337x')
-rwxr-xr-x1337x10
1 files changed, 4 insertions, 6 deletions
diff --git a/1337x b/1337x
index 2005440..aeacf3c 100755
--- a/1337x
+++ b/1337x
@@ -60,8 +60,7 @@ main()
[ -z "$WAYLAND_DISPLAY" ] &&
menu="dmenu"
- if [ "$#" -gt 0 ] && [ "$1" = "-o" ]
- then
+ if [ "$#" -gt 0 ] && [ "$1" = "-o" ]; then
out=true
shift
fi
@@ -70,17 +69,16 @@ main()
query="${*:-$(printf "" | "$menu" -p "󱇒 ")}"
[ -z "$query" ] &&
- die "please enter a query"
+ exit 1
fetch="$(search_1337x "$query")"
select="$(echo "$fetch" | sed -e's/^.*\///g' | tr '-' ' ' | "$menu" -l 25 -p "󰎁 " | tr ' ' '-')"
magnet="$(magnet_1337x "$(echo "$fetch" | grep "$select")")"
[ -z "$magnet" ] &&
- die "empty magnet"
+ die "empty torrent magnet"
- if [ "$out" = true ]
- then
+ if [ "$out" = true ]; then
echo "$magnet"
else
dep_check "pirowatch"