diff --git a/commands.html b/commands.html index 0739da23..d3123dc6 100644 --- a/commands.html +++ b/commands.html @@ -513,38 +513,41 @@

AeroSpace Commands

Table of Contents
@@ -591,11 +594,24 @@

AeroSpace Commands

-

1. close

+

1. balance-sizes

-
close [-h|--help] [--quit-if-last-window]
+
aerospace balance-sizes [-h|--help]
+
+
+
+

Balance sizes of all windows in the current workspace

+
+
+
+
+

2. close

+
+
+
+
aerospace close [-h|--help] [--quit-if-last-window]
@@ -623,11 +639,11 @@

-

2. close-all-windows-but-current

+

3. close-all-windows-but-current

-
close-all-windows-but-current [-h|--help] [--quit-if-last-window]
+
aerospace close-all-windows-but-current [-h|--help] [--quit-if-last-window]
@@ -651,11 +667,11 @@

-

3. enable

+

4. enable

-
enable [-h|--help] (on|off|toggle)
+
aerospace enable [-h|--help] (on|off|toggle)
@@ -670,11 +686,11 @@

-

4. exec-and-forget

+

5. exec-and-forget

-
exec-and-forget <bash-script>
+
aerospace exec-and-forget <bash-script>
@@ -705,15 +721,15 @@

-

5. flatten-workspace-tree

+

6. flatten-workspace-tree

-
flatten-workspace-tree [-h|--help]
+
aerospace flatten-workspace-tree [-h|--help]
-

Flatten the tree of currently focused workspace.

+

Flatten the tree of the focused workspace

The command is useful when you messed up with your layout, and it’s easier to "reset" it and start again.

@@ -721,13 +737,13 @@

-

6. focus

+

7. focus

-
focus [-h|--help] [--boundaries <boundary>]
-      [--boundaries-action <action>] (left|down|up|right)
-focus [-h|--help] --window-id <window-id>
+
aerospace focus [-h|--help] [--boundaries <boundary>]
+                [--boundaries-action <action>] [--ignore-floating] (left|down|up|right)
+aerospace focus [-h|--help] --window-id <window-id>
@@ -736,10 +752,9 @@

Contrary to i3, focus command doesn’t have a separate argument to focus floating windows. From focus command perspective, floating windows are part of the tree. -The floating window parent container is determined as the smallest tiling container that contains the center of the floating window.

-

-
-

This technique eliminates the need for an additional binding for floating windows.

+The floating window parent container is determined as the smallest tiling container that contains the center of the floating window. +The technique eliminates the need for an additional binding for floating windows. +This behavior can be disabled with --ignore-floating flag.

focus child|parent isn’t supported because the necessity of this operation is under the question. @@ -770,18 +785,54 @@

Focus the window with specified <window-id>

+
--ignore-floating
+
+

Don’t perceive floating windows as part of the tree. +It may be useful for more reliable scripting.

+

-

7. focus-monitor

+

8. focus-back-and-forth

+
+
+
+
aerospace focus-back-and-forth [-h|--help]
+
+
+
+

Switch between the current and previously focused elements back and forth. +The element is either a window or an empty workspace.

+
+
+

AeroSpace stores only one previously focused window in history, +which means that if you close the previous window, +focus-back-and-forth has no window to switch focus to. +In that case, the command will exit with non-zero exit code.

+
+
+

That’s why it may be preferred to combine focus-back-and-forth with workspace-back-and-forth:

+
+
+
+
aerospace focus-back-and-forth || aerospace workspace-back-and-forth
+
+
+ +
+
+
+

9. focus-monitor

-
focus-monitor [-h|--help] [--wrap-around] (left|down|up|right)
-focus-monitor [-h|--help] [--wrap-around] (next|prev)
-focus-monitor [-h|--help] <monitor-pattern>...
+
aerospace focus-monitor [-h|--help] [--wrap-around] (left|down|up|right)
+aerospace focus-monitor [-h|--help] [--wrap-around] (next|prev)
+aerospace focus-monitor [-h|--help] <monitor-pattern>...
@@ -809,7 +860,7 @@

