diff options
Diffstat (limited to '.config/wmii-hg/wmiirc')
-rwxr-xr-x | .config/wmii-hg/wmiirc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc index a6bc4b4..6fd348f 100755 --- a/.config/wmii-hg/wmiirc +++ b/.config/wmii-hg/wmiirc @@ -1,15 +1,24 @@ #!/bin/bash -export _PATH="$PATH" -export PATH="$WMII_CONFPATH:$PATH" +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 -wmiir read /event 2>/dev/null | while read event; do +while read -r event; do Event $event -done +done < <(wmiir read /event 2>/dev/null) |