From e7e14e894202b6757400797c0ca1ea6216967cf8 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Thu, 6 Jul 2023 13:07:22 +0530 Subject: damb: update icon and make it a var --- damb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'damb') diff --git a/damb b/damb index 61167c2..a4b9af5 100755 --- a/damb +++ b/damb @@ -5,13 +5,14 @@ amb_dir="$HOME/.local/share/damb" pid_file="${XDG_RUNTIME_DIR:-${TMPDIR:-/tmp}}/damb.pid" config_dir="$HOME/.config/damb" menu="wmenu" +ico="󰎆 " die() { : "${1:?}" command -v notify-send > /dev/null && - notify-send " damb" "$1" + notify-send "${ico} damb" "$1" printf "\033[31;1merr: %b\033[0m\n" "$1" exit "${2:-1}" @@ -31,7 +32,7 @@ dep_check() get_opt() { - printf "select\nlinks\nrandom\nstream\nstop" | "$menu" -p " " + printf "select\nlinks\nrandom\nstream\nstop" | "$menu" -p "$ico" } get_ambs() @@ -42,7 +43,7 @@ get_ambs() get_link() { grep -v "^#.*$" "$config_dir"/links | - grep "$(grep -v "^#.*$" "$config_dir"/links | cut -d '=' -f1 | "$menu" -p " " -l 25)" | + grep "$(grep -v "^#.*$" "$config_dir"/links | cut -d '=' -f1 | "$menu" -p "$ico" -l 25)" | cut -d '=' -f2 | tr -d ' ' } @@ -56,7 +57,7 @@ main() case "$(get_opt)" in select) dep_check "ffplay" - ffplay -volume 20 -nodisp -loop 0 "$amb_dir/$(get_ambs | "$menu" -p " " -l 25)" & + ffplay -volume 20 -nodisp -loop 0 "$amb_dir/$(get_ambs | "$menu" -p "$ico" -l 25)" & echo "$!" >> "$pid_file" ;; links) -- cgit v1.2.3