about summary refs log tree commit diff stats
path: root/hm/soispha/pkgs/scripts/wrappers/mpc-fav.sh
blob: f9107ff6488e23cd2ac0a843be6557ba4b59e650 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env dash

# shellcheck source=/dev/null
SHELL_LIBRARY_VERSION="2.0.13" . %SHELL_LIBRARY_PATH

FAV_DIR="$XDG_MUSIC_DIR/playlists/favourites";

cd "$XDG_MUSIC_DIR" || die "No music dir!";

[ -d "$FAV_DIR" ] || mkdir --parents "$FAV_DIR";

ln -sr "$(mpc --format '%file%' current)" "$FAV_DIR/" || die "Link failed!";


# vim: ft=sh