From f575dadeefc6d8b58b3f13b12a315b25de2332b5 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 22 Feb 2019 16:39:58 -0500 Subject: [PATCH] note bloat gone; pix replaced with emojis --- .profile | 1 - .scripts/tools/ifinstalled | 2 +- .scripts/tools/note | 8 -------- .scripts/tools/qndl | 4 ++-- .scripts/tools/transadd | 11 ++++------- 5 files changed, 7 insertions(+), 19 deletions(-) delete mode 100755 .scripts/tools/note diff --git a/.profile b/.profile index 7ea18c7..dbf59eb 100644 --- a/.profile +++ b/.profile @@ -13,7 +13,6 @@ export REFER="$HOME/Documents/referbib" export SUDO_ASKPASS="$HOME/.scripts/tools/dmenupass" export NOTMUCH_CONFIG="$HOME/.config/notmuch-config" export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0" -export PIX="$HOME/.config/pix/" # less/man colors export LESS=-R 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" "$1 must be installed for this function." && exit 1 ;} +command -v "$1" >/dev/null || { notify-send "📦 $1 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."