-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loosing left Click >> Hammerspoon Error : attempt to index a nil value (field 'indicator') #41
Comments
I've also experienced this, and can only agree: "Weird". My unsatisfying short-term strategy has been to reload hammerspoon (which I have bound to hs.hotkey.bind({'cmd', 'alt'}, 'r', hs.reload) I always have Thanks for documenting this so we can fix it. A slightly better (but still pretty random) guess: There's a race condition somewhere; If the indicator isn't rendered before Question for you @NylonDiamond: do you actually use/want the ability the click indicators? I ask because I've been thinking about configuration options, and if you don't want this feature, it'd be nice if you could turn it off and avoid the rough edges. |
I have to reload a few times per day, unfortunately. I'd be down for toggling the ability to click indicators. I don't use it anyways. |
Did we decide to add the remove or toggle the click indicators functionality? I get this issue like 10x every day. I can't really use Stackline at the moment. |
Sorry to hear that @NylonDiamond . Good news tho – yes – I made good progress on better configurability this weekend, and there's a feature flag to enable / disable You can toggle set it off in your stackline.config:set('features.clickToFocus', true) …or turn it off via the command line using the ipc interface: echo ":features.clickToFocus:false` | hs -m stackline-config I described the changes in more detail here: #33 (comment) All of these changes are very very fresh (you'd probably be the first to try it). I understand if you're not interested in doing more QA here :-) I can let you know when it's merged in, tho! https://github.com/AdamWagner/stackline/tree/feature/configuration |
I've also experienced this issue. I don't know if it helps your investigation to know this, but i find that i can regain left-click ability without reloading hammerspoon just by switching to a different space and back. i dunno, maybe that'll give you some idea of the root cause? |
Thanks @alextremblay ! That does give me a better idea of the root cause… or at least it narrows the scope of the hunt for the root cause ;-) |
@NylonDiamond just merged in improved configuration updates. Note that, in the new version, Stackline must be initialized in your ~/.hammerspoon/init.lua` file. init.lua before stackline = require "stackline.stackline.stackline" init.lua after stackline = require "stackline.stackline.stackline"
stackline:init() -- must initialize stackline in your init.lua file! The changes, of course, allow you to pass in custom config options ;-) stackline = require "stackline.stackline.stackline"
local myStackline = {
appearance = {
showIcons = false, -- default is true
},
features = {
clickToFocus = false, -- default is true
fzyFrameDetect = {
fuzzFactor = 25 -- default is 30
},
},
}
stackline:init(myStackline) -- ah yea! |
Much like @NylonDiamond, I've noticed the following in the logs when I lose left-click:
Interestingly, when i switch to a different space and back, I get this in the logs:
and then left click is restored Also interestingly, this 'trick' only works if i switch spaces on the display that had the active, focused window when the problem started. i guess it has something to do with unloading or unfocusing the focused window or something? |
@alextremblay While investigating #46, I found a reliable way to "lose left click": re-initialize stackline while it's already running. Especially since the location of You could either pull the version in this branch: https://github.com/AdamWagner/stackline/tree/fix/nil-windows-in-get-summary or add the following snippet to if stackline.manager then
-- guard against re-initializtion https://github.com/AdamWagner/stackline/issues/46#issuecomment-723527826
return print('stackline already initialized')
end |
Thank you @AdamWagner I implemented the guard condition, and haven't experienced the issue since. i think you can close this issue? |
Great to hear @alextremblay. I merged the guard to master, and will close this now. |
I get the error below after a while. I lose the ability to left click my mouse. Right click works fine as well as everything else. Weird. Any ideas?
stack traceback: .../jesseskelton/.hammerspoon/stackline/stackline/stack.lua:73: in local 'fn' ...on.app/Contents/Resources/extensions/hs/fnutils/init.lua:130: in function 'stackline.lib.utils.filter' .../jesseskelton/.hammerspoon/stackline/stackline/stack.lua:72: in function 'stackline.stackline.stack.getWindowByPoint' ...kelton/.hammerspoon/stackline/stackline/stackmanager.lua:118: in function 'stackline.stackline.stackmanager.getClickedWindow' ...seskelton/.hammerspoon/stackline/stackline/stackline.lua:26: in function <...seskelton/.hammerspoon/stackline/stackline/stackline.lua:22> 2020-09-21 21:47:06: 21:47:06 ERROR: LuaSkin: hs.eventtap callback error: .../jesseskelton/.hammerspoon/stackline/stackline/stack.lua:73: attempt to index a nil value (field 'indicator')
The text was updated successfully, but these errors were encountered: