check if x11 or not

This commit is contained in:
2023-08-20 11:32:38 +05:00
parent 94e23dc226
commit b2e7765b13

View File

@ -1,5 +1,10 @@
#!/bin/bash #!/bin/bash
if [[ $XDG_SESSION_TYPE != "x11" ]]; then
echo "Unsupported session type: $XDG_SESSION_TYPE"
exit 1
fi
get_tg_window_id(){ get_tg_window_id(){
tg_window_id=$(wmctrl -lx | grep telegram-desktop | awk '{print $1}') tg_window_id=$(wmctrl -lx | grep telegram-desktop | awk '{print $1}')
} }