From 634ed233259f3f30e7560e983ca90426c56f94b5 Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.dev>
Date: Thu, 9 May 2024 23:19:54 +0100
Subject: [PATCH] Override the `ttyper` command with a function

Set values for the number of words and languages, as there isn't a word
setting to add to a `config.toml` file.

This is based on https://www.youtube.com/watch?v=C5aRtq-Rtbg by Greg
Hurrell.
---
 lib/shared/modules/zsh.nix | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/shared/modules/zsh.nix b/lib/shared/modules/zsh.nix
index 8bdceb55..3f134196 100644
--- a/lib/shared/modules/zsh.nix
+++ b/lib/shared/modules/zsh.nix
@@ -58,6 +58,10 @@
         t "''${repo_path}"
       }
 
+      ttyper() {
+        command ${pkgs.ttyper}/bin/ttyper --language english1000 --words 50 "''${@}"
+      }
+
       # Plugins
       source "''${ZPLUG_REPOS}/joshskidmore/zsh-fzf-history-search/zsh-fzf-history-search.plugin.zsh"
       source "''${ZPLUG_REPOS}/robbyrussell/oh-my-zsh/plugins/git/git.plugin.zsh"