✊ Copy Handler

🧚 Hello

🧚 I am Fairie

🧚 Nice to meet you

🧚 Bye

Copy handler is a program that captures host machine's ctrl+c, and automatically executes asynchronous tasks for you quickly.

Let Procrastinate: https://youtu.be/NEDQQESQxxg

💇 Usage:

One time set up:

  bash setup.sh && source ~/.bash_profile

Main Usage:

  echo "doing your thing..."
  ...
  copy-handler.sh <mode> <optional-argument>
  # Terminate by pressing ctrl-c, so the worker's final task is to die.
  ...
  echo "back to doing your thing..."

Mode:

  • grep "<text-pattern>": Scan the copied text, notify if text contains pattern
  • definition: Google Search this text
  • translate: Google Translate this text
  • youtube: Google Youtube Search this text

🏗️ Plugins system

  cd ./plugins
  # view sample files, create one yourself
  # remember the naming prefix "plugin_", without it, the plugin would not run.
``