Split out thmed dmenu as khomenu
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 22 Nov 2019 20:32:59 +0000 (15:32 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Fri, 22 Nov 2019 20:32:59 +0000 (15:32 -0500)
home/bin/khomenu [copied from home/bin/mpplay with 53% similarity]
home/bin/mpplay

similarity index 53%
copy from home/bin/mpplay
copy to home/bin/khomenu
index c8bb07b..8658ca4 100755 (executable)
@@ -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" \
+    $@
index c8bb07b..e31fbe3 100755 (executable)
@@ -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
This page took 0.02756 seconds and 4 git commands to generate.