1.0.4 • Published 8 years ago

mac-space v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

mac-space

Automate spaces on Mac OS X.

mac-space Demonstration


Dependencies

  • Max OS X >= 10.11

  • Node >= 4.2


Installation

npm install -g mac-space;

Commands

  • Help: mac-space --help

  • Start: mac-space --config /path/to/config.json


Configuration

See ./config/example.json for a sample configuration.

JSON Schema

The application expects the following configuration in a valid JSON format.

KeyTypeDefaultRequiredDescription
delayNumber0.25NoThe delay between launching windows.
spaceArray/Object[]NoThe configuration for the space.
columnObject{}NoThe grid columns configuration.
maxNumber0NoThe maximum number of columns to allow.
spacingNumber0NoThe number of pixels to space the columns with.
enabledBooleantrueNoWhether the space is enabled or not.
rowObject{}NoThe grid rows configuration.
maxNumber0NoThe maximum number of rows to allow.
spacingNumber0NoThe number of pixels to space the rows with.
spaceNumber1NoThe Mac OS X space to assign the windows to.
windowArray/Object[]NoThe configuration for each of the windows for the space.
applicationStringYesThe name of the application recognizable by AppleScript.
descriptionStringNoA description for the window.
osascriptArray/StringNoInvoke OSA commands to assist with launching the window.
osascriptPostArray/StringNoInvoke OSA commands after the window has launched.
osascriptPreArray/StringNoInvoke OSA commands before the window has launched.
shellArray/StringNoInvoke shell commands to assist with launching the window.
shellPostArray/StringNoInvoke shell commands after the window has launched.
shellPreArray/StringNoInvoke shell commands before the window has launched.
titleStringNoThe title for the window.

Notes

  • Application: The space.window.application field usually expects the name of the Application that lives in your /Application/ folder. For example if you wanted to launch Mac OS X's native text application, then the value would be TextEdit.

  • Delay: You may need to adjust the delay depending on the speed of your system.

  • Disabling Grid/Resizing/Moving: Set the maximum number of columns and rows to 0 to disable resizing and moving of windows. Doing this will simply assign the window to a specific space.


Development

  • Help: npm run help

  • Start: npm run start -- --config /path/to/config.json

  • Test: npm run test


Known Issues

  • Resizing Problems: Some OS X applications simply don't support resizing of their windows, and there's not much that can be done about this. If you have an idea or working example, please feel free to create a new issue or make a pull request.

  • Spaces Must Already Exist: The application will not automatically create spaces for you. When running the application your spaces must already exist, otherwise the application will just use the current space where it's being run from.

  • Moving Windows Across Spaces: It's possible, but currently unsupported due the amount of work required. Feel free to make a pull request.


Copyright (c) 2016 Dolox, Inc. All rights reserved.

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago