/ hammerspoon / README.md
README.md
 1  # hammerspoon
 2  
 3  My personal Hammerspoon configurations.
 4  
 5  ```bash
 6  .
 7  ├── README.md
 8  ├── Spoons                   # External spoons
 9  │   └── ShiftIt.spoon
10  │       └── init.lua
1112  ├── config
13  │   ├── init.lua             # config loader
14  │   └── keymaps.lua          # keybindings
1516  ├── init.lua                 # config entry-point
17  ├── plugins
18      └── pass.lua             # Standard Unix pass plugin for fetching secrets
1920  └── utils
21      ├── launchers.lua       # App launchers
22  ```
23  
24  ## How to Install?
25  
26  ```bash
27  # backup previously existing settings
28  mv ~/.hammerspoon{,.bak}
29  
30  # clone the main repo and move the configs
31  # to the default location
32  git clone https://github.com/silveiralexf/.dotfiles
33  mv .dotfiles/hammerspoon ~/hammerspoon
34  
35  # Reload configurations from Hammerspoon UI
36  ```
37  
38  ## Keybindings
39  
40  All bindings are defined at [./config/keymaps.lua](./config/keymaps.lua).
41  
42  Combination of keys are organized in modes for convenience, below a quick reference:
43  
44  | Mode       | Shortcuts          |
45  | ---------- | ------------------ |
46  | `LEADER`   | `alt + o`          |
47  | `LEADER_2` | `ctrl + alt + cmd` |
48  | `CMD`      | `cmd` on macos     |
49  | `CMD_REV`  | `cmd + shift`      |
50  
51  ### Quick Reference
52  
53  Below a quick reference of all available bindings considering the modes
54  from previous the section:
55  
56  | Shortcut       | Description                   |
57  | -------------- | ----------------------------- |
58  | `LEADER_2 + r` | Reload configs                |
59  | `LEADER + j`   | Launch Google Chrome          |
60  | `LEADER + k`   | Launch Unix Pass Fuzzy Finder |
61  
62  ## Password Store Finder
63  
64  For fetching credentials from [UNIX Standard Password manager](https://www.passwordstore.org/), use the keybinding referenced at the previous section (`LEADER + k`), and as long your password store is located at `$HOME/.password-store`, you should see an input as shown in the example below:
65  
66  ![pass-preview](../images/hammerspoon_pass.png)
67  
68  Select your credential to have it copied to clipboard.
69  
70  ### References & Inspirations
71  
72  A big shout-out to thank the amazing folks, from which I borrowed ideas,
73  and code to use as starting point for my own personal setup:
74  
75  - [github.com/peterlijn/hammerspoon-shiftit](https://github.com/peterklijn/hammerspoon-shiftit/)
76  - [github.com/4tXJ7f/hammerpass](https://github.com/4tXJ7f/hammerpass)