diff options
Diffstat (limited to 'bin/vncez')
| -rwxr-xr-x | bin/vncez | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/vncez b/bin/vncez index 068a199..f82f524 100755 --- a/bin/vncez +++ b/bin/vncez @@ -1,10 +1,11 @@ #!/bin/sh set -e +[ -n "$DEBUG" ] && set -x if [ -n "$1" ]; then printf "usage: %s\n" "$(basename "$0")" printf "\n" - printf "launches wayvnc(1), wshowkeys(1) and remmina(1)\n" + printf "launches a vnc server and client, creating a loopback X window\n" exit 2 fi @@ -13,16 +14,18 @@ if [ -n "$OUTPUT" ]; then server_args="-o ${OUTPUT}" fi -trap '{ printf "\n=> killing everything...\n"; pkill wayvnc; pkill gvncviewer; }' EXIT + +trap '{ printf "\n=> killing everything...\n"; }' INT +trap '{ killall -9 wayvnc gvncviewer; notify-send "stopped output mirror" "cleaned up viewer window and workspace"; }' EXIT # echo "=> starting wshowkeys" # swaymsg exec "wshowkeys -a bottom -a left -F 'Iosevka Sparkle 25' -t 1" >/dev/null echo "=> starting wayvnc" -swaymsg exec "wayvnc -c dmabuf -r ${server_args} 0.0.0.0" >/dev/null +swaymsg exec "wayvnc -r ${server_args} 0.0.0.0" echo "=> starting viewer" -swx -b none -S -F '1.0 tl' -- x11fy gvncviewer localhost +swx -w __vnc -- x11fy gvncviewer "0.0.0.0" -notify-send 'started screensharing' 'the vnc viewer window was moved to the scratchpad' +notify-send 'started output mirror' 'the vnc viewer X window was moved to new workspace\nyou can screen cast the desktop using it' while true; do sleep $((1024*1024)) done |