diff --git a/eww-fcitx5-toggle b/eww-fcitx5-toggle index 2364176..b31dc2b 100755 --- a/eww-fcitx5-toggle +++ b/eww-fcitx5-toggle @@ -1,3 +1,6 @@ #!/bin/sh +if [ "${#}" -gt 0 ]; then + config_flags="-c ${1}" +fi fcitx5-remote -t -eww update fcitx5-state="$(fcitx5-remote)" +eww ${config_flags} update fcitx5-state="$(fcitx5-remote)" diff --git a/eww-toggle-systray b/eww-toggle-systray new file mode 100755 index 0000000..5ca6156 --- /dev/null +++ b/eww-toggle-systray @@ -0,0 +1,18 @@ +#!/usr/bin/env zsh + +local config_flags=() +if ((${#} >= 1)); then + config_flags+=("-c" "${1}") +fi + +local value="$(eww ${config_flags} get show-systray)" +case "${value}" in + 'false') + value='true' + ;; + *) + value='false' + ;; +esac + +eww ${config_flags} update show-systray="${value}"