diff --git a/scripts/tginput.sh b/scripts/tginput.sh index 1764d99..c6f89ac 100755 --- a/scripts/tginput.sh +++ b/scripts/tginput.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [[ $XDG_SESSION_TYPE != "x11" ]]; then + echo "Unsupported session type: $XDG_SESSION_TYPE" + exit 1 +fi + get_tg_window_id(){ tg_window_id=$(wmctrl -lx | grep telegram-desktop | awk '{print $1}') }