aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/ddtelegram
blob: cc5028d30b3b505df5682181e727aaa20953a55a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

if pidof telegram-desktop-bin > /dev/null; then
    if [ -z $(swaymsg -t get_tree | grep -A 1 'telegramdesktop' | tail -n 1 | grep 'true') ]; then
        swaymsg '[app_id="telegramdesktop"] scratchpad show'
    else
        swaymsg '[app_id="telegramdesktop"] move scratchpad'
    fi
else
    telegram-desktop
fi