Skip to content

wyne/awesome-hammerspoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spoons

AppBindings.spoon

This spoon allows you to easily set custom app-specific key bindings.

Just provide the app name as seen in the menubar and a mapping from and to new keyboard shortcut.

Installation

Download: AppBindings.zip

Open: Unzip and open AppBindings.spoon. It should auto-install the spoon.

Configure: Add to your init.lua

hs.loadSpoon("AppBindings")

Usage: Replace App Name and key maps below.

spoon.AppBindings:bind('App Name', {
--  |----FROM----| |------TO------|
--  |meta  ,  key| |meta   ,  key |
  { {'meta'}, 'a', {'meta'}, 'down' }, -- Description
})

Example:

-- App Specific Bindings

hs.loadSpoon("AppBindings")

spoon.AppBindings:bind('Telegram', {
  { {'cmd', 'shift'}, ']', {'alt'}, 'down' }, -- Next chat window
  { {'cmd', 'shift'}, '[', {'alt'}, 'up' },   -- Prev chat window
  { {'ctrl'}, 'n', {}, 'pagedown' },          -- Scroll message window
  { {'ctrl'}, 'p', {}, 'pageup' },            -- Scroll message window
})

spoon.AppBindings:bind('Notion', {
  { {'cmd', 'shift'}, ']', {'cmd'}, ']' },
  { {'cmd', 'shift'}, '[', {'cmd'}, '[' },
  { {'cmd'}, 'o', {'cmd'}, 'k' },  -- Open search
})

spoon.AppBindings:bind('Slack', {
  { {'ctrl'}, 'n', {}, 'pagedown' },  -- Scroll message window
  { {'ctrl'}, 'p', {}, 'pageup' },    -- Scroll message window
})

Don't forget to save and reload Hammerspoon configuration.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages