summaryrefslogtreecommitdiff
path: root/.local/bin/camtoggle
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/camtoggle')
-rwxr-xr-x.local/bin/camtoggle5
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)