-
Photo of the day 2025.10.18
-
Photo of the day 2025.10.15
我在OPPO发布会现场。
-
Photo of the day 2025.10.14
深圳益田假日广场的苹果店,人非常多,但是没有iPhone 17 Pro可以买。
-
一个关机声音写了半天
-- ========== Smart Break Reminder (Keyboard Maestro 版) ========== -- 功能: -- 1) 按时间段选择句子(早餐/午餐/晚餐 + 上午/下午/晚上) -- 2) 仅当 Safari 为前台且成功获取标题时,按“概率”插入带网页标题的提示(默认 30%) -- 3) 句子池可留空;留空时将使用内置兜底句子,保证脚本可运行 -- 4) 你可在 Keyboard Maestro 中创建变量“PageTitleChance”来调整标题提示的概率(0~100) -- -------------- 时间与时段 -------------- set currentHour to hours of (current date) set currentMinute to minutes of (current date) set currentTime to currentHour * 60 + currentMinute -- 用餐时间段(分钟):早餐 07:00–08:30;午餐 12:00–13:30;晚餐 18:00–19:30 set mealTimes to {breakfast:{420, 510}, lunch:{720, 810}, dinner:{1080, 1170}} -- 判定 periodKey if currentTime ≥ (item 1 of (breakfast of mealTimes)) and currentTime ≤ (item 2 of (breakfast of mealTimes)) then set periodKey to "breakfast" else if currentTime ≥ (item 1 of (lunch of mealTimes)) and currentTime ≤ (item 2 of (lunch of mealTimes)) then set periodKey to "lunch" else if currentTime ≥ (item 1 of (dinner of mealTimes)) and currentTime ≤ (item 2 of (dinner of mealTimes)) then set periodKey to "dinner" else if currentHour ≥ 6 and currentHour < 12 then set periodKey to "morning" else if currentHour ≥ 12 and currentHour < 18 then set periodKey to "afternoon" else set periodKey to "evening" end if -- -------------- 前台应用 & Safari 网页标题 -------------- set frontAppName to "" try tell application "System Events" set frontAppName to name of first application process whose frontmost is true end tell on error set frontAppName to "" end try set pageTitle to "" if frontAppName is "Safari" then tell application "Safari" try if exists front document then set pageTitle to name of front document on error set pageTitle to "" end try end tell end if -- -------------- (可选)概率参数:从 KM 变量读取,否则用默认 30 -------------- set pageTitleChance to 30 try tell application "Keyboard Maestro Engine" set v to getvariable "PageTitleChance" end tell if v is not "" then set vInt to v as integer if vInt < 0 then set vInt to 0 if vInt > 100 then set vInt to 100 set pageTitleChance to vInt end if end try -- -------------- 兜底句池(当你未填充 sentencePools 时使用) -------------- set defaultMorning to {"早安,伸个懒腰吧。", "抬头远眺十秒,让眼睛轻松一下。", "喝口温水,开启元气一天。", "深呼吸三次,清醒一下。"} set defaultAfternoon to {"下午好,休息下眼睛再继续。", "起身走两步,恢复专注。", "喝杯茶,唤醒下午活力。", "放松肩颈,舒缓疲劳。"} set defaultEvening to {"晚上了,给眼睛一个小假期。", "别熬夜,闭目养神一下。", "喝点热水,温暖身心。", "深呼吸,让心绪慢下来。"} set defaultBreakfast to {"早餐时间到啦!", "去吃顿温暖的早餐吧。", "早餐很重要,精神满满一整天。", "暂停一下,享受美味早餐。"} set defaultLunch to {"午餐时间,请放下手头工作。", "吃个午饭,下午更有精神。", "午餐很重要,别错过。", "走吧,去享用午餐。"} set defaultDinner to {"晚餐时间到了。", "辛苦一天了,去吃晚饭吧。", "放下屏幕,享受晚餐。", "好好吃个晚餐犒劳自己。"} -- -------------- 明确定义句子Record(在此处粘贴你的句子) -------------- -- 按你要求的“单行格式”,把每个时段的句子粘贴进下方 record。 -- 例如: -- afternoon:{"下午好,休息下眼睛,回来继续。", "喝点水再继续吧。", ...}, ¬ -- 提示:每个时段一行,结尾用 “, ¬” 续行,最后一个时段行末不要 “, ¬”。 ¬ -- -------------- 取当前时段的基础句池(若为空则使用兜底) -------------- set sentencesBase to {} if periodKey = "morning" then set sentencesBase to morning of sentencePools if (count of sentencesBase) = 0 then set sentencesBase to defaultMorning else if periodKey = "afternoon" then set sentencesBase to afternoon of sentencePools if (count of sentencesBase) = 0 then set sentencesBase to defaultAfternoon else if periodKey = "evening" then set sentencesBase to evening of sentencePools if (count of sentencesBase) = 0 then set sentencesBase to defaultEvening else if periodKey = "breakfast" then set sentencesBase to breakfast of sentencePools if (count of sentencesBase) = 0 then set sentencesBase to defaultBreakfast else if periodKey = "lunch" then set sentencesBase to lunch of sentencePools if (count of sentencesBase) = 0 then set sentencesBase to defaultLunch else if periodKey = "dinner" then set sentencesBase to dinner of sentencePools if (count of sentencesBase) = 0 then set sentencesBase to defaultDinner end if -- -------------- Safari 前台时按“概率”切换到网页标题模板 -------------- set sentences to sentencesBase if frontAppName is "Safari" and pageTitle is not "" then set roll to (random number from 1 to 100) if roll ≤ pageTitleChance then set sentences to {"休息一下眼睛,等会儿再看「" & pageTitle & "」。", "暂停一下,回来继续浏览「" & pageTitle & "」。", "主人,稍微休息一会儿,网页「" & pageTitle & "」等你回来哦!"} end if end if -- -------------- 随机朗读 -------------- if (count of sentences) = 0 then set sentences to {"主人,休息一下吧。"} -- 双保险 set chosenSentence to item (random number from 1 to (count of sentences)) of sentences say chosenSentence -- ===================== 结束 =====================
-
Photo of the day 2025.10.12
一个外卖小哥。