share-window 627 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env bash
  2. MODE=WINDOW
  3. WINDOW=pick
  4. POP_WIN=true
  5. while getopts "m:w:x" OPT
  6. do
  7. case "${OPT}" in
  8. m)
  9. MODE="${OPTARG}"
  10. ;;
  11. w)
  12. WINDOW="${OPTARG}"
  13. ;;
  14. x)
  15. if [ "${POP_WIN}" == true ] ; then
  16. POP_WIN=false
  17. else
  18. POP_WIN=true
  19. fi
  20. esac
  21. done
  22. if [ "${MODE}" == "WINDOW" ] ; then
  23. tmu -e screenshare screenshare "x11vnc -id ${WINDOW} $X11VNCOPTS"
  24. else
  25. tmu -e screenshare screenshare "x11vnc $X11VNCOPTS"
  26. fi
  27. if [ "${POP_WIN}" == true ] ; then
  28. urxvto -e tmu -c screenshare
  29. fi