diff options
author | Soispha <soispha@vhack.eu> | 2023-12-18 20:13:03 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-12-18 20:13:03 +0100 |
commit | 1b97796b3d701587f601f9997ef9b16b1cd99ad1 (patch) | |
tree | a347bc59f1df0270aa9c2f405d5e35b333faa1f9 | |
parent | fix(hm/pkgs/src/lyrics): Use less instead of cat (diff) | |
download | nixos-config-1b97796b3d701587f601f9997ef9b16b1cd99ad1.tar.gz nixos-config-1b97796b3d701587f601f9997ef9b16b1cd99ad1.zip |
feat(hm/pkgs/src/mpc-rm): Provide a command to remove current song
Diffstat (limited to '')
-rw-r--r-- | hm/soispha/pkgs/scripts.nix | 15 | ||||
-rwxr-xr-x | hm/soispha/pkgs/scripts/wrappers/mpc-rm | 14 |
2 files changed, 28 insertions, 1 deletions
diff --git a/hm/soispha/pkgs/scripts.nix b/hm/soispha/pkgs/scripts.nix index a8568d43..2bc92297 100644 --- a/hm/soispha/pkgs/scripts.nix +++ b/hm/soispha/pkgs/scripts.nix @@ -147,6 +147,18 @@ mpc-cli jq gnused + less + ; + }; + }; + mpc-rm-src = write_script { + name = "mpc-rm"; + path = "wrappers"; + dependencies = builtins.attrValues { + inherit + (pkgs) + mpc-cli + trash-cli ; }; }; @@ -166,12 +178,13 @@ dependencies = builtins.attrValues {inherit (pkgs) gawk expect yt-dlp;}; }; in [ + # llp-scr # TODO: see above aumo-scr con2pdf-scr fupdate-src ll-scr - # llp-scr # TODO: see above lyrics-src + mpc-rm-src neorg-scr screenshot_persistent-scr screenshot_temporary-scr diff --git a/hm/soispha/pkgs/scripts/wrappers/mpc-rm b/hm/soispha/pkgs/scripts/wrappers/mpc-rm new file mode 100755 index 00000000..5e206481 --- /dev/null +++ b/hm/soispha/pkgs/scripts/wrappers/mpc-rm @@ -0,0 +1,14 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.8.0" . %SHELL_LIBRARY_PATH + + +cd "$XDG_MUSIC_DIR" || die "No music dir!" +trash-put "$(mpc --format '%file%' current)"; +mpc del 0; + + + + +# vim: ft=sh |