Skip to content

Hammerspoon spoon that indicates current indent level with beeps

License

Notifications You must be signed in to change notification settings

pitermach/IndentBeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IndentBeeper is a Hammerspoon spoon which is designed to fill in one of the larger gaps between Mac and Windows programming productivity with a screen reader. Ask a blind developer why they prefer to code on Windows, and chances are one of the main reasons you'll hear most often is that VoiceOver has no way to announce indentation level, something which can be very important especially when dealing with languages that require it like Python. IndentBeeper aims to solve this gap by indicating the indent of the line under the cursor with a sound, with its pitch indicating how indented the line is.

Installation

First, download and install Hammerspoon. You can do so either from their Github, or if you have it installed, through homebrew simply by running "brew install Hammerspoon" in the terminal. Once you have it installed, run it, and follow the prompts to grant accessibility permissions (I also choose to hide the app from the dock here so it stays out of your command-tab switcher)

Once Hammerspoon is installed and configured, navigate into the folder where you cloned this repository with Finder or another file manager, and open "IndentBeeper.spoon" which should cause Hammerspoon to install it into the right place. Finally, from the Hammerspoon menu extra select the open configuration option which should open your default text editor with your init.lua file. To make IndentBeeper work and do its thing, simply add the following 2 lines:

hs.loadSpoon("IndentBeeper")
spoon.IndentBeeper:start()

Save the file, return to the Hammerspoon menu extra but this time click the reload configuration option for your new changes to take effect. And this should be all there is to it!

Todo

While IndentBeeper already does what it's supposed to, there's a couple of things I'd like to do that were floated around by friends as suggestions:

  • Make number of spaces and tabs for the level of indent configurable. This is already kinda implemented in code.
  • Add an option to configure a folder where sounds are loaded from, to support theming.
  • Add an ability to make an include/exclude list of applications where the script should function

If any of these features sounds like something you'd really want or if you have other cool ideas on how this could be expanded, pull requests and other feature suggestions are welcome!

About

Hammerspoon spoon that indicates current indent level with beeps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages