Cthulhu is no longer a fork. Now it is a screen reader written in Golang.

This commit is contained in:
Storm Dragon committed 2026-10-14 00:16:34 -04:00
1 parent a998fe67de
commit 069fc674dc
708 files changed
+112482 -532

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
// Copyright (c) 2026 Storm Dragon
// Authors: Storm Dragon, Angus Kola
// SPDX-License-Identifier: GPL-3.0-or-later
package app
import (
"context"
"git.stormux.org/storm/cthulhu/internal/input"
)
func runCopyFeedback(ctx context.Context, changes <-chan struct{}, source any, speech speechEnqueuer, live *liveSettings, ocr *ocrSession) <-chan struct{} {
done := make(chan struct{})
go func() {
defer close(done)
var announced uint64
for {
select {
case <-ctx.Done():
return
case _, ok := <-changes:
if !ok {
return
}
activity := recentInput(source)
if ocr != nil && ocr.Reviewing() {
if activity.Clipboard == input.CopyAction {
announced = activity.Sequence
}
continue
}
if live != nil && live.Load().Reading.AutomaticallyReadClipboardChanges {
continue
}
if activity.Clipboard != input.CopyAction || activity.Sequence == 0 || activity.Sequence == announced {
continue
}
announced = activity.Sequence
speech.Enqueue(speechRequest{Text: "copied to clipboard", Role: "system", Cause: "clipboard"})
}
}
}()
return done
}