1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-19 05:12:47 +00:00
dotfiles/.local/bin/acmus

34 lines
657 B
Plaintext
Raw Normal View History

2020-09-14 15:35:51 +00:00
#!/usr/bin/fish
cd ~/Music/ACMUS
#set rofi rofi -sort -
if test "$argv"
if test -d "$argv"
cd "$argv"
else
set num (ls -d */ | sed -n 's/\(.\)[^ ]* */\L\1/g;/'"$argv"'/=')
set dir (ls -d */)
cd ./$dir[$num]
end
else
cd (ls -d */ |cut -f1 -d/ | eval "$rofi"dmenu -i)
end
xargs kill (pgrep (basename (status -f)) | grep -v $fish_pid) < ../.p
if not test (dirname $PWD) = (dirname (realpath (status -f)))
exit
end
if test (basename $PWD) = Kill
exit
end
while echo
mpv --no-video --loop (date +%H)* &\
jobs -p > ../.p &\
sleep (math 3600 - (date +%s) % 3600)
xargs kill < ../.p
end