Managing window size and position in OSX
This project is looking for a new maintainer. Until that transition is completed, there will likely not be further development on this project.
A highly recommended alternative to ShiftIt that can be implemented using Hammerspoon.
You can use the ShiftIt Spoon which implements the ShiftIt functionality in Hammerspoon.
Additionally there is a step-by-step guide to replicating ShiftIt's features using Hammerspoon yourself: https://github.com/fikovnik/ShiftIt/wiki/The-Hammerspoon-Alternative
Looking for a new maintainer #296.
ShiftIt is an application for OSX that allows you to quickly manipulate window position and size using keyboard shortcuts. It intends to become a full featured window organizer for OSX. It is a complete rewrite of the original ShiftIt by Aravindkumar Rajendiran which is not longer under development. For discussing any sort of stuff about this app, please create a new issue.
License: GNU General Public License v3
Change logs: change logs are versioned in the repository as well.
A binary build for OSX 10.7+ is available in releases.
Please note, because the binary is not signed, you'll have to "right click" on the application, click "Open", and subsequently click "Open" in the dialog that appears. You only have to do this the first time you launch the newly-downloaded application.
ShiftIt installs itself in the menu bar (optionally it can be completely hidden). It provides a set of actions that manipulates windows positions and sizes. Following is an example of list of actions available:
Normally, all Cocoa windows and X11 windows are supported. Some applications might not work correctly or not at all. There is a list of known problems. If you find any problem not mentioned there, please submit an issue.
The primary development is done on OSX 10.10, but it should be running under OSX 10.7 as well.
If this feature is on, snapping to the left side of the screen (and top, bottom, and right sides) will resize the window to half of the screen. If window is then snapped to the same side of the screen, it will resize to one third of the screen, and then two thirds of the screen.
If the feature is off, additional snappings will have no effect and the window will remain at half of the screen.
Currently, the only way to accomplish this is by running commands on the command line. To turn the feature on, run:
defaults write org.shiftitapp.ShiftIt multipleActionsCycleWindowSizes YES
To turn it off, run:
defaults write org.shiftitapp.ShiftIt multipleActionsCycleWindowSizes NO
Launch the application again. It will open the preference dialog.
While most of application windows should work well with ShiftIt, there are some exceptions (like the GTK+ OSX applications). There is a list of known problems. If you find any problem not mentioned in the list, please raise an issue.
ShiftIt is based on a Cocoa Accessibility API and sometimes this API can be a bit fragile and not do exactly what it should. In order to help to improve ShiftIt, please submit an issue every time you find some weird behavior. Before you do please consult the list of known problems. Thanks!
For instructions on accessibility in Mac OS X 10.9.x, see this comment.
This can be done either using the GUI in System Preferences -> Security & Privacy -> Privacy -> Accessibility where it is necessary to check and uncheck the checkbox which is next to ShiftIt in the Allow the apps below to control your computer.
If ShiftIt is not in the list, just drag and drop it there from the Applications
folder.
Alternatively, this can be also done in a command line, however, this is rather a hack with all potential issues hacks come with.
$ sudo sqlite3 '/Library/Application Support/com.apple.TCC/TCC.db' 'update access set allowed=1 where client like "%org.shiftitapp.ShiftIt%"'
For instructions on accessibility in Mac OS X 10.9.x, see this comment. If you've upgraded to 10.10, just uncheck and recheck the box to make things work again.
The repository is based on the git flow model. The development therefore happens in the develop
branch. Any contribution is welcomed!
To build ShiftIt locally just clone the repository or get the latest snapshot and execute following command in the ShiftIt
directory:
$ xcodebuild -target ShiftIt -configuration Release
To make a build without X11 support execute following:
$ xcodebuild -target "ShiftIt NoX11" -configuration Release
To install ShiftIt using brew you can use the cask.
$ brew install shiftit --cask
First, update the release version in ShiftIt/ShiftIt-Info.plist. NOTE the version is in the file twice;
once under <key>CFBundleShortVersionString</key>
and again under <key>CFBundleVersion</key>
. Make sure you update both!
Releases are handled using fabric. There are some dependencies that can be easily obtained using pip
:
NOTE: this is Python2 compatible; it will error out under Python3.
Using pipenv, a release environment can be created with the following command:
$ pipenv install --two
$ pipenv shell
Prior to running the commands below, ensure the following environment variables are set:
export SHIFTIT_PRIVATE_KEY=~/.shiftit/dsa_priv.pem.gpg # get this from the project contributors
export SHIFTIT_GITHUB_TOKEN=~/.shiftit/github.token.gpg # this is your personal access token
export SHIFTIT_GITHUB_USER=fikovnik
export SHIFTIT_GITHUB_REPO=ShiftIt
Get your personal access token from Github's developer settings page.
As you see above, the private key and github token can be gpg-encrypted at rest. This is optional and they can simply be plain text; just don't suffix the files with .gpg
.
The releases are fully automatic which hopefully will help to release more often.
Available commands
archive
- Archives buildbuild
- Makes a build by executing xcodebuildinfo
- Output all the build propertiesrelease
- Prepare the release: sign the build, generate appcast, generate release notesrelease_notes
- Generate release notesAfter fab release
instructions about how to create the actual release at github are printed.
Thanks JetBrains for kindly supporting this open source project by providing AppCode IDE.