(left|down|up|right)
-

Focus monitor in direction relative to the currently focused monitor

+

Focus monitor in direction relative to the focused monitor

(next|prev)
@@ -825,15 +876,15 @@

-

8. fullscreen

+

10. fullscreen

-
fullscreen [-h|--help] [on|off]
+
aerospace fullscreen [-h|--help] [on|off]
-

Toggle the fullscreen mode for the currently focused window

+

Toggle the fullscreen mode for the focused window

Switching to a different tiling window within the same workspace while the current focused window is in fullscreen mode results in the fullscreen window exiting fullscreen mode.

@@ -864,15 +915,15 @@

-

9. join-with

+

11. join-with

-
join-with [-h|--help] (left|down|up|right)
+
aerospace join-with [-h|--help] (left|down|up|right)
-

Put the currently focused window and the nearest node in the specified direction under a common parent container

+

Put the focused window and the nearest node in the specified direction under a common parent container

EXAMPLES

@@ -916,11 +967,11 @@

-

10. layout

+

12. layout

-
layout [-h|--help] (h_tiles|v_tiles|h_accordion|v_accordion|tiles|accordion|horizontal|vertical|tiling|floating)...
+
aerospace layout [-h|--help] (h_tiles|v_tiles|h_accordion|v_accordion|tiles|accordion|horizontal|vertical|tiling|floating)...
@@ -982,15 +1033,15 @@

-

11. macos-native-fullscreen

+

13. macos-native-fullscreen

-
macos-native-fullscreen [-h|--help] [on|off]
+
aerospace macos-native-fullscreen [-h|--help] [on|off]
-

Toggle macOS fullscreen for the currently focused window

+

Toggle macOS fullscreen for the focused window

OPTIONS

@@ -1018,24 +1069,24 @@

-

12. macos-native-minimize

+

14. macos-native-minimize

-
macos-native-minimize [-h|--help]
+
aerospace macos-native-minimize [-h|--help]
-

Toggle macOS minimize for the currently focused window

+

Toggle macOS minimize for the focused window

-

13. mode

+

15. mode

-
mode [-h|--help] <binding-mode>
+
aerospace mode [-h|--help] <binding-mode>
@@ -1047,11 +1098,11 @@

13

-

14. move

+

16. move

-
move [-h|--help] (left|down|up|right)
+
aerospace move [-h|--help] (left|down|up|right)
@@ -1174,13 +1225,76 @@

14

-

15. move-node-to-monitor

+

17. move-mouse

-
move-node-to-monitor [-h|--help] [--wrap-around] (left|down|up|right)
-move-node-to-monitor [-h|--help] [--wrap-around] (next|prev)
-move-node-to-monitor [-h|--help] <monitor-pattern>...
+
aerospace move-mouse [-h|--help] <mouse-position>
+
+
+
+

Move mouse to the requested position

+
+
+

OPTIONS

+
+
+
+
-h, --help
+
+

Print help

+
+
+
+
+

ARGUMENTS

+
+
+
+
<mouse-position>
+
+

Position to move mouse to. +Possible values:

+
+
    +
  • +

    monitor-lazy-center. Move mouse to the center of the focused monitor, unless it is already within the monitor boundaries.

    +
  • +
  • +

    monitor-force-center. Move mouse to the center of the focused monitor.

    +
  • +
  • +

    window-lazy-center. Move mouse to the center of the focused window, unless it is already within the window boundaries. Fails the command if no window is focused.

    +
  • +
  • +

    window-force-center. Move mouse to the center of the focused window. Fails the command if no window is focused.

    +
  • +
+
+
+
+
+
+

EXAMPLES

+
+
+
    +
  • +

    Try to move mouse to the center of the window. If there is no window in focus, move mouse to the center of the monitor:
    +aerospace move-mouse window-lazy-center || aerospace move-mouse monitor-lazy-center

    +
  • +
+
+
+
+
+

18. move-node-to-monitor

+
+
+
+
aerospace move-node-to-monitor [-h|--help] [--wrap-around] (left|down|up|right)
+aerospace move-node-to-monitor [-h|--help] [--wrap-around] (next|prev)
+aerospace move-node-to-monitor [-h|--help] <monitor-pattern>...
@@ -1208,7 +1322,7 @@

(left|down|up|right)
-

Move window to monitor in direction relative to the currently focused monitor

+

Move window to monitor in direction relative to the focused monitor

(next|prev)
@@ -1224,16 +1338,16 @@

-

16. move-node-to-workspace

+

19. move-node-to-workspace

-
move-node-to-workspace [-h|--help] [--wrap-around] (next|prev)
-move-node-to-workspace [-h|--help] <workspace-name>
+
aerospace move-node-to-workspace [-h|--help] [--wrap-around] (next|prev)
+aerospace move-node-to-workspace [-h|--help] <workspace-name>
-

Move currently focused window to the specified workspace

+

Move the focused window to the specified workspace

(next|prev) is identical to workspace (next|prev)

@@ -1256,15 +1370,15 @@

-

17. move-workspace-to-monitor

+

20. move-workspace-to-monitor

-
move-workspace-to-monitor [-h|--help] [--wrap-around] (next|prev)
+
aerospace move-workspace-to-monitor [-h|--help] [--wrap-around] (next|prev)
-

Move currently focused workspace to the next or previous monitor

+

Move the focused workspace to the next or previous monitor

The command doesn’t have effect on workspaces that have monitor assignment

@@ -1287,11 +1401,11 @@

-

18. reload-config

+

21. reload-config

-
reload-config [-h|--help] [--no-gui] [--dry-run]
+
aerospace reload-config [-h|--help] [--no-gui] [--dry-run]
@@ -1337,11 +1451,11 @@

-

19. resize

+

22. resize

-
resize [-h|--help] (smart|width|height) [+|-]<number>
+
aerospace resize [-h|--help] (smart|width|height) [+|-]<number>
@@ -1383,15 +1497,15 @@

-

20. split

+

23. split

-
split [-h|--help] (horizontal|vertical|opposite)
+
aerospace split [-h|--help] (horizontal|vertical|opposite)
-

If the parent of currently focused window contains more than one child, then the command

+

If the parent of focused window contains more than one child, then the command

@@ -1411,7 +1525,7 @@

opposite means opposite orientation compared to the parent container.

-

If the parent of currently focused window contains only a single child (the window itself), then split command changes the orientation of the parent container

+

If the parent of the focused window contains only a single child (the window itself), then split command changes the orientation of the parent container

@@ -1429,11 +1543,11 @@

-

21. trigger-binding

+

24. trigger-binding

-
trigger-binding [-h|--help] <binding> --mode <mode-id>
+
aerospace trigger-binding [-h|--help] <binding> --mode <mode-id>
-

22. workspace

+

25. workspace

-
workspace [-h|--help] [--auto-back-and-forth] <workspace-name>
-workspace [-h|--help] [--wrap-around] (next|prev)
+
aerospace workspace [-h|--help] [--auto-back-and-forth] <workspace-name>
+aerospace workspace [-h|--help] [--wrap-around] (next|prev)
@@ -1550,20 +1664,29 @@

-

23. workspace-back-and-forth

+

26. workspace-back-and-forth

-
workspace-back-and-forth [-h|--help]
+
aerospace workspace-back-and-forth [-h|--help]
-

Switch between currently focused workspace and previously focused workspace back and forth

+

Switch between the focused workspace and previously focused workspace back and forth

+
+
+

Unlike focus-back-and-forth, workspace-back-and-forth always succeeds. +Because unlike windows, workspaces can not be "closed". +Workspaces are name-addressable objects. +They are created and destroyed on the fly.

