diff options
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/camtoggle | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.local/bin/camtoggle b/.local/bin/camtoggle index a71bdf7..07cfa2c 100755 --- a/.local/bin/camtoggle +++ b/.local/bin/camtoggle @@ -1,4 +1,5 @@ #!/bin/sh - -mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[0,4,6,8] | tail -n 1) +[ "$1" == "" ] && \ +mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[0,4,6,8] | tail -n 1) || \ +mpv --no-keepaspect-window --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video$1 | tail -n 1) # mpv --no-cache --no-osc --no-input-default-bindings --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1) |