#!/bin/sh

# NOTE: ulauncher-toggle is no longer needed.
# It's better to use these two gapplication commands directly.

while [ "$#" -gt 0 ]
do
  arg="$1"
  shift
  if [ "$arg" = "--query" ] || [ "$arg" = "-q" ]; then
    gapplication action io.ulauncher.Ulauncher set-query "'$1'"
    exit 0
  fi
done

gapplication launch io.ulauncher.Ulauncher
