dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f575dadeefc6d8b58b3f13b12a315b25de2332b5
parent f3d33a0b67ebc1f15a12673645935a5cbde0300d
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Fri, 22 Feb 2019 16:39:58 -0500

note bloat gone; pix replaced with emojis

Diffstat:
M.profile | 1-
M.scripts/tools/ifinstalled | 2+-
D.scripts/tools/note | 8--------
M.scripts/tools/qndl | 4++--
M.scripts/tools/transadd | 11++++-------
5 files changed, 7 insertions(+), 19 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -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 @@ -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."