rewrite to use dmenu
This commit is contained in:
parent
f07bb869af
commit
b8539e4b6b
13
README.md
13
README.md
|
@ -1,13 +1,6 @@
|
|||
Create a stream launcher with:
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
./new name url
|
||||
```
|
||||
URL of cam to be saved in individual text files in `cams` directory.
|
||||
|
||||
Launch an mpv cam feed with:
|
||||
Launch with `launch`.
|
||||
|
||||
```sh
|
||||
./cam/name [max-quality]
|
||||
```
|
||||
|
||||
Where `max-quality` is a height (e.g., `720` means a maximum quality of '720p').
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
#!/bin/sh
|
||||
"$(pwd)/cams/launcher.sh" "https://www.youtube.com/watch?v=Wi2h6BpRcns" "$1"
|
||||
https://www.youtube.com/watch?v=Wi2h6BpRcns
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
#!/bin/sh
|
||||
"$(pwd)/cams/launcher.sh" "https://www.youtube.com/watch?v=dSycFECDqME" "$1"
|
||||
https://www.youtube.com/watch?v=dSycFECDqME
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
#!/bin/sh
|
||||
"$(pwd)/cams/launcher.sh" "https://www.youtube.com/watch?v=Z591sNEtPgs" "$1"
|
||||
https://www.youtube.com/watch?v=Z591sNEtPgs
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
if [ -n "$2" ] ; then
|
||||
_max_quality="$2"
|
||||
else
|
||||
_max_quality="480"
|
||||
fi
|
||||
bspc rule --add mpv --one-shot state=tiled && mpv --ytdl-raw-options=format='best[height<='"$_max_quality"']' "$1" & disown
|
|
@ -1,2 +1 @@
|
|||
#!/bin/sh
|
||||
"$(pwd)/cams/launcher.sh" "https://www.youtube.com/watch?v=6B_6K-splRU" "$1"
|
||||
https://www.youtube.com/watch?v=6B_6K-splRU
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
#!/bin/sh
|
||||
"$(pwd)/cams/launcher.sh" "https://www.youtube.com/watch?v=G05wmWFDtSo" "$1"
|
||||
https://www.youtube.com/watch?v=G05wmWFDtSo
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
#!/bin/sh
|
||||
"$(pwd)/cams/launcher.sh" "https://www.youtube.com/watch?v=hO9Nkorupv4" "$1"
|
||||
https://www.youtube.com/watch?v=hO9Nkorupv4
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
#!/bin/sh
|
||||
"$(pwd)/cams/launcher.sh" "https://www.youtube.com/watch?v=0Ns1sNoUSaY" "$1"
|
||||
https://www.youtube.com/watch?v=0Ns1sNoUSaY
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
#!/bin/sh
|
||||
"$(pwd)/cams/launcher.sh" "https://www.youtube.com/watch?v=neo1hRZTO0s" "$1"
|
||||
https://www.youtube.com/watch?v=neo1hRZTO0s
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
_cam_dir='/home/ray/mpv-cam-views/'
|
||||
|
||||
_qualities="360\n480\n720\n1080"
|
||||
|
||||
_file="$(ls cams | dmenu)"
|
||||
_url="$(cat cams/$_file)"
|
||||
_quality="$(echo -e $_qualities | dmenu)"
|
||||
|
||||
echo "Playing '$_file' at $_quality ($_url)"
|
||||
|
||||
bspc rule --add mpv --one-shot state=tiled && mpv --ytdl-raw-options=format='best[height<='"$_quality"']' "$_url"
|
10
new
10
new
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
_cam_directory='cams'
|
||||
mkdir -p "$_cam_directory"
|
||||
|
||||
echo '#!/bin/sh' >> "$_cam_directory/$1"
|
||||
# FIXME fails when run from parent directory (see mars for poss solution)
|
||||
echo '"$(pwd)"'"/cams/launcher.sh \"$2\" "'"$1"' >> "$_cam_directory/$1"
|
||||
chmod +x "$_cam_directory/$1"
|
||||
|
Loading…
Reference in New Issue