mirror of https://github.com/mitchell/dotfiles.git
Add ytmpv function and scripts folder
This commit is contained in:
parent
1604fd862e
commit
ff4007d988
|
@ -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
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/sh
|
||||
kitty tmux new-session -s jmpv jellyfin-mpv-shim
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env fish
|
||||
redisco
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/sh
|
||||
kitty fish -c ytmpv
|
5
sync
5
sync
|
@ -56,6 +56,10 @@ function sync_terminal_env
|
|||
mkdir ~/.config
|
||||
end
|
||||
|
||||
if ! test -e ~/code/scripts
|
||||
mkdir -p ~/code/scripts
|
||||
end
|
||||
|
||||
rsync -aP ./.config/fish ~/.config/
|
||||
and rsync -aP ./.config/nvim ~/.config/
|
||||
and rsync -aP ./.tmux-line.conf ~/
|
||||
|
@ -63,6 +67,7 @@ function sync_terminal_env
|
|||
and rsync -aP ./.vim ~/
|
||||
and rsync -aP ./.vimrc ~/
|
||||
and rsync -aP ./.taskrc ~/
|
||||
and rsync -aP ./scripts/ ~/code/scripts/
|
||||
end
|
||||
|
||||
function sync_desktop_env -a uname
|
||||
|
|
Loading…
Reference in New Issue