Add ytmpv function and scripts folder

This commit is contained in:
mitchell 2022-02-28 03:13:49 -05:00
parent 1604fd862e
commit ff4007d988
5 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,34 @@
function ytmpv -d 'A script to help queue youtube videos on MPV'
if not set -Uq _ytmpv_video_queue
set -U _ytmpv_video_queue
end
while read -P 'url(s)/command (play)> ' -l video
switch $video
case cl clear
clear
case c copy
set -l video (fromcb)
set -U _ytmpv_video_queue $_ytmpv_video_queue (string split ' ' $video)
case d destroy
set -Ue _ytmpv_video_queue
case f fg
tmux attach -t ytmpv
case h help
functions ytmpv
case l list
string split ' ' $_ytmpv_video_queue
case p play
break
case q quit
return
case '*'
test -z "$video"; and break
set -U _ytmpv_video_queue $_ytmpv_video_queue (string split ' ' $video)
end
end
tmux attach -t ytmpv
tmux new-session -s ytmpv -- mpv --save-position-on-quit $_ytmpv_video_queue
ytmpv
end

2
scripts/jmpv Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/sh
kitty tmux new-session -s jmpv jellyfin-mpv-shim

2
scripts/redisco Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env fish
redisco

2
scripts/ytmpv Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/sh
kitty fish -c ytmpv

5
sync
View File

@ -56,6 +56,10 @@ function sync_terminal_env
mkdir ~/.config mkdir ~/.config
end end
if ! test -e ~/code/scripts
mkdir -p ~/code/scripts
end
rsync -aP ./.config/fish ~/.config/ rsync -aP ./.config/fish ~/.config/
and rsync -aP ./.config/nvim ~/.config/ and rsync -aP ./.config/nvim ~/.config/
and rsync -aP ./.tmux-line.conf ~/ and rsync -aP ./.tmux-line.conf ~/
@ -63,6 +67,7 @@ function sync_terminal_env
and rsync -aP ./.vim ~/ and rsync -aP ./.vim ~/
and rsync -aP ./.vimrc ~/ and rsync -aP ./.vimrc ~/
and rsync -aP ./.taskrc ~/ and rsync -aP ./.taskrc ~/
and rsync -aP ./scripts/ ~/code/scripts/
end end
function sync_desktop_env -a uname function sync_desktop_env -a uname