aboutsummaryrefslogtreecommitdiff
path: root/damb
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-08-01 09:54:21 +0530
committersinanmohd <sinan@firemail.cc>2023-08-01 13:56:48 +0530
commiteb685ec5d22a914cb4d46553fce16aea2ea95899 (patch)
tree571fc5719ac93ef8db32b363ff10060c88cc77a8 /damb
parentc1c45be404683ed20011eebe0c18827bf686147b (diff)
damb: code clean up
Diffstat (limited to 'damb')
-rwxr-xr-xdamb8
1 files changed, 4 insertions, 4 deletions
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)" &