From ecef58f4652d4254e0c7209407353ca860b6124f Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Wed, 2 Oct 2024 08:27:13 -0500 Subject: [PATCH] dev: I no longer use hammerspoon --- .hammerspoon/.mjolnir | 1 - .hammerspoon/init.lua | 133 ------------------------------------------ 2 files changed, 134 deletions(-) delete mode 120000 .hammerspoon/.mjolnir delete mode 100644 .hammerspoon/init.lua diff --git a/.hammerspoon/.mjolnir b/.hammerspoon/.mjolnir deleted file mode 120000 index adc6a6f..0000000 --- a/.hammerspoon/.mjolnir +++ /dev/null @@ -1 +0,0 @@ -C:/Users/jwall/.mjolnir \ No newline at end of file diff --git a/.hammerspoon/init.lua b/.hammerspoon/init.lua deleted file mode 100644 index cc17d71..0000000 --- a/.hammerspoon/init.lua +++ /dev/null @@ -1,133 +0,0 @@ -local mash = {"cmd", "alt", "ctrl"} - -hs.hotkey.bind(mash, "R", function() mjolnir.reload() end) - --- Make the window fullscreen -hs.hotkey.bind(mash, "F", function() - local win = hs.window.focusedWindow() - if win then win:maximize() end -end) - --- Move the window to the right 5 pixels -hs.hotkey.bind(mash, "L", function() - local win = hs.window.focusedWindow() - local screen = win:screen() - local scrfrm = screen:frame() - if win then - f = win:frame() - local nx = f.x + 5 - if (f.w + nx) <= scrfrm.w then - f.x = nx - win:setFrame(f) - else - f.x = scrfrm.w - end - end -end) - --- Move the window to the left 5 pixels -hs.hotkey.bind(mash, "H", function() - local win = hs.window.focusedWindow() - local screen = win:screen() - local scrfrm = screen:frame() - if win then - f = win:frame() - local nx = f.x - 5 - if nx >= scrfrm.x then - f.x = nx - win:setFrame(f) - else - f.x = scrfrm.x - end - end -end) - --- Move the window down 5 pixels -hs.hotkey.bind(mash, "J", function() - local win = hs.window.focusedWindow() - local screen = win:screen() - local scrfrm = screen:frame() - if win then - f = win:frame() - local ny = f.y + 5 - if (ny + f.h) <= scrfrm.h then - f.y = ny - win:setFrame(f) - else - f.y = scrfrm.h - end - end -end) - --- Move the window up 5 pixels -hs.hotkey.bind(mash, "K", function() - local win = hs.window.focusedWindow() - local screen = win:screen() - local scrfrm = screen:frame() - if win then - f = win:frame() - local ny = f.y - 5 - if ny >= scrfrm.y then - f.y = ny - win:setFrame(f) - else - f.y = scrfrm.y - end - end -end) - --- Center the window -hs.hotkey.bind(mash, "C", function() - local win = hs.window.focusedWindow() - if win then - win:centerOnScreen() - end -end) - --- Move window all the way to the up -hs.hotkey.bind(mash, "up", function() - local win = hs.window.focusedWindow() - local screen = win:screen() - local scrfrm = screen:frame() - if win then - f = win:frame() - f.y = 0 - win:setFrame(f) - end -end) - --- Move window all the way to the left -hs.hotkey.bind(mash, "left", function() - local win = hs.window.focusedWindow() - local screen = win:screen() - local scrfrm = screen:frame() - if win then - f = win:frame() - f.x = 0 - win:setFrame(f) - end -end) - --- Move window all the way to the down -hs.hotkey.bind(mash, "down", function() - local win = hs.window.focusedWindow() - local screen = win:screen() - local scrfrm = screen:frame() - if win then - f = win:frame() - f.y = scrfrm.h - f.h - win:setFrame(f) - end -end) - --- Move window all the way to the right -hs.hotkey.bind(mash, "right", function() - local win = hs.window.focusedWindow() - local screen = win:screen() - local scrfrm = screen:frame() - if win then - f = win:frame() - f.x = scrfrm.w - f.w - win:setFrame(f) - end -end)