Merge branch 'master' of github.com:LukeSmithxyz/voidrice into master

This commit is contained in:
Luke Smith 2020-08-28 13:31:47 -04:00
commit 86480f70d9
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
4 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -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 & ;;

View file

@ -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; }'

View file

@ -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" ;;