Skip to content

Instantly share code, notes, and snippets.

View joshmenden's full-sized avatar

Josh Menden joshmenden

  • Pageport
  • Lehi UT
View GitHub Profile
yarn add @vue/apollo-composable @apollo/client
hs.geomtery.rect(
x starting point right from leftest(?) most part of screen,
y starting point down from top part of screen,
width of the application,
height of the application
)
hs.fnutils.each(hs.application.runningApplications(), function(app) print(app:title()) end)
-- ...
-- 2022-06-05 22:23:40: 1Password
-- 2022-06-05 22:23:40: Docker
-- 2022-06-05 22:23:40: Notion
-- 2022-06-05 22:23:40: Hammerspoon
-- ...
-- assign the main screen to a variable
s = hs.screen.mainScreen()
-- this command will tell you the pixels that you have to work with in your slice and dic
s:fullFrame()
-- hs.geometry.rect(0.0,0.0,3840.0,2160.0)
-- the name of the monitor; comes in handy later
s:name()
-- U32J59x
@joshmenden
joshmenden / hammerspoonbounce.lua
Created November 27, 2020 17:06
HammerspoonBounce
direction = "downright"
animate = false
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "M", function()
animate = not animate
window = hs.window.focusedWindow()
width = hs.screen.primaryScreen():fullFrame().w
height = hs.screen.primaryScreen():fullFrame().h
hs.timer.doWhile(function() return animate end, function()
frame = window:frame()
if direction == "downright" then
goToDraft () {
this.draft = response.data.draft
if (draft.status === 'OK') {
this.$router.push('/')
}
}