Adding some moRe scripts and android variables

This commit is contained in:
2021-09-07 20:22:09 +01:00
parent 2018d94552
commit 758934e0d5
3 changed files with 42 additions and 1 deletions

24
.local/bin/downloadhandler Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
echo "starting"
echo "$1"
file="${1:-$HOME/Downloads}"
[ -d "$file" ] && file="$file/$(ls -Art "$file" | tail -n 1)"
echo "continuing"
echo "$file"
case "$file" in
*ergodox*.hex)
wally-cli "$file" ;;
# *png|*jpg|*jpe|*jpeg|*gif)
# curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
# *pdf|*cbz|*cbr)
# curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
# *mp3|*flac|*opus|*mp3?source*)
# qndl "$1" 'curl -LO' >/dev/null 2>&1 ;;
# *)
# [ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1
esac

11
.local/bin/installfont Executable file
View File

@@ -0,0 +1,11 @@
# !/bin/bash
dir=$(mktemp -d)
unzip "$1" -d "$dir"
mv "$dir/"*.ttf ~/.local/share/fonts/
mv "$dir/"*.otf ~/.local/share/fonts/
mv "$dir/"*.TTF ~/.local/share/fonts/
mv "$dir/"*.OTF ~/.local/share/fonts/