diff options
author | Teddy Wing | 2019-10-20 00:05:48 +0200 |
---|---|---|
committer | Teddy Wing | 2019-10-20 00:05:48 +0200 |
commit | 7662961f51819d6db27ec09cb0845b7060ab4206 (patch) | |
tree | aad820e22edb4a80cbb74d7925b2fc11244b53b9 /window_layout.lua | |
parent | 45d100a49bc1b88f25b61a1c23932088f374360b (diff) | |
download | dothammerspoon-7662961f51819d6db27ec09cb0845b7060ab4206.tar.bz2 |
window_layout: Set default `window_positions` table value to `{}`
Make the default table value of `window_positions` keys an empty table
(`{}`) to fix nil access errors on line 31:
window_positions[screen][window:id()] = window:frame()
Diffstat (limited to 'window_layout.lua')
-rw-r--r-- | window_layout.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/window_layout.lua b/window_layout.lua index 408498c..f8d201a 100644 --- a/window_layout.lua +++ b/window_layout.lua @@ -16,6 +16,7 @@ all_window_filter = hs.window.filter.new():setOverrideFilter({ visible = true }) window_positions = {} +setmetatable(window_positions, {__index = function() return {} end}) local function window_positions_save(window, _app_name, event_type) local screen = hs.screen.primaryScreen():id() |