check if x11 or not

This commit is contained in:
Shihaam Abdul Rahman 2023-08-20 11:32:38 +05:00
parent 94e23dc226
commit b2e7765b13
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636

View File

@ -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}')
}