diff options
| -rw-r--r-- | modules/keyboard-compat.el | 8 | ||||
| -rwxr-xr-x | scripts/assemblyai-transcribe | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/modules/keyboard-compat.el b/modules/keyboard-compat.el index 9b277ba8..735839eb 100644 --- a/modules/keyboard-compat.el +++ b/modules/keyboard-compat.el @@ -163,8 +163,12 @@ Meta+Shift+letter triggers M-S-letter keybindings." (define-key key-translation-map (kbd "M-B") (kbd "M-S-b")) (define-key key-translation-map (kbd "M-K") (kbd "M-S-k")))) -;; Run early - key-translation-map should be set up before keybindings -(add-hook 'emacs-startup-hook #'cj/keyboard-compat-gui-setup) +;; In daemon mode, no frame exists at startup so env-gui-p returns nil. +;; Use server-after-make-frame-hook to set up translations when the first +;; GUI client connects. In non-daemon mode, run at startup as before. +(if (daemonp) + (add-hook 'server-after-make-frame-hook #'cj/keyboard-compat-gui-setup) + (add-hook 'emacs-startup-hook #'cj/keyboard-compat-gui-setup)) (provide 'keyboard-compat) ;;; keyboard-compat.el ends here diff --git a/scripts/assemblyai-transcribe b/scripts/assemblyai-transcribe index 22cbf538..c798cb6b 100755 --- a/scripts/assemblyai-transcribe +++ b/scripts/assemblyai-transcribe @@ -127,7 +127,7 @@ echo "Transcription complete! (${ELAPSED}s total)" >&2 # Extract utterances and format as "Speaker A: text" echo "$RESULT" | jq -r ' if .utterances then - .utterances[] | "Speaker \(.speaker): \(.text)" + .utterances[] | ((.start / 1000 | floor) as $s | "\([$s/3600 | floor, ($s % 3600 / 60 | floor), $s % 60] | map(tostring | if length < 2 then "0" + . else . end) | join(":")) Speaker \(.speaker): \(.text)") else .text end |