+
+
-

24. Query commands

+

27. Query commands

Query commands are commands that do not change the state but rather allow the examination of the current state.

@@ -1580,13 +1703,13 @@

-

24.1. config

+

27.1. config

-
config [-h|--help] --get <name> [--json] [--keys]
-config [-h|--help] --major-keys
-config [-h|--help] --all-keys
-config [-h|--help] --config-path
+
aerospace config [-h|--help] --get <name> [--json] [--keys]
+aerospace config [-h|--help] --major-keys
+aerospace config [-h|--help] --all-keys
+aerospace config [-h|--help] --config-path
@@ -1686,10 +1809,10 @@

-

24.2. debug-windows

+

27.2. debug-windows

-
debug-windows [-h|--help]
+
aerospace debug-windows [-h|--help]
@@ -1722,10 +1845,10 @@

-

24.3. list-apps

+

27.3. list-apps

-
list-apps [-h|--help] [--macos-native-hidden [no]]
+
aerospace list-apps [-h|--help] [--macos-native-hidden [no]] [--format <output-format>]
-

OUTPUT FORMAT

-
-
-

Output format is the table with the following columns:

-
-
-
    -
  • -

    Process ID

    -
  • -
  • -

    Application ID

    -
  • -
  • -

    Application name

    -
  • -
-
-
-

Output example:

-
-
-
-
486   | com.apple.finder            | Finder
-17966 | org.alacritty               | Alacritty
-24780 | com.jetbrains.AppCode       | AppCode
-32541 | com.apple.systempreferences | System Settings
-
-
-
-

You can use awk to get values of particular column: awk -F '|' '{print $2}'

-
-

OPTIONS

+
+

OUTPUT FORMAT

-
-

24.4. list-exec-env-vars

-
-
-
list-exec-env-vars [-h|--help]
-
+
+

Output format can be configured with optional [--format <output-format>] option. +<output-format> supports string interpolation.

-

List environment variables that exec-* commands and callbacks are run with

+

If not specified, the default <output-format> is:
+%{app-pid}%{right-padding} | %{app-bundle-id}%{right-padding} | %{app-name}

-

Examples of commands and callbacks:

+

The following variables can be used inside <output-format>:

-
-
    -
  • -

    aerospace exec-and-forget command

    -
  • -
  • -

    exec-on-workspace-change-callback

    -
  • -
+
+
+
%{app-bundle-id}
+
+

String. Application unique identifier. Bundle ID

+
+
%{app-name}
+
+

String. Application name

+
+
%{app-pid}
+
+

Number. UNIX process identifier

+
+
%{right-padding}
+
+

A special variable which expands with a minimum number of spaces required to form a right padding in the appropriate column

+
+
%{newline}
+
+

Unicode U+000A newline symbol \n

+
+
%{tab}
+
+

Unicode U+0009 tab symbol \t

+
+
-

24.5. list-monitors

+

27.4. list-exec-env-vars

-
list-monitors [-h|--help] [--focused [no]] [--mouse [no]]
+
aerospace list-exec-env-vars [-h|--help]
-

Print monitors that satisfy conditions

-
-
-

OUTPUT FORMAT

+

List environment variables that exec-* commands and callbacks are run with

-

Output format is the table with 2 columns:

+

Examples of commands and callbacks:

  • -

    Monitor unique sequence ID (ID orders monitors from left to right)

    +

    aerospace exec-and-forget command

  • -

    Monitor name

    +

    exec-on-workspace-change-callback

-
-

Output example:

+
+

27.5. list-monitors

-
1 | Built-in Retina Display
-2 | DELL U2723QE
+
aerospace list-monitors [-h|--help] [--focused [no]] [--mouse [no]] [--format <output-format>]
-
-

- - - - -
-
Note
-
-monitor sequence ID may change if you plug or unplug monitors -
-
-

You can use awk to get values of particular column: awk -F '|' '{print $2}'

