Skip to content

Commit

Permalink
xkb-group.sh: search for xkb-switch in build directories
Browse files Browse the repository at this point in the history
  • Loading branch information
grwlf committed Mar 3, 2016
1 parent 00dad39 commit e2fa28d
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions xkb-group.sh
Expand Up @@ -27,6 +27,17 @@ while test -n "$1" ; do
shift
done

XKBS=`which xkb-switch 2>/dev/null`
if ! test -e "$XKBS" ; then
XKBS=./xkb-switch
fi
if ! test -e "$XKBS" ; then
XKBS=./build/xkb-switch
fi
if ! test -e "$XKBS" ; then
die "xkb-switch not found"
fi

test -n "$lay1" || { die "error: LAY1 is empty, try --help"; }
test -n "$lay2" || { die "error: LAY2 is empty, try --help"; }

Expand All @@ -46,15 +57,15 @@ while read event arg <$FIFO ; do
esac
;;
user-asks-switch)
xkb-switch -s $next ;;
$XKBS -s $next ;;
*)
echo "unknown command: $event $arg" >&2
;;
esac
done &

echo layout-change `xkb-switch -p` >$FIFO
xkb-switch -W | while read l ;do
echo layout-change `$XKBS -p` >$FIFO
$XKBS -W | while read l ;do
echo "layout-change $l" >$FIFO
done &

Expand Down

0 comments on commit e2fa28d

Please sign in to comment.