add screen-share-sway script

* based on a guide to setup proper screen sharing on sway
  ref: https://github.com/hw0lff/screen-share-sway
This commit is contained in:
surtur 2021-02-17 23:47:43 +01:00
parent 7aa1e113f5
commit 3eeb1e435e
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

43
bin/screen-share-sway Executable file

@ -0,0 +1,43 @@
#!/bin/bash
# Screen Sharing with OBS Studio on Fedora and Sway
# ref: https://github.com/hw0lff/screen-share-sway
grep -q "alias obs" ~/.zshrc || echo 'alias obs="QT_QPA_PLATFORM=xcb obs"' >> ~/.zshrc
cd ~/utils
dotfiles/bin/v4l2pls 0.12.5
# ref: https://github.com/obsproject/obs-studio/wiki/Install-Instructions#red-hatfedora-based-build-directions
git clone --recursive https://github.com/obsproject/obs-studio.git
cd ~/utils/obs-studio
git pull
git submodule update --recursive
mkdir -pv build && cd build
cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo make install
cd ~/utils
git clone https://github.com/CatxFish/obs-v4l2sink.git
cd obs-v4l2sink
git pull
mkdir -pv build && cd build
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=~/.local ..
make -j4
make install
cd ~/utils/obs-v4l2sink
cd ~/utils
hg clone https://hg.sr.ht/~scoopta/wlrobs
cd wlrobs
hg pull
meson build
ninja -C build
mkdir -pv ~/.config/obs-studio/plugins/wlrobs/bin/64bit
cp -v build/libwlrobs.so ~/.config/obs-studio/plugins/wlrobs/bin/64bit