![]() Lua Hammerspoon: hs.window.focusedWindow() is nil when assigned to a variableĪnd it seems that changing the variables from local to global makes no difference and the bug persists. Has anyone seen this type of bug and been able to fix it? moves m screen left) once it focuses on the console but nothing else that I have tried. Constructor Creates a new switcher instance it can use a windowfilter to determine which windows to show windowfilter - (optional) if omitted or nil, use the. The strange thing is that the functionality or the code "works" (i.e. I tried inserting a (what I assume in hammerspoon is) a print statement hs.console.printStyledtext(win) right after the variable win to inspect it but that also throws the same error except it print nil right before the error. It says that my variable is nil but I don't see why it should be nil. Users/my_secret_username/.hammerspoon/a:25: in function ![]() Unfortunately, it doesn't work and opens the hammerspoon console with the following error: *** ERROR: hs.hotkey callback error: /Users/my_secret_username/.hammerspoon/a:25: attempt to index a nil value (local 'win') I then when back reloaded my config and tried it out. Straight from the getting started page I copied the code for moving the focused window left: hs.hotkey.bind(, "Left", function() Note: The key bindings are only showing for demonstration purposes. Below, I show the Lua script that I use to make Hammerspoon my basic OSX keyboard controlled window manager to move and resize windows easily. ![]() I was trying to use hammerspoon to control my windows (on MAC OSX) but was having some issue. Hammerspoon is a really powerful but simple automation tool for OSX.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |