This file contains 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
import "@johnlindquist/kit" | |
// prefer using the full path | |
let qalc = `/opt/homebrew/bin/qalc` | |
let currentValue = "" | |
await arg( | |
{ | |
placeholder: "Qalculate", | |
enter: "Copy Result to Clipboard", |
This file contains 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: Bookmarks | |
// Trigger: bm | |
// Shortcut: opt b | |
import "@johnlindquist/kit" | |
let bookmarks = await readFile(kenvPath("bookmarks.txt"), "utf8") | |
let choices = bookmarks | |
.split("\n") |
This file contains 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: Widget Info | |
import "@johnlindquist/kit" | |
// converting video | |
let fullPath = await drop() | |
let css = ` | |
h1{ |
This file contains 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 Servers | |
import "@johnlindquist/kit" | |
let servers = [ | |
{ | |
name: "Byte Bistro", | |
description: "This is the first server", | |
value: "server1", | |
}, |
This file contains 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: Copy Latest Transcript | |
import "@johnlindquist/kit" | |
// Define the directory path | |
const directoryPath = path.join(process.env.HOME, "Documents", "Audio Hijack") | |
async function readMostRecentTxtFile(dirPath) { | |
try { | |
// Read the directory contents |
This file contains 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: Toggle Transcribe | |
import "@johnlindquist/kit" | |
let ahScript = ` | |
let sessionName = "Transcribe"; //Set me to the target session | |
let session = app.sessionWithName( sessionName ) | |
if( session.running ) |
This file contains 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: Fix Clipboard | |
import "@johnlindquist/kit" | |
await replace({ | |
files: kitPath("main", "clipboard-history.js"), | |
from: "input: keyword + ` `", | |
to: "input: keyword ? keyword + ` ` : ``", | |
}) |
This file contains 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: GitHub Karabiner Examples | |
import "@johnlindquist/kit" | |
let recentsPath = kenvPath("recent", "queries.txt") | |
let recentsContent = await ensureReadFile(recentsPath) | |
let recents = recentsContent.split("\n").filter(r => r.length > 0) | |
const OPEN_RECENTS = "Open recents.txt" | |
let choices = groupChoices( |
This file contains 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: GitHub Karabiner Examples | |
import "@johnlindquist/kit" | |
import express from "express" | |
let app = express() | |
let recentsPath = kenvPath("recent", "queries.txt") | |
let recentsContent = await ensureReadFile(recentsPath) | |
let recents = recentsContent.split("\n").filter(r => r.length > 0) |
This file contains 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: Search by Value | |
import "@johnlindquist/kit" | |
let fruits = [ | |
{ name: "Apple", description: "A sweet, edible fruit", value: "USA" }, | |
{ name: "Banana", description: "A long, curved fruit", value: "South America" }, | |
{ name: "Cherry", description: "A small, round fruit", value: "Europe" }, | |
{ name: "Date", description: "A sweet, chewy fruit", value: "Middle East" }, | |
{ name: "Elderberry", description: "A small, dark fruit", value: "North America" }, |
NewerOlder