From 0d10205772b2745356969176de6f52510527e5a6 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 4 Jan 2024 20:45:39 +0100 Subject: Add more scripts --- bin/extra/mariadb-adduser | 25 +++++++++++++++++++++++++ bin/extra/oclipp | 2 ++ 2 files changed, 27 insertions(+) create mode 100755 bin/extra/mariadb-adduser create mode 100755 bin/extra/oclipp (limited to 'bin') diff --git a/bin/extra/mariadb-adduser b/bin/extra/mariadb-adduser new file mode 100755 index 0000000..d4e1b45 --- /dev/null +++ b/bin/extra/mariadb-adduser @@ -0,0 +1,25 @@ +#!/bin/sh +if [ "$(id -u)" -ne 0 ] +then + >&2 printf "Not root.\n" + exit 1 +fi + +printf 'name? ' +name="$(head -n 1)" +printf 'password? ' +password="$(head -n 1)" +printf 'database? ' +database="$(head -n 1)" + +( + cat < Date: Thu, 25 Jan 2024 13:46:24 +0100 Subject: Update options for commander --- bin/menuscripts/memoji | 2 +- bin/menuscripts/mpower | 2 +- bin/menuscripts/mpwgen | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/menuscripts/memoji b/bin/menuscripts/memoji index 45a74f1..5766238 100755 --- a/bin/menuscripts/memoji +++ b/bin/menuscripts/memoji @@ -17,7 +17,7 @@ case "$1" in printf "%s" "$input" | clipp fi ;; - "") sh "$0" list | commander -p "Emoji:" -x -w 44 -y 10 -c | sh "$0" copy ;; + "") sh "$0" list | commander -p "Emoji:" -xlc | sh "$0" copy ;; esac exit diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower index 0d0cdcc..f8f7654 100755 --- a/bin/menuscripts/mpower +++ b/bin/menuscripts/mpower @@ -1,6 +1,6 @@ #!/bin/sh choice="$( -cat < Date: Thu, 25 Jan 2024 14:08:22 +0100 Subject: uncomment notify-send --- bin/common/ytclipo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 6416a15..1a82df2 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -2,7 +2,7 @@ inp="$(ytlink)" >&2 printf "inp: %s\n" "$inp" -# notify-send "ytclipo" "downloading $inp" || : +notify-send "ytclipo" "downloading $inp" || : yt-dlp "$inp" \ --restrict-filenames \ @@ -11,4 +11,4 @@ yt-dlp "$inp" \ -S "res:1080" \ -P "$HOME/vids/youtube/" \ -o "%(channel)s/%(title)s.%(ext)s" -# notify-send "ytclipo" "finished downloading." || : +notify-send "ytclipo" "finished downloading." || : -- cgit v1.2.3 From 3f7b5dd79688fa4d36302a60175ed3bb53e225d8 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 25 Jan 2024 21:57:49 +0100 Subject: Use clipp and remove tac --- bin/guiscripts/sturl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/guiscripts/sturl b/bin/guiscripts/sturl index 5b8b1e7..d261e32 100755 --- a/bin/guiscripts/sturl +++ b/bin/guiscripts/sturl @@ -1,11 +1,11 @@ #!/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" | tac | commander -cl)" +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)" [ -z "$url" ] && exit 1 case $1 in - 'c') printf '%s' "$url" | xclip -sel c -r ;; + 'c') printf '%s' "$url" | clipp ;; 'o') linkhandler "$url" ;; *) echo "no option" ;; esac -- cgit v1.2.3