···198198199199# AI
200200bind = $mainMod SHIFT, A, exec, uwsm app -- brave --app=https://chatgpt.com
201201-bind = $mainMod SHIFT, Y, exec, ledit
201201+bind = $mainMod SHIFT, Y, exec, magic-brush
202202203203# Todoist
204204bind = $mainMod SHIFT, T, exec, uwsm app -- brave --app=https://app.todoist.com/app/today
+34
llm/templates/polish.yaml
···11+model: gemini/gemini-3-pro-preview
22+system: |
33+ Improve the provided text using your knowledge and best practices of clear and direct writing.
44+55+ ## Guidelines
66+77+ - Ensure ideas are clearly understood and expressed.
88+ - Be concise. Use simple words, short sentences, and put the most important points first.
99+ - Get to the point as quickly as possible. Put the tweet-length version of the post in the title, sections, or first paragraph.
1010+ - Define a clear thesis before supporting it. State the main point early.
1111+ - Be useful. Clarify purpose, audience, and what the reader actually needs.
1212+ - Be specific. Remove vague language, qualifiers, fluff, and weak adverbs.
1313+ - Prefer stronger, more precise verbs over adverbs.
1414+ - Don't use clichés or marketing language.
1515+ - Rewrite sentences to place key information before the noun.
1616+ - Be consistent in structure, terminology, and tone.
1717+ - Add rhythm. Vary sentence length for clarity and flow.
1818+ - Good sound often equals good thinking. Use rhythm to refine ideas.
1919+ - Prefer active voice.
2020+ - Maintain a conversational tone and awareness of the reader.
2121+ - Structure ideas into small, logical chunks. Number points when helpful.
2222+ - Break up long paragraphs into multiple shorter ones. Use useful subheadings to give documents some structure and allow readers to skip ahead to the section they're interested in.
2323+ - Support the thesis with clear arguments. Restate for clarity when needed.
2424+ - Avoid ambiguous references like "this".
2525+ - Look for ways that you can restate the main point, clarify, or provide closure for the reader.
2626+ - The title gets read way more than the rest, so make it count. Keep same style and tone.
2727+ - Return only the improved text. No commentary, no quotes, no code fences.
2828+2929+prompt: |
3030+ Improve the following text so that it's **clear**, **direct** and **effective**. Avoid fluff and unnecessary changes.
3131+3232+ <text>
3333+ $input
3434+ </text>
-57
scripts/ledit
···11-#!/usr/bin/env bash
22-set -euo pipefail
33-44-TITLE="ledit"
55-66-require() {
77- command -v "$1" >/dev/null 2>&1
88-}
99-1010-sendshortcut() {
1111- local mods="$1"
1212- local key="$2"
1313- local result
1414-1515- result="$(hyprctl dispatch sendshortcut "${mods}, ${key}, activewindow" 2>&1 | tr -d '\n')"
1616- if [[ "$result" != "ok" ]]; then
1717- notify-send -u critical "$TITLE" "sendshortcut failed: $result"
1818- exit 1
1919- fi
2020-}
2121-2222-for cmd in hyprctl llm notify-send wl-copy wl-paste; do
2323- if ! require "$cmd"; then
2424- echo "$TITLE: missing required command: $cmd" >&2
2525- exit 1
2626- fi
2727-done
2828-2929-sleep 0.05
3030-sendshortcut CTRL C
3131-sleep 0.05
3232-3333-INPUT="$(wl-paste --no-newline)"
3434-if [[ -z "${INPUT}" ]]; then
3535- notify-send -u critical "$TITLE" "No text copied (is something selected?)"
3636- exit 1
3737-fi
3838-3939-notify-send -u low -t 5000 "$TITLE" "Refabulating..."
4040-4141-OUTPUT="$(
4242- printf %s "$INPUT" | llm prompt -t ledit --no-log --no-stream
4343-)" || {
4444- notify-send -u critical "$TITLE" "LLM failed"
4545- exit 1
4646-}
4747-4848-if [[ -z "${OUTPUT}" ]]; then
4949- notify-send -u critical "$TITLE" "LLM returned empty output"
5050- exit 1
5151-fi
5252-5353-printf %s "$OUTPUT" | wl-copy
5454-sleep 0.05
5555-sendshortcut CTRL V
5656-5757-notify-send -u low -t 1500 "$TITLE" "Done"
+62
scripts/magic-brush
···11+#!/usr/bin/env bash
22+set -euo pipefail
33+44+APP_NAME="magic-brush"
55+NOTIFY_TITLE="🪄 Magic Brush"
66+NOTIFY_ICON="draw-brush"
77+88+require() {
99+ command -v "$1" >/dev/null 2>&1
1010+}
1111+1212+notify() {
1313+ local urgency="$1"
1414+ local timeout_ms="$2"
1515+ local message="$3"
1616+1717+ if require notify-send; then
1818+ notify-send -a "$APP_NAME" -i "$NOTIFY_ICON" -u "$urgency" -t "$timeout_ms" "$NOTIFY_TITLE" "$message"
1919+ fi
2020+}
2121+2222+die() {
2323+ local message="$1"
2424+ notify critical 0 "$message"
2525+ echo "$APP_NAME: $message" >&2
2626+ exit 1
2727+}
2828+2929+if [[ $# -ne 0 ]]; then
3030+ die "This script takes no arguments"
3131+fi
3232+3333+for cmd in alacritty llm wl-copy wl-paste; do
3434+ if ! require "$cmd"; then
3535+ die "Missing required command: $cmd"
3636+ fi
3737+done
3838+3939+INPUT="$(wl-paste --type text --no-newline)" || die "Failed to read clipboard text"
4040+if [[ -z "${INPUT}" ]]; then
4141+ die "Clipboard is empty"
4242+fi
4343+4444+notify low 5000 "Polishing..."
4545+4646+OUTPUT="$(
4747+ printf %s "$INPUT" | llm prompt -t polish --no-log --no-stream
4848+)" || die "LLM failed"
4949+5050+if [[ -z "${OUTPUT}" ]]; then
5151+ die "LLM returned empty output"
5252+fi
5353+5454+printf %s "$OUTPUT" | wl-copy
5555+notify low 1500 "Copied to clipboard"
5656+5757+TMP_DIR="${XDG_RUNTIME_DIR:-/tmp}"
5858+TMP_FILE="$(mktemp -p "$TMP_DIR" magic-brush.XXXXXX)"
5959+trap 'rm -f "$TMP_FILE"' EXIT
6060+printf %s "$OUTPUT" >"$TMP_FILE"
6161+6262+alacritty --title "$APP_NAME" --hold --command cat -- "$TMP_FILE"