Prompt pack

KDE Widgets Prompt Pack

Download the whole pack: kde-widgets-pack.md

Free to copy, use, change and share.

Build your own versions of two small KDE Plasma desktop widgets: a scrolling Stock Ticker and a flip-through HUD Card. These prompts work with any AI assistant that can write code. There are two widgets, each with two versions:

  • Easy: describe what you want, and let the AI walk you through it step by step.
  • Advanced: a detailed spec for when you want exactly this design and are comfortable in a terminal.

Copy-paste tip: Replace anything in [SQUARE BRACKETS] before you send the prompt.


Step 0: Before you start (2 minutes)

  1. Find your Plasma version. Run this in a terminal: plasmashell --version. Plasma 5 and Plasma 6 widgets are built differently, so your AI needs to know which one you have.
  2. Back up first. At minimum, copy your ~/.config folder somewhere safe.
  3. House rules for your AI. Paste this line at the top of any prompt below:

Copy this

Ground rules: explain every command before I run it, don't use sudo unless you tell me exactly why, install everything to my user account only, and tell me how to uninstall it.


Widget 1: Stock Ticker (a scrolling quote strip)

Easy

Copy this

I use Linux with the KDE Plasma desktop, version [YOUR PLASMA VERSION]. I'm a beginner.
I'd like a simple desktop widget (a "plasmoid") that scrolls stock prices from right to left in a thin strip, like a news ticker. It should show each symbol, its price, and the day's change in green or red.
I want to pick my own symbols, starting with: [YOUR SYMBOLS, e.g. SPY, QQQ].
Please:

1. Tell me which free price source you'll use, whether it's official, and what happens if it stops working.
2. Give me every file I need, with the full folder layout.
3. Walk me through installing it for my user only, adding it to my desktop, and removing it later.
Go one step at a time and wait for me to say "done" before the next step.

Advanced

Copy this

Build a KDE Plasma [5 or 6] applet (plasmoid) for Plasma [YOUR VERSION] named "Stock Ticker".

Behavior

- A horizontal strip that continuously scrolls quotes right to left: SYMBOL, last price, change % with ▲/▼, green up and red down.
- It must still scroll when the symbol list is shorter than the widget's width (loop the content seamlessly).
- Works on the desktop and in a panel. Show a plain "No quotes yet" message instead of an empty strip.

Settings (a config page plus a kcfg schema)

- symbols: string, comma- or space-separated. Default: [YOUR SYMBOLS]
- refreshIntervalSeconds: int, default 300, minimum 60
- scrollSpeed: int, pixels per second, default 90
- onlyDuringMarketHours: bool, default false. When true, show the ticker only during the NYSE regular session (Mon–Fri, 9:30 AM–4:00 PM America/New_York), hide it on exchange holidays, and treat 1:00 PM ET early-close days correctly. Keep the holiday list in a separate, easy-to-edit JS file.

Data

- Propose a free quote source. Tell me plainly if it is unofficial or rate-limited, and design it so I can swap it out in one function.
- Batch all symbols into one request. Map special symbols (indexes such as ^VIX and crypto pairs such as BTC-USD) in one lookup table.
- Stop all network requests while the widget is hidden and resume when it's shown.
- Never store credentials. No telemetry.

Deliverables

- The full package tree: metadata.json (and metadata.desktop if Plasma 5), contents/ui/main.qml, contents/ui/configGeneral.qml, contents/config/main.xml, contents/config/config.qml, and contents/ui/MarketHours.js.
- An MIT LICENSE with [YOUR NAME OR HANDLE].
- Commands to install and upgrade for my user only (kpackagetool5 or kpackagetool6), to see errors (e.g. journalctl or plasmawindowed), and to uninstall.
- A short test plan: short list, long list, a bad symbol, market closed, network off.


Widget 2: HUD Card (a flip-through heads-up card)

Easy

Copy this

I use Linux with the KDE Plasma desktop, version [YOUR PLASMA VERSION]. I'm a beginner.
I'd like a square desktop widget that flips through "pages" every few seconds, like a little dashboard. Each page shows one stock: big price, today's change, and a small 30-day trend line. Hovering pauses it, and clicking moves to the next page.
My stocks: [YOUR SYMBOLS].
Please:

1. Tell me which free data sources you'll use and whether they're official.
2. Give me every file and the folder layout.
3. Walk me through installing it for my user only, adding it to my desktop, and removing it later.
One step at a time, please. Wait for me to say "done."

Advanced

Copy this

Build a KDE Plasma [5 or 6] applet named "HUD Card" for Plasma [YOUR VERSION].

Layout and behavior

- A square, dark "heads-up" card. It cycles pages every cycleSeconds (default 10; 0 means don't cycle), pauses while hovered, and advances on click or scroll. Show dot indicators for the pages and an "Updated [time]" footer.
- Stock page: symbol and name, last price, change and change %, previous close, open, high/low, volume, a 30-day close sparkline with daily volume bars, and the latest news headline (clicking opens it in the browser).
- Optional "account" pages read ONLY from a local JSON file I create (default path: ~/.local/share/[your-widget-name]/accounts.json). Show balance, a 30-day trend and upcoming items. Never ask for credentials and never contact a bank. Include a demo accounts.json with obviously fake names such as "Example Bank" and "Everyday Checking".

Settings (kcfg plus a config page)

- items: one per line. Either SYMBOL, or SYMBOL | custom news search words, or @account-id
- cycleSeconds (10), pauseOnHover (true), accountsFile (path)
- refreshMarketSeconds (60) during US market hours, refreshOffhoursSeconds (300) otherwise

Data

- Put fetching in a small helper script (Python 3 standard library only) that the widget runs and that prints one JSON object. That keeps QML simple.
- Quotes, 30-day history and headlines: propose free sources, say which are unofficial, and make each one swappable.
- Cache history (30 min) and headlines (15 min) under ~/.cache/[your-widget-name] to stay polite.
- Handle network errors by showing the last good data with its timestamp.

Deliverables

- The full package tree (metadata, contents/ui/main.qml, config page, contents/config/main.xml, contents/code/fetch.py), the demo accounts.json, and an MIT LICENSE with [YOUR NAME OR HANDLE].
- Install, upgrade, debug and uninstall commands for my user only.
- A test plan: one stock, five stocks, an account page from the demo file, a missing file, network off.


If something goes wrong

Paste this into the same chat:

Copy this

The widget isn't working. Here's exactly what I see: [DESCRIBE IT OR PASTE THE ERROR].
My Plasma version is [VERSION]. Before suggesting a fix, tell me what you think is wrong and how we can check it. Give me one change at a time.

Good habits: Ask, check, own it. Read before you run. Keep notes on what you changed. If a price feed stops working, ask your AI to swap in a different source. That's why the Advanced prompts keep each source in one place.

Prices are for fun, not financial advice.

← All prompts