Skip to content

Instantly share code, notes, and snippets.

@Vashkatsi
Vashkatsi / README.md
Last active June 9, 2026 12:06
Hammerspoon macOS Cmd+C+C translator for ChatGPT and Gemini

macOS Cmd+C+C AI Translator

A small Hammerspoon automation for macOS. Press Cmd+C+C to copy selected text, open the selected AI provider, paste a translation prompt, and optionally submit it automatically.

Behavior

  • If copied text is primarily Russian → translate to English.
  • If copied text is not primarily Russian → translate to Russian.
  • Preserves formatting, code blocks, URLs, commands, names, numbers, and technical terms.

Supported providers

  • ChatGPT macOS app
  • Gemini macOS app / PWA
@Vashkatsi
Vashkatsi / Python Repository
Created October 1, 2024 13:11
Python Repository
from abc import ABC, abstractmethod
class AbstractRepository(ABC):
def __init__(self, model_class):
self.model_class = model_class
@abstractmethod
def get(self, **kwargs):
pass