Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add designer-excuses extension #16659

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shree5k
Copy link

@shree5k shree5k commented Jan 28, 2025

Description

Screencast

Checklist

@raycastbot raycastbot added the new extension Label for PRs with new extensions label Jan 28, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Jan 28, 2025

Congratulations on your new Raycast extension! 🚀

Due to our current reduced availability, the initial review may take up to 10-15 business days

Once the PR is approved and merged, the extension will be available on our Store.

@raycastbot
Copy link
Collaborator

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

@raycastbot raycastbot added the status: stalled Stalled due inactivity label Feb 11, 2025
Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you make this with AI?

You don't need applescript, why not use Clipboard.paste instead?

import { showHUD, Clipboard } from "@raycast/api";
import excuses from "./excuses"; // Adjust the path if necessary

// Main function to execute when the command is run
export default async function main() {
  const randomExcuse: string = getRandomElement(excuses);
  await Clipboard.paste(randomExcuse); // Copy to clipboard
  await showHUD(`✅ Pasted excuse: ${randomExcuse}`); // Show HUD notification
}

// Function to get a random element from an array
const getRandomElement = (arr: string[]): string => arr[Math.floor(Math.random() * arr.length)];

@pernielsentikaer pernielsentikaer removed the status: stalled Stalled due inactivity label Feb 13, 2025
@pernielsentikaer pernielsentikaer self-assigned this Feb 13, 2025
@shree5k
Copy link
Author

shree5k commented Feb 14, 2025

Yes, used AI for this, could you help explain the the clipboard.paste please

@pernielsentikaer
Copy link
Collaborator

You can read about it here

- update using clipboard api
- update using clipboard api
@shree5k
Copy link
Author

shree5k commented Feb 23, 2025

@pernielsentikaer thanks for the link and I've updated using the clipboard api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new extension Label for PRs with new extensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants