aboutsummaryrefslogtreecommitdiffstats
path: root/Low Battery Yup d
AgeCommit message (Collapse)Author
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-16Initial CommitTeddy Wing