Created
July 27, 2012 12:12
-
-
Save tobynet/3187618 to your computer and use it in GitHub Desktop.
open browser with temporary profile and URIs from clipboard for linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'uri' | |
from_clipboard = `xsel -b` | |
uris = URI.extract(from_clipboard) | |
exec 'chromium-browser', '--temp-profile', *uris | |
# for zsh | |
# chromium-browser --temp-profile "$uri" $* & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
他のプラットフォームで使う場合は、 clipboard gem 使うのと、ubuntuの /usr/bin/chromium-browser のスクリプトの一時プロファイルを生成しているのを参考にするのがいいと思う。