+

Print monitors that satisfy conditions

+
+

OUTPUT FORMAT

+
+
+
+

If not specified, the default <output-format> is:
+%{monitor-id}%{right-padding} | %{monitor-name}

+
+
+

The following variables can be used inside <output-format>:

+
+
+
+
%{monitor-id}
+
+

Number. Sequential number of the belonging monitor

+
+
%{monitor-name}
+
+

String. Name of the belonging monitor

+
+
%{right-padding}
+
+

A special variable which expands with a minimum number of spaces required to form a right padding in the appropriate column

+
+
%{newline}
+
+

Unicode U+000A newline symbol \n

+
+
%{tab}
+
+

Unicode U+0009 tab symbol \t

+
-

24.6. list-windows

+

27.6. list-windows

-
list-windows [-h|--help] (--workspace <workspace>...|--monitor <monitor>...)
-             [--monitor <monitor>...] [--workspace <workspace>...]
-             [--pid <pid>] [--app-bundle-id <app-bundle-id>] [--format <output-format>]
-list-windows [-h|--help] --all [--format <output-format>]
-list-windows [-h|--help] --focused [--format <output-format>]
+
aerospace list-windows [-h|--help] (--workspace <workspace>...|--monitor <monitor>...)
+                       [--monitor <monitor>...] [--workspace <workspace>...]
+                       [--pid <pid>] [--app-bundle-id <app-bundle-id>] [--format <output-format>]
+aerospace list-windows [-h|--help] --all [--format <output-format>]
+aerospace list-windows [-h|--help] --focused [--format <output-format>]
@@ -2008,6 +2146,10 @@

String. Window title

+
%{app-bundle-id}
+
+

String. Application unique identifier. Bundle ID

+
%{app-name}

String. Application name

@@ -2016,10 +2158,6 @@

Number. UNIX process identifier

-
%{app-bundle-id}
-
-

String. Application unique identifier. Bundle ID

-
%{workspace}

String. Name of the belonging workspace

@@ -2048,12 +2186,12 @@

-

24.7. list-workspaces

+

27.7. list-workspaces

-
list-workspaces [-h|--help] --monitor <monitor>... [--visible [no]] [--empty [no]]
-list-workspaces [-h|--help] --all
-list-workspaces [-h|--help] --focused
+
aerospace list-workspaces [-h|--help] --monitor <monitor>... [--visible [no]] [--empty [no]] [--format <output-format>]
+aerospace list-workspaces [-h|--help] --all [--format <output-format>]
+aerospace list-workspaces [-h|--help] --focused [--format <output-format>]
@@ -2121,6 +2263,52 @@

Filter results to only print empty workspaces. [no] inverts the condition.

+
--format <output-format>
+
+

Specify output format. See "Output Format" section for more details

+
+ +

+
+

OUTPUT FORMAT

+
+
+
+

If not specified, the default <output-format> is:
+%{workspace}

+
+
+

The following variables can be used inside <output-format>:

+
+
+
+
%{workspace}
+
+

String. Name of the belonging workspace

+
+
%{monitor-id}
+
+

Number. Sequential number of the belonging monitor

+
+
%{monitor-name}
+
+

String. Name of the belonging monitor

+
+
%{right-padding}
+
+

A special variable which expands with a minimum number of spaces required to form a right padding in the appropriate column

+
+
%{newline}
+
+

Unicode U+000A newline symbol \n

+
+
%{tab}
+
+

Unicode U+0009 tab symbol \t

+
@@ -2129,7 +2317,7 @@

diff --git a/config-examples.html b/config-examples.html index adce7e4b..950df35c 100644 --- a/config-examples.html +++ b/config-examples.html @@ -611,6 +611,12 @@

# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping key-mapping.preset = 'qwerty' +# Mouse follows focus when focused monitor changes +# Drop it from your config, if you don't like this behavior +# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks +# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse +on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] + # Gaps between windows (inner-*) and between monitor edges (outer-*). # Possible values: # - Constant: gaps.outer.top = 8 @@ -626,12 +632,6 @@

