Skip to content

Instantly share code, notes, and snippets.

@thorsummoner
Created September 4, 2015 21:11
Show Gist options
  • Save thorsummoner/b33b69ed822d85b892b9 to your computer and use it in GitHub Desktop.
Save thorsummoner/b33b69ed822d85b892b9 to your computer and use it in GitHub Desktop.
Use this as a 'custom browser command' to 'open' urls with a copy to the clipboard
python -c "import sys, subprocess; p = subprocess.Popen(['xclip', '-selection', 'clipboard'], stdin=subprocess.PIPE); p.communicate(input=bytes((' '.join(sys.argv[1:]) + '\n').split('http://')[-1]))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment