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 line 108
password_length
Signature PasswordGenerator.password_length
Type Variable
Description Length of generated passwords. Is ignored by style xkcd.
Source Source/PasswordGenerator.spoon/init.lua line 113
password_style
Signature PasswordGenerator.password_style
Type Variable
Description Style for the generated password.
Source Source/PasswordGenerator.spoon/init.lua line 100
word_count
Signature PasswordGenerator.word_count
Type Variable
Description Number of words in generated passwords. Used by xkcd.
Source Source/PasswordGenerator.spoon/init.lua line 118
word_leet
Signature PasswordGenerator.word_leet
Type Variable
Description Which word number will have its word `733t` transformed.
Notes
  • Useful to ensure the word will at least have a one numeric value.
  • Defaults to 0
Source Source/PasswordGenerator.spoon/init.lua line 123
word_separators
Signature PasswordGenerator.word_separators
Type Variable
Description String of separators to use between words.
Notes
  • If multiple characters one will be chosen by random.
  • Used by xkcd. Default is " _-,$"
Source Source/PasswordGenerator.spoon/init.lua line 132
word_uppercase
Signature PasswordGenerator.word_uppercase
Type Variable
Description Number of words to uppercase the first letter.
Notes
  • Used by xkcd. Default is 1.
Source Source/PasswordGenerator.spoon/init.lua line 141

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
Returns
Source Source/PasswordGenerator.spoon/init.lua line 149
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 line 178
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 line 193