Last active
September 10, 2020 01:08
-
-
Save GwyndolynMarchant/26999fd44602e96b01ef1067f8d35fd6 to your computer and use it in GitHub Desktop.
Script to automate replacing text with w i d e text
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/bash | |
# Author: Gwyndolyn Marchant <gwyn@shadenexus.com> | |
# | |
# Bind this to a keyboard shortcut and it should (hopefully) replace selected text with a w i d e version | |
windowid=$(xdotool getwindowfocus) | |
text=`xsel -o | sed -e 's/\(.\)/\1 /g'` | |
xdotool windowactivate --sync "$windowid" key Delete && xdotool type " ${text}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment