diff options
author | sinanmohd <sinan@firemail.cc> | 2023-08-01 09:54:21 +0530 |
---|---|---|
committer | sinanmohd <sinan@firemail.cc> | 2023-08-01 13:56:48 +0530 |
commit | eb685ec5d22a914cb4d46553fce16aea2ea95899 (patch) | |
tree | 571fc5719ac93ef8db32b363ff10060c88cc77a8 /damb | |
parent | c1c45be404683ed20011eebe0c18827bf686147b (diff) |
damb: code clean up
Diffstat (limited to 'damb')
-rwxr-xr-x | damb | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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)" & |