dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit e03ffcf33110131128ab124547b39d2f5be0a4f1
parent 06bcb3f1d319a2de22835e29341a4e53d6759f14
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 12 Jun 2020 11:12:20 +0200

Prefer video1 over video0 if available

Diffstat:
M.local/bin/videotoggle | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/.local/bin/videotoggle b/.local/bin/videotoggle @@ -1,9 +1,13 @@ #!/bin/sh -# remember to chown ad /dev/video0 +# remember `chmod g+rw /dev/video[01]` + +videoopts="-s 320" + if pgrep video >/dev/null 2>&1; then pkill video else - nohup video -s 320 >/dev/null 2>&1 & + nohup sh -c 'video -f /dev/video1 $videoopts || video $videoopts' \ + >/dev/null 2>&1 & sleep 0.5 xdotool click 1 fi