Skip to content

Commit

Permalink
EMPTY MESSAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitabobko committed Jul 27, 2024
1 parent 5455918 commit 191ed1f
Show file tree
Hide file tree
Showing 10 changed files with 480 additions and 242 deletions.
610 changes: 399 additions & 211 deletions commands.html

Large diffs are not rendered by default.

19 changes: 11 additions & 8 deletions config-examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,12 @@ <h2 id="default-config"><a class="anchor" href="#default-config"></a><a class="l
<span class="tok-c1"># See https://nikitabobko.github.io/AeroSpace/guide#key-mapping</span>
<span class="tok-n">key-mapping</span><span class="tok-p">.</span><span class="tok-n">preset</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-s1">&#39;qwerty&#39;</span>

<span class="tok-c1"># Mouse follows focus when focused monitor changes</span>
<span class="tok-c1"># Drop it from your config, if you don&#39;t like this behavior</span>
<span class="tok-c1"># See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks</span>
<span class="tok-c1"># See https://nikitabobko.github.io/AeroSpace/commands#move-mouse</span>
<span class="tok-n">on-focused-monitor-changed</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-p">[</span><span class="tok-s1">&#39;move-mouse monitor-lazy-center&#39;</span><span class="tok-p">]</span>

<span class="tok-c1"># Gaps between windows (inner-*) and between monitor edges (outer-*).</span>
<span class="tok-c1"># Possible values:</span>
<span class="tok-c1"># - Constant: gaps.outer.top = 8</span>
Expand All @@ -626,12 +632,6 @@ <h2 id="default-config"><a class="anchor" href="#default-config"></a><a class="l
<span class="tok-n">outer</span><span class="tok-p">.</span><span class="tok-n">top</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-mi">0</span>
<span class="tok-n">outer</span><span class="tok-p">.</span><span class="tok-n">right</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-mi">0</span>

<span class="tok-c1"># See https://nikitabobko.github.io/AeroSpace/guide#exec-env-vars</span>
<span class="tok-k">[exec]</span><span class="tok-w"> </span><span class="tok-c1"># Again, you don&#39;t need to copy all config sections to your config.</span>
<span class="tok-n">inherit-env-vars</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-kc">true</span><span class="tok-w"> </span><span class="tok-c1"># If you don&#39;t touch &quot;exec&quot; section,</span>
<span class="tok-k">[exec.env-vars]</span><span class="tok-w"> </span><span class="tok-c1"># it will fallback to &quot;default-config.toml&quot;</span>
<span class="tok-n">PATH</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-s1">&#39;/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}&#39;</span>

<span class="tok-c1"># &#39;main&#39; binding mode declaration</span>
<span class="tok-c1"># See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes</span>
<span class="tok-c1"># &#39;main&#39; binding mode must be always presented</span>
Expand Down Expand Up @@ -777,13 +777,16 @@ <h2 id="i3-like-config"><a class="anchor" href="#i3-like-config"></a><a class="l
<div class="content">
<pre class="pygments highlight nowrap"><code data-lang="toml"><span></span><span class="tok-c1"># Reference: https://github.com/i3/i3/blob/next/etc/config</span>

<span class="tok-c1"># i3 didn&#39;t have &quot;normalizations&quot; feature that why we disable them here.</span>
<span class="tok-c1"># i3 doesn&#39;t have &quot;normalizations&quot; feature that why we disable them here.</span>
<span class="tok-c1"># But the feature is very helpful.</span>
<span class="tok-c1"># Normalizations eliminate all sorts of weird tree configurations that don&#39;t make sense.</span>
<span class="tok-c1"># Give normalizations a chance and enable them back.</span>
<span class="tok-n">enable-normalization-flatten-containers</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-kc">false</span>
<span class="tok-n">enable-normalization-opposite-orientation-for-nested-containers</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-kc">false</span>

<span class="tok-c1"># Mouse follows focus when focused monitor changes</span>
<span class="tok-n">on-focused-monitor-changed</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-p">[</span><span class="tok-s1">&#39;move-mouse monitor-lazy-center&#39;</span><span class="tok-p">]</span>

<span class="tok-k">[mode.main.binding]</span>
<span class="tok-n">alt-enter</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-s1">&#39;exec-and-forget open -n /System/Applications/Utilities/Terminal.app&#39;</span>