outer.top = 0 outer.right = 0 -# See https://nikitabobko.github.io/AeroSpace/guide#exec-env-vars -[exec] # Again, you don't need to copy all config sections to your config. -inherit-env-vars = true # If you don't touch "exec" section, -[exec.env-vars] # it will fallback to "default-config.toml" -PATH = '/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}' - # 'main' binding mode declaration # See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes # 'main' binding mode must be always presented @@ -777,13 +777,16 @@

# Reference: https://github.com/i3/i3/blob/next/etc/config
 
-# i3 didn't have "normalizations" feature that why we disable them here.
+# i3 doesn't have "normalizations" feature that why we disable them here.
 # But the feature is very helpful.
 # Normalizations eliminate all sorts of weird tree configurations that don't make sense.
 # Give normalizations a chance and enable them back.
 enable-normalization-flatten-containers = false
 enable-normalization-opposite-orientation-for-nested-containers = false
 
+# Mouse follows focus when focused monitor changes
+on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
+
 [mode.main.binding]
 alt-enter = 'exec-and-forget open -n /System/Applications/Utilities/Terminal.app'
 
@@ -857,7 +860,7 @@ 

diff --git a/config-examples/default-config.toml b/config-examples/default-config.toml index ba3e57a3..0ab3308a 100644 --- a/config-examples/default-config.toml +++ b/config-examples/default-config.toml @@ -38,6 +38,12 @@ default-root-container-orientation = 'auto' # See https://nikitabobko.github.io/AeroSpace/guide#key-mapping key-mapping.preset = 'qwerty' +# Mouse follows focus when focused monitor changes +# Drop it from your config, if you don't like this behavior +# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks +# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse +on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] + # Gaps between windows (inner-*) and between monitor edges (outer-*). # Possible values: # - Constant: gaps.outer.top = 8 @@ -53,12 +59,6 @@ outer.bottom = 0 outer.top = 0 outer.right = 0 -# See https://nikitabobko.github.io/AeroSpace/guide#exec-env-vars -[exec] # Again, you don't need to copy all config sections to your config. -inherit-env-vars = true # If you don't touch "exec" section, -[exec.env-vars] # it will fallback to "default-config.toml" -PATH = '/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}' - # 'main' binding mode declaration # See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes # 'main' binding mode must be always presented diff --git a/config-examples/i3-like-config-example.toml b/config-examples/i3-like-config-example.toml index efc7c68a..4bac0096 100644 --- a/config-examples/i3-like-config-example.toml +++ b/config-examples/i3-like-config-example.toml @@ -1,12 +1,15 @@ # Reference: https://github.com/i3/i3/blob/next/etc/config -# i3 didn't have "normalizations" feature that why we disable them here. +# i3 doesn't have "normalizations" feature that why we disable them here. # But the feature is very helpful. # Normalizations eliminate all sorts of weird tree configurations that don't make sense. # Give normalizations a chance and enable them back. enable-normalization-flatten-containers = false enable-normalization-opposite-orientation-for-nested-containers = false +# Mouse follows focus when focused monitor changes +on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] + [mode.main.binding] alt-enter = 'exec-and-forget open -n /System/Applications/Utilities/Terminal.app' diff --git a/goodness.html b/goodness.html index 08434836..f97445e8 100644 --- a/goodness.html +++ b/goodness.html @@ -752,7 +752,8 @@

~/.aerospace.toml

[mode.main.binding]
-cmd-h = []
+cmd-h = [] # Disable "hide application" +cmd-alt-h = [] # Disable "hide others"
@@ -1169,7 +1170,7 @@
-

(Optional) If you want shell completion to work, you need to configure your shell to enable completion provided by homebrew packages: -https://docs.brew.sh/Shell-Completion

+

