Add eww-toggle-systray

This commit is contained in:
Alexander Rosenberg 2024-04-27 14:23:43 -07:00
parent 546fa520e8
commit db9e04378d
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
2 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,6 @@
#!/bin/sh #!/bin/sh
if [ "${#}" -gt 0 ]; then
config_flags="-c ${1}"
fi
fcitx5-remote -t fcitx5-remote -t
eww update fcitx5-state="$(fcitx5-remote)" eww ${config_flags} update fcitx5-state="$(fcitx5-remote)"

18
eww-toggle-systray Executable file
View File

@ -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}"