Expand Down Expand Up @@ -857,7 +860,7 @@ <h2 id="i3-like-config"><a class="anchor" href="#i3-like-config"></a><a class="l
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-06-16 18:46:25 +0200
Last updated 2024-07-27 13:37:55 +0200
</div>
</div>
</body>
Expand Down
12 changes: 6 additions & 6 deletions config-examples/default-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion config-examples/i3-like-config-example.toml
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
5 changes: 3 additions & 2 deletions goodness.html
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,8 @@ <h2 id="disable-hide-app"><a class="anchor" href="#disable-hide-app"></a><a clas
<div class="title">~/.aerospace.toml</div>
<div class="content">
<pre class="pygments highlight nowrap"><code data-lang="toml"><span></span><span class="tok-k">[mode.main.binding]</span>
<span class="tok-n">cmd-h</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-p">[]</span></code></pre>
<span class="tok-n">cmd-h</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-p">[]</span><span class="tok-w"> </span><span class="tok-c1"># Disable &quot;hide application&quot;</span>
<span class="tok-n">cmd-alt-h</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-p">[]</span><span class="tok-w"> </span><span class="tok-c1"># Disable &quot;hide others&quot;</span></code></pre>
</div>
</div>
</div>
Expand Down Expand Up @@ -1169,7 +1170,7 @@ <h2 id="popular-apps-ids"><a class="anchor" href="#popular-apps-ids"></a><a clas
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-06-16 18:46:25 +0200
Last updated 2024-07-27 13:37:55 +0200
</div>
</div>
</body>
Expand Down
62 changes: 52 additions & 10 deletions guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ <h1>AeroSpace Guide</h1>
<li><a href="#callbacks">5. Callbacks</a>
<ul class="sectlevel2">
<li><a href="#on-window-detected-callback">5.1. 'on-window-detected' callback</a></li>
<li><a href="#exec-on-workspace-change-callback">5.2. 'exec-on-workspace-change' callback</a></li>
<li><a href="#on-focus-changed-callbacks">5.2. 'on-focus-changed' callbacks</a></li>
<li><a href="#exec-on-workspace-change-callback">5.3. 'exec-on-workspace-change' callback</a></li>
</ul>
</li>
<li><a href="#multiple-monitors">6. Multiple monitors</a>
Expand Down Expand Up @@ -612,8 +613,8 @@ <h3 id="homebrew-installation"><a class="anchor" href="#homebrew-installation"><
</div>
</div>
<div class="paragraph">
<p><strong>(Optional)</strong> If you want shell completion to work, you need to configure your shell to enable completion provided by homebrew packages:
<a href="https://docs.brew.sh/Shell-Completion" class="bare">https://docs.brew.sh/Shell-Completion</a></p>
<p><strong>(Optional)</strong> You might need to configure your shell to enable completion provided by homebrew packages: <a href="https://docs.brew.sh/Shell-Completion" class="bare">https://docs.brew.sh/Shell-Completion</a>
AeroSpace provides bash, fish and zsh completions.</p>
</div>
</div>
<div class="sect2">
Expand Down Expand Up @@ -841,11 +842,19 @@ <h3 id="exec-env-vars"><a class="anchor" href="#exec-env-vars"></a><a class="lin
</div>
</li>
<li>
<p>If not overridden, <code>default-config.toml</code> adds Homebrew to <code>$PATH</code> <code>/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}</code>.
See the problem statement: <a href="https://docs.brew.sh/FAQ#my-mac-apps-dont-find-homebrew-utilities" class="bare">https://docs.brew.sh/FAQ#my-mac-apps-dont-find-homebrew-utilities</a></p>
<p>You can inspect what is the end result of environment variables using <a href="commands#list-exec-env-vars"><code>list-exec-env-vars</code> command</a></p>
</li>
<li>
<p>You can inspect what is the end result of environment variables using <a href="commands#list-exec-env-vars"><code>list-exec-env-vars</code> command</a></p>
<p>GUI apps on macOS don’t have Homebrew’s prefix in their <code>PATH</code> by default ([source](<a href="https://docs.brew.sh/FAQ#my-mac-apps-dont-find-homebrew-utilities" class="bare">https://docs.brew.sh/FAQ#my-mac-apps-dont-find-homebrew-utilities</a>)).
That&#8217;s why unless you override <code>exec</code> section in the config, AeroSpace fallbacks to the following <code>exec</code> configuration:</p>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight nowrap"><code data-lang="toml"><span></span><span class="tok-k">[exec]</span>
<span class="tok-n">inherit-env-vars</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-kc">true</span>
<span class="tok-k">[exec.env-vars]</span>
<span class="tok-n">PATH</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-s1">&#39;/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}&#39;</span></code></pre>
</div>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -1159,7 +1168,7 @@ <h2 id="emulation-of-virtual-workspaces"><a class="anchor" href="#emulation-of-v
<h3 id="a-note-on-mission-control"><a class="anchor" href="#a-note-on-mission-control"></a><a class="link" href="#a-note-on-mission-control">4.1. A note on mission control</a></h3>
<div class="paragraph">
<p>For some reason, mission control doesn&#8217;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.</p>
Mission control shows windows too small even there is enough space to show them bigger.</p>
</div>
<div class="paragraph">
<p>To workaround, you can enable <code>System Settings &#8594; Desktop &amp; Dock &#8594; Group windows by application</code> setting.
Expand Down Expand Up @@ -1372,7 +1381,40 @@ <h3 id="on-window-detected-callback"><a class="anchor" href="#on-window-detected
</div>
</div>
<div class="sect2">
<h3 id="exec-on-workspace-change-callback"><a class="anchor" href="#exec-on-workspace-change-callback"></a><a class="link" href="#exec-on-workspace-change-callback">5.2. 'exec-on-workspace-change' callback</a></h3>
<h3 id="on-focus-changed-callbacks"><a class="anchor" href="#on-focus-changed-callbacks"></a><a class="link" href="#on-focus-changed-callbacks">5.2. 'on-focus-changed' callbacks</a></h3>
<div class="paragraph">
<p>You can track focus changes using the following callbacks: <code>on-focus-changed</code> and <code>on-focused-monitor-changed</code>.</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>on-focus-changed</code> is called every time focused window or workspace changes.</p>
</li>
<li>
<p><code>on-focused-monitor-changed</code> is called every time focused monitor changes.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>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 <a href="commands#move-mouse">move-mouse command</a>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight nowrap"><code data-lang="toml"><span></span><span class="tok-n">on-focused-monitor-changed</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-p">[</span><span class="tok-s1">&#39;move-mouse monitor-lazy-center&#39;</span><span class="tok-p">]</span>
<span class="tok-c1"># or</span>
<span class="tok-n">on-focus-changed</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-p">[</span><span class="tok-s1">&#39;move-mouse window-lazy-center&#39;</span><span class="tok-p">]</span></code></pre>
</div>
</div>
<div class="paragraph">
<p>You shouldn&#8217;t rely on the order callback are called, since it&#8217;s an implementation detail and can change from version to version.</p>
</div>
<div class="paragraph">
<p>The callbacks are "recursion resistant", which means that any focus change within the callback won&#8217;t retrigger the callback.
Changing the focus within these callbacks is a bad idea anyway, and the way it&#8217;s handled will probably change in future versions.</p>
</div>
</div>
<div class="sect2">
<h3 id="exec-on-workspace-change-callback"><a class="anchor" href="#exec-on-workspace-change-callback"></a><a class="link" href="#exec-on-workspace-change-callback">5.3. 'exec-on-workspace-change' callback</a></h3>
<div class="paragraph">
<p><code>exec-on-workspace-change</code> callback allows to run arbitrary process when workspace changes.
It may be useful for integrating with bars.</p>
Expand All @@ -1381,7 +1423,7 @@ <h3 id="exec-on-workspace-change-callback"><a class="anchor" href="#exec-on-work
<div class="content">
<pre class="pygments highlight nowrap"><code data-lang="toml"><span></span><span class="tok-c1"># Notify Sketchybar about workspace change</span>
<span class="tok-n">exec-on-workspace-change</span><span class="tok-w"> </span><span class="tok-o">=</span><span class="tok-w"> </span><span class="tok-p">[</span><span class="tok-s1">&#39;/bin/bash&#39;</span><span class="tok-p">,</span><span class="tok-w"> </span><span class="tok-s1">&#39;-c&#39;</span><span class="tok-p">,</span>
<span class="tok-w"> </span><span class="tok-s1">&#39;/opt/homebrew/opt/sketchybar/bin/sketchybar --trigger aerospace_workspace_change FOCUSED=$AEROSPACE_FOCUSED_WORKSPACE&#39;</span>
<span class="tok-w"> </span><span class="tok-s1">&#39;sketchybar --trigger aerospace_workspace_change FOCUSED=$AEROSPACE_FOCUSED_WORKSPACE&#39;</span>
<span class="tok-p">]</span></code></pre>
</div>
</div>
Expand Down Expand Up @@ -1595,7 +1637,7 @@ <h3 id="dialog-heuristics"><a class="anchor" href="#dialog-heuristics"></a><a cl
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-06-16 18:46:25 +0200
Last updated 2024-07-27 13:37:55 +0200
</div>
</div>
</body>
Expand Down
Empty file added util/app-inter-variables.adoc
Empty file.
5 changes: 3 additions & 2 deletions util/man-footer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion util/monitor-option.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion version.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9cf82feb0c85bea77fedcdc6b8cdba75b5bbf1f8
deae2acad33789e0a8526247a668fde5003cc063

0 comments on commit 191ed1f

Please sign in to comment.