scottwhudson / lunette Goto Github PK
View Code? Open in Web Editor NEWZero-Config Spectacle Keybindings for Hammerspoon
License: MIT License
Zero-Config Spectacle Keybindings for Hammerspoon
License: MIT License
#15 provides an easier invocation of Lunette for default bindings, and that invocation has been reflected in README.md, but the new code has not been packaged into the .zip file, so downloading the .zip and trying to invoke it produces the following error message:
2023-06-07 09:25:59: -- Loading ~/.hammerspoon/init.lua
2023-06-07 09:25:59: -- Loading extension: spoons
2023-06-07 09:25:59: -- Loading Spoon: Lunette
2023-06-07 09:25:59: -- Loading extension: window
2023-06-07 09:25:59: 09:25:59 ERROR: spoons: Default bindings requested, but spoon Lunette does not have a defaultHotkeys definition
2023-06-07 09:25:59: -- Done.
Presumably, the repo clone method for loading Lunette works correctly.
Thank you!
I downloaded Lunette-0.3.tar.gz
from the release notes, and moved the contents of the Source
directory to ~/.hammerspoon/Spoons/Lunette.spoonbut when reloading config, go the following error. I got similar when unzipping
Lunette.spoon.zip into my ~/.hammerspoon/Spoons
directory.
I don't know Lua so reporting this early; I'll try to figure out what's going on here. Appreciate this repo as a great replacement for Spectacle!
2019-06-10 16:51:08: Welcome to the Hammerspoon Console!
You can run any Lua code in here.
2019-06-10 16:51:12: ********
2019-06-10 16:51:12: 16:51:12 ERROR: spoonDocs: error generating documentation for /Users/pivotal/.hammerspoon/Spoons/Lunette.spoon:
...oon.app/Contents/Resources/extensions/hs/doc/builder.lua:146: couldn't find module for Command:leftHalf(windowFrame, screenFrame) (Method) (Inspects current screen frame position, determines how to resize given frame
and calls corresponding resize method
Returns:
* A screenFrame to be rendered)
2019-06-10 16:51:12: ********
2019-06-10 16:51:12: -- Lazy extension loading enabled
2019-06-10 16:51:12: -- Loading ~/.hammerspoon/init.lua
2019-06-10 16:51:12: -- Loading Spoon: Lunette
2019-06-10 16:51:12: -- Loading extension: window
2019-06-10 16:51:12: -- Loading extension: uielement
2019-06-10 16:51:12: Lunette: Binding Hotkeys
2019-06-10 16:51:12: -- Loading extension: hotkey
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌥F
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌃⌥RIGHT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌃RIGHT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌥C
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌥Z
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌃⌥LEFT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌃LEFT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌃⇧RIGHT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌥DOWN
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌃⌥⇧LEFT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌥LEFT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌃⌥LEFT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌃⇧LEFT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌃⌥RIGHT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌥⇧Z
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌥RIGHT
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌘⌥UP
2019-06-10 16:51:12: hotkey: Enabled hotkey ⌃⌥⇧RIGHT
2019-06-10 16:51:12: -- Done.
2019-08-26 11:46:45: ********
2019-08-26 11:46:45: 11:46:45 ERROR: spoonDocs: error generating documentation for /Users/pivotal/.hammerspoon/Spoons/Lunette.spoon:
...oon.app/Contents/Resources/extensions/hs/doc/builder.lua:146: couldn't find module for Command:leftHalf(windowFrame, screenFrame) (Method) (Inspects current screen frame position, determines how to resize given frame
and calls corresponding resize method
Returns:
* A screenFrame to be rendered)
2019-08-26 11:46:45: ********
2019-08-26 11:46:45: -- Lazy extension loading enabled
2019-08-26 11:46:45: -- Loading ~/.hammerspoon/init.lua
2019-08-26 11:46:45: -- Loading Spoon: Lunette
2019-08-26 11:46:45: -- Loading extension: window
2019-08-26 11:46:45: -- Loading extension: uielement
2019-08-26 11:46:45: Lunette: Binding Hotkeys
2019-08-26 11:46:45: *** ERROR: /Users/pivotal/.hammerspoon/Spoons/Lunette.spoon/init.lua:91: bad argument #1 to 'for iterator' (table expected, got nil)
stack traceback:
[C]: in function 'next'
/Users/pivotal/.hammerspoon/Spoons/Lunette.spoon/init.lua:91: in function 'Lunette.bindHotkeys'
/Users/pivotal/.hammerspoon/init.lua:3: in main chunk
[C]: in function 'xpcall'
...app/Contents/Resources/extensions/hs/_coresetup/init.lua:603: in function 'hs._coresetup.setup'
(...tail calls...)
Thanks for writing Lunette; it's most of the reason I'm trying out Hammerspoon (replacing Spectacle for me).
I'm trying to use some of the Lunette commands directly from a script. I am new to Hammerspoon and to Lua, and I am most likely doing it wrong: spoon.Lunette.exec("topHalf")
.
Is it possible to invoke Lunette commands directly? If, so, then a paragraph in the docs would be invaluable for novices like myself. If not, then that would be an extremely useful feature, at least for me.
Hey there, I have been wondering why Lunette's last distribution hasn't been loading for me, and I just got some time to investigate. I think maybe something went wrong when packaging this release and attaching to the Github release?
Here's my evidence:
→ (cd Lunette/ ; git status)
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
→ tar xzf ../Lunette-0.3.1.tar.gz
→ cd Lunette-0.3.1/Spoons/
→ unzip Lunette.spoon.zip
Archive: Lunette.spoon.zip
creating: Lunette.spoon/
inflating: Lunette.spoon/validator.lua
inflating: Lunette.spoon/init.lua
inflating: Lunette.spoon/history.lua
inflating: Lunette.spoon/command.lua
inflating: Lunette.spoon/resize.lua
→ cd ../..
→ diff Lunette/Source/Lunette.spoon/command.lua Lunette-0.3.1/Spoons/Lunette.spoon/command.lua
5c5
< --- Load dependencies
---
> -- Load dependencies
15,21c15,21
< --- Command:leftHalf(windowFrame, screenFrame)
< --- Method
< --- Inspects current screen frame position, determines how to resize given frame
< --- and calls corresponding resize method
< ---
< --- Returns:
< --- * A screenFrame to be rendered
---
> -- Command:leftHalf(windowFrame, screenFrame)
> -- Method
> -- Inspects current screen frame position, determines how to resize given frame
> -- and calls corresponding resize method
> --
> -- Returns:
> -- * A screenFrame to be rendered
...
→ diff Lunette/Source/Lunette.spoon/command.lua Lunette-0.3.1/Source/Lunette.spoon/command.lua | head -20
5c5
< --- Load dependencies
---
> -- Load dependencies
15,21c15,21
< --- Command:leftHalf(windowFrame, screenFrame)
< --- Method
< --- Inspects current screen frame position, determines how to resize given frame
< --- and calls corresponding resize method
< ---
< --- Returns:
< --- * A screenFrame to be rendered
---
> -- Command:leftHalf(windowFrame, screenFrame)
> -- Method
> -- Inspects current screen frame position, determines how to resize given frame
> -- and calls corresponding resize method
> --
> -- Returns:
> -- * A screenFrame to be rendered
For me, copying from master
to my .hammerspoon
directory solves the problems created when trying to install from Lunette-0.3.1.tar.gz
.
Am I missing something, or is this an actual bug?
One of the biggest downsides of spectacle is that it doesn't support moving windows between spaces/desktops, it would great if Lunette could support this.
This doesn't really make sense, and its easy for it to get out of date. Using GitHub releases makes much more sense doesn't it?
Invalid syntax? I swear I had this working a second ago, but copying/pasting the sample config doesn't appear to work for me now. Only thing I've done is change the variable name. Any suggestions?
lunetteBindings = {
leftHalf = {
{{"Q", "W"}, "E"},
{{"cmd", "alt"}, "left"},
}
rightHalf = {
{{"A", "S"}, "D"},
}
undo = false,
redo = false
}
You can see the parse failure here: https://rextester.com/WGXDF28058
Specifically, it reports:
Error(s), warning(s):lua5.3: source_file.lua:6: '}' expected (to close '{' at line 1) near 'rightHalf'
--
And likewise I'm getting similar errors in my local console.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.