summaryrefslogtreecommitdiff
path: root/scripts/enable-ibus-test
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/enable-ibus-test')
-rwxr-xr-xscripts/enable-ibus-test5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/enable-ibus-test b/scripts/enable-ibus-test
index b0a32cc..d95e296 100755
--- a/scripts/enable-ibus-test
+++ b/scripts/enable-ibus-test
@@ -5,7 +5,10 @@ state_dir=${XDG_STATE_HOME:-$HOME/.local/state}/parley
dropin_dir=${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user/parley.service.d
mkdir -p "$state_dir" "$dropin_dir"
-previous=$(ibus engine)
+previous=$(ibus engine 2>/dev/null || true)
+if [[ -z "$previous" ]]; then
+ previous=xkb:us::eng
+fi
if [[ "$previous" != "parley" ]]; then
printf '%s\n' "$previous" > "$state_dir/previous-ibus-engine"
fi