dotfiles

regexghost dotfiles and scripts
git clone https://git.regexghost.com/dotfiles.git
Log | Files | Refs | README

commit 6b610205e29e016e7c90915cdd3829b0ba6f523d
parent 2c5f0ea754c8e4f859d127a391a41a3aab1ce8db
Author: regexghost <dev@regexghost.com>
Date:   Wed, 19 Aug 2026 21:58:44 +0100

check if running in terminal in queue-vid.sh, so it doesn't send notifications when invoked manually (outside newsraft)

Diffstat:
Mdotfiles/.config/newsraft/queue-vid.sh | 15++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/dotfiles/.config/newsraft/queue-vid.sh b/dotfiles/.config/newsraft/queue-vid.sh @@ -1,6 +1,15 @@ #!/bin/sh LOC="${HOME}/Videos/YouTube/toDownload" + +notify () { + if [ -t 1 ]; then + echo "$1" + else + notify-send "$1" + fi +} + [ -d "$LOC" ] || mkdir -p "$LOC" [ -d "$LOC/Shorts" ] || mkdir "$LOC/Shorts" [ -d "$LOC/Videos" ] || mkdir "$LOC/Videos" @@ -13,11 +22,11 @@ elif echo "$1" | grep -q "youtube.com/shorts"; then setsid yt-data "$1" > "${LOC}/Shorts/${id}.txt" & elif echo "$1" | grep -q ".mp3"; then echo "$1" >> "${HOME}/Videos/Podcasts/toDownload.txt" - notify-send "Podcast Queued" + notify "Podcast Queued" exit else - notify-send "Not a video or podcast" + notify "Not a video or podcast" exit fi -notify-send "Video Queued" +notify "Video Queued"