Add mpdrandom script and bind it

This commit is contained in:
Wiktor Zykubek 2020-06-01 13:52:49 +02:00
parent 5b393d9e74
commit c9fb43a443
2 changed files with 16 additions and 1 deletions

View File

@ -15,9 +15,11 @@ super + a; {g,k,l,i}
{gimp,keepassxc,libreoffice,inkscape} {gimp,keepassxc,libreoffice,inkscape}
super + {_,ctrl +} m super + {_,ctrl +} m
rofi-mpd {-a,-s} rofi-mpd {-a,-s} && refbar
super + apostrophe super + apostrophe
mpdqueue mpdqueue
XF86Tools
mpdrandom
{Prior,super + x} {Prior,super + x}
slock slock
super + z super + z

13
.local/bin/scripts/mpdrandom Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# Add random song to mpd queue.
song="$(mpc listall | shuf -r -n 1)"
mpc add "$song"
notify-send -u normal "MPD added random song" "$(
mpc -f "%artist% - %title%" find filename "$song"
)"
mpc play>/dev/null