diff options
Diffstat (limited to 'dotfiles/.local/bin/ddtelegram')
-rwxr-xr-x | dotfiles/.local/bin/ddtelegram | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/ddtelegram b/dotfiles/.local/bin/ddtelegram new file mode 100755 index 0000000..8ddff22 --- /dev/null +++ b/dotfiles/.local/bin/ddtelegram @@ -0,0 +1,12 @@ +#!/bin/sh + +if pidof telegram-desktop > /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 + |