diff --git a/enhanced-voice-typing.py b/enhanced-voice-typing.py old mode 100755 new mode 100644 index d7b6889..808b21a --- a/enhanced-voice-typing.py +++ b/enhanced-voice-typing.py @@ -112,7 +112,7 @@ def type_text(self, text): """Type the text using ydotool or xdotool""" try: # Try ydotool first - subprocess.run(['ydotool', '--socket-path', '/run/ydotoold/socket', 'type', text + ' '], + subprocess.run(['ydotool', 'type', '-d1', '-H1', text + ' '], capture_output=True, text=True, check=True) print(f"✓ {text}") except: diff --git a/voice b/voice old mode 100755 new mode 100644 index 6776a6b..8e8d563 --- a/voice +++ b/voice @@ -29,5 +29,5 @@ elif [ "$XDG_SESSION_TYPE" = "x11" ]; then fi # Run enhanced version (with pre-buffer to capture initial words) -cd /home/jordan/voice-typing-nix -exec nix-shell shell.nix --run "python enhanced-voice-typing.py $DEFAULT_ARGS $*" \ No newline at end of file +cd "$(dirname "$0")" +YDOTOOL_SOCKET=/run/ydotoold/socket exec nix-shell shell.nix --run "python enhanced-voice-typing.py $DEFAULT_ARGS $*"