summaryrefslogtreecommitdiffstats
path: root/.scripts
diff options
context:
space:
mode:
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/tools/ifinstalled2
-rwxr-xr-x.scripts/tools/note8
-rwxr-xr-x.scripts/tools/qndl4
-rwxr-xr-x.scripts/tools/transadd11
4 files changed, 7 insertions, 18 deletions
diff --git a/.scripts/tools/ifinstalled b/.scripts/tools/ifinstalled
index bbaaf11..0305f4f 100755
--- a/.scripts/tools/ifinstalled
+++ b/.scripts/tools/ifinstalled
@@ -1,3 +1,3 @@
#!/bin/sh
# If $1 command is not available, error code and notify.
-command -v "$1" >/dev/null || { notify-send -i "$PIX/larbs.svg" "<b>$1</b> must be installed for this function." && exit 1 ;}
+command -v "$1" >/dev/null || { notify-send "📦 <b>$1</b> must be installed for this function." && exit 1 ;}
diff --git a/.scripts/tools/note b/.scripts/tools/note
deleted file mode 100755
index 09186ea..0000000
--- a/.scripts/tools/note
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-# This is a general notification command for my own ease.
-# $1 should be a message
-# $2 is an optional image for notify-send
-# Echos content on terminal and if dunst is running, shows notification.
-
-[ -z "$2" ] || img="-i $2"
-echo "$1" && pgrep -x dunst >/dev/null && notify-send $img "$1"
diff --git a/.scripts/tools/qndl b/.scripts/tools/qndl
index ffe3647..a99d37e 100755
--- a/.scripts/tools/qndl
+++ b/.scripts/tools/qndl
@@ -2,10 +2,10 @@
# $1 is a url; $2 is a command
[ -z "$1" ] && exit
base="$(basename "$1")"
-notify-send -i "$PIX/dl.svg" "Queuing $base..."
+notify-send "⏳ Queuing $base..."
cmd="$2"
[ -z "$cmd" ] && cmd="youtube-dl --add-metadata"
idnum="$(tsp $cmd "$1")"
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
tsp -D "$idnum" mv "$base" "$realname"
-tsp -D "$idnum" notify-send -i "$PIX/check.svg" "$realname done."
+tsp -D "$idnum" notify-send "👍 $realname done."
diff --git a/.scripts/tools/transadd b/.scripts/tools/transadd
index 0ab4784..ad2ee7f 100755
--- a/.scripts/tools/transadd
+++ b/.scripts/tools/transadd
@@ -1,12 +1,9 @@
#!/bin/sh
-# Mimeapp script for adding torrent to transmission-daemon, but will also start
-# the daemon first if not running.
+# Mimeapp script for adding torrent to transmission-daemon, but will also start the daemon first if not running.
-# Optionally requires my `note` script. The sleep of 3 seconds is because the
-# transmission-daemon sometimes fails to take remote requests in its first
-# moments.
+# transmission-daemon sometimes fails to take remote requests in its first moments.
-pgrep -x transmission-da || (transmission-daemon && note "Starting daemon..." "$PIX/dl.svg" && sleep 3 && pkill -RTMIN+7 i3blocks)
+pgrep -x transmission-da || (transmission-daemon && notify-send "Starting transmission daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks)
-transmission-remote -a "$@" && note "Torrent added." "$PIX/dl.svg"
+transmission-remote -a "$@" && notify-send "🔽 Torrent added."