Fish: add acmus to bin, fix wallp

This commit is contained in:
Phantop 2020-09-14 11:35:51 -04:00
parent 26f7354585
commit d4e1e23469
2 changed files with 36 additions and 2 deletions

View File

@ -1,3 +1,4 @@
function wallp -w readlink
gsettings set org.gnome.desktop.background picture-uri "file://(readlink -f $argv)"
# Defined in /tmp/fish.UKii9e/wallp.fish @ line 2
function wallp --wraps=readlink
gsettings set org.gnome.desktop.background picture-uri file://(readlink -f $argv)
end

33
.local/bin/acmus Executable file
View File

@ -0,0 +1,33 @@
#!/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