Skip to content

Instantly share code, notes, and snippets.

View MikeBirdTech's full-sized avatar
🚀
Accelerating

Mike Bird MikeBirdTech

🚀
Accelerating
View GitHub Profile
@MikeBirdTech
MikeBirdTech / StartWorkDay.applescript
Last active September 1, 2023 20:59
Start Work Day - On weekdays between 8-10 am, ask if I am starting my work day, and if so, open all my work apps
-- Get current day of the week
set currentDay to weekday of (current date) as string
-- Get the current time in seconds since midnight
set currentTime to time of (current date)
-- Convert the current time to hours
set currentHour to currentTime div 3600
-- Check if today is between Monday and Friday
@MikeBirdTech
MikeBirdTech / init.lua
Last active September 29, 2023 14:09
Hammerspoon config for triggering Start Work Day
-- Define the events that should trigger the startWorkDay function
local startWorkDayEvents = {
hs.caffeinate.watcher.systemDidWake,
hs.caffeinate.watcher.screensDidUnlock,
hs.caffeinate.watcher.screensaverDidStop
}
-- Function to check if the event should trigger the startWorkDay function
local function shouldTriggerStartWorkDay(eventType)
for _, startWorkDayEvent in ipairs(startWorkDayEvents) do