Skip to content

Sample Configurations

Dongwoon Son edited this page Jan 7, 2023 · 103 revisions

Please feel free to add a link here to your Hammerspoon configuration (i.e. init.lua) if you want to share it with the world.

  • Ki.spoon - Work in macOS like you work in vim (reddit post here)
    • Binds modal hotkeys to enter and exit a number of different modes to automate macOS
    • Ships with default shortcuts for almost every action for all stock macOS apps
    • Provides an API for configuring any default shortcut and adding your own custom modes, applications, and actions
  • andweeb's configuration - Personal usage and configuration of Ki.spoon and custom SizeUp-like window management
  • Lunette -- Zero-config Spectacle keybindings for Hammerspoon
  • VimMode.spoon -- Adds Vim movements and operations to any OS X input box. Trying to get a mostly complete set of motions and operators implemented. Supports jk to enter normal mode, as well as per-app disabling.
  • new-filet-o-fish -- Mac Improvemen
  • digitalbase init.lua -- Config for 34inch display. Focus/Launch apps with shortkeys, auto layout/tile for coding and comms, shortcuts to resize apps
  • Awesome-hammerspoon, as advertised. —- Highly modal-based, vim-styled key bindings, provides functionality like desktop widgets, window management, application launcher, timer indicator, dictionary translation, cheatsheets... etc.
  • miro's window management -- To move windows in halves and corners using only arrows (no use of strange letters), magic and very intuitive!
  • CommandPost -- Adds lots of additional shortcuts and features to Apple's Final Cut Pro. Well documented, and makes use of almost every Hammerspoon extension (i.e AppleScript, GUI Scripting, hs.chooser, Pasteboard History, etc).
  • rtoshiro's init.lua -- Well documented. Some useful shortcuts to resize and position windows. Custom layouts for each application.
  • victorso's Jumpcut replacement -- Clipboard manager with direct paste option.
  • ztomer's Configuration -- Keyboard based move/ resize + Pomodoro timer.
  • cmsj's init.lua
  • asmagill's configuration -- undocumented and may invoke in-progress or not currently working code, but if you can use anything in it, enjoy!
  • heptal's configuration -- location-based redshift, imgur uploader, window movement/resizing with undo
  • marksantcroos's configuration -- near real-time view of my $HOME/.hammerspoon!
  • auser's configuration
  • mgee's configuration -- Application specific window layouts and global keyboard layers.
  • af's configuration
  • BrianGilbert's configuration -- well documented, mainly window management things.
  • andrewhampton's configuration -- Window management and weather/gmail menubar items
  • Krillere's init.lua (Window resizing)
  • Safari Tab switch (CMD #), like Chrome
  • TwoLeaves' configuration -- Supports changing Spaces.
  • Songchenwen's configuration -- Supports Undo.
  • exark's configuration - Basic window management and shortcuts. Readable and hopefully well-documented.
  • oskarols's configuration - Extended app launcher that cycles between app windows and saves mouse positions. Fullscreen-hotkey that toggles between fullscreen and previous state. Create a grid-on the fly and resize/move windows using your keyboard.
  • STRML's configuration - Basic window movement using hjkl keys, window resizing with -=[], saved layouts, Slack tab switching override (ctrl-tab is back!), saved layout for 4k screen.
  • jwkvam's configuration - Draws a red border around the active window.
  • pstadler's configuration - Fast spaces switching, resize and move windows, focus windows, reconnect to current wifi network, hotkey triggered caffeinate menu, enhanced battery status notifications
  • zzamboni's configuration - Near-live contents of my ~/.hammerspoon directory. Includes window management, audio control, clipboard management, and various other things as I add them.
  • szymon_k's configuration - huge config including one-of-a-kind functions like automatic launch/cycle/create-new-window for multiple apps (smartLaunchOrFocus), moving windows between spaces (moveToSpace), ios-like dot indicators for spaces at the bottom of the screen (spacesDots), and more crazy stuff.
  • Oh-my-Hammerspoon! - early work on a generic framework for Hammerspoon configuration that provides a useful out-of-the-box configuration and allows loading and configuration of "plugins". Draws a lot of code and ideas from some of the other configurations in this page.
  • tdlm's pastebin.lua - CTRL+ALT+CMD+P for pasting text to pastebin API and getting a URL copied to your clipboard on success. Requires API keys.
  • tdlm's url_shortener.lua - CTRL+ALT+CMD+S for pasting URL bit.ly API and getting a URL copied to your clipboard on success. Requires API key.
  • tdlm's github_pull_requests.lua - Lists Github Pull Requests in menu bar with a simple number indication. Requires API key and filling out the GITHUB_API_USER, GITHUB_API_TOKEN and GITHUB_REPOS fields.
  • Teun's configs - Google Authenticator tokens at a keystroke, making use of OSX Keychain, Dutch TV guide in a menu
  • Dharma Poudel's configs - Cheatsheet copycat, battery configurations, window management and many more random stuffs.
  • j-martin's config - Combination of hyper-key mapping for applications and window management.
  • scottcs's config - timers, cheatsheet, notational velocity, scratchpad, weather, and more.
  • spacehammer - simple config inspired by Spacemacs
  • S1ngS1ng's init.lua
    • Window management includes Set to Another Screen, Snap to 4 directions, and Free-Style Resize
      • NEW Add Windows-like reletive window cycle. Works the same as winKey + left/right
    • Global music control shortcut (I am using VOX for now). See vox-control.lua
    • NEW VIM-like key global binding, i.e. Ctrl + h/j/k/l. Works well with combination of alt, shift, and cmd. Thanks to A-Ron's help
  • weather menu bar app - Shows current temperature and conditions in the menu bar (based on Yahoo Weather API)
  • Launcher Mode (inspired by Karabiner) - Use right-cmd + X to launch Xcode, right-cmd + C=Chrome, right-cmd + T=Terminal, etc.
  • control+hjkl to arrow keys - simple configutation. just key remapping `control + hjkl' to 'arrow keys'
  • raulchen's configuration: Tmux style prefix key bindings, window management, mouse key, double CMD-Q to quit app, Vim style arrow keys, and more.
  • emanresusername's .hammerspoon
  • dulm's config - A framework for diffrent app with diffrent key binding. In this file is emacs basic key binding.
  • hyperex - pwerful hyper-key library
  • foundation_remapping - implementation of TN2450: Remapping Keys in Sierra
  • knu's modules - key chord implementation (SimultaneousKeyPress in Karabiner), application/window based keymap, pseudo hotkeys with extended modifiers support, emoji chooser, etc.
  • anoxape's .hammerspoon - cheatsheet, dock_press, ensure, layout_cache, etc.
  • ControlEscape.spoon - Supercharge your control key. Tap it for escape. Hold it for control. (Optional: Remap caps lock to enjoy a physical key for control and escape right on the home row.)
  • Hammerspoon config - Some key bindings, hopefully useful selection of modules/spoons/menubar_apps + IOTD from various sources
  • dbmrq's configuration
  • MenuHammer - A menuing system based on the Spacemacs command system. Menus are customizable with a simple table and a variety of actions (including executing lua functions) can be performed by menu items.
  • danshan's configuration - Application launcher, Window resize, and window movement.
  • jjaaccoobb's alacritty global shortcut - Simple configuration enabling a system-wide shortcut to focus the terminal (alacritty is a particular good use case)
  • roeybiran's config - Includes, amongst others: a ~/Downloads watcher, Wi-Fi watcher, and an extensible app watcher with lots of (optional) app-specific automations + UI scripts. Also:
    • Documented, modular and completely Spoon-based.
    • Easy on system resources, even with all Spoons loaded.
    • Linted with luacheck and formatted with LuaFormatter.
  • gwww's config - simple but powerful. Ditched karabiner due to keyboard compatibility issues and have not looked back. The hyper module replaces karabiner. Also have a smartLaunch module that cycles through windows of an app or launches app if it is not running. Other than that similar to a number of other configs out there.
  • KURANADO's config - Includes windows mangnet、application switch、emoji search、password paste、network speed、shotcut list check、remind from work、auto update、function menu etc.(包含窗口管理、应用切换、表情包搜索、密码粘贴、实时网速、快捷键列表查看、提醒下班、自动更新、功能菜单等功能)
  • Switch DNS By MenuBar on MacOS - show dns config and switch dns config by clicking menubar icon(状态栏展示DNS配置,支持点击切换配置)
  • amlestin's config - Balances my AirPods sound balance automatically using AudioDevice methods
  • Space Manager - Enhances MacOS mission control by providing more functionalities for using keyboard (without mouse) to work with spaces. They are:
    • Workspace switcher wrap around.
    • Add/Remove workspace.
    • Move focused window to a space.
    • Move mouse to a monitor.
    • Space indicator in menubar or OSD.
  • windvalley's config
    • Application quick launch or hide.
    • Application window manipulation, such as moving, resizing, changing position, etc.
    • System management, such as lock screen, restart system, etc.
    • Auto switch input method according to the application.
    • Switch to the specified input method.
    • Open the specified website directly.
    • Toggle the keybindings cheatsheet.
    • Keep the desktop wallpaper the same as the bing daily picture.
    • Auto reload configuration when lua files changes.
    • The code structure is clear and easy to customize into your own configuration.
  • DefaultKeyBinding.spoon - Create DefaultKeyBinding.dict