Skip to content

A Hammerspoon Spoon for removing invisible characters for strings when you copy them

Notifications You must be signed in to change notification settings

Alazoral/invisikill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Invisikill

A Hammerspoon Spoon for macOS for detecting and removing invisible spaces and other gremlins from strings when you copy them. Invisible characters can ruin your code, your application, and your life. They can spread, so easily, copy and pasting, sticking around when you've thought you've deleted them. They are pernicious. They are the disease. Invisikill is the cure.

Installation

  1. Install Hammerspoon
  2. Download it as a zip
  3. Double click Invisikill.spoon to install it.
  4. Open your Hammerspoon Config using the menu item
  5. Add the following to your config:
    hs.spoons.use("Invisikill")
    spoon.Invisikill:start() 
  6. Save and reload your config

Usage

After configuration, Hammerspoon will check everything you copy to the clipboard, and if it matches the kill list, it will give you a notification that will give you the option to Remove the offenders. It's that simple.

screenshot of notification

To make sure it's working, copy the following word to the clipboard: te​st

Configuration

By default Invisikill will zap \x00 through \x7F. You can customise that by setting the kill list or appending to it in your Hammerspoon Config.

Reset the list

To reset the kill list to exactly your desire, just do this:

hs.spoons.use("Invisikill")
spoon.Invisikill.kill_list = {"fuck"}
spoon.Invisikill:start() 

That will ensure that you don't accidentally copy anything that includes the word "fuck", thus maintaining your milquetoast half-arsed glaze of professionalism that is preventing you from doing what you should be doing. It will let invisibles through though. Because you don't actually care. Burn it all down. As long as you look innocent they will never suspect a thing. Your exciting career in corporate sabotage begins here. You're welcome.

Add to the list

To kill the existing config but just add to it, do this:

hs.spoons.use("Invisikill")
spoon.Invisikill.addKillList({"", "", "", ""})
spoon.Invisikill:start() 

That will ensure you don't copy smart quotes. It won't make them dumb, though, it will just remove them. That is probably not what you're looking for. Your attempt at becoming smart has backfired. Look at you. You stood for the dumb quotes and you became dumb. You are dumb. You are all flat. The world around you is curling and you are just lying straight as a board. Are you dead or are you just having difficulty coping?

About

A Hammerspoon Spoon for removing invisible characters for strings when you copy them

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages