#!/bin/sh # Wait for fcitx to startup for i in $(seq 30); do if fcitx-remote &> /dev/null; then sogou-qimpanel $@ echo 'sogou-qimpanel started' exit else sleep 1 fi done echo 'sogou-qimpanel failed to start: fcitx not running' exit 1