aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-11-16Configure ShortcutRecorderShortcutRecorderTeddy Wing
2016-11-16Add 'ShortcutRecorder'Teddy Wing
Add this library as a Git submodule. We'll be using it to set a configurable shortcut and pull it when needed from `NSUserDefaults`.
2016-11-16MainMenu.xib: Remove `IBDocument.UseAutolayout` keyTeddy Wing
Xcode (4.5.2) was crashing whenever I tried to open the MainMenu.xib file. A Stack Overflow post turned up that recommended removing this key in order to get it working again: http://stackoverflow.com/questions/27167679/xcode-6-1-crashes-whenever-i-use-interface-builder/27932154#27932154 Sure, works for me.
2016-11-16Add new target "Low Battery Yup"Teddy Wing
This new target will be used as our non-background user-facing configuration application. It's purpose will be to define a custom shortcut to trigger the mouse move & click action.
2016-11-16Remove MainMenu.xibTeddy Wing
Since this is a backround app (3db243f3c84f7ab36747f4badfd4f57a26563821), we don't have a UI and have no need for any nib files. We'll make an additional target as a separate application that does have a UI and will allow customisation of the global hotkey.
2016-11-16Mouse: Change mouse coordinates to Low Battery OK buttonTeddy Wing
Modify the coordinates such that instead of clicking the center of the screen, we click the OK button on the low battery warning dialog. Rename the method according to its new intent. TODO: This probably doesn't work on other displays that have different resolutions. We need to check that and figure out a cross-display solution.
2016-11-16Info.plist: Set LSBackgroundOnly=1Teddy Wing
Make this a background-only app. We don't have any UI for the daemon part of the app. It should just sit quietly until it's called by a global hotkey to click in the right part of the screen.
2016-11-16Rename project to "Low Battery Yup.d"Teddy Wing
Change the last space to a dot to make it more obvious that it's supposed to mean 'daemon'.
2016-11-16Mouse: Move `centerPoint` back to `moveToCenter`Teddy Wing
This method isn't reused anywhere so it can go back into the `moveToCenter` method. Originally created before `_cursor_position`. See 1832514ab872dec621d5f403eb5328167b3da033.
2016-11-16Mouse: Implement `click`Teddy Wing
Method that clicks the mouse. * Add `_cursor_position` instance var that describes the current cursor position after the `moveToPoint` method is called * `click` will click at the `_cursor_position` point * I had extracted the centering code to `centerPoint` (which maybe should have been called `pointAtCenter`) out of the `moveToCenter` method because I briefly used it in `click` as a test before adding the `_cursor_position` ivar. This should be reintegrated with `moveToCenter`. * Add a `post_mouse_event` function that abstracts the CG calls needed to send a mouse event since we need both click down and up events. Based on: http://stackoverflow.com/questions/1483657/performing-a-double-click-using-cgeventcreatemouseevent
2016-11-16Make the mouse move to the center of the screenTeddy Wing
* Create a `Mouse` class to group mouse movement and click functionality * Add functions to move the mouse to the center of the screen (primary display) * Move the cursor to the center on launch
2016-11-16Add project.xcworkspaceTeddy Wing
Apparently maybe it should be committed? http://stackoverflow.com/questions/22345575/should-xcworkspace-be-in-gitignore#22346270
2016-11-16.gitignore: Ignore _private directoryTeddy Wing
Uncommitted directory for development resources and gatherings.
2016-11-16Add .gitignoreTeddy Wing
Copied from another project (Aye-Search). Ignore common Xcode files.
2016-11-16Initial CommitTeddy Wing