docs » PasswordGenerator

Generate a password and copy to the clipboard.

Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/PasswordGenerator.spoon.zip

API Overview

API Documentation

Variables

password_generator_function
Signature PasswordGenerator.password_generator_function
Type Variable
Description

Explicit function used to generate passwords, if nil style is used instead.

Source Source/PasswordGenerator.spoon/init.lua
password_length
Signature PasswordGenerator.password_length
Type Variable
Description

Length of generated passwords. Is ignored by style xkcd.

Source Source/PasswordGenerator.spoon/init.lua
password_style
Signature PasswordGenerator.password_style
Type Variable
Description

Style for the generated password.

Source Source/PasswordGenerator.spoon/init.lua
word_count
Signature PasswordGenerator.word_count
Type Variable
Description

Number of words in generated passwords. Used by xkcd.

Source Source/PasswordGenerator.spoon/init.lua
word_leet
Signature PasswordGenerator.word_leet
Type Variable
Description

Which word number will have its word 733t transformed. Useful to ensure the word will at least have a one numeric value. Defaults to 0

Source Source/PasswordGenerator.spoon/init.lua
word_separators
Signature PasswordGenerator.word_separators
Type Variable
Description

String of separators to use between words. If multiple characters one will be chosen by random. Used by xkcd. Default is " _-,$"

Source Source/PasswordGenerator.spoon/init.lua
word_uppercase
Signature PasswordGenerator.word_uppercase
Type Variable
Description

Number of words to uppercase the first letter. Used by xkcd. Default is 1.

Source Source/PasswordGenerator.spoon/init.lua

Methods

bindHotkeys
Signature PasswordGenerator:bindHotkeys(mapping)
Type Method
Description

Binds hotkeys for PasswordGenerator

Parameters:

  • mapping - A table containing hotkey objifier/key details for the following items:
    • copy - Generate password and copy to clipboard
    • paste - Generate password and paste
Source Source/PasswordGenerator.spoon/init.lua
copyPassword
Signature PasswordGenerator:copyPassword()
Type Method
Description

Generates a password and copies to clipboard

Parameters:

  • None

    Returns:

    • The generated password
Source Source/PasswordGenerator.spoon/init.lua
pastePassword
Signature PasswordGenerator:pastePassword()
Type Method
Description

Generates a password and types it

Parameters:

  • None

    Returns:

    • The generated password
Source Source/PasswordGenerator.spoon/init.lua