Skip to content

Instantly share code, notes, and snippets.

@valechelaru
Last active May 7, 2022 23:40
Show Gist options
  • Select an option

  • Save valechelaru/a7d685d82309138789699f4e9ca798fd to your computer and use it in GitHub Desktop.

Select an option

Save valechelaru/a7d685d82309138789699f4e9ca798fd to your computer and use it in GitHub Desktop.
Small script that searches for highlighted text using the gnome-dictionary.
#!/bin/bash
# Put highlighted text into the clipboard buffer
xclip -out -selection primary
# Start the gnome-dictionary and search for the clipboard buffer
gnome-dictionary --look-up="$(xclip -o selection clipboard)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment