spectacle README

The project's README from github.com/eczarny/spectacle. As one markdown file: README.md.

Spectacle

Build Status

Easily organize windows without using a mouse.

Important Note

This project is not being actively maintained. Unfortunately, after almost a decade of on-and-off development I can no longer dedicate the time needed to be a responsible maintainer of this project. Spectacle will remain available for download but please use at your own risk. The source code will continue to be free and open to anyone, so feel free to make Spectacle your own.

Thanks to all the folks that have made Spectacle the first app they install a new Mac!

Spectacle users have recommended Rectangle as an open source alternative.

System requirements

Spectacle 0.8.6 is the last version to support Mac OS X 10.7; future releases will only support 10.9 or greater. Folks wishing to stay on 10.7 should download 0.8.6. Those looking for a version of Spectacle that supports 10.6 can still download 0.7.

Keyboard Shortcuts

Spectacle makes use of several keyboard shortcuts that trigger specific window actions. A window action is nothing more than a command that tells Spectacle how to change the size and/or position of a particular window.

A keyboard shortcut consists of one or more modifier keys paired with a character key. The common modifier keys Spectacle takes advantage of are:

Symbol Key
⌘ Command Key
⌃ Control Key
⌥ Option Key
⇧ Shift Key

The default keyboard shortcuts can be changed at any time. Use new key combinations to trigger window actions, or clear particular keyboard shortcuts to disable window actions entirely.

Basic window actions

To move a window to the center of the screen use the ⌥⌘C keyboard shortcut. Centered windows will not have their size altered. Maximize a window using the ⌥⌘F shortcut.

Windows can be moved to a number of predefined regions of the screen:



Windows may also be resized between thirds using any of the shortcuts above. For example, to have a window resized between 1/3 and 2/3 of the left region of the screen simply activate the left half ⌥⌘← keyboard shortcut more than once. Each time the shortcut is activated Spectacle will move the window between 1/3, 2/3, and back to 1/2 of the left side of the screen. This feature also applies to the upper left, lower left, upper right, and lower right shortcuts.

Spectacle can also move windows between horizontal and vertical thirds of the screen. The ⌃⌥→ keyboard shortcut will move a window to the next third of the screen, starting with the horizontal third region on the left of the screen. ⌃⌥← will move a window to the previous third of the screen.

Resizing a window is just as easy. To make a window a bit larger use the ⌃⌥⇧→ keyboard shortcut; ⌃⌥⇧← can be used to make a window smaller. Spectacle will always attempt to maintain contact between the edges of a window and the edges of the screen when resizing.

Multiple displays

The ⌃⌥⌘→ keyboard shortcut will move a window to the next available display. ⌃⌥⌘← can be used to move a window to the previous display.

Window action history

Spectacle remembers where every window was prior to executing a window action. To undo a window action use the ⌥⌘Z keyboard shortcut. Use the ⌥⇧⌘Z shortcut to redo the window action once again.

Common Issues

Spectacle is requesting access to use accessibility features

Apple's OS X Accessibility Protocol makes Spectacle possible. This protocol allows assistive applications to drive the user interface of another application running in OS X. In order to do its job Spectacle must be granted access to use these accessibility features. Instructions to do so will be displayed if Spectacle determines it does not have sufficient privileges.

Spectacle does not resize a particular window as expected

OS X allows applications to place constraints on the size of its windows. This allows application developers to design their user interfaces without needing to worry about supporting every possible window dimension. In these cases Spectacle will not be able to resize those windows to fit into the exact dimensions intended by the shortcut used.

As an example suppose a display has a 2880x1800 resolution and a window is being resized to fit the left half of the display. If the window has specified a minimum allowable width of 1600 pixels Spectacle will not be able to resize the window to fit the expected 1440 pixels. The constraints placed on windows will always be respected despite leading to potentially unexpected results; in this example Spectacle will resize the window's width to 1600 pixels.

Spectacle behaves strangely with Terminal windows

Terminal (and other terminal emulation applications like iTerm 2) place constraints on how windows are resized so entire rows and columns are always visible. This behavior works great since it guarantees no rows or columns are truncated. Unfortunately it does mean that Spectacle needs to do some extra work to make these windows fit.

To work around the limitations imposed on Terminal windows Spectacle will first try to resize a window to match the desired dimensions. If a window cannot be resized to fit Spectacle will immediately try to make the window a little smaller. This process is repeated until the window can be made to fit with its constraints still in place. The result is a window that is centered within the desired dimensions at the cost of a slightly jittery experience.

Spectacle does not work with all applications

Most applications built with the Cocoa frameworks can be readily manipulated via the OS X Accessibility Protocol; allowing Spectacle to interact with nearly every window it encounters. Unfortunately this is not always the case. Spectacle will be unable to manipulate the windows of applications that build their user interfaces in unexpected ways.

Building and running

Spectacle uses Carthage. Before building Spectacle in Xcode run:

$ carthage bootstrap --platform Mac

Once Carthage builds Spectacle's dependencies open the Xcode project:

$ open Spectacle.xcodeproj

After Xcode finishes loading the workspace press ⌘R to run Spectacle.

License

Copyright (c) 2017 Eric Czarny.

Spectacle should be accompanied by a LICENSE file containing the license relevant to this distribution.

spectacle (eczarny/spectacle)

Searching Database…

13.6K ·GitHub
archived
这是干什么用的?Spectacle 是一款免费的 Mac 应用,让你完全用键盘来整理窗口——移动、调整大小、居中或最大化,完全不用碰鼠标。
它是运行在我 Mac 上的应用,还是别的东西?它是一款原生 macOS 应用,每当你按下它的快捷键时,就会执行窗口操作——比如把窗口吸附到屏幕的一半或某个角落。
我怎么把它跑起来?下载 Spectacle 并启动;首次运行时它会请求访问 macOS 辅助功能权限,移动和调整其他应用的窗口都需要这个权限。
Spectacle 还在维护吗?不维护了——经过近十年的断断续续开发,作者已经停止了。这个应用仍然可以下载,但按原样提供,使用风险自负。
它支持哪些版本的 macOS?最新版本需要 Mac OS X 10.9 或更新。0.8.6 版是最后一个支持 10.7 的版本,0.7 版可以在 10.6 上运行。
源代码可以自由使用和修改吗?源代码保持免费开放给所有人,但 README 中没有指明任何标准许可证——应用附带一个 LICENSE 文件,版权归属 Eric Czarny 2017。
我可以更改默认的键盘快捷键吗?可以。每个快捷键都可以重新映射为新的组合键,你也可以清除单个快捷键,从而彻底禁用对应的窗口操作。
如果我再按一次同一个快捷键会怎样?尺寸会循环切换:反复按左半屏快捷键,窗口会在屏幕左侧的 1/3、2/3 和 1/2 之间来回切换。角落以及横向或纵向三等分也是同样的道理。
我能撤销一次窗口移动吗?可以——Spectacle 会记住每次操作之前每个窗口的位置。Option-Cmd-Z 撤销上一次操作,Ctrl-Shift-Cmd-Z 重做。
它对所有应用都有效吗?不一定。Spectacle 会遵守应用自身的尺寸限制(不会把窗口缩小到低于它的最小宽度),调整终端类窗口时会有轻微抖动,而且无法控制那些用特殊方式构建界面的应用。
Creator
eczarny
Size
12.5 MB
Stars
13.6K
Age
16y
Commits · 90 Days