summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-07-11 20:45:20 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-07-11 20:45:20 +0200
commitf039e82cac63f24ee7386bb3efd1fc6921d14d12 (patch)
tree12b013b9b199a4f7a6c3adeefbb761679148f8bd
parent2144e991b0334aac9def384e0430be20889f1b73 (diff)
checkpoint
-rwxr-xr-xbin/menuscripts/tsh17
1 files changed, 3 insertions, 14 deletions
diff --git a/bin/menuscripts/tsh b/bin/menuscripts/tsh
index 72670f2..19a7373 100755
--- a/bin/menuscripts/tsh
+++ b/bin/menuscripts/tsh
@@ -3,34 +3,27 @@
PROG="$(basename "$0")"
## VARIABLES
# copy command and deps variable
-deps="pup curl $MENUCMD"
+deps="pup curl clipp"
MODULES_PATH=$HOME/.local/share/tsh
module='nyaa.sh' # default module
# Files
export tmp="/tmp/$PROG"
+
files="seeds sizes names html tmp_types"
# Use export so that these variables can be used inside of modules
for file in $files
do eval "export $file=$tmp/$file"
done
+
# Files not in $files won't be deleted
export results="$tmp/results"
export links="$tmp/links"
categories="music anime movies shows other software games isos books"
-if [ "$WAYLAND_DISPLAY" ]
-then
- clipp() { wl-copy -n; }
- deps="$deps wl-copy"
-else
- clipp() { xclip -selection clipboard -r; }
- deps="$deps xclip"
-fi
## FUNCTIONS
-
help ()
{
>&2 cat <<-EOF
@@ -71,10 +64,6 @@ dependencies ()
[ "${error:-0}" -eq 1 ] && exit 1
}
-# shellcheck disable=SC2046
-# (we use word splitting on purpose)
-isOnline () { grep -q '1' $(echo /sys/class/net/*/carrier | sed 's#/sys/class/net/lo/carrier ##'); }
-
# Remove temp files and quit
cleanup ()
{