Script searching mpd lib and playing selection
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 22 Nov 2019 00:14:24 +0000 (19:14 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Fri, 22 Nov 2019 00:14:24 +0000 (19:14 -0500)
home/.xbindkeysrc
home/bin/mpplay [new file with mode: 0755]

index b7bece5..5eca4dc 100644 (file)
 # Screenshot
 "screengrab -r"
     Print
+
+# Search mpd lib and play selection
+"mpplay"
+    Mod4+p
diff --git a/home/bin/mpplay b/home/bin/mpplay
new file mode 100755 (executable)
index 0000000..c8bb07b
--- /dev/null
@@ -0,0 +1,29 @@
+#! /bin/sh
+
+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 play
+mpc next
This page took 0.032088 seconds and 4 git commands to generate.