#!/bin/bash WID=$(kdotool search --name "Telegram" | head -1) if [ -n "$WID" ]; then kdotool windowactivate "$WID" else org.telegram.desktop & fi