From: Siraaj Khandkar Date: Fri, 22 Nov 2019 20:32:59 +0000 (-0500) Subject: Split out thmed dmenu as khomenu X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=5fd6cb5cf3cd50337b55b5c78dc8b64e13f0e625;p=khome.git Split out thmed dmenu as khomenu --- diff --git a/home/bin/mpplay b/home/bin/khomenu similarity index 53% copy from home/bin/mpplay copy to home/bin/khomenu index c8bb07b..8658ca4 100755 --- a/home/bin/mpplay +++ b/home/bin/khomenu @@ -11,19 +11,12 @@ BG_NORM='#3a3a3a' FG_NORM='#dcdccc' BG_SELECTED="$BG_NORM" FG_SELECTED='#72d5a3' -LINES=60 -path=$( - mpc listall | dmenu \ - -i \ - -l "$LINES" \ - -fn "$FONT" \ - -nb "$BG_NORM" \ - -nf "$FG_NORM" \ - -sb "$BG_SELECTED" \ - -sf "$FG_SELECTED" -) - -mpc insert "$path" -mpc play -mpc next +dmenu \ + -i \ + -fn "$FONT" \ + -nb "$BG_NORM" \ + -nf "$FG_NORM" \ + -sb "$BG_SELECTED" \ + -sf "$FG_SELECTED" \ + $@ diff --git a/home/bin/mpplay b/home/bin/mpplay index c8bb07b..e31fbe3 100755 --- a/home/bin/mpplay +++ b/home/bin/mpplay @@ -2,28 +2,8 @@ set -e -# TODO: Get theme-appropriate font and colors from some central config file. - -FONT_NAME='terminus' -FONT_SIZE=32 -FONT="$FONT_NAME:pixelsize=$FONT_SIZE:antialias=false:autohint=true" -BG_NORM='#3a3a3a' -FG_NORM='#dcdccc' -BG_SELECTED="$BG_NORM" -FG_SELECTED='#72d5a3' LINES=60 -path=$( - mpc listall | dmenu \ - -i \ - -l "$LINES" \ - -fn "$FONT" \ - -nb "$BG_NORM" \ - -nf "$FG_NORM" \ - -sb "$BG_SELECTED" \ - -sf "$FG_SELECTED" -) - -mpc insert "$path" +mpc listall | khomenu -l "$LINES" | mpc insert mpc play mpc next