(Optional) You might need to configure your shell to enable completion provided by homebrew packages: https://docs.brew.sh/Shell-Completion +AeroSpace provides bash, fish and zsh completions.

@@ -841,11 +842,19 @@

https://docs.brew.sh/FAQ#my-mac-apps-dont-find-homebrew-utilities

+

You can inspect what is the end result of environment variables using list-exec-env-vars command

  • -

    You can inspect what is the end result of environment variables using list-exec-env-vars command

    +

    GUI apps on macOS don’t have Homebrew’s prefix in their PATH by default ([source](https://docs.brew.sh/FAQ#my-mac-apps-dont-find-homebrew-utilities)). +That’s why unless you override exec section in the config, AeroSpace fallbacks to the following exec configuration:

    +
    +
    +
    [exec]
    +inherit-env-vars = true
    +[exec.env-vars]
    +PATH = '/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}'
    +
    +
  • @@ -1159,7 +1168,7 @@

    4.1. A note on mission control

    For some reason, mission control doesn’t like that AeroSpace puts a lot of windows in the bottom right corner of the screen. -Mission control shows windows too small even if it has enough space to show them bigger.

    +Mission control shows windows too small even there is enough space to show them bigger.

    To workaround, you can enable System Settings → Desktop & Dock → Group windows by application setting. @@ -1372,7 +1381,40 @@

    -

    5.2. 'exec-on-workspace-change' callback

    +

    5.2. 'on-focus-changed' callbacks

    +
    +

    You can track focus changes using the following callbacks: on-focus-changed and on-focused-monitor-changed.

    +
    +
    +
      +
    • +

      on-focus-changed is called every time focused window or workspace changes.

      +
    • +
    • +

      on-focused-monitor-changed is called every time focused monitor changes.

      +
    • +
    +
    +
    +

    A common use case for the callbacks is to implement "mouse follows focus" behavior. All you need is to combine the callback of your choice with move-mouse command:

    +
    +
    +
    +
    on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
    +# or
    +on-focus-changed = ['move-mouse window-lazy-center']
    +
    +
    +
    +

    You shouldn’t rely on the order callback are called, since it’s an implementation detail and can change from version to version.

    +
    +
    +

    The callbacks are "recursion resistant", which means that any focus change within the callback won’t retrigger the callback. +Changing the focus within these callbacks is a bad idea anyway, and the way it’s handled will probably change in future versions.

    +
    +
    + @@ -1595,7 +1637,7 @@

    diff --git a/util/app-inter-variables.adoc b/util/app-inter-variables.adoc new file mode 100644 index 00000000..e69de29b diff --git a/util/man-footer.adoc b/util/man-footer.adoc index 97ad011a..d7633f24 100644 --- a/util/man-footer.adoc +++ b/util/man-footer.adoc @@ -9,8 +9,9 @@ Bugs can be reported to https://github.com/nikitabobko/AeroSpace/issues/new == License -Copyright (C) 2024 Nikita Bobko + -Free use of this software is granted under the terms of the MIT License +Copyright (C) 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 licenses in the 'license' directory of the distributed zip archieve. == AUTHOR diff --git a/util/monitor-option.adoc b/util/monitor-option.adoc index 0f06b74c..d2177fe9 100644 --- a/util/monitor-option.adoc +++ b/util/monitor-option.adoc @@ -7,4 +7,4 @@ Possible monitors IDs: + . 1-based index of a monitor as if monitors were ordered horizontally from left to right . `all` is a special monitor ID that represents all monitors . `mouse` is a special monitor ID that represents monitor with the mouse -. `focused` is a special monitor ID that represents currently focused monitor +. `focused` is a special monitor ID that represents the focused monitor diff --git a/version.html b/version.html index 124067ed..e2b907a6 100644 --- a/version.html +++ b/version.html @@ -1 +1 @@ -9cf82feb0c85bea77fedcdc6b8cdba75b5bbf1f8 +deae2acad33789e0a8526247a668fde5003cc063