aboutsummaryrefslogtreecommitdiffstats
path: root/window_layout.lua
AgeCommit message (Collapse)Author
2023-11-08window_layout: Add debug logTeddy Wing
After changing machines, I was having a problem with window layout restoration. I had added this debug log, but then it magically started working again. Committing this change anyway, maybe it actually did something.
2019-11-07window_layout: Fix error when saved window not foundTeddy Wing
Saw this error when a saved window ID doesn't exist: 2019-11-07 16:25:03: 16:25:03 ERROR: LuaSkin: hs.screen.watcher callback: $HOME/.hammerspoon/window_layout.lua:39: attempt to index a nil value stack traceback: $HOME/.hammerspoon/window_layout.lua:39: in upvalue 'window_positions_restore' $HOME/.hammerspoon/window_layout.lua:52: in function </$HOME/.hammerspoon/window_layout.lua:51> This could be when a saved window was closed, in which case we don't care that its position can't be restored.
2019-10-20window_layout: Set default `window_positions` table value to `{}`Teddy Wing
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()
2019-10-14window_layout: Restore all window positions when monitors changeTeddy Wing
Save all window positions when windows are moved, resized, created, deleted. When the primary monitor changes, restore previously saved window positions for that monitor. This ensures that our windows stay in the same position even after connecting and disconnecting an external monitor.
2019-08-12Add missing license headersTeddy Wing
2019-07-26window_layout: Fix iTerm window #2 targetingTeddy Wing
Using an index of 2 didn't guarantee that the window accessed would be window #2. Turns out the order of windows in the list is not consistent. In order to target window #2, look for the "2. " prefix in the window title.
2019-07-25Automatically reposition iTerm window 2 when external monitor connectedTeddy Wing
When my external monitor is connected, ensure that iTerm's window #2 is in the proper position. iTerm has a habit of getting its window layout screwed up when switching monitors (or just not remembering window layouts between monitors).