diff options
Diffstat (limited to 'pkgs/by-name/mp/mpc-rm')
-rwxr-xr-x | pkgs/by-name/mp/mpc-rm/mpc-rm.sh | 10 | ||||
-rw-r--r-- | pkgs/by-name/mp/mpc-rm/package.nix | 15 |
2 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/by-name/mp/mpc-rm/mpc-rm.sh b/pkgs/by-name/mp/mpc-rm/mpc-rm.sh new file mode 100755 index 00000000..94e0634b --- /dev/null +++ b/pkgs/by-name/mp/mpc-rm/mpc-rm.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH + +cd "$XDG_MUSIC_DIR" || die "No music dir!" +trash-put "$(mpc --format '%file%' current)" +mpc del 0 + +# vim: ft=sh diff --git a/pkgs/by-name/mp/mpc-rm/package.nix b/pkgs/by-name/mp/mpc-rm/package.nix new file mode 100644 index 00000000..6b7e2ead --- /dev/null +++ b/pkgs/by-name/mp/mpc-rm/package.nix @@ -0,0 +1,15 @@ +{ + sysLib, + mpc-cli, + trash-cli, +}: +sysLib.writeShellScript { + name = "mpc-rm"; + src = ./mpc-rm.sh; + generateCompletions = false; + keepPath = false; + dependencies = [ + mpc-cli + trash-cli + ]; +} |