AEROSPACE-TEST(1)

πŸ“¦ version 0.21.3-Beta, in nixpkgs unstable

✨ AEROSPACE-TEST πŸ’… (a.k.a. the aerospace-test manual page, section 1 of the AeroSpace Manual)

okay bestie, buckle up πŸŽ€ β€” this is aerospace-test, the Condition evaluation utility, and honestly it's giving tiny-but-mighty main character energy.


🌸 NAME 🌸

aerospace-test β€” Condition evaluation utility ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

aerospace test [-h|--help] <lhs> = <rhs>
aerospace test [-h|--help] <lhs> ~= <rhs>

πŸ’– DESCRIPTION πŸ’–

Condition evaluation utility. Yes, that's literally the whole tagline, and no, it doesn't need more, it ate.

So here's the vibe: the test utility evaluates the expression, and if it evaluates to true, it returns a zero (true) exit status πŸŽ‰; otherwise it returns 1 (false) 😭.

The utility is inspired by the builtin /bin/test utility β€” like, it's lowkey the same idea, but make it AeroSpace.

  • <lhs> = <rhs> β€” Tests that <lhs> equals to <rhs> πŸ‘―
  • <lhs> ~= <rhs> β€” Tests that <lhs> contains case insensitive <rhs> regex πŸ”. The command fails if <lhs> is not a string πŸ’€

🌈 EXAMPLES 🌈

Test if the application ID equals to Chrome:

aerospace test %{app-bundle-id} = com.google.Chrome

Test if the application name contains "chrome" (case insensitive):

aerospace test %{app-name} ~= chrome

see? iconic. no notes. 🫢

⭐ ARGUMENTS ⭐

  • <lhs> β€” The left hand side of the expression. And listen, the left hand side must be one of the interpolation variables (see below) β€” that's not a suggestion, that's the rule πŸ‘‘
  • <rhs> β€” An integer, a boolean (true/false), a regex, or just a plain string. The way the expression is interpreted depends on the type of <lhs> and the infix operator 🧠✨

🧚 INTERPOLATION VARIABLES 🧚

these are the little %{...} cuties you plug into <lhs> β€” collect them all πŸ’…

  • %{window-id} β€” Number. Window unique ID
  • %{window-title} β€” String. Window title
  • %{window-is-fullscreen} β€” Boolean. Is window in fullscreen by aerospace fullscreen command
  • %{window-layout} β€” String. An alias for %{window-parent-container-layout}
  • %{window-parent-container-layout} β€” String. The layout (v_tiles, h_tiles, v_accordion, h_accordion, floating) of the window’s parent container.
  • %{app-bundle-id} β€” String. Application unique identifier. Bundle ID <https://developer.apple.com/documentation/appstoreconnectapi/bundle_ids>
  • %{app-name} β€” String. Application name
  • %{app-pid} β€” Number. UNIX process identifier <https://en.wikipedia.org/wiki/Process_identifier>
  • %{app-exec-path} β€” String. Application executable path
  • %{app-bundle-path} β€” String. Application bundle path
  • %{workspace} β€” String. Name of the belonging workspace
  • %{workspace-is-focused} β€” Boolean. true if the workspace has focus
  • %{workspace-is-visible} β€” Boolean. true if the workspace is visible. A workspace can be visible but not focused in a multi-monitor setup πŸ‘€
  • %{workspace-root-container-layout} β€” String. The layout (v_tiles, h_tiles, v_accordion, h_accordion) of the workspace the window belongs to.
  • %{monitor-id} β€” 1-based Number. Sequential number of the belonging monitor.
  • %{monitor-appkit-nsscreen-screens-id} β€” 1-based index of the belonging monitor in NSScreen.screens array. Useful for integration with other tools that might be using NSScreen.screens ordering (like sketchybar). πŸ–₯️
  • %{monitor-name} β€” String. Name of the belonging monitor
  • %{monitor-is-main} β€” Boolean. true if the monitor is main.

πŸŽ€ EXIT CODES πŸŽ€

  • 0 β€” The expression has evaluated to true. slay! πŸŽ‰
  • 1 β€” The expression has evaluated to false. it's giving flop πŸ˜”
  • >1 β€” An error occurred. For instance, when <rhs> type doesn’t match <lhs> type, or if the test subcommand couldn’t be parsed. πŸ’€ not the parse error

πŸ”₯ RESOURCES πŸ”₯

πŸ™ˆ BUGS πŸ™ˆ

Bugs can be reported to <https://github.com/nikitabobko/AeroSpace/discussions/categories/potential-bugs> πŸ›

Maintainers will move verified bugs to <https://github.com/nikitabobko/AeroSpace/issues> πŸ“Œ

πŸ’œ LICENSE πŸ’œ

Copyright Β© 2023 Nikita Bobko

Free use of this software is granted under the terms of the MIT License

You can find the full text of AeroSpace license and its dependencies in the 'legal' directory of the distributed zip archive. πŸ“

πŸ‘‘ AUTHOR πŸ‘‘

Nikita Bobko and contributors 🫢


and that's the whole page, bestie ✨ this one's from AeroSpace, dated 2026-07-16 β€” AEROSPACE-TEST(1), periodt. πŸ’…πŸŽ€

πŸ“¦ where this page comes from