summaryrefslogtreecommitdiff
path: root/.local/bin/camtoggle
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2020-10-29 19:25:33 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2020-10-29 19:25:33 -0400
commite381f1c560a775bff483f93a2d983092d5993a0a (patch)
treef731203cbb77883331a97f3d45297ac1f1134c7d /.local/bin/camtoggle
parent3a6235af3326589710a496c3d46e7b3241997fe5 (diff)
add arch linux news rss
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)