Skip to content

Commit

Permalink
ENH: EFCK_TYPEOUT_CMD env variable for overriding xdotool
Browse files Browse the repository at this point in the history
Fixes #22
  • Loading branch information
kernc committed Feb 5, 2025
1 parent ec6cc5d commit 8410187
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions efck/output.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import os
import shlex
import shutil
import subprocess
from tempfile import NamedTemporaryFile
Expand All @@ -10,8 +11,12 @@
logger = logging.getLogger(__name__)


EFCK_TYPEOUT_CMD = os.environ.get('EFCK_TYPEOUT_CMD', None)


def type_chars(text: str, force_clipboard):
TYPEOUT_COMMANDS = (
(EFCK_TYPEOUT_CMD, [*shlex.split(EFCK_TYPEOUT_CMD or ''), text]),
(IS_X11, ['xdotool', 'type', text]),
(IS_X11 or IS_WAYLAND, ['ydotool', 'type', '--next-delay', '0', '--key-delay', '0', text]),
(IS_X11 or IS_WAYLAND, ['wtype', text]),
Expand Down

0 comments on commit 8410187

Please sign in to comment.