From 435f0e5f526c12cc3f70ad9025d861270de78ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Thu, 27 Aug 2020 21:54:36 +0200 Subject: [PATCH 1/4] add videos.lukesmith.xyz to linkhandler script (#792) since mpv can handle peertube videos, it would be best to open video links in e. g. newsboat with mpv. --- .local/bin/linkhandler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler index 7c7e96f..ee5d170 100755 --- a/.local/bin/linkhandler +++ b/.local/bin/linkhandler @@ -10,7 +10,7 @@ [ -z "$1" ] && { "$BROWSER"; exit; } case "$1" in - *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*) + *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*) setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;; *png|*jpg|*jpe|*jpeg|*gif) curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;; From 5fd9637eb7345c2e68ec9a2b5c3116292e7f57e7 Mon Sep 17 00:00:00 2001 From: build2stone Date: Thu, 27 Aug 2020 21:55:17 +0200 Subject: [PATCH 2/4] Improve rotdir script (#789) Now doesn't interpret file name as regex pattern. --- .local/bin/rotdir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/rotdir b/.local/bin/rotdir index 7313a42..86da6db 100755 --- a/.local/bin/rotdir +++ b/.local/bin/rotdir @@ -9,4 +9,4 @@ [ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1 base="$(basename "$1")" - ls "$PWD" | awk "BEGIN { lines = \"\"; m = 0; } /^$base$/ { m = 1; } { if (!m) { if (lines) { lines = lines\"\n\"; } lines = lines\"\"\$0; } else { print \$0; } } END { print lines; }" +ls "$PWD" | awk -v BASE="$base" 'BEGIN { lines = ""; m = 0; } { if ($0 == BASE) { m = 1; } } { if (!m) { if (lines) { lines = lines"\n"; } lines = lines""$0; } else { print $0; } } END { print lines; }' From ca9b3952e6481903cdb47810933765fb2cd1ab27 Mon Sep 17 00:00:00 2001 From: anntnzrb <51257127+anntnzrb@users.noreply.github.com> Date: Thu, 27 Aug 2020 14:57:16 -0500 Subject: [PATCH 3/4] Exit codes, stderr suppression, minor edits (#788) This is a re-attempt of #643 - `[ "$archive" = "" ]` may be replaced with `[ -z "$archive" ]` - added exit codes - upon entering `ext -c` with no arguments stderr will be thrown from readlink, should be suppressed --- .local/bin/ext | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.local/bin/ext b/.local/bin/ext index c5f89c5..806ce5e 100755 --- a/.local/bin/ext +++ b/.local/bin/ext @@ -8,19 +8,19 @@ while getopts "hc" o; do case "${o}" in c) extracthere="True" ;; - *) printf "Options:\\n -c: Extract archive into current directory rather than a new one.\\n" && exit ;; + *) printf "Options:\\n -c: Extract archive into current directory rather than a new one.\\n" && exit 1 ;; esac done if [ -z "$extracthere" ]; then archive="$(readlink -f "$*")" && directory="$(echo "$archive" | sed 's/\.[^\/.]*$//')" && mkdir -p "$directory" && - cd "$directory" || exit + cd "$directory" || exit 1 else - archive="$(readlink -f "$(echo "$*" | cut -d' ' -f2)")" + archive="$(readlink -f "$(echo "$*" | cut -d' ' -f2)" 2>/dev/null)" fi -[ "$archive" = "" ] && printf "Give archive to extract as argument.\\n" && exit +[ -z "$archive" ] && printf "Give archive to extract as argument.\\n" && exit 1 if [ -f "$archive" ] ; then case "$archive" in From 0582b495937117d899ce8ef715a89c6cc25a36cf Mon Sep 17 00:00:00 2001 From: LordRusk <54194338+LordRusk@users.noreply.github.com> Date: Thu, 27 Aug 2020 20:07:01 +0000 Subject: [PATCH 4/4] right clicking on nettraf now opens bmon (bandwidth monitor) (#681) --- .local/bin/statusbar/nettraf | 1 + 1 file changed, 1 insertion(+) diff --git a/.local/bin/statusbar/nettraf b/.local/bin/statusbar/nettraf index 71e6fe4..eb7a73b 100755 --- a/.local/bin/statusbar/nettraf +++ b/.local/bin/statusbar/nettraf @@ -5,6 +5,7 @@ # second, gives network traffic per second. case $BLOCK_BUTTON in + 1) setsid -f "$TERMINAL" -e bmon ;; 3) notify-send "🌐 Network traffic module" "🔻: Traffic received 🔺: Traffic transmitted" ;; 6) "$TERMINAL" -e "$EDITOR" "$0" ;;