Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copy to RTL

I use a lot of Hebrew in Claude, and the desktop app — like most chat apps built with English in mind — lays text out left-to-right. Mixed Hebrew/English answers end up scrambled: punctuation lands on the wrong side, lines read backwards, and you burn more energy untangling the direction than actually reading the answer.

The obvious fix is to "just make Claude render right-to-left" — inject some CSS, patch the Electron bundle, run a userscript in devtools. I didn't want to go anywhere near that:

  • I'm not cracking open Anthropic's app. I'd rather not poke at its internals, risk voiding support, or step on its terms of use.
  • Claude updates constantly, and every update would wipe the patch. I'm not signing up to re-apply a hack forever.
  • One bad injection and I've broken the app I actually depend on.

So Copy to RTL never touches Claude at all. It's a small, separate window that just watches your clipboard. Select an answer in Claude, hit Ctrl+C, and it shows up here laid out properly right-to-left. Nothing injected, nothing patched, nothing to redo after the next update — and no way for it to break Claude itself.

It isn't Claude-only, either. ChatGPT, Gemini, Copilot, and Grok work the same way out of the box, and you can add any other app by a keyword from its window title.

Windows only. It figures out where a copy came from by reading the active window's title through a tiny PowerShell call — that's the one OS-specific bit.

What it does

613996247-582c96f0-81c3-4e94-9fba-0f311910c119 613908819-3df83e0e-62fa-4f84-bc24-75e6ff3bbd5d
  • Shows whatever you copy right-to-left, with proper Hebrew layout.
  • Optionally styles common Markdown — **bold**, *italic*, _italic_, `code`, ~~strikethrough~~, ####### headings, ordered/unordered/nested lists, - [ ] task lists, [links](url), ![images](url), > blockquotes, --- dividers, and | pipe | tables | — or shows the raw text if you'd rather. Toggle it with the Style button.
  • Highlights ``` fenced code blocks with highlight.js (vendored, fully offline), honoring the language hint (```js) or auto-detecting. Code stays left-to-right; any English-only prose line also stays LTR while Hebrew lines flow RTL (per-line dir="auto").
  • Every rendered code block gets its own copy button (hover to reveal it), so you can grab just the snippet without touching the rest of the text on screen.
  • A 📥 paste button shows whatever is on the clipboard right now — handy for a one-time paste from an app you haven't added to the monitored list.
  • Renders math with KaTeX, so formulas copied out of Claude show up as real notation instead of raw LaTeX that fell apart on the way to the clipboard. $x^2$, $$…$$, \(…\) and \[…\] all work, fully offline. (Shown when Style is on.)
  • Snaps side by side in one click (the button): this window jumps to the right third of your screen and the app it's watching — Claude, say — fills the left two-thirds. Handy for reading along while you chat.
  • Only reacts to copies from apps you've opted into. Claude is on by default; the others are a checkbox away under Select Monitoring, and custom apps are matched by a window-title keyword you provide.
  • Stays out of the way: always-on-top, light/dark themes, one-click copy of what's shown, and a pause toggle for when you don't want it watching.
  • Opens at 30% of your screen width × 70% of its height and remembers wherever you drag or resize it to next time.
  • Only ever runs one copy of itself, and closing the window quits it for real — no stray process left running in the background.

Getting it running

The easiest way: grab the installer (copy-to-rtl-setup-*.exe) from the Releases page and run it. A portable zip is there too if you'd rather not install anything.

To run from source you'll need Node.js 18+ on Windows 10/11.

npm install
npm start

If something gets stuck, npm run stop kills any running instances.

Building a standalone .exe

npm run package

That drops an unpacked build in release/copy-to-rtl-win32-x64/. Launch it with copy-to-rtl.exe. To move or share it, copy the whole folder — it carries the Electron runtime with it. The packaging setup lives in build.mjs.

To build the Windows installer (Squirrel Setup.exe) from that unpacked build:

npm run installer

which writes copy-to-rtl-setup-<version>.exe to release/installer/ (see installer.mjs).

Auto-updates

The installed build (from the setup exe) checks the repo's latest GitHub release shortly after launch and every few hours while running. When a newer version has been downloaded it offers a one-click restart to apply it. The portable zip and dev runs never self-update.

For that to work, every GitHub release must include — alongside the setup exe and the portable zip — the Squirrel update assets that npm run installer drops in release/installer/:

  • RELEASES
  • copytortl-<version>-full.nupkg
  • copytortl-<version>-delta.nupkg (produced when the previous version's nupkg is still in release/installer/; makes updates much smaller)

The app reads them from https://github.com/Stastyle/copy-to-rtl/releases/latest/download/, so they must be on the latest release or updates silently stop.

Using it day to day

Launch it, then copy text in a monitored app (Claude, unless you've changed things). The window pops up with your text the right way round. The toolbar keeps the quick actions up front:

  • — snap this window to the right third and the monitored app to the left two-thirds.
  • 📥 — paste: show the clipboard's current contents, even from an unmonitored app.
  • 📋 — copy the displayed text back to the clipboard.
  • Clear — wipe the view.

Everything else lives under ☰ Menu, with a ✓ marking whichever toggles are on:

  • Select Monitoring — pick which apps trigger it, or add your own by keyword.
  • Always on top — keep it floating above everything else (remembered between launches).
  • Styled markdown — switch between styled Markdown and raw text (also turns on math rendering).
  • Dark mode — dark or light.
  • Help — a quick reference for everything above.

Hovering a code block reveals a 📋 button in its corner that copies just that snippet.

Click the title (or the tray's Enable Monitoring item) to pause and resume. The dot next to it is green when it's watching, red when it's paused.

How it decides what to show

Roughly five times a second it checks whether the clipboard changed. When it has, it reads the foreground window's title and compares it (case-insensitively) against the keywords of each enabled app. Match found → it shows the text; no match → it ignores it. That's the whole trick — it never touches the other app, it just notices what's in front when you copy.

Where your settings live

Everything's kept out of the app folder, under %AppData%\copy-to-rtl\:

  • monitored-apps.json — your app list and toggles.
  • window-state.json — the last window size and position.

Project layout

The interesting files: main.js is the Electron main process (window, tray, clipboard polling, lifecycle); renderer.js is the viewer UI; markdown.js is the markdown/math/code rendering pipeline (covered by test/markdown.test.js); apps-store.js handles the monitored-app list and matching; foreground-title.ps1 reads the active window title and snap-window.ps1 moves the watched window for the snap layout; and build.mjs / installer.mjs package the executable and build the Setup.exe installer. The monitoring-settings.* files are the "Select Monitoring" window, the *preload.js files are the context-isolated IPC bridges, and vendor/katex and vendor/highlight are the bundled math renderer and syntax highlighter that ship with the app so it works offline.

License

MIT — see LICENSE. © Stas Meirovich

About

Clipboard monitor that displays copied text in RTL for Hebrew readability

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages