This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Actions Example | |
import { Action } from "@johnlindquist/kit" | |
/* | |
Using a "flag" determines where to do to custom logic: After the prompt or in the action | |
Also, "flags" are supported when running the script in the terminal with `--js` | |
*/ | |
let actions: Action[] = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Testing Regenerate List | |
import "@johnlindquist/kit" | |
let choices = ["one", "two", "three"].map(name => ({ | |
name, | |
value: name, | |
id: uuid(), // This happens automatically behind the scenes if you don't do it manually | |
})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
# Script Hub | |
You can access this on your phone from: | |
http://kit.local | |
Run a script by going to http://kit.local/my-script-name | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Move Mouse to Active App | |
// Background: true | |
import "@johnlindquist/kit" | |
import { getFrontmostApp } from "@johnlindquist/mac-frontmost" | |
import { shakeCursor } from "@johnlindquist/mac-cursor-effects" | |
let windowID = "" | |
let windowTitle = "" | |
let recentlyClicked = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Move Mouse to Active App | |
// Background: true | |
import "@johnlindquist/kit" | |
import { getFrontmostApp } from "@johnlindquist/mac-frontmost" | |
import { shakeCursor } from "@johnlindquist/mac-cursor-effects" | |
import pkg from "uiohook-napi" | |
const { uIOhook } = pkg | |
let windowID = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Move Mouse to Active App | |
// Background: true | |
import "@johnlindquist/kit" | |
import { getFrontmostApp } from "@johnlindquist/mac-frontmost" | |
import { shakeCursor } from "@johnlindquist/mac-cursor-effects" | |
import pkg from "uiohook-napi" | |
const { UiohookKeyboardEvent, UiohookKey, UiohookMouseEvent, uIOhook } = pkg | |
let bundleIdentifier = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Filter Scripts | |
// Shortcut: opt 7 | |
// Cache: true | |
import "@johnlindquist/kit" | |
let kenv = "kit-examples" | |
let scripts = (await getScripts()).filter(script => script.kenv === kenv) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: List Kit Examples Scripts | |
// Shortcut: opt 7 | |
// Cache: true | |
import "@johnlindquist/kit" | |
import { parseScript } from "@johnlindquist/kit/core/utils" | |
import { globby } from "globby" | |
let kenv = "kit-examples" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: List Kit Examples Scripts | |
// Shortcut: opt 7 | |
// Cache: true | |
import "@johnlindquist/kit" | |
import { parseScript } from "@johnlindquist/kit/core/utils" | |
import { globby } from "globby" | |
let kenv = "kit-examples" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: List Kit Examples Scripts | |
// Shortcut: opt 7 | |
// Cache: true | |
import "@johnlindquist/kit" | |
import { parseScript } from "@johnlindquist/kit/core/utils" | |
import { globby } from "globby" | |
let kenv = "kit-examples" |