blob: 6fb144bb6c24c00fe588e6cedbf346a11b8e9bf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/zsh
#
# Start Pidgin and make sure, that the buddylist is shown.
#
# test for pidgin already running
(( `pgrep -xc pidgin` )) && return
# start pidgin in background
pidgin &
# wait for the DBus-Service to be available
# we use '--profile' because it renders nicer output
dbus-monitor --profile "interface=im.pidgin.purple.PurpleInterface" |
while read line; do
[[ $line =~ 'UpdateIdle$' ]] && break
# if the blist is automatically shown, we exit
# else we would move the focus, which is bad
[[ $line =~ 'GtkblistUnhiding$' ]] && return
done
# if we are here, pidgin is running and the blist is not yet visible
exec purple-send-async PurpleBlistSetVisible int32:1
|