4 ms·
If anyone cares, here's my config: https://github.com/kbd/setup/blob/master/HOME/.hammerspoon/init.lua https://github.com/kbd/setup/blob/master/HOME/.hammerspoo
by kbd 5y ago
If anyone cares, here's my config: https://github.com/kbd/setup/blob/master/HOME/.hammerspoon/init.lua https://github.com/kbd/setup/blob/master/HOME/.hammerspoon/i...
It shows off a tiny bit of what you can do with Hammerspoon:
- window and app management
- keyboard shortcuts for common apps (eg. hyper+T for text editor, hyper+B for browser, hyper+S for shell)
- if you can code a tiny bit of Lua there's no need for apps like Spectacle, Rectangle, Moom, etc. because it's easy to position apps wherever you want. eg. hyper+L arranges my browser+editor+terminal in a standard layout, and I have other shortcuts to set apps to halves or thirds of the screen, or to another monitor.
- fuzzy-find popups (like Alfred/fzf) are built-in. I use it to choose audio input/output.
- a replacement for Caffeine (menubar icon to keep computer from going to sleep)
I have my "hyper" key bound to caps lock using Karabiner Elements (but it still works as a normal caps lock if you hold it for half a second). Here's that config: https://github.com/kbd/setup/blob/master/HOME/.config/karabiner/karabiner.json https://github.com/kbd/setup/blob/master/HOME/.config/karabi...
- VTimofeenko 5y agoThank you so much for your sample config. I recently got a Macbook for work, and coming back to non-tiling wm has been a challenge, especially with multiple monitors. With this config I am finally back to my comfortable meta+{h,l} tiling, dedicated shortcuts for applications and easy way to move application between monitors. And it took less than 10 minutes. Excellent way to start a Monday.
- kbd 5y agoAwesome, you made my day better knowing that it helped someone. Thanks for your comment! FWIW the rest of my (Mac-based) system config is all open source (both the files I linked are in the same repo) so feel free to steal anything else.
- VTimofeenko 5y agoThanks! I have perused some of the configs and will definitely take a few snippets from zshrc. Also, kdiff3 looks quite interesting. I have been relying on vimdiff/colordiff.
- kbd 5y agoDon't miss https://github.com/dandavison/delta https://github.com/dandavison/delta. I use gui diff tools much less nowadays because I can get such great diffs in the terminal.
- VTimofeenko 5y agoYeah, I found myself gravitating more towards lazygit with the default bundled diff utility, but I believe it has the option to plug an external one. Thanks, will check delta out!
- watersb 5y agoThis is really interesting! I didn't consider mapping a keypress duration! Apple has a bit of documentation on scriptable key mapping: https://developer.apple.com/library/archive/technotes/tn2450/_index.html https://developer.apple.com/library/archive/technotes/tn2450...