From ee81307555ec0670e1690f93c103dd58e4acd287 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Tue, 14 Feb 2023 19:04:40 -0500 Subject: [PATCH] added scripts: prod.sh, tag.sh --- src/.local/bin/deskutils/notification-sound.sh | 3 +++ src/.local/bin/deskutils/prod.sh | 7 +++++++ src/.local/bin/tag.sh | 13 +++++++++++++ 3 files changed, 23 insertions(+) create mode 100755 src/.local/bin/deskutils/prod.sh create mode 100755 src/.local/bin/tag.sh diff --git a/src/.local/bin/deskutils/notification-sound.sh b/src/.local/bin/deskutils/notification-sound.sh index ff6a6c8..dd6b748 100755 --- a/src/.local/bin/deskutils/notification-sound.sh +++ b/src/.local/bin/deskutils/notification-sound.sh @@ -5,6 +5,9 @@ if [ "$DUNST_APP_NAME" = "soundboard" ]; then exit fi +if [ "$DUNST_APP_NAME" = "prod" ]; then + exit +fi if pactl list short sinks | grep -q virtual_mic; then mpv ~/.local/bin/deskutils/notif.wav --audio-device=pulse/alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo diff --git a/src/.local/bin/deskutils/prod.sh b/src/.local/bin/deskutils/prod.sh new file mode 100755 index 0000000..f5f9b6a --- /dev/null +++ b/src/.local/bin/deskutils/prod.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# visual reminder of watson status + +while true; do + notify-send -a "prod" -r 13371234 "$(watson status)" + sleep 5 +done diff --git a/src/.local/bin/tag.sh b/src/.local/bin/tag.sh new file mode 100755 index 0000000..4caf40a --- /dev/null +++ b/src/.local/bin/tag.sh @@ -0,0 +1,13 @@ +#!/bin/sh +TMPFILE="$(mktemp)" +nvim "$TMPFILE" +cat "$TMPFILE" | while read line; do + link="$(echo $line | awk -F";" '{print $1}')" + artist="$(echo $line | awk -F";" '{print $2}')" + alb="$(echo $line | awk -F";" '{print $3}')" + file="$artist-$alb" + yt-dlp "$link" -x --audio-format mp3 --no-playlist -o "$file.%(ext)s" + mid3v2 -a "$artist" "$file"* + mid3v2 -A "$alb" "$file"* + mid3v2 -t "$alb" "$file"* +done