From 363f4b6dd28fd4d7b30f8a669efea4b16f96a268 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 14 Feb 2024 15:33:28 +0100 Subject: Include text file in script --- bin/extra/p.sh | 657 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 656 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/extra/p.sh b/bin/extra/p.sh index 010ae0c..98f8ede 100755 --- a/bin/extra/p.sh +++ b/bin/extra/p.sh @@ -1,6 +1,661 @@ #!/bin/sh -ask_pokemon() { commander -xc < ./pokemon_bw.txt; } +list_pokemon() +{ + cat < Date: Sat, 24 Feb 2024 15:06:23 +0100 Subject: [ytlink] Add substitution for yt-local --- bin/common/ytlink | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin') diff --git a/bin/common/ytlink b/bin/common/ytlink index a5e9bf0..48be9cf 100755 --- a/bin/common/ytlink +++ b/bin/common/ytlink @@ -8,6 +8,8 @@ inp="$1" [ "${inp:=$(clipo)}" ] || inp="$(cat /dev/stdin)" +# if link is http://127.0.0.1:9010/https://www.youtube.com/watch?v=7KpxsqwNF0o +inp="${inp#*/https://}" # remove util scheme inp="${inp#*//}" inp="https://youtube.com/${inp#*/}" -- cgit v1.2.3 From 1e1b7fed63b806c2788baa4ca6c4244b7544006a Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 27 Feb 2024 22:50:20 +0100 Subject: fix commander not working --- bin/guiscripts/sturl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/guiscripts/sturl b/bin/guiscripts/sturl index d261e32..27a8f47 100755 --- a/bin/guiscripts/sturl +++ b/bin/guiscripts/sturl @@ -1,7 +1,7 @@ #!/bin/sh regex='(((file|https?|gopher|gemini|ftps?|git)://|www\.)[a-zA-Z0-9.]*[:;!a-zA-Z0-9./+@$&%?$\#=_~-]*)|(magnet:\?xt=urn:btih:[a-zA-Z0-9]*)' -url="$(tr -d '\n' | grep -Eo "$regex" | commander -cl)" +url="$(tr -d '\n' | grep -Eo "$regex" | commander -xcl)" [ -z "$url" ] && exit 1 case $1 in -- cgit v1.2.3 From 066db981ba91d232bead8a4543d7647465197ded Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 27 Feb 2024 22:50:50 +0100 Subject: fix commander --- bin/menuscripts/mpower | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower index f8f7654..8c1a886 100755 --- a/bin/menuscripts/mpower +++ b/bin/menuscripts/mpower @@ -1,11 +1,13 @@ #!/bin/sh choice="$( -cat < Date: Wed, 28 Feb 2024 10:33:54 +0100 Subject: use sshpass and refactor --- bin/extra/aivpn | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'bin') diff --git a/bin/extra/aivpn b/bin/extra/aivpn index 3c87ce8..aab90a8 100755 --- a/bin/extra/aivpn +++ b/bin/extra/aivpn @@ -4,27 +4,18 @@ logn() { printf "%s\n" "$@"; } if [ "$1" = "-k" ] then - pgrep -f -- "ssh.*-L.*vm" | - xargs kill + pgrep -f -- "ssh.*-L.*vm" | xargs kill exit fi -# For when script calls itself -if [ "$PASSWORD" ] -then - pass show "$PASSWORD" && - exit - exit 1 -fi - keyadd ehb/ai -export SSH_ASKPASS="$0" +export SSH_ASKPASS="sshpass" export SSH_ASKPASS_REQUIRE="prefer" -export PASSWORD=zot/qemu +export PASSWORD="zot/qemu" logn "I: Waiting for connectivity..." -while ! ssh -o ConnectTimeout=1 -o BatchMode=yes vm 2>&1 | grep -q "Permission denied" +while ! ssh -o ConnectTimeout=1 -o BatchMode=yes vm 2>&1 | grep "Permission denied" > /dev/null do sleep 1 done -- cgit v1.2.3 From 5e044857f14932a950b12d61a1f1c58a934bc5e6 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 28 Feb 2024 10:34:10 +0100 Subject: added sshpass --- bin/common/sshpass | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 bin/common/sshpass (limited to 'bin') diff --git a/bin/common/sshpass b/bin/common/sshpass new file mode 100755 index 0000000..71f8e93 --- /dev/null +++ b/bin/common/sshpass @@ -0,0 +1,6 @@ +#!/bin/sh +if [ "$PASSWORD" ] +then + pass show "$PASSWORD" && exit + exit 1 +fi -- cgit v1.2.3