{"id":16653607,"url":"https://github.com/norm/hammerspoon-config","last_synced_at":"2025-10-29T07:08:28.013Z","repository":{"id":66550705,"uuid":"124395395","full_name":"norm/hammerspoon-config","owner":"norm","description":"My Hammerspoon configuration","archived":false,"fork":false,"pushed_at":"2022-02-14T06:35:16.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-19T10:32:40.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/norm.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-08T13:27:34.000Z","updated_at":"2022-02-14T05:43:29.000Z","dependencies_parsed_at":"2023-02-28T13:30:55.440Z","dependency_job_id":null,"html_url":"https://github.com/norm/hammerspoon-config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norm%2Fhammerspoon-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norm%2Fhammerspoon-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norm%2Fhammerspoon-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norm%2Fhammerspoon-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/norm","download_url":"https://codeload.github.com/norm/hammerspoon-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243266762,"owners_count":20263797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T09:46:02.370Z","updated_at":"2025-10-29T07:08:27.995Z","avatar_url":"https://github.com/norm.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hammerspoon configuration\n\nMy [hammerspoon](http://www.hammerspoon.org) configuration.\nFeel free to borrow/steal.\n\n## Stream Deck controls\n\nSee the [README in the stream_deck directory](stream_deck/README.md).\n\n![A photo of my Stream Deck showing my button configuration](deck.jpg)\n\n\n## mover.lua\n\nA Hammerspoon script to move/resize windows purely from the keyboard, as a\nreplacement for an old OS X program I used called\n[MercuryMover](https://web.archive.org/web/20230307035103/http://www.heliumfoot.com/mercurymover/),\nnow sadly defunct. To use it, copy the `mover.lua` file into your\n`.hammerspoon` directory and add `require \"mover\"` to your configuration.\n\n### Move the window\n\nHitting Function+Command+Up (Command+Pageup on a full-width keyboard) starts\nthe movement mode.\n\n**Move within display** The cursor keys will move the active window, and the\namount it moves changes depending on the modifier key you are holding:\n\n| Modifier | Movement            |\n| -------- | ------------------- |\n| Shift    | 1 pixel             |\n|          | 10 pixels           |\n| Option   | 100 pixels          |\n| Command  | to the display edge |\n\n**Move to another display** When a side of the window is at the display's\nedge, hitting *Command+Cursor* will move the window to the next display in\nthat direction if there is one.\n\n**Centre in display** Pressing the equals key will centre the window in the\ncurrent display.\n\n**Fill display** Pressing the plus key (Shift+equals) will resize the window\nto fill the display (note, this is different from either macOS's Maximise or\nZoom functions).\n\n**Show frame size** Pressing the minus key will display text showing the\ncurrent top, left, width, and height of the window.\n\n### Resize the window\n\n**Resize right and/or down** Hitting Function+Command+Right (Command+End)\nstarts the resize mode, anchored on the bottom-right corner of the window.\n\n**Resize left and/or up** Hitting Function+Command+Left (Command+Home) starts\nthe resize mode, anchored on the top-left corner of the window.\n\nThe cursor keys will move the relevant side of the window. The different\namounts the window resizes by when modifiers are held is the same as it is for\nmovement.\n\n### Specific sizes\n\nAs well as on-demand sizing of windows, you can create predefined size and\nplacement rules for windows in your Hammerspoon configuration by adding a\n[`hs.hotkey.modal.bind`](https://www.hammerspoon.org/docs/hs.hotkey.modal.html#bind)\nfunction onto the `mover` modal, like so:\n\n    mover:bind(\n        'shift',\n        '1',\n        function() resize_to(0, 0, 1160, 1440) end\n    )\n\nThe first argument is what modifiers are being held. The second argument is\nthe keypress. The third argument is the function to run when the key is\npressed, typically an anonymous function to call `resize_to(top, left, width,\nheight)` as shown.\n\nYou could create \"left-half\" and \"right-half\" sizes for your main display, for\nexample. I like to have keys that place my text editor, terminal window, and\nweb browser to fill my display without gaps.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorm%2Fhammerspoon-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnorm%2Fhammerspoon-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorm%2Fhammerspoon-config/lists"}