GithubHelp home page GithubHelp logo

scottwhudson / lunette Goto Github PK

View Code? Open in Web Editor NEW
79.0 3.0 19.0 57 KB

Zero-Config Spectacle Keybindings for Hammerspoon

License: MIT License

Lua 98.80% Makefile 1.20%
tiling-window-manager window-manager hammerspoon-configuration

lunette's People

Contributors

davidosomething avatar jasperzs avatar jokajak avatar jon-schneider avatar scottwhudson avatar shayneholmes avatar subic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lunette's Issues

New invocation of Lunette is not supported by the .zip version of Lunette

#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!

Error applying Lunette-0.3.0 in HammerSpoon 0.9.75

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 unzippingLunette.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...)

Run commands directly

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.

Packaging of Lunette v0.3.1 doesn't include commits for v0.3.1?

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?

sample keystroke config not working?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.