Gen 423: Converted shell scripts into nix files
This commit is contained in:
16
glasshouse-laptop/home/scripts/music.nix
Normal file
16
glasshouse-laptop/home/scripts/music.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ pkgs }:
|
||||
|
||||
{
|
||||
music = pkgs.writeShellScriptBin "music" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (ps aux | grep audacious | grep -v grep > /dev/null) then
|
||||
pkill audacious
|
||||
else
|
||||
hyprctl dispatch exec "[workspace 5 silent] audacious -t ~/Music/playlist"
|
||||
sleep 0.5
|
||||
audtool playlist-repeat-status |grep "on" || audtool playlist-repeat-toggle
|
||||
audtool playlist-shuffle-status|grep "on" || audtool playlist-shuffle-toggle
|
||||
fi
|
||||
'');
|
||||
}
|
||||
Reference in New Issue
Block a user