diff --git a/commands.html b/commands.html index f2da3b92..2c0478a7 100644 --- a/commands.html +++ b/commands.html @@ -577,7 +577,7 @@

AeroSpace Commands

AeroSpace Commands

  • -

    AeroSpace Goodness

    +

    AeroSpace Goodies

  • @@ -2638,7 +2638,7 @@

    diff --git a/config-examples/default-config.toml b/config-examples/default-config.toml index 378228b7..1e97dcdf 100644 --- a/config-examples/default-config.toml +++ b/config-examples/default-config.toml @@ -40,7 +40,7 @@ on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] # You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag # Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key -# Also see: https://nikitabobko.github.io/AeroSpace/goodness#disable-hide-app +# Also see: https://nikitabobko.github.io/AeroSpace/goodies#disable-hide-app automatically-unhide-macos-hidden-apps = false # Possible values: (qwerty|dvorak) diff --git a/config-examples/i3-like-config-example.toml b/config-examples/i3-like-config-example.toml index 98b4df53..272b87d2 100644 --- a/config-examples/i3-like-config-example.toml +++ b/config-examples/i3-like-config-example.toml @@ -11,7 +11,7 @@ enable-normalization-opposite-orientation-for-nested-containers = false on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] [mode.main.binding] -# See: https://nikitabobko.github.io/AeroSpace/goodness#open-a-new-window-with-applescript +# See: https://nikitabobko.github.io/AeroSpace/goodies#open-a-new-window-with-applescript alt-enter = '''exec-and-forget osascript -e ' tell application "Terminal" do script diff --git a/goodies.html b/goodies.html new file mode 100644 index 00000000..5e61c3b0 --- /dev/null +++ b/goodies.html @@ -0,0 +1,1272 @@ + + + + + + + + +AeroSpace Goodies + + + + + + +
    +
    +
    +
    +
    +
    +

    AeroSpace is an i3-like tiling window manager for macOS

    +
    + +
    +

    300

    +
    + +
    +
    +
    +

    Do you have a cool automatization, AeroSpace integration, or workflow? +Feel free to open an issue or pull request to add it to this list! +The source code of the page can be found in the ./docs directory.

    +
    +
    +
    +
    +

    1. Move windows by dragging any part of the window

    +
    +
    +
    +
    defaults write -g NSWindowShouldDragOnGesture -bool true
    +
    +
    +
    +

    Now, you can move windows by holding ctrl + cmd and dragging any part of the window (not necessarily the window title)

    +
    +
    +
    +
    +

    2. Highlight focused windows with colored borders

    +
    +
    +

    To highlight the focused window with colored border you can use JankyBorders.

    +
    +
    +

    You can also use after-startup-command to start JankyBorders together with AeroSpace

    +
    +
    +
    +
    after-startup-command = [
    +    # JankyBorders has a built-in detection of already running process,
    +    # so it won't be run twice on AeroSpace restart
    +    'exec-and-forget borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0'
    +]
    +
    +
    +
    +
    +
    +

    3. AeroSpace Raycast extension

    +
    +
    +

    There is a third party Raycast extension for AeroSpace. https://www.raycast.com/limonkufu/aerospace

    +
    +
    +

    If you struggle remembering shortcuts, it’s useful to search for commands until they become muscle memory.

    +
    +
    +
    +
    +

    4. Disable windows opening animations

    +
    +
    +

    Observable in Google Chrome

    +
    +
    +
    +
    defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
    +
    +
    +
    +
    +
    +

    5. Use trackpad gestures to switch workspaces

    +
    +
    +

    You can use BetterTouchTool to assign trackpad gestures to switch workspaces

    +
    +
    +

    The following commands focus next or previous workspaces on monitors where the mouse is located

    +
    +
    +
    +
    aerospace workspace "$(aerospace list-workspaces --monitor mouse --visible)" && aerospace workspace next
    +
    +aerospace workspace "$(aerospace list-workspaces --monitor mouse --visible)" && aerospace workspace prev
    +
    +
    +
    +

    Beware that you might need to specify full path to aerospace executable https://community.folivora.ai/t/how-to-execute-terminal-command-to-switch-workspaces-with-aerospace/35914

    +
    +
    +
    +
    +

    6. Show AeroSpace workspaces in Sketchybar

    +
    +
    +

    You can integrate AeroSpace workspace indicators with Sketchybar. +Use these snippets as a starting point.

    +
    +
    +
    ~/.aerospace.toml
    +
    +
    # Run Sketchybar together with AeroSpace
    +# sketchbar has a built-in detection of already running process,
    +# so it won't be run twice on AeroSpace restart
    +after-startup-command = ['exec-and-forget sketchybar']
    +
    +# Notify Sketchybar about workspace change
    +exec-on-workspace-change = ['/bin/bash', '-c',
    +    'sketchybar --trigger aerospace_workspace_change FOCUSED_WORKSPACE=$AEROSPACE_FOCUSED_WORKSPACE'
    +]
    +
    +
    +
    +
    ~/.config/sketchybar/sketchybarrc
    +
    +
    sketchybar --add event aerospace_workspace_change
    +
    +for sid in $(aerospace list-workspaces --all); do
    +    sketchybar --add item space.$sid left \
    +        --subscribe space.$sid aerospace_workspace_change \
    +        --set space.$sid \
    +        background.color=0x44ffffff \
    +        background.corner_radius=5 \
    +        background.height=20 \
    +        background.drawing=off \
    +        label="$sid" \
    +        click_script="aerospace workspace $sid" \
    +        script="$CONFIG_DIR/plugins/aerospace.sh $sid"
    +done
    +
    +
    +
    +
    ~/.config/sketchybar/plugins/aerospace.sh
    +
    +
    #!/usr/bin/env bash
    +
    +# make sure it's executable with:
    +# chmod +x ~/.config/sketchybar/plugins/aerospace.sh
    +
    +if [ "$1" = "$FOCUSED_WORKSPACE" ]; then
    +    sketchybar --set $NAME background.drawing=on
    +else
    +    sketchybar --set $NAME background.drawing=off
    +fi
    +
    +
    +
    +
    +
    +

    7. Open a new window with AppleScript

    +
    +
    +

    Invoking Safari/Terminal with a command the obvious way (exec-and-forget open -a Safari) results in an outcome that is probably not the intended one. +Namely, that any workspace already containing an instance of Safari/Terminal is brought in focus.

    +
    +
    +

    Opening a new window of a program that can supports multiple windows (such as Safari or Terminal.app) can be accomplished with an AppleScript inlined in aerospace.toml as follows:

    +
    +
    +
      +
    • +

      Safari

      +
      +
      +
      ctrl-g = '''exec-and-forget osascript -e '
      +tell application "Safari"
      +    make new document at end of documents
      +    activate
      +end tell'
      +'''
      +
      +
      +
    • +
    • +

      Terminal

      +
      +
      +
      ctrl-g = '''exec-and-forget osascript -e '
      +tell application "Terminal"
      +    do script
      +    activate
      +end tell'
      +'''
      +
      +
      +
    • +
    +
    +
    +
    +
    +

    8. Disable annoying and useless "hide application" shortcut

    +
    +
    +

    If automatically-unhide-macos-hidden-apps isn’t enough, you can disable cmd-h altogether (which will make this hotkey unavailable for apps that might use it for other purposes)

    +
    +
    +
    ~/.aerospace.toml
    +
    +
    [mode.main.binding]
    +cmd-h = [] # Disable "hide application"
    +cmd-alt-h = [] # Disable "hide others"
    +
    +
    +
    +
    +
    +

    9. Colemak keys remap

    +
    +
    +
    ~/.aerospace.toml
    +
    +
    [key-mapping.key-notation-to-key-code]
    +q = 'q'
    +w = 'w'
    +f = 'e'
    +p = 'r'
    +g = 't'
    +j = 'y'
    +l = 'u'
    +u = 'i'
    +y = 'o'
    +semicolon = 'p'
    +leftSquareBracket = 'leftSquareBracket'
    +rightSquareBracket = 'rightSquareBracket'
    +backslash = 'backslash'
    +
    +a = 'a'
    +r = 's'
    +s = 'd'
    +t = 'f'
    +d = 'g'
    +h = 'h'
    +n = 'j'
    +e = 'k'
    +i = 'l'
    +o = 'semicolon'
    +quote = 'quote'
    +
    +z = 'z'
    +x = 'x'
    +c = 'c'
    +v = 'v'
    +b = 'b'
    +k = 'n'
    +m = 'm'
    +comma = 'comma'
    +period = 'period'
    +slash = 'slash'
    +
    +
    +
    +
    +
    +

    10. i3 like config

    +
    + +
    +
    +
    # Reference: https://github.com/i3/i3/blob/next/etc/config
    +
    +# 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]
    +# See: https://nikitabobko.github.io/AeroSpace/goodies#open-a-new-window-with-applescript
    +alt-enter = '''exec-and-forget osascript -e '
    +tell application "Terminal"
    +    do script
    +    activate
    +end tell'
    +'''
    +
    +# i3 wraps focus by default
    +alt-j =         'focus --boundaries-action wrap-around-the-workspace left'
    +alt-k =         'focus --boundaries-action wrap-around-the-workspace down'
    +alt-l =         'focus --boundaries-action wrap-around-the-workspace up'
    +alt-semicolon = 'focus --boundaries-action wrap-around-the-workspace right'
    +
    +alt-shift-j = 'move left'
    +alt-shift-k = 'move down'
    +alt-shift-l = 'move up'
    +alt-shift-semicolon = 'move right'
    +
    +# Consider using 'join-with' command as a 'split' replacement if you want to enable normalizations
    +alt-h = 'split horizontal'
    +alt-v = 'split vertical'
    +
    +alt-f = 'fullscreen'
    +
    +alt-s = 'layout v_accordion' # 'layout stacking' in i3
    +alt-w = 'layout h_accordion' # 'layout tabbed' in i3
    +alt-e = 'layout tiles horizontal vertical' # 'layout toggle split' in i3
    +
    +alt-shift-space = 'layout floating tiling' # 'floating toggle' in i3
    +
    +# Not supported, because this command is redundant in AeroSpace mental model.
    +# See: https://nikitabobko.github.io/AeroSpace/guide#floating-windows
    +#alt-space = 'focus toggle_tiling_floating'
    +
    +# `focus parent`/`focus child` are not yet supported, and it's not clear whether they
    +# should be supported at all https://github.com/nikitabobko/AeroSpace/issues/5
    +# alt-a = 'focus parent'
    +
    +alt-1 = 'workspace 1'
    +alt-2 = 'workspace 2'
    +alt-3 = 'workspace 3'
    +alt-4 = 'workspace 4'
    +alt-5 = 'workspace 5'
    +alt-6 = 'workspace 6'
    +alt-7 = 'workspace 7'
    +alt-8 = 'workspace 8'
    +alt-9 = 'workspace 9'
    +alt-0 = 'workspace 10'
    +
    +alt-shift-1 = 'move-node-to-workspace 1'
    +alt-shift-2 = 'move-node-to-workspace 2'
    +alt-shift-3 = 'move-node-to-workspace 3'
    +alt-shift-4 = 'move-node-to-workspace 4'
    +alt-shift-5 = 'move-node-to-workspace 5'
    +alt-shift-6 = 'move-node-to-workspace 6'
    +alt-shift-7 = 'move-node-to-workspace 7'
    +alt-shift-8 = 'move-node-to-workspace 8'
    +alt-shift-9 = 'move-node-to-workspace 9'
    +alt-shift-0 = 'move-node-to-workspace 10'
    +
    +alt-shift-c = 'reload-config'
    +
    +alt-r = 'mode resize'
    +
    +[mode.resize.binding]
    +h = 'resize width -50'
    +j = 'resize height +50'
    +k = 'resize height -50'
    +l = 'resize width +50'
    +enter = 'mode main'
    +esc = 'mode main'
    +
    +
    +
    +
    +
    + +
    +
    +

    The list is useful to compose custom on-window-detected callback.

    +
    + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Application nameApplication ID

    1Password

    com.1password.1password

    Activity Monitor

    com.apple.ActivityMonitor

    AirPort Utility

    com.apple.airport.airportutility

    Alacritty

    org.alacritty

    Android Studio

    com.google.android.studio

    App Store

    com.apple.AppStore

    AppCode

    com.jetbrains.AppCode

    Arc Browser

    company.thebrowser.Browser

    Audio MIDI Setup

    com.apple.audio.AudioMIDISetup

    Automator

    com.apple.Automator

    Battle.net

    net.battle.app

    Books

    com.apple.iBooksX

    Brave

    com.brave.Browser

    CLion

    com.jetbrains.CLion

    Calculator

    com.apple.calculator

    Calendar

    com.apple.iCal

    Chess

    com.apple.Chess

    Clock

    com.apple.clock

    ColorSync Utility

    com.apple.ColorSyncUtility

    Console

    com.apple.Console

    Contacts

    com.apple.AddressBook

    Dictionary

    com.apple.Dictionary

    Disk Utility

    com.apple.DiskUtility

    Docker

    com.docker.docker

    FaceTime

    com.apple.FaceTime

    Figma

    com.figma.Desktop

    Find My

    com.apple.findmy

    Finder

    com.apple.finder

    Firefox

    org.mozilla.firefox

    Freeform

    com.apple.freeform

    GIMP

    org.gimp.gimp-2.10

    Google Chrome

    com.google.Chrome

    Grapher

    com.apple.grapher

    Home

    com.apple.Home

    Inkscape

    org.inkscape.Inkscape

    IntelliJ IDEA Community

    com.jetbrains.intellij.ce

    IntelliJ IDEA Ultimate

    com.jetbrains.intellij

    Karabiner-Elements

    org.pqrs.Karabiner-Elements.Settings

    Keychain Access

    com.apple.keychainaccess

    Keynote

    com.apple.iWork.Keynote

    Kitty

    net.kovidgoyal.kitty

    Mail

    com.apple.mail

    Maps

    com.apple.Maps

    Marta

    org.yanex.marta

    Messages

    com.apple.MobileSMS

    Music

    com.apple.Music

    Notes

    com.apple.Notes

    Obsidian

    md.obsidian

    Pages

    com.apple.iWork.Pages

    Photo Booth

    com.apple.PhotoBooth

    Photos

    com.apple.Photos

    Podcasts

    com.apple.podcasts

    Preview

    com.apple.Preview

    PyCharm Community

    com.jetbrains.pycharm.ce

    PyCharm Professional

    com.jetbrains.pycharm

    QuickTime Player

    com.apple.QuickTimePlayerX

    Reminders

    com.apple.reminders

    Safari

    com.apple.Safari

    Shortcuts

    com.apple.shortcuts

    Slack

    com.tinyspeck.slackmacgap

    Spotify

    com.spotify.client

    Steam

    com.valvesoftware.steam

    Stocks

    com.apple.stocks

    Sublime Merge

    com.sublimemerge

    Sublime Text

    com.sublimetext.4

    System Settings

    com.apple.systempreferences

    TV

    com.apple.TV

    Telegram

    com.tdesktop.Telegram

    Terminal

    com.apple.Terminal

    TextEdit

    com.apple.TextEdit

    Thunderbird

    org.mozilla.thunderbird

    Time Machine

    com.apple.backup.launcher

    Todoist

    com.todoist.mac.Todoist

    Tor Browser

    org.torproject.torbrowser

    Transmission

    org.m0k.transmission

    VLC

    org.videolan.vlc

    Visual Studio Code

    com.microsoft.VSCode

    VoiceMemos

    com.apple.VoiceMemos

    VoiceOver Utility

    com.apple.VoiceOverUtility

    Weather

    com.apple.weather

    WezTerm

    com.github.wez.wezterm

    Xcode

    com.apple.dt.Xcode

    iMovie

    com.apple.iMovieApp

    iTerm2

    com.googlecode.iterm2

    kdenlive

    org.kde.Kdenlive

    +
    +
    +
    + + + \ No newline at end of file diff --git a/goodness.html b/goodness.html index 9cb5c109..5e61c3b0 100644 --- a/goodness.html +++ b/goodness.html @@ -6,7 +6,7 @@ -AeroSpace Goodness +AeroSpace Goodies