From eb685ec5d22a914cb4d46553fce16aea2ea95899 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Tue, 1 Aug 2023 09:54:21 +0530 Subject: damb: code clean up --- damb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'damb') diff --git a/damb b/damb index e0f7534..3f4e620 100755 --- a/damb +++ b/damb @@ -2,7 +2,7 @@ # dir where audio files are stored amb_dir="$HOME/.local/share/damb" -pid_file="${XDG_RUNTIME_DIR:-${TMPDIR:-/tmp}}/damb.pid" +pid_file="${XDG_RUNTIME_DIR:-${TMPDIR:-/tmp}}/damb.pids" config_dir="$HOME/.config/damb" menu="wmenu" ico="󰎆 " @@ -30,9 +30,9 @@ dep_check() unset dep } -get_opt() +menu_opt() { - printf "select\nlinks\nstream\nstop" | "$menu" -p "$ico" + printf "%s\n" "select" "links" "stream" "stop" | "$menu" -p "$ico" } get_ambs() @@ -54,7 +54,7 @@ main() dep_check "$menu" - case "$(get_opt)" in + case "$(menu_opt)" in select) dep_check "ffplay" ffplay -volume 20 -nodisp -loop 0 "$amb_dir/$(get_ambs | "$menu" -p "$ico" -l 25)" & -- cgit v1.2.3