aerospace-marks
Beta: I use this daily, but it's still a work in progress. Please report any issues or ideas in the issues section.
This is a CLI extension for AeroSpace WM that helps manage marks on windows.
It’s heavily inspired by sway marks, but follows the aerospace style of commands:
mark --add|--replace [--toggle] <identifier>
Marks are arbitrary labels that can be used to identify certain
windows and then jump to them at a later time. Each identifier
can only be set on a single window at a time since they act as
a unique identifier. By default, mark sets identifier as the only
mark on a window. --add will instead add identifier to the list
of current marks for that window. If --toggle is specified mark will
remove identifier if it is already marked.
Why not use named workspaces?
TL;DR: Dynamic mappings to specific windows, not workspaces.
I wanted something more granular than workspaces — I want to jump to a specific window, given a context.
Sometimes my "video" context means YouTube, sometimes it’s a video player, sometimes a browser. I want to be able to jump to the right window, regardless of which workspace it's on.
Usage
Allow one to mark a window with the given identifier.
aerospace-marks mark [--add|--replace] [--toggle] <identifier>
And then focus to a window with the given mark.
aerospace-marks focus <identifier>
Config Usage
# ~/.config/aerospace/config.toml
[mode.main.binding]
# Mark
cmd-shift-h = ["exec-and-forget aerospace-marks mark h", "mode main"]
cmd-shift-j = ["exec-and-forget aerospace-marks mark j", "mode main"]
cmd-shift-k = ["exec-and-forget aerospace-marks mark k", "mode main"]
cmd-shift-l = ["exec-and-forget aerospace-marks mark l", "mode main"]
cmd-shift-b = ["exec-and-forget aerospace-marks mark browser", "mode main"]
# Focus
cmd-ctrl-h = ["exec-and-forget aerospace-marks focus h", "mode main"]
cmd-ctrl-j = ["exec-and-forget aerospace-marks focus j", "mode main"]
cmd-ctrl-k = ["exec-and-forget aerospace-marks focus k", "mode main"]
cmd-ctrl-l = ["exec-and-forget aerospace-marks focus l", "mode main"]
cmd-ctrl-b = ["exec-and-forget aerospace-marks focus browser", "mode main"]
See more in documentation
Installation
Using Nix
If you have Nix installed, you can build and install aerospace-marks using the following command:
nix profile install github:cristianoliveira/aerospace-marks
You can also run without installing it by using:
nix run github:cristianoliveira/aerospace-marks
This will build the default package defined in flake.nix.
Installing with Go
If you have Go installed, you can install aerospace-marks directly using:
go install github.com/cristianoliveira/aerospace-marks@latest
This will download and install the latest version of aerospace-marks to your $GOPATH/bin.
Building from Source
To build from source, ensure you have Go installed. Then, clone the repository and run:
git clone https://github.com/cristianoliveira/aerospace-marks.git
cd aerospace-marks
go build -o aerospace-marks
This will create an executable named aerospace-marks in the current directory.
Packages