aerospace fork
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305= AeroSpace Goodiesinclude::util/site-attributes.adoc[]
include::util/header.adoc[]
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.
[#move-by-dragging-any-part-of-the-window]== Move windows by dragging any part of the window
[source,bash]----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)
[#non-native-fullscreen-in-firefox]== Non-native fullscreen in Firefox
Change the following settings in `about:config`:
----// Disable macOS native fullscreen in Firefoxfull-screen-api.macos-native-full-screen = false
// Disable fullscreen transition animationsfull-screen-api.transition-duration.enter = 0 0full-screen-api.transition-duration.leave = 0 0----
`full-screen-api.ignore-widgets` is also an interesting config knob that might be of your preference.
[#highlight-focused-windows-with-colored-borders]== Highlight focused windows with colored borders
To highlight the focused window with colored border you can use link:https://github.com/FelixKratz/JankyBorders[JankyBorders].
You can also use `after-startup-command` to start JankyBorders together with AeroSpace
[source,toml]----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']----
[#raycast-extension]== 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.
[#disable-open-animations]== Disable windows opening animations
Observable in Google Chrome
[source,bash]----defaults write -g NSAutomaticWindowAnimationsEnabled -bool false----
[#use-trackpad-gestures-to-switch-workspaces]== Use trackpad gestures to switch workspaces
The following commands focus next or previous workspaces on monitors where the mouse is located
[source,bash]----aerospace eval 'list-workspaces --monitor mouse --visible | workspace --stdin next; workspace next --wrap-around'
aerospace eval 'list-workspaces --monitor mouse --visible | workspace --stdin next; workspace prev --wrap-around'----
Use the software of your choice to assign trackpad gestures to the respective commands.Here are a few third party options in alphabetical order:
* https://github.com/acsandmann/aerospace-swipe* link:https://folivora.ai/[BetterTouchTool] can assign arbitrary commands to trackpad gestures.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* https://github.com/MediosZ/SwipeAeroSpace
CAUTION: Make sure that you trust project authors before running the distributed binaries.Alternatively, inspect the source code, and build it yourself.
[#show-aerospace-workspaces-in-sketchybar]== Show AeroSpace workspaces in Sketchybar
You can integrate AeroSpace workspace indicators with link:https://github.com/FelixKratz/SketchyBar[Sketchybar].Use these snippets as a starting point.
.~/.aerospace.toml[source,toml]----# Run Sketchybar together with AeroSpace# sketchybar has a built-in detection of already running process,# so it won't be run twice on AeroSpace restartafter-startup-command = ['exec-and-forget sketchybar']
# Notify Sketchybar about workspace changeexec-on-workspace-change = ['/bin/bash', '-c', 'sketchybar --trigger aerospace_workspace_change FOCUSED_WORKSPACE=$AEROSPACE_FOCUSED_WORKSPACE']----
.~/.config/sketchybar/sketchybarrc[source,bash]----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[source,bash]----#!/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=onelse sketchybar --set $NAME background.drawing=offfi----
[#show-aerospace-workspaces-in-simple-bar]== Show AeroSpace workspaces in simple-bar
link:https://github.com/Jean-Tinland/simple-bar[simple-bar] can be used to display AeroSpace workspaces.
In order to sync simple-bar with AeroSpace, add these lines to your AeroSpace config file:
.~/.aerospace.toml[source,toml]----# Notify simple-bar about window focus changeon-focus-changed = [ "exec-and-forget osascript -e 'tell application id \"tracesOf.Uebersicht\" to refresh widget id \"simple-bar-index-jsx\"'",]
# Notify simple-bar about workspace changeexec-on-workspace-change = [ '/bin/zsh', '-c', '/usr/bin/osascript -e "tell application id \"tracesOf.Uebersicht\" to refresh widget id \"simple-bar-index-jsx\""',]----
[#open-a-new-window-with-applescript]== 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 support multiple windows (such as Safari or Terminal.app) can be accomplished with an AppleScript inlined in `aerospace.toml` as follows:
- Safari+[source,toml]----ctrl-g = '''exec-and-forget osascript -e 'tell application "Safari" make new document at end of documents activateend tell''''----- Terminal+[source,toml]----ctrl-g = '''exec-and-forget osascript -e \'tell application "Terminal" to tell (do script) to activate' '''----- Ghostty+[source,toml]----ctrl-g = '''exec-and-forget osascript -e 'tell application "Ghostty" new windowend tell''''----
[#disable-hide-app]== 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[source,toml]----[mode.main.binding] cmd-h = [] # Disable "hide application" cmd-alt-h = [] # Disable "hide others"----
[#screenshoot-shortcut]== Take screenshots to clipboard using keyboard shortcut
You can configure a custom shortcut to take a screenshot.`screencapture` is a built-in macOS command.
.~/.aerospace.toml[source,toml]----alt-shift-s = 'exec-and-forget screencapture -i -c'----
[#i3-like-config]== i3 like config
link:config-examples/i3-like-config-example.toml[Download i3-like-config.toml]
[source,toml,subs="macros+,specialchars+"]----include::config-examples/i3-like-config-example.toml[]----
[#spacelist]== Spacelist
link:https://github.com/magicmark/spacelist[Spacelist] is a terminal UI application that provides a searchable interface to view all open windows organized by workspace. You can hit enter on a selected application to switch to that workspace.
[#popular-apps-ids]== List of Apple application IDs
The list is useful to compose custom xref:./guide.adoc#on-window-detected-callback[on-window-detected callback].
[cols="1,3"]|===|Application name|Application ID
|Activity Monitor|`com.apple.ActivityMonitor`|AirPort Utility|`com.apple.airport.airportutility`|App Store|`com.apple.AppStore`|Audio MIDI Setup|`com.apple.audio.AudioMIDISetup`|Automator|`com.apple.Automator`|Books|`com.apple.iBooksX`|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`|FaceTime|`com.apple.FaceTime`|Find My|`com.apple.findmy`|Finder|`com.apple.finder`|Freeform|`com.apple.freeform`|Grapher|`com.apple.grapher`|Home|`com.apple.Home`|iMovie|`com.apple.iMovieApp`|Keychain Access|`com.apple.keychainaccess`|Keynote|`com.apple.iWork.Keynote`|Mail|`com.apple.mail`|Maps|`com.apple.Maps`|Messages|`com.apple.MobileSMS`|Music|`com.apple.Music`|Notes|`com.apple.Notes`|Pages|`com.apple.iWork.Pages`|Photo Booth|`com.apple.PhotoBooth`|Photos|`com.apple.Photos`|Podcasts|`com.apple.podcasts`|Preview|`com.apple.Preview`|QuickTime Player|`com.apple.QuickTimePlayerX`|Reminders|`com.apple.reminders`|Safari|`com.apple.Safari`|Shortcuts|`com.apple.shortcuts`|Stocks|`com.apple.stocks`|System Settings|`com.apple.systempreferences`|Terminal|`com.apple.Terminal`|TextEdit|`com.apple.TextEdit`|Time Machine|`com.apple.backup.launcher`|TV|`com.apple.TV`|VoiceMemos|`com.apple.VoiceMemos`|VoiceOver Utility|`com.apple.VoiceOverUtility`|Weather|`com.apple.weather`|Xcode|`com.apple.dt.Xcode`
|===