diff --git a/dotfiles/.local/bin/rdp b/dotfiles/.local/bin/rdp new file mode 100755 index 0000000..2f3df28 --- /dev/null +++ b/dotfiles/.local/bin/rdp @@ -0,0 +1,20 @@ +#!/bin/sh + +cleanup() { + echo "Ctrl+C pressed. Killing Xquartz..." + pkill Xquartz + exit 0 +} + +trap cleanup INT + +open -a "Xquartz" +while ! xdpyinfo -display "$DISPLAY"; do + sleep 0.1 +done +xfreerdp /u:$USER /p:$PASSWORD /v:$IP /auto-reconnect-max-retries:0 /size:1920x900 +clipboard + +echo "Killing Xquartz" +pkill Xquartz + +exit 0