(fn history.push
[self]
"
Append current window frame geometry to history.
self refers to history table instance
"
(let [win (hs.window.focusedWindow) ; Can be nil
id (: win :id) ; Error here
tbl (. self id)]
(when win ; Yet we protect here
(when (= (type tbl) :nil)
(tset self id []))
(when tbl
(let [last-el (. tbl (length tbl))]
(when (~= last-el (: win :frame))
(table.insert tbl (: win :frame))))))))
2021-10-27 08:07:56: 08:07:56 ERROR: LuaSkin: hs.timer callback error: ./windows.fnl:20: attempt to index a nil value (local 'win')
stack traceback:
./windows.fnl:20: in method 'push'
./windows.fnl:71: in function 'windows.maximize-window-frame'
(...tail calls...)
Not sure how I got a nil window, but I did. On my work computer, should be an easy fix for after work.
Not sure how I got a nil window, but I did. On my work computer, should be an easy fix for after work.