diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2020-12-11 18:52:10 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2020-12-11 19:02:21 +0300 |
commit | d74a5a26385ebb21903da26e3d239a4929c4a5b7 (patch) | |
tree | 0705be303bc69a05a73a0e8ecbc6ca6e0020fd84 /dotfiles/.local/bin/camtoggle | |
parent | 7cbd4c73ece6bc6b89d8b5c6febf6c3ead5de20a (diff) | |
download | swayrice-d74a5a26385ebb21903da26e3d239a4929c4a5b7.tar.gz swayrice-d74a5a26385ebb21903da26e3d239a4929c4a5b7.zip |
Screen share hack
Hack to be able to share the screen under certain apps such as Zoom* by
using v4l2loopback to create a fake webcam device to which wf-recorder
outputs the contents of the screen.
*Unfortunately because of the corona shit show my university requires to
use this Chinese piece of crap spyware. This Covid nonsense seriously
needs to end.
Diffstat (limited to 'dotfiles/.local/bin/camtoggle')
-rwxr-xr-x | dotfiles/.local/bin/camtoggle | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dotfiles/.local/bin/camtoggle b/dotfiles/.local/bin/camtoggle index 00fd201..a12fcb8 100755 --- a/dotfiles/.local/bin/camtoggle +++ b/dotfiles/.local/bin/camtoggle @@ -4,12 +4,14 @@ # If a second camera is present, use the second one camera="/dev/video0" [ -e /dev/video2 ] && camera="/dev/video2" +[ -n "$1" ] && camera="$1" pkill -f /dev/video || mpv \ --gpu-context=wayland \ + --profile=low-latency \ --no-osc \ --no-input-default-bindings \ --input-conf=/dev/null \ --geometry=-0-0 \ --autofit=25% \ - --title="mpvfloat" "$camera" + --title="mpvfloat" "av://v4l2:$camera" |