import { exec } from "child_process"; /** * Get the system clipboard text */ export async function clipboardGet(): Promise { return new Promise((resolve, reject) => { const command = `termux-clipboard-set`; exec(command, (error, stdout, stderr) => { if (error) { return reject(`Error: ${error.message}`); } if (stderr) { return reject(`Error: ${stderr}`); } const output = stdout.trim(); return resolve(output); }); }); }