Reads non-empty lines from stdin or a file and pastes / types each
line into any X-org window using xclip and xdotool.
Perfect for dropping long URL lists into chat apps, editors, shells, or
opening them as new browser tabs.
- Detects the current terminal window, then waits until you focus the target window before starting – rock-solid workflow.
- Built-in paste modes (mutually exclusive):
• Editor / IMctrl+v,Return(default)
• Terminalctrl+shift+v,Return
• Browser new-tabctrl+t,ctrl+v,Return
• Custom sequences via--paste-commands. - Fine-grained timing control
• Inter-key delay (--sleep)
• Exact per-line delay (--item-delay) – auto-distributed across the sequence. - Verbose output (
-v,-vv) shows progress, ETA, timing per line, etc. - Aborts gracefully if the target window loses focus mid-run.
# Paste each line from urls.txt into Telegram (default mode)
./paste_lines_to_window.py -f urls.txt
# Open each line as a new tab in the browser
cat urls.txt | ./paste_lines_to_window.py -B
# Guarantee 2 s per line regardless of sequence length
./paste_lines_to_window.py -f commands.sh -S 2.0 -v# Paste into Telegram with 12-second breaks, sending bookmarks from folders foo bar zoo
for folder in foo bar zoo ; do \
bookmarks_chromium.py -f Bookmarks ls "$folder" -F urls ; \
done | paste_lines_to_window.py -v -e -S 12Python 3, xdotool, xclip, xprop
sudo pacman -S xdotool xclip xorg-xprop- Visual progress bar.
- Wayland, macOS, Windows back-ends.