Screenhook
Background app to make up for BetterTouchTool's limitations. (eg: Run applescript on click (w/o modifier keys) or when connecting a display)
Install / Use
/learn @steventheworker/ScreenhookREADME
screenhook
originally made to make up for features BTT lacks like:
-
running applescript when monitor is attached/detached
-
running applescript when you click on a corner
-
running applescript for any click (without modifiers keys held)
-
lets you use 3 fingers to open exposé/mission control/switch spaces w/ 3 finger drag
-
Firefox (new --vertical tabs support) (my config)
- cmd+shift+T to reopen tabs AND windows (requires BTT bindings)
- left-edge of window = sidebar peak
- twoFingerSwipeFromLeftEdge of trackpad = sidebar peak_
- top-edge of window = more consistent window dragging (compensate for userChrome.css w/ auto-reveal location bar (prevent drag))
*Note:* best if used w/ the BetterTouchTool triggers included in "steviaOS" (but not required for all features)
"steviaOS" exclusive features:
- make sure afterBTTLaunched.applescript (steviaOS script) ran, launch DockAltTab after
- "Spotlight Search.app" will only work with screenhook (dock app to toggle Spotlight / Alfred)
planned features:
- awareness of spaces
- applescript definitions - to share space awareness
- change middle mouse button behavior
startup:
- waits to run some startup apps (7-14 seconds) that depend on programs that take a bit startup (eg: BetterTouchTool, AltTab & DockAltTab (opens on startup))
- KeyCastr - set overlay position to {0, 820} (currently hardcoded for m1 air's dimensions (bottom left))
- QuickShade - uncheck "Enable Shade"
using screenhook (for <u>Firefox</u> vertical tabs) without BTT:
<details> <summary>put in (~/.config/karabiner/assets/complex_modifications) </summary><details> <summary>as toggle-firefox-sidebar.json</summary>
{
"title": "Rules for Karabiner-Elements | Tested Version: 11.6.0",
"rules": [
{
"description": "Firefox cmd+s => (applescript) toggle the sidebar and tell screenhook it's visiblity",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": ["^org\\.mozilla\\.firefox$"],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "s",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"shell_command":
"osascript -e 'run script \"'/Users/YOUR_USER_NAME/Desktop/firefox-sidebar-toggle.scpt'\"'"
}
],
"type": "basic"
}
]
}
]
}
</details>
<details>
<summary>as toggle-firefox-dev-sidebar.json</summary>
{
"title": "Rules for Karabiner-Elements | Tested Version: 11.6.0",
"rules": [
{
"description": "Firefox (dev) cmd+s => (applescript) toggle the sidebar and tell screenhook it's visiblity",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": ["^org\\.mozilla\\.firefoxdeveloperedition$"],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "s",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"shell_command":
"osascript -e 'run script \"'/Users/YOUR_USER_NAME/Desktop/firefox-dev-sidebar-toggle.scpt'\"'"
}
],
"type": "basic"
}
]
}
]
}
</details>
Fix the path in "shell_command" to point at the .scpt
or, if it's on the desktop, just replace "YOUR_USERNAME" in the example string
</details>
... then enable in Karabiner-Elements in order to bind Command+S to firefox-sidebar-toggle.scpt / firefox-dev-sidebar-toggle.scpt (save as .scpt w/ Script Editor)
Related Skills
node-connect
337.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR
