summaryrefslogtreecommitdiff
path: root/.config/wmii-hg/wmiirc
blob: 6fd348f35c09f0768dae8eec4f44a3d17f7f2f56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
unset WMII_NAMESPACE
unset WMII_DIR

if [[ -z $_PATH ]]; then
	export _PATH="$PATH"
	export PATH="$WMII_CONFPATH:$PATH"
fi

. include.sh

wmiir xwrite /event WmiircQuit # close any existing wmiirc's

Event WmiircStart
# Notify systemd that we're ready
if [ -S "$NOTIFY_SOCKET" ]; then
	echo READY=1 | socat STDIO UNIX-SENDTO:"$NOTIFY_SOCKET"
fi

trap "Event Quit" EXIT

while read -r event; do
	Event $event
done < <(wmiir read /event 2>/dev/null)