eww-toggle-systray 316 B

12345678910111213141516171819
  1. #!/usr/bin/env zsh
  2. local config_flags=()
  3. if ((${#} >= 1)); then
  4. config_flags+=("-c" "${1}")
  5. fi
  6. local value="$(eww ${config_flags} get show-systray)"
  7. case "${value}" in
  8. 'false')
  9. value='true'
  10. ;;
  11. *)
  12. value='false'
  13. ;;
  14. esac
  15. eww ${config_flags} update show-systray="${value}"