New scripts: sxmo_{youtube,weather,rss,camera}.sh; Implement screenlock

Various minor script bugfixes
This commit is contained in:
Miles Alan 2020-03-23 22:37:07 -05:00
parent 9beef511af
commit ed09f2b8b3
20 changed files with 33534 additions and 122 deletions

23
scripts/sxmo_youtube.sh Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env sh
pidof svkbd-sxmo || svkbd-sxmo &
SEARCHTERMS="$(
echo "Search term" |
dmenu -p "Yt Search" -c -l 10 -fn Terminus-20
)"
pkill svkbd-sxmo
IDIOTRESULTS="$(idiotbox-cli $SEARCHTERMS)"
RESULT="$(
echo "$IDIOTRESULTS" |
grep -Ev '^(Channelid|Atom feed|Channel title|Published|Viewcount|Userid):' |
sed -E 's/^(URL|Duration):\s+/\t/g' |
tr -d '\n' |
sed 's/===/\n/g' |
gawk -F'\t' '{ print $3 " " $1 " " $2}' |
dmenu -c -l 10 -fn Terminus-20
)"
[[ "CLOSE_MENU" == "$RESULT" ]] && exit 0
URL=$(echo "$RESULT" | awk -F " " '{print $NF}')
st -e mpv --ytdl-format='[height<420]' "$URL"