misc macos updates

This commit is contained in:
2025-10-22 14:07:45 -07:00
parent 6a6cd3bc79
commit 151cd20a95
4 changed files with 718 additions and 32 deletions

View File

@@ -114,7 +114,7 @@ function focusOrOpeniTerm()
end end
end end
hs.hotkey.bind({ "cmd", "ctrl" }, "T", focusOrOpeniTerm) hs.hotkey.bind({ "cmd", "ctrl" }, "T", focusOrOpenGhostty)
-------------------------------------------------------------------- --------------------------------------------------------------------
-- Open new / focus existing browser window in current desktop space -- Open new / focus existing browser window in current desktop space
@@ -369,8 +369,6 @@ hs.hotkey.bind({ "cmd", "shift" }, "space", function()
click menu item "New Tab to the Right" of menu "Tab" of menu bar 1 click menu item "New Tab to the Right" of menu "Tab" of menu bar 1
end tell end tell
delay 0.01
set URL of active tab of front window to "https://perplexity.ai" set URL of active tab of front window to "https://perplexity.ai"
end if end if
end tell end tell
@@ -380,6 +378,34 @@ hs.hotkey.bind({ "cmd", "shift" }, "space", function()
)) ))
end) end)
-- Open new / focus existing Discord window in current desktop space
hs.hotkey.bind({ "cmd", "ctrl" }, "R", function()
local app = "Discord"
wf_app = wf.new(false):setAppFilter(app, { currentSpace = true })
local wins = wf_app:getWindows()
local count = 0
for _ in pairs(wins) do
count = count + 1
end
if count > 0 then
wf_app:getWindows()[1]:focus()
else
hs.osascript.applescript(string.format(
[[
tell application "System Events" to tell process "%s"
click menu item "New Window" of menu "File" of menu bar 1
set frontmost to true
end tell
]],
app
))
end
end)
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- DESKTOP SWITCHING (axed) -- DESKTOP SWITCHING (axed)
-- Retroactive note: it should be harder, not easier, to context-switch :P -- Retroactive note: it should be harder, not easier, to context-switch :P

View File

@@ -436,6 +436,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.1234394758939743</real> <real>0.1234394758939743</real>
</dict> </dict>
<key>Ansi 0 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.12343787401914597</real>
<key>Green Component</key>
<real>0.12343578040599823</real>
<key>Red Component</key>
<real>0.1234394758939743</real>
</dict>
<key>Ansi 0 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.25882352941176473</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.21176470588235294</real>
<key>Red Component</key>
<real>0.027450980392156862</real>
</dict>
<key>Ansi 1 Color</key> <key>Ansi 1 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -445,6 +465,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.97170770168304443</real> <real>0.97170770168304443</real>
</dict> </dict>
<key>Ansi 1 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.095619738101959229</real>
<key>Green Component</key>
<real>0.067135065793991089</real>
<key>Red Component</key>
<real>0.97170770168304443</real>
</dict>
<key>Ansi 1 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.18431372549019609</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.19607843137254902</real>
<key>Red Component</key>
<real>0.86274509803921573</real>
</dict>
<key>Ansi 10 Color</key> <key>Ansi 10 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -454,6 +494,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.11459558457136154</real> <real>0.11459558457136154</real>
</dict> </dict>
<key>Ansi 10 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.379891037940979</real>
<key>Green Component</key>
<real>0.82695949077606201</real>
<key>Red Component</key>
<real>0.11459558457136154</real>
</dict>
<key>Ansi 10 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.45882352941176469</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.43137254901960786</real>
<key>Red Component</key>
<real>0.34509803921568627</real>
</dict>
<key>Ansi 11 Color</key> <key>Ansi 11 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -463,6 +523,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.95126962661743164</real> <real>0.95126962661743164</real>
</dict> </dict>
<key>Ansi 11 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.035377603024244308</real>
<key>Green Component</key>
<real>0.74144089221954346</real>
<key>Red Component</key>
<real>0.95126962661743164</real>
</dict>
<key>Ansi 11 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.51372549019607838</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.4823529411764706</real>
<key>Red Component</key>
<real>0.396078431372549</real>
</dict>
<key>Ansi 12 Color</key> <key>Ansi 12 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -472,6 +552,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.061654355376958847</real> <real>0.061654355376958847</real>
</dict> </dict>
<key>Ansi 12 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.838664710521698</real>
<key>Green Component</key>
<real>0.50448882579803467</real>
<key>Red Component</key>
<real>0.061654355376958847</real>
</dict>
<key>Ansi 12 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.58823529411764708</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.58039215686274515</real>
<key>Red Component</key>
<real>0.51372549019607838</real>
</dict>
<key>Ansi 13 Color</key> <key>Ansi 13 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -481,6 +581,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.32478702068328857</real> <real>0.32478702068328857</real>
</dict> </dict>
<key>Ansi 13 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.72698760032653809</real>
<key>Green Component</key>
<real>0.3135044276714325</real>
<key>Red Component</key>
<real>0.32478702068328857</real>
</dict>
<key>Ansi 13 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.7686274509803922</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.44313725490196076</real>
<key>Red Component</key>
<real>0.42352941176470588</real>
</dict>
<key>Ansi 14 Color</key> <key>Ansi 14 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -490,6 +610,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.059441849589347839</real> <real>0.059441849589347839</real>
</dict> </dict>
<key>Ansi 14 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.85764402151107788</real>
<key>Green Component</key>
<real>0.4900696873664856</real>
<key>Red Component</key>
<real>0.059441849589347839</real>
</dict>
<key>Ansi 14 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.63137254901960782</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.63137254901960782</real>
<key>Red Component</key>
<real>0.57647058823529407</real>
</dict>
<key>Ansi 15 Color</key> <key>Ansi 15 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -499,6 +639,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>1</real> <real>1</real>
</dict> </dict>
<key>Ansi 15 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>1</real>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Ansi 15 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.8901960784313725</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.96470588235294119</real>
<key>Red Component</key>
<real>0.99215686274509807</real>
</dict>
<key>Ansi 2 Color</key> <key>Ansi 2 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -508,6 +668,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.17600196599960327</real> <real>0.17600196599960327</real>
</dict> </dict>
<key>Ansi 2 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.36823004484176636</real>
<key>Green Component</key>
<real>0.77383565902709961</real>
<key>Red Component</key>
<real>0.17600196599960327</real>
</dict>
<key>Ansi 2 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.59999999999999998</real>
<key>Red Component</key>
<real>0.52156862745098043</real>
</dict>
<key>Ansi 3 Color</key> <key>Ansi 3 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -517,6 +697,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.92706489562988281</real> <real>0.92706489562988281</real>
</dict> </dict>
<key>Ansi 3 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.060177117586135864</real>
<key>Green Component</key>
<real>0.72761225700378418</real>
<key>Red Component</key>
<real>0.92706489562988281</real>
</dict>
<key>Ansi 3 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.53725490196078429</real>
<key>Red Component</key>
<real>0.70980392156862748</real>
</dict>
<key>Ansi 4 Color</key> <key>Ansi 4 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -526,6 +726,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.16567224264144897</real> <real>0.16567224264144897</real>
</dict> </dict>
<key>Ansi 4 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.82454067468643188</real>
<key>Green Component</key>
<real>0.51804500818252563</real>
<key>Red Component</key>
<real>0.16567224264144897</real>
</dict>
<key>Ansi 4 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.82352941176470584</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.54509803921568623</real>
<key>Red Component</key>
<real>0.14901960784313725</real>
</dict>
<key>Ansi 5 Color</key> <key>Ansi 5 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -535,6 +755,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.30770933628082275</real> <real>0.30770933628082275</real>
</dict> </dict>
<key>Ansi 5 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.71787959337234497</real>
<key>Green Component</key>
<real>0.35215187072753906</real>
<key>Red Component</key>
<real>0.30770933628082275</real>
</dict>
<key>Ansi 5 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.50980392156862742</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.21176470588235294</real>
<key>Red Component</key>
<real>0.82745098039215681</real>
</dict>
<key>Ansi 6 Color</key> <key>Ansi 6 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -544,6 +784,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.061654355376958847</real> <real>0.061654355376958847</real>
</dict> </dict>
<key>Ansi 6 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.838664710521698</real>
<key>Green Component</key>
<real>0.50448882579803467</real>
<key>Red Component</key>
<real>0.061654355376958847</real>
</dict>
<key>Ansi 6 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.59607843137254901</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.63137254901960782</real>
<key>Red Component</key>
<real>0.16470588235294117</real>
</dict>
<key>Ansi 7 Color</key> <key>Ansi 7 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -553,6 +813,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.84028750658035278</real> <real>0.84028750658035278</real>
</dict> </dict>
<key>Ansi 7 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.89713811874389648</real>
<key>Green Component</key>
<real>0.8579363226890564</real>
<key>Red Component</key>
<real>0.84028750658035278</real>
</dict>
<key>Ansi 7 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.83529411764705885</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.90980392156862744</real>
<key>Red Component</key>
<real>0.93333333333333335</real>
</dict>
<key>Ansi 8 Color</key> <key>Ansi 8 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -562,6 +842,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.84028750658035278</real> <real>0.84028750658035278</real>
</dict> </dict>
<key>Ansi 8 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.89713811874389648</real>
<key>Green Component</key>
<real>0.8579363226890564</real>
<key>Red Component</key>
<real>0.84028750658035278</real>
</dict>
<key>Ansi 8 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.21176470588235294</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.16862745098039217</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Ansi 9 Color</key> <key>Ansi 9 Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -571,6 +871,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.87161564826965332</real> <real>0.87161564826965332</real>
</dict> </dict>
<key>Ansi 9 Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.1818375289440155</real>
<key>Green Component</key>
<real>0.20686990022659302</real>
<key>Red Component</key>
<real>0.87161564826965332</real>
</dict>
<key>Ansi 9 Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.086274509803921567</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.29411764705882354</real>
<key>Red Component</key>
<real>0.79607843137254897</real>
</dict>
<key>BM Growl</key> <key>BM Growl</key>
<true/> <true/>
<key>Background Color</key> <key>Background Color</key>
@@ -582,6 +902,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.07621997594833374</real> <real>0.07621997594833374</real>
</dict> </dict>
<key>Background Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.076218985021114349</real>
<key>Green Component</key>
<real>0.076217696070671082</real>
<key>Red Component</key>
<real>0.07621997594833374</real>
</dict>
<key>Background Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.8901960784313725</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.96470588235294119</real>
<key>Red Component</key>
<real>0.99215686274509807</real>
</dict>
<key>Background Image Location</key> <key>Background Image Location</key>
<string></string> <string></string>
<key>Badge Color</key> <key>Badge Color</key>
@@ -597,6 +937,32 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>1</real> <real>1</real>
</dict> </dict>
<key>Badge Color (Dark)</key>
<dict>
<key>Alpha Component</key>
<real>0.5</real>
<key>Blue Component</key>
<real>0.0</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.1491314172744751</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Badge Color (Light)</key>
<dict>
<key>Alpha Component</key>
<real>0.5</real>
<key>Blue Component</key>
<real>0.13960540294647217</real>
<key>Color Space</key>
<string>P3</string>
<key>Green Component</key>
<real>0.25479039549827576</real>
<key>Red Component</key>
<real>0.92929404973983765</real>
</dict>
<key>Blinking Cursor</key> <key>Blinking Cursor</key>
<false/> <false/>
<key>Blur</key> <key>Blur</key>
@@ -610,14 +976,42 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.84028750658035278</real> <real>0.84028750658035278</real>
</dict> </dict>
<key>Bold Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.89713811874389648</real>
<key>Green Component</key>
<real>0.8579363226890564</real>
<key>Red Component</key>
<real>0.84028750658035278</real>
</dict>
<key>Bold Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.45882352941176469</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.43137254901960786</real>
<key>Red Component</key>
<real>0.34509803921568627</real>
</dict>
<key>Brighten Bold Text (Dark)</key>
<true/>
<key>Brighten Bold Text (Light)</key>
<true/>
<key>Character Encoding</key> <key>Character Encoding</key>
<integer>4</integer> <integer>4</integer>
<key>Close Sessions On End</key> <key>Close Sessions On End</key>
<true/> <true/>
<key>Columns</key> <key>Columns</key>
<integer>158</integer> <integer>168</integer>
<key>Command</key> <key>Command</key>
<string></string> <string></string>
<key>Cursor Boost (Dark)</key>
<real>0.0</real>
<key>Cursor Boost (Light)</key>
<real>0.0</real>
<key>Cursor Color</key> <key>Cursor Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -627,6 +1021,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.72549021244049072</real> <real>0.72549021244049072</real>
</dict> </dict>
<key>Cursor Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.72549021244049072</real>
<key>Green Component</key>
<real>0.72549021244049072</real>
<key>Red Component</key>
<real>0.72549021244049072</real>
</dict>
<key>Cursor Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.51372549019607838</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.4823529411764706</real>
<key>Red Component</key>
<real>0.396078431372549</real>
</dict>
<key>Cursor Guide Color</key> <key>Cursor Guide Color</key>
<dict> <dict>
<key>Alpha Component</key> <key>Alpha Component</key>
@@ -640,6 +1054,32 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.70213186740875244</real> <real>0.70213186740875244</real>
</dict> </dict>
<key>Cursor Guide Color (Dark)</key>
<dict>
<key>Alpha Component</key>
<real>0.25</real>
<key>Blue Component</key>
<real>1</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.9268307089805603</real>
<key>Red Component</key>
<real>0.70213186740875244</real>
</dict>
<key>Cursor Guide Color (Light)</key>
<dict>
<key>Alpha Component</key>
<real>0.25</real>
<key>Blue Component</key>
<real>0.99125725030899048</real>
<key>Color Space</key>
<string>P3</string>
<key>Green Component</key>
<real>0.92047786712646484</real>
<key>Red Component</key>
<real>0.74862593412399292</real>
</dict>
<key>Cursor Text Color</key> <key>Cursor Text Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -649,6 +1089,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.062745101749897003</real> <real>0.062745101749897003</real>
</dict> </dict>
<key>Cursor Text Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.062745101749897003</real>
<key>Green Component</key>
<real>0.062745101749897003</real>
<key>Red Component</key>
<real>0.062745101749897003</real>
</dict>
<key>Cursor Text Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.83529411764705885</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.90980392156862744</real>
<key>Red Component</key>
<real>0.93333333333333335</real>
</dict>
<key>Custom Command</key> <key>Custom Command</key>
<string>No</string> <string>No</string>
<key>Custom Directory</key> <key>Custom Directory</key>
@@ -661,6 +1121,10 @@ The script should do this: \(ai.prompt)</string>
<true/> <true/>
<key>Faint Text Alpha</key> <key>Faint Text Alpha</key>
<real>0.5</real> <real>0.5</real>
<key>Faint Text Alpha (Dark)</key>
<real>0.5</real>
<key>Faint Text Alpha (Light)</key>
<real>0.5</real>
<key>Flashing Bell</key> <key>Flashing Bell</key>
<false/> <false/>
<key>Foreground Color</key> <key>Foreground Color</key>
@@ -672,6 +1136,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.84028750658035278</real> <real>0.84028750658035278</real>
</dict> </dict>
<key>Foreground Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.89713811874389648</real>
<key>Green Component</key>
<real>0.8579363226890564</real>
<key>Red Component</key>
<real>0.84028750658035278</real>
</dict>
<key>Foreground Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.51372549019607838</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.4823529411764706</real>
<key>Red Component</key>
<real>0.396078431372549</real>
</dict>
<key>Guid</key> <key>Guid</key>
<string>093812C0-CFC5-4622-AB39-AD24DB22E05B</string> <string>093812C0-CFC5-4622-AB39-AD24DB22E05B</string>
<key>Horizontal Spacing</key> <key>Horizontal Spacing</key>
@@ -1130,18 +1614,74 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.0</real> <real>0.0</real>
</dict> </dict>
<key>Link Color (Dark)</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.73423302173614502</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.35916060209274292</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Link Color (Light)</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.7093239426612854</real>
<key>Color Space</key>
<string>P3</string>
<key>Green Component</key>
<real>0.35333043336868286</real>
<key>Red Component</key>
<real>0.14513972401618958</real>
</dict>
<key>Load Shell Integration Automatically</key> <key>Load Shell Integration Automatically</key>
<false/> <false/>
<key>Match Background Color (Dark)</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
<key>Color Space</key>
<string>P3</string>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Match Background Color (Light)</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
<key>Color Space</key>
<string>P3</string>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Minimum Contrast (Dark)</key>
<real>0.0</real>
<key>Minimum Contrast (Light)</key>
<real>0.0</real>
<key>Mouse Reporting</key> <key>Mouse Reporting</key>
<true/> <true/>
<key>Name</key> <key>Name</key>
<string>Default</string> <string>Default</string>
<key>Non Ascii Font</key> <key>Non Ascii Font</key>
<string>Monaco 12</string> <string>MesloLGS-NF-Regular 12</string>
<key>Non-ASCII Anti Aliased</key> <key>Non-ASCII Anti Aliased</key>
<true/> <true/>
<key>Normal Font</key> <key>Normal Font</key>
<string>MesloLGS-NF-Regular 13</string> <string>HackNerdFontComplete-Regular 13</string>
<key>Option Key Sends</key> <key>Option Key Sends</key>
<integer>0</integer> <integer>0</integer>
<key>Prompt Before Closing 2</key> <key>Prompt Before Closing 2</key>
@@ -1149,7 +1689,7 @@ The script should do this: \(ai.prompt)</string>
<key>Right Option Key Sends</key> <key>Right Option Key Sends</key>
<integer>0</integer> <integer>0</integer>
<key>Rows</key> <key>Rows</key>
<integer>46</integer> <integer>47</integer>
<key>Screen</key> <key>Screen</key>
<integer>-1</integer> <integer>-1</integer>
<key>Scrollback Lines</key> <key>Scrollback Lines</key>
@@ -1163,6 +1703,26 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.84028750658035278</real> <real>0.84028750658035278</real>
</dict> </dict>
<key>Selected Text Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.89713811874389648</real>
<key>Green Component</key>
<real>0.8579363226890564</real>
<key>Red Component</key>
<real>0.84028750658035278</real>
</dict>
<key>Selected Text Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.45882352941176469</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.43137254901960786</real>
<key>Red Component</key>
<real>0.34509803921568627</real>
</dict>
<key>Selection Color</key> <key>Selection Color</key>
<dict> <dict>
<key>Blue Component</key> <key>Blue Component</key>
@@ -1172,12 +1732,36 @@ The script should do this: \(ai.prompt)</string>
<key>Red Component</key> <key>Red Component</key>
<real>0.1234394758939743</real> <real>0.1234394758939743</real>
</dict> </dict>
<key>Selection Color (Dark)</key>
<dict>
<key>Blue Component</key>
<real>0.12343787401914597</real>
<key>Green Component</key>
<real>0.12343578040599823</real>
<key>Red Component</key>
<real>0.1234394758939743</real>
</dict>
<key>Selection Color (Light)</key>
<dict>
<key>Blue Component</key>
<real>0.83529411764705885</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.90980392156862744</real>
<key>Red Component</key>
<real>0.93333333333333335</real>
</dict>
<key>Send Code When Idle</key> <key>Send Code When Idle</key>
<false/> <false/>
<key>Shortcut</key> <key>Shortcut</key>
<string></string> <string></string>
<key>Silence Bell</key> <key>Silence Bell</key>
<true/> <true/>
<key>Smart Cursor Color (Dark)</key>
<false/>
<key>Smart Cursor Color (Light)</key>
<false/>
<key>Sync Title</key> <key>Sync Title</key>
<false/> <false/>
<key>Tags</key> <key>Tags</key>
@@ -1192,10 +1776,32 @@ The script should do this: \(ai.prompt)</string>
<true/> <true/>
<key>Use Bright Bold</key> <key>Use Bright Bold</key>
<true/> <true/>
<key>Use Bright Bold (Dark)</key>
<true/>
<key>Use Bright Bold (Light)</key>
<true/>
<key>Use Cursor Guide (Dark)</key>
<false/>
<key>Use Cursor Guide (Light)</key>
<false/>
<key>Use Italic Font</key> <key>Use Italic Font</key>
<true/> <true/>
<key>Use Non-ASCII Font</key> <key>Use Non-ASCII Font</key>
<false/> <false/>
<key>Use Selected Text Color (Dark)</key>
<true/>
<key>Use Selected Text Color (Light)</key>
<true/>
<key>Use Separate Colors for Light and Dark Mode</key>
<true/>
<key>Use Tab Color (Dark)</key>
<false/>
<key>Use Tab Color (Light)</key>
<false/>
<key>Use Underline Color (Dark)</key>
<false/>
<key>Use Underline Color (Light)</key>
<false/>
<key>Vertical Spacing</key> <key>Vertical Spacing</key>
<real>1</real> <real>1</real>
<key>Visual Bell</key> <key>Visual Bell</key>
@@ -2037,7 +2643,7 @@ The script should do this: \(ai.prompt)</string>
<key>Print In Black And White</key> <key>Print In Black And White</key>
<true/> <true/>
<key>ShowFullScreenTabBar</key> <key>ShowFullScreenTabBar</key>
<true/> <false/>
<key>SmartPlacement</key> <key>SmartPlacement</key>
<true/> <true/>
<key>SoundForEsc</key> <key>SoundForEsc</key>

View File

@@ -1,24 +0,0 @@
#!/usr/bin/env bb
(require '[clojure.string :as str :refer [split]])
(require '[babashka.tasks :as tasks :refer [shell]])
(def drive-dest "turtlebasket-gdrive:/macbook-air-m1")
(def paths ["Desktop"
"Documents/Personal Knowledge Base"
"Documents/Berkeley Notes"])
;; currently not used
(def exclude ["*.swp" ".git" "node_modules" "__pycache__" ".DS_Store"])
(for [path paths]
(future
(let [res
(shell "rclone" "sync"
path
(format "%s/%s" drive-dest (-> path (split #"/") last))
"--progress" "--retries" 1 "--delete-excluded")]
(if (= (get res "exit") 0)
(println (format "Backed up %s" path))
(println (get res "error"))))))
;; (for [item exclude] (cons "--exclude" item))))

78
scripts/ntfy-me Executable file
View File

@@ -0,0 +1,78 @@
#!/usr/bin/env bash
#
# ntfy-me — run any command, then send ntfy success/failure notification (via curl)
#
# Usage:
# ntfy-me <command> [args...]
#
# Example:
# ntfy-me make build
# ntfy-me bash -c "sleep 10 && false"
# ntfy-me ls /nonexistent
#
# Notes:
# - Requires $NTFY_ME_TOPIC set (e.g., mytopic)
# - Optional $NTFY_HOST (defaults to https://ntfy.sh)
# - Captures exit code and reports SUCCESS/FAILURE via ntfy with duration.
set -uo pipefail # no `-e`, so we can handle nonzero exits ourselves
if [ -z "${NTFY_ME_TOPIC:-}" ]; then
echo "Error: NTFY_ME_TOPIC environment variable not set."
echo "Set it like: export NTFY_ME_TOPIC=mytopic"
exit 1
fi
# Set default ntfy host if not provided
NTFY_HOST="${NTFY_HOST:-https://ntfy.sh}"
if [ $# -lt 1 ]; then
echo "Usage: $0 <command> [args...]"
exit 1
fi
# Reconstruct command with proper quoting for display
original_cmd=""
for arg in "$@"; do
if [[ "$arg" =~ [[:space:]] ]]; then
original_cmd="$original_cmd \"$arg\""
else
original_cmd="$original_cmd $arg"
fi
done
original_cmd="${original_cmd# }" # Remove leading space
start_time=$(date +%s)
hostname=$(hostname)
# Run the command directly, preserving exit code
"$@"
code=$?
end_time=$(date +%s)
elapsed=$((end_time - start_time))
duration="$(printf '%02dh:%02dm:%02ds' $((elapsed/3600)) $((elapsed%3600/60)) $((elapsed%60)))"
if [ $code -eq 0 ]; then
title="✅ Command exited - SUCCESS"
else
title="❌ Command exited - FAILURE"
fi
# Truncate if too long (keep first 100 chars + "..." if truncated)
cmd_str="$original_cmd"
if [ ${#cmd_str} -gt 100 ]; then
cmd_str="${cmd_str:0:100}..."
fi
body="Command: $cmd_str
Host: $hostname
Duration: $duration
Exit code: $code"
curl -fsS -X POST \
-H "Title: $title" \
-d "$body" \
"$NTFY_HOST/$NTFY_ME_TOPIC" >/dev/null 2>&1 || echo "Warning: failed to send ntfy notification" >&2
exit $code