Skip to content

Instantly share code, notes, and snippets.

@antonsoroko
Created March 12, 2025 12:59
Show Gist options
  • Select an option

  • Save antonsoroko/1cdbb014ca74dc1f6f997bd40f869f1c to your computer and use it in GitHub Desktop.

Select an option

Save antonsoroko/1cdbb014ca74dc1f6f997bd40f869f1c to your computer and use it in GitHub Desktop.
Paste copied or selected text into Kodi in Linux.
#!/bin/bash
text="$(xclip -out -selection clipboard)"
# OR xsel --output --clipboard ; remove "clipboard" if you want to use PRIMARY selection.
xdotool type --window $(xdotool search --class Kodi) -- "$text"
@magoafono

Copy link
Copy Markdown

It works like a charm! Thank you!

@vitusson

Copy link
Copy Markdown

You saved my nerves, thanks!
Nothing sucks more than the fact that you can't normal c&p to Kodi.

@antonsoroko

Copy link
Copy Markdown
Author

I am glad that this script helped you :-) As a note: in Wayland you can paste text into Kodi via CTRL-V. Although, personally I am still sill using X11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment