Browse Source

Add a share-window script

Samuel W. Flint 1 year ago
parent
commit
9b71637bb3
1 changed files with 33 additions and 0 deletions
  1. 33 0
      share-window

+ 33 - 0
share-window

@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+MODE=WINDOW
+WINDOW=pick
+POP_WIN=true
+
+while getopts "m:w:x" OPT
+do
+    case "${OPT}" in
+        m)
+            MODE="${OPTARG}"
+            ;;
+        w)
+            WINDOW="${OPTARG}"
+            ;;
+        x)
+            if [ "${POP_WIN}" == true ] ; then
+                POP_WIN=false
+            else
+                POP_WIN=true
+            fi
+    esac
+done
+
+if [ "${MODE}" == "WINDOW" ] ; then
+    tmu -e screenshare screenshare "x11vnc -id ${WINDOW} $X11VNCOPTS"
+else
+    tmu -e screenshare screenshare "x11vnc $X11VNCOPTS"
+fi
+
+if [ "${POP_WIN}" == true ] ; then
+    urxvto -e tmu -c screenshare
+fi