[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6549":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":21,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},6549,"mjolnir","mjolnirapp\u002Fmjolnir","mjolnirapp","Lightweight automation and productivity app for OS X","",null,"C",5219,126,81,0,1,5,37.31,false,"master",true,[],"2026-06-12 02:01:26","# Mjolnir\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmjolnirapp\u002Fmjolnir\u002Fmaster\u002FMjolnir\u002FImages.xcassets\u002FAppIcon.appiconset\u002Ficon_128x128.png\" alt=\"Mjolnir logo\" title=\"Mjolnir logo\" align=\"right\" width=\"64\" height=\"64\"\u002F>\n\n*Lightweight automation and productivity power-tool for OS X*\n\n* Current version:  Mjolnir 1.0.1\n* Requires:         OS X 10.12 or higher\n\n## What is Mjolnir?\n\nMjolnir is an OS X app that lets you automate common tasks using the\nlanguage Lua. At its core, it doesn't actually do anything besides\nload up a Lua environment; the real power lies in all the useful\nmodules that you can install.\n\nYou write a \"config\", which just means `~\u002F.mjolnir\u002Finit.lua`. This\nfile, along with whatever modules it requires, have full access to the\nbuilt-in `mjolnir` module, and all Lua modules that you have installed\n(e.g. from LuaRocks or any way you want to install them).\n\n## Try it out\n\n1. Download [the latest release](https:\u002F\u002Fgithub.com\u002Fmjolnirapp\u002Fmjolnir\u002Freleases\u002Flatest), unzip, right-click `Mjolnir.app`, choose \"Open\". Or, install it with [Homebrew](https:\u002F\u002Fbrew.sh\u002F):\n\n   ~~~bash\n   $ brew install --cask mjolnir\n   ~~~\n\n2. Install Lua into \u002Fusr\u002Flocal e.g. from [Homebrew](http:\u002F\u002Fbrew.sh\u002F), and then install LuaRocks:\n\n   ~~~bash\n   $ brew update\n   $ brew install lua\n   $ brew install luarocks\n   ~~~\n\n3. Install some modules from this list: https:\u002F\u002Fluarocks.org\u002Fsearch?q=mjolnir\n\n   ~~~bash\n   $ luarocks install mjolnir.hotkey\n   $ luarocks install mjolnir.application\n   ~~~\n\n   Note: you don't need to install every module, since some of them have lower-level ones as dependencies, e.g. installing mjolnir-hotkey automatically installs mjolnir-keycodes, etc.\n\n4. Create `~\u002F.mjolnir\u002Finit.lua`, and at the top, require the modules you installed, e.g. like this:\n\n   ~~~lua\n   local application = require \"mjolnir.application\"\n   local hotkey = require \"mjolnir.hotkey\"\n   local window = require \"mjolnir.window\"\n   local fnutils = require \"mjolnir.fnutils\"\n   ~~~\n\n   NOTE: The `mjolnir.window` module comes with `mjolnir.application`,\n         so you don't need to (and can't) install it separately. Also,\n         `mjolnir.fnutils` is already installed as a dependency of the\n         other modules, so you don't need to explicitly install it.\n\n5. Start writing some fun stuff!\n\n   ~~~lua\n   hotkey.bind({\"cmd\", \"alt\", \"ctrl\"}, \"D\", function()\n      local win = window.focusedwindow()\n      local f = win:frame()\n      f.x = f.x + 10\n      win:setframe(f)\n   end)\n   ~~~\n   \n6. Reload config using `mjolnir.reload()` in the console.\n\n## Uninstalling\n\nIf for any reason you want to undo everything in the above steps, do:\n\n~~~bash\n$ luarocks purge --tree=\u002Fusr\u002Flocal\n$ brew uninstall lua luarocks\n$ rm ~\u002F.luarocks\u002Fconfig.lua\n~~~\n\n## Installing to $HOME\n\nIf you run `luarocks --local install ...` instead of `luarocks\ninstall ...`, it will install to `~\u002F.luarocks\u002F` instead of\n`\u002Fusr\u002Flocal`. Update your `package.path` and `package.cpath`\naccordingly, as noted in the FAQ.\n\n## Finding modules\n\nCheck out https:\u002F\u002Fluarocks.org\u002Fsearch?q=mjolnir for a list of\npublished Mjolnir modules.\n\nNotable modules:\n\n- `mjolnir.hotkey` for creating global hotkeys\n- `mjolnir.application` for inspecting and manipulating running OS X applications and windows\n- `mjolnir.alert` for showing on-screen messages\n\n## Documentation\n\nMjolnir and mjolnir-modules use [Dash](http:\u002F\u002Fkapeli.com\u002Fdash) for\ndocumentation. You can install Mjolnir's docset from the User\nContributed section of the Downloads tab in Dash's Preferences\nwindow. It should generally update on its own.\n\n## Publishing modules\n\nWrote an awesome module, and want to share with the world? Check out\nthe `sample-plugin` subdirectory.\n\nWhen it's published, please announce it on our mailing list :)\n\nAvoid the temptation to reformat the Repos page in the wiki. It uses\na strict format that's needed by the documentation generator.\n\n## Principles\n\nDevelopment of Mjolnir.app and the core Mjolnir modules follow these\nprinciples:\n\n1. They must be stable. The app should never crash. You should only\n   ever have to launch it once, and it should stay running until you\n   quit. Period.\n\n2. They must be lightweight. They should never do anything that drains\n   your computer's battery. They should never poll for anything. They\n   should use as little RAM as possible. Everything they do should\n   feel instant and snappy, never sluggish or delayed.\n\n3. They should be completely transparent. There should be no surprises\n   in how it's behaving, or what's being executed and when. Everything\n   should be fully predictable.\n\n4. They must not be bloated. The app and core modules must always\n   adhere to the minimalist philosophy, no excuses. Everything else\n   can be a separate Lua module.\n\n## FAQ\n\n1. **Add Spaces support!**\n\n   Not a question. But anyway, there are no public *or* private APIs\n   to manage Spaces in OS X 10.9 or 10.10, there are only private APIs\n   that work in 10.8. No open source project has been able to crack\n   this problem yet, not just us.\n\n2. **Does LuaRocks have a way to upgrade modules automatically?**\n\n   Sadly no. But it can be done manually by removing a module and\n   re-installing it. I'm hoping maybe one day some enthusiastic\n   Mjolnir users can jump in and improve the tooling around this. ;)\n\n3. **I'm getting an error like this: \"attempt to index field 'win' (a nil value)\"**\n\n   Disable and re-enable accessibility. It may look enabled, but do it\n   anyway. (This is an OS X bug, not a Mjolnir bug.)\n\n4. **I don't have things in \u002Fusr\u002Flocal, so I can't load modules!**\n\n   Add the path to `package.path` and `package.cpath` in your\n   init-file. For example, if you're using Boxen, add this:\n\n   ~~~lua\n   package.path = package.path .. ';\u002Fopt\u002Fboxen\u002Fhomebrew\u002Fshare\u002Flua\u002F5.3\u002F?.lua'\n   package.cpath = package.cpath .. ';\u002Fopt\u002Fboxen\u002Fhomebrew\u002Flib\u002Flua\u002F5.3\u002F?.so'\n   ~~~\n\n## Mjolnir vs. other apps\n\n1. **Hydra, Phoenix, or Zephyros?**\n\n   Those are my old apps. Mjolnir is their spiritual successor.\n\n2. **Slate**\n\n   They're both programmer-centric with somewhat similar goals but\n   different approaches. Mjolnir is more modularized, Slate is more\n   all-in-one. Try them both and see which one suits you better.\n\n3. **Spectacle, Moom, SizeUp, Divvy**\n\n   Mjolnir is intended for programmers who want to write programs that\n   customize their environment. It's not intended to be a drag-n-drop\n   solution; it's meant to allow you to write your own personalized\n   productivity enhancement suite to keep and to use long-term.\n\n4. **Hammerspoon**\n\n   [Hammerspoon](https:\u002F\u002Fgithub.com\u002Fhammerspoon) is a fork of Mjolnir (get it? a \"fork and\u002For spoon\" of Mjolnir aka. Thor's \"hammer\"? :) ). It was created to turn Mjolnir back into an all-in-one application, for those who prefer that over a completely decentralized module system with a bare-bones core (kind of like the debate of monolithic kernel vs microkernel). It's actively maintained, like literally there's commit activity every week.\n\n## Community\n\nOur [mailing list](https:\u002F\u002Fgroups.google.com\u002Fforum\u002F#!forum\u002Fmjolnir-io)\nis a fine place to share ideas, and follow releases and announcements.\n\nWe also have a shrinking IRC channel on freenode, #mjolnir.\n\n## Credits and Thanks\n\nMjolnir is developed by Steven Degutis with the help of\n[various contributors](https:\u002F\u002Fgithub.com\u002Fsdegutis\u002Fmjolnir\u002Fgraphs\u002Fcontributors).\n\nSpecial thanks, in no special order:\n\n- @Habbie for his constant help and support ever since the moment I\n  first jumped into #lua and said \"anyone wanna try out an OS X window\n  manager scriptable in Lua?\" and being the first person to join our\n  IRC channel and for helping with nearly every Lua question I had\n\n- @cmsj, @Keithbsmiley, @BrianGilbert, @muescha, @chdiza, @asmagill,\n  @splintax, @arxanas, and @DomT4 for all their help and support\n\n- @jasonm23 for writing, not one, not two, but *three* app icons for\n  this project\n\n- @jhgg for contributing so many awesome modules to the project\n\n- @kapeli for his patience with my constant Dash questions and PRs\n\n- Everyone else who has helped who I've probably forgotten: thanks for\n  all your help!\n\n- Everyone who has donated: thank you so much for your support!\n\nSee the in-app About panel for the open source licenses for the\nsoftware Mjolnir uses internally (basically just Lua's license).\n\n## Changes\n\n**NOTE:** When upgrading, System Preferences will *pretend* like\n  Mjolnir's accessibility is enabled, showing a checked checkbox. But\n  in fact, you'll still need to be disable and re-enable it. This is a\n  bug in OS X.\n\n### 0.4.3\n\n- Removed donation requests\n\n### 0.4.{0,1,2}\n\n- Default implementation of `mjolnir.showerror(err)` now opens the console and focuses Mjolnir\n- There's a new variable, `mjolnir.configdir = \"~\u002F.mjolnir\u002F\"` for users and modules to coordinate\n- New `mjolnir.focus()` function to make Mjolnir the focused app\n- The original `print` function is now stored in `mjolnir.rawprint` (rather than `mjolnir.print`, to disambiguate it)\n- New `mjolnir.openconsole()` function to open console (and bring Mjolnir to front)\n\n### 0.3.1\n\n- Renamed global `mj` to `mjolnir`\n\n### 0.3\n\n- The UI has changed drastically. Expect nothing to be in the same\n  place or look the same. Pretend it's a brand new app.\n- Modules are now handled by LuaRocks instead of by the app itself.\n- The \"core\" namespace has been renamed to \"mj\".\n- The 'mj.window' module now ships with the 'mj.application' LuaRocks\n  package since they depend on each other.\n- `mj.screen:frame_without_dock_or_menu()` is now called `mj.screen:frame()`\n- `mj.screen:frame_including_dock_and_menu()` is now called `mj.screen:fullframe()`\n\n## License\n\n> Released under MIT license.\n>\n> Copyright (c) 2014 Steven Degutis\n>\n> Permission is hereby granted, free of charge, to any person obtaining a copy\n> of this software and associated documentation files (the \"Software\"), to deal\n> in the Software without restriction, including without limitation the rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and\u002For sell\n> copies of the Software, and to permit persons to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> The above copyright notice and this permission notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n","Mjolnir 是一款轻量级的 macOS 自动化和生产力工具，使用 Lua 语言来实现任务自动化。其核心功能是提供一个 Lua 环境，用户可以通过安装各种模块来自定义脚本，以完成窗口管理、快捷键绑定等操作。技术特点包括支持 LuaRocks 安装扩展模块，以及通过简单的 Lua 脚本来实现复杂的功能。适用于需要提高工作效率或希望自定义操作系统行为的 macOS 用户，特别是开发者和技术爱好者。",2,"2026-06-11 03:07:35","top_language"]