{"id":16596739,"url":"https://github.com/tuanpham-dev/spaceman","last_synced_at":"2025-09-03T03:40:21.704Z","repository":{"id":98570644,"uuid":"581046930","full_name":"tuanpham-dev/spaceman","owner":"tuanpham-dev","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-22T06:59:42.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-06T19:41:44.650Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuanpham-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-12-22T06:07:25.000Z","updated_at":"2025-03-06T10:39:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"d8ea58b4-8bfa-4955-a728-49b5c6b8d46c","html_url":"https://github.com/tuanpham-dev/spaceman","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tuanpham-dev/spaceman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuanpham-dev%2Fspaceman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuanpham-dev%2Fspaceman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuanpham-dev%2Fspaceman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuanpham-dev%2Fspaceman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuanpham-dev","download_url":"https://codeload.github.com/tuanpham-dev/spaceman/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuanpham-dev%2Fspaceman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273386617,"owners_count":25096246,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11T23:54:05.380Z","updated_at":"2025-09-03T03:40:21.676Z","avatar_url":"https://github.com/tuanpham-dev.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Space Manager\n\nThis [Hammerspoon](http://www.hammerspoon.org/) config enhances MacOS mission control by providing more functionalities for using keyboard (without mouse) to work with spaces. They are:\n* Workspace switcher wrap around.\n* Add/Remove workspace.\n* Move focused window to a space.\n* Move mouse to a monitor.\n* Space indicator in menubar or OSD.\n\n## Prerequisites\n\n* [Hammerspoon](http://www.hammerspoon.org/) must be installed.\n* Keyboard shortcut for Mission Control -\u003e Move left a space and Move right a space must be default as Control–Left Arrow (⌃←) and Control–Right Arrow (⌃→).\n\n## Usage\n\n- Download and copy `utils.lua`, `spaces.lua` and `space-indicator.lua` in `dot-hammerspoon` to your `~/.hammerspoon`.\n- Append content of `dot-hammerspoon/init.lua` to your `~/.hammerspoon/init.lua`.\n\nDefault keyboard shortcuts are:\n| Command                       | hotkey |\n|-------------------------------|--------|\n| Move left a space             | ⌘⌃←    |\n| Move right a space            | ⌘⌃→    |\n| Insert a space                | ⌘⌃↓    |\n| Remove last space             | ⌘⌃↑    |\n| Move window to left space     | ⌘⌃⇧←   |\n| Move window to right space    | ⌘⌃⇧→   |\n| Move mouse to previous screen | ⌘⌥⇧↑   |\n| Move mouse to next screen     | ⌘⌥⇧↓   |\n| Start Space Indicator         | ⌘⌃⌥⇧S  |\n\n## Customization\nTo set diferent hotkey you can change the value of `spaces.hotkeys[function]`. For example this bind ⌘⌥← to Move left a space and ⌘⌥→ to Move right a space.\n\n```lua\nlocal spaces = require('spaces')\nlocal spaceIndicator = require('space-indicator')\n\nspaces.hotkeys.moveLeftSpace = { mods = {'cmd', 'alt'}, key = 'left' }\nspaces.hotkeys.moveLeftSpace = { mods = {'cmd', 'alt'}, key = 'right' }\n\nspaces.insertRemoveSpaceCallback = spaceIndicator.render\n\nspaces.init()\nspaceIndicator.init()\n```\n\nTo add more hotkey to a function you can do something like this:\n\n```lua\n...\nhs.hotkey.bind({'cmd', 'alt', 'shift'}, 'left', spaces.moveMouseToPreviousScreen)\nhs.hotkey.bind({'cmd', 'alt', 'shift'}, 'left', spaces.moveMouseToNextScreen)\n...\n```\n\n## Reference\n\nFull list of function of spaces module\n\n| Function Name             |\n|---------------------------|\n| moveLeftSpace             |\n| moveRightSpace            |\n| insertSpace               |\n| removeSpace               |\n| moveWindowToLeftSpace     |\n| moveWindowToRightSpace    |\n| moveMouseToPreviousScreen |\n| moveMouseToNextScreen     |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuanpham-dev%2Fspaceman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuanpham-dev%2Fspaceman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuanpham-dev%2Fspaceman/lists"}