initial commit

This commit is contained in:
Celso 2022-08-02 07:48:31 -03:00
commit adc11ba5f1
3 changed files with 8 additions and 0 deletions

3
display.awk Normal file
View File

@ -0,0 +1,3 @@
BEGIN{x="nigger"; y=1}
{if(x=="nigger"){buffer=$0;x=""}
else if(NR%3==0){print y" "buffer" |duration: "$0"|";x="nigger";y=y+1}}

1
select.awk Normal file
View File

@ -0,0 +1 @@
{if(NR==2+((x-1)*3)){print}}

4
ytsearchtompv.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
list="$(yt-dlp ytsearch5:"${1}" --get-title --get-id --get-duration)"
id="$(awk -v x=$(awk 'BEGIN{x="nigger"; y=1}{if(x=="nigger"){buffer=$0;x=""}else if(NR%3==0){print y" "buffer" |duration: "$0"|";x="nigger";y=y+1}}' <<< ${list} | dmenu -c -l 10 -bw 3 | awk '{print $1}') '{if(NR==2+((x-1)*3)){print}}' <<< "${list}")"
mpv "https://youtube.com/watch?v=${id}"