Last active
September 23, 2024 12:16
-
-
Save derjohn/957c8f43fe8247b48e4cd5f6127ff8d0 to your computer and use it in GitHub Desktop.
X11 / Wayland "Type for me" instead of pasting the clipboard. Good for services that don't accept CTRL-V
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Hint: Wayland uses ydotool instead | |
# FYI: Multiline a special thing, because keyboard do not send the newline style that Linux wants | |
# To workaround that tr and sed are in place | |
# I bind that command to shift-alt-N because that's neither occupied by a Windows nor a KDE default hotkey. | |
xdotool sleep 0.100 type --clearmodifiers -- "$(xsel -bo | tr \\n \\r | sed s/\\r*\$//)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment