This commit is contained in:
cheesus_crust 2023-02-14 21:22:28 +03:00
commit 9581bcc174
10 changed files with 191 additions and 0 deletions

14
for_bigg/rtcdate.sh Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
midnight=$(TZ=Europe/Moscow date +"%p")
# echo $midnight
if [[ $midnight = "PM" ]]
then
# echo "PM"
rtcdate=$(TZ='Europe/Moscow' date --date='08:15 tomorrow' +"%Y%m%d%H%M%S")
else
# echo "AM"
rtcdate=$(TZ='Europe/Moscow' date --date='08:15' +"%Y%m%d%H%M%S")
fi
echo "$rtcdate"

31
for_bigg/ytmpdplay.sh Executable file
View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
: "${1?How to use: $0 YT_VIDEO_LINK}"
yt_link="$1"
play_link=$(yt-dlp -g "$yt_link" | sed '1d')
echo "Clear playlist? (N/y)"
read -r clearplay
case "$clearplay" in
"y")
mpc clear 1>/dev/null
echo "Playlist cleared"
mpc add "$play_link" 1>/dev/null
mpc play 1>/dev/null
echo "Playing"
exit 0
;;
"n")
echo "Adding"
;;
"")
echo "Adding"
;;
esac
mpc add "$play_link" 1>/dev/null
exit 0