my personal dotfiles managed by dotbot, zinit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Ein Verne d94ec0c351
Hammerspoon: update bing path
4 years ago
..
Spoons Hammerspoon: update bing path 4 years ago
.gitignore Add hammerspoon config 4 years ago
README.md Add hammerspoon config 4 years ago
autoscript.lua Auto sync torrent to downloader 4 years ago
config-example.lua Add hammerspoon config 4 years ago
ime.lua Update ime auto switch 4 years ago
init.lua Hammerspoon: fix DNS auto switch rule 4 years ago
usb.lua Add hammerspoon config 4 years ago

README.md

hammerspoon configuration

hammerspoon is my configuration for Hammerspoon. It has highly modal-based, vim-style keybindings, provides some functionality like desktop widgets, window management, application launcher, instant search, aria2 frontend ... etc.

Get started

  • Install Hammerspoon first.
  • git clone https://github.com/einverne/dotfiles.git ~/dotfiles
  • ln -s ~/dotfiles/hammerspoon ~/.hammerspoon
  • Reload the configutation.

Keep update

cd ~/dotfiles && git pull

How to use

Use Karabier-Elements to set caps lock as hyper key. Press caps lock is just like press Cmd+Control+Option+Shift at the same time.

Reload config

  • Hyper key + R, reload hammerspoon config

Hyper key windows management

  • Hyper key + H, set windows to left half of screen
  • Hyper key + L, right half of screen
  • Hyper key + J, bottom half
  • Hyper key + K, top half
  • Hyper key + F, full screen

Windows management mode

Option+r Enter windows management:

  • ASDW to move windows position
  • HL/JK to set windows to left, right, up, down half of screen
  • Y/O/U/I to set windows to LeftUp, RightUp, LeftDown, LeftDown corner
  • Left/Right/Up/Down same as HL/JK
  • F to set windows to full screen
  • C to set windows to center
  • Esc/Q to exit
  • Tab to show help

Switch windows

I personally use the application called Context to switch between different windows, however this config provider another way to quickly switch between windows. Try with Option+Tab.

Toggle hammerspoon console

Option+z

Move windows between monitors

  • Hyper key + N, to move current window to next monitor
  • Hpper key + P, to move current window to previous monitor

Application launcher

Press option + a to enter application launcher. The shorcut information will show on the center of the screen. But I personally prefer Alfred.

Just press opt, plus A or C or R… to start. If need help, press tab to toggle the keybindings cheatsheet.

Press opt + ? to toggle the help panel, which will show all opt related keybindings.

Screenshots

These screenshots demostrate what awesome-hammerspoon is capable of. Learn more about built-in Spoons.

Desktop widgets

widgets

Window manpulation + R

winresize

aria2 Frontend + D

hsearch

You need to run aria2 with RPC enabled before using this. Config aria2 host and token in ~/.hammerspoon/private/config.lua, then you're ready to go.

hsaria2_host = "http://localhost:6800/jsonrpc" -- default host
hsaria2_secret = "token" -- YOUR OWN SECRET

Customization

cp ~/.hammerspoon/config-example.lua ~/.hammerspoon/private/config.lua

Then modify the file ~/.hammerspoon/private/config.lua:

  • Add/remove Spoons.

    Define hspoon_list to decide which Spoons (a distributing format of Hammerspoon module) to be loaded. There are 15 built-in Spoons, learn about them at here.

    There are more Spoons at official spoon repository (you may need a little config before using them).

  • Customize keybindings

    Please read ~/.hammerspoon/private/config.luafor more details.

Finally press cmd + ctrl + shift + r to reload the configuration.

Contribute

Thanks to

https://github.com/zzamboni/oh-my-hammerspoon

https://github.com/scottcs/dot_hammerspoon

https://github.com/dharmapoudel/hammerspoon-config

http://tracesof.net/uebersicht/