Skip to content

Instantly share code, notes, and snippets.

View yrnehli's full-sized avatar
🕺
console.log((![]+[])[+[]]+([][[]]+[])[+[]]+([][[]]+[])[+!![]])

Henry Li yrnehli

🕺
console.log((![]+[])[+[]]+([][[]]+[])[+[]]+([][[]]+[])[+!![]])
View GitHub Profile
@yrnehli
yrnehli / middleClickHide.lua
Last active September 18, 2024 19:34
Hammerspoon script to hide active window when middle clicking top left of window
hs.eventtap.new(
{ hs.eventtap.event.types.otherMouseDown },
function(e)
local button = e:getProperty(
hs.eventtap.event.properties['mouseEventButtonNumber']
)
if button == 2 then
m = hs.mouse.absolutePosition()
a = hs.application.frontmostApplication()
@yrnehli
yrnehli / tiling.lua
Last active September 19, 2024 19:10
Hammerspoon script to bind tiling hotkeys
function leftHalf()
hs.application.frontmostApplication():selectMenuItem({"Window", "Move & Resize", "Left"})
end
function rightHalf()
hs.application.frontmostApplication():selectMenuItem({"Window", "Move & Resize", "Right"})
end
function fill()
hs.application.frontmostApplication():selectMenuItem({"Window", "Fill"})