playshellsound is now a standalone script
This commit is contained in:
20
overlay/scripts/wm-controls/playshellsound.nix
Normal file
20
overlay/scripts/wm-controls/playshellsound.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "playshellsound";
|
||||
runtimeInputs = with pkgs; [
|
||||
alsa-utils
|
||||
pkgs.myScripts.runbg
|
||||
];
|
||||
text = ''
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: playshellsound <path/to/sound>"
|
||||
exit 1
|
||||
fi
|
||||
if scheck; then
|
||||
runbg aplay "$1"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user