Skip to content

Commit

Permalink
Accept dmenu arguments on the command line
Browse files Browse the repository at this point in the history
  • Loading branch information
cdown committed May 28, 2013
1 parent 6439bd8 commit 5f9dd71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mpdmenu
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/bin/sh

dmenu_args=( "$@" )
was_playing=0

d_artist() {
mpc list artist | sort -f | dmenu -p artist
mpc list artist | sort -f | dmenu -p artist "${dmenu_args[@]}"
}

d_album() {
local artist="$1"
{
echo "[ALL]"
mpc list album artist "$artist" | sort -f
} | dmenu -p album
} | dmenu -p album "${dmenu_args[@]}"
}

is_playing() {
Expand Down

0 comments on commit 5f9dd71

Please sign in to comment.