-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathsample.toml
More file actions
104 lines (79 loc) · 3.69 KB
/
sample.toml
File metadata and controls
104 lines (79 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#################################################
# This file is a sample of some things you
# can do with this leader key setup. It's active
# right now! Set leader_key below and try it! The
# lua prioritizes home.toml, then work.toml,
# then falls back to this sample.toml. If you
# want different profile names, you can add it
# to the list in ~/.hammerspoon/init.lua.
#################################################
# settings
leader_key = "f18" # required, the leader key that starts the sequence
leader_key_mods = "" # optional, default "", not recommended - a dedicated leader key is better
# supports cmd ctrl alt shift
auto_reload = true # optional, default true, reload when any file in this directory is saved
toast_on_reload = true # optional, default false, show a toast when the config is reloaded
show_ui = true # optional, default true, show the ui with your key maps
key_maps_per_line = 3 # optional, default 5, number of key maps per line in the ui
# set a key to open an app
t = "Terminal"
# or a url
g = "https://google.com"
# use an array to change the label in the popup
v = ["Visual Studio Code", "VS Code"]
# create groups to nest actions
[l]
label = "[links]" # the "label" key is reserved to change the label of the group
g = "https://github.com"
b = "https://bsky.app"
t = "https://twitter.com"
# groups can be nested too!
[l.m]
label = "[me]"
g = ["https://github.com/saml-dev", "my github"]
b = ["https://bsky.app/profile/saml.dev", "my bluesky"]
t = ["https://twitter.com/saml_dev", "my twitter"]
# raycast deep links are supported
[r]
label = "[raycast]"
c = ["raycast://extensions/raycast/raycast/confetti", "confetti"]
e = ["raycast://extensions/raycast/emoji-symbols/search-emoji-symbols", "emoji"]
# use prefixes for special actions
[p]
label = "[prefixes]"
t = "text:sam@saml.dev" # types "sam@saml.dev"
z = "cmd:code ~/.zshrc" # run any terminal command
x = "code: ~/.zshrc" # open a file or directory in VS Code
s = "shortcut:cmd shift 4" # trigger a keyboard shortcut
w = "menu:File>New Window" # select menu items (frontmost app)
n = "menu:Safari|File>New Tab" # select menu items (specific app)
r = "reload" # reserved for reloading your hammerspoon config (helpful when auto_reload is false)
i = "input:https://google.com/search?q={input}" # capture input and insert it into any other action
c = "clipboard:text:{clipboard}" # insert clipboard contents into any other action
# we have window management too!
[w]
label = "[window]"
h = "window:left-half" # use presets listed in the README
c = "window:center-half" # use presets listed in the README
s = ["window:.4,.3,.2,.4","small center"] # or use 4 percentages for x,y,width,height for custom placement - more details in README
# or use raycast for window management if you prefer
[w.r]
label = "[raycast-window]"
h = ["raycast://extensions/raycast/window-management/left-half", "left half"]
l = ["raycast://extensions/raycast/window-management/right-half", "right half"]
c = ["raycast://extensions/raycast/window-management/center-half", "center half"]
# this group is handy to copy over
# for quick access to your config
[h]
label = "[hammerspoon]"
c = "code: ~/.hammerspoon"
r = "reload" # reserved for reloading your hammerspoon config (helpful when auto_reload is false)
# glhf :) share your cool ideas with me on
# twitter @saml_dev - <leader> l m t
# bluesky @saml.dev - <leader> l m b
# github saml-dev - <leader> l m g
# for advanced hammerspoon users, you can use
# the hs: prefix as an escape hatch to run any
# hammerspoon command you want.
[z]
z = "hs:hs.alert('Hello, world!')"