Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save hulet/1260502 to your computer and use it in GitHub Desktop.

Select an option

Save hulet/1260502 to your computer and use it in GitHub Desktop.

Revisions

  1. Frank Macreery revised this gist Sep 29, 2011. No changes.
  2. Frank Macreery created this gist Sep 29, 2011.
    8 changes: 8 additions & 0 deletions enable_google_keyboard_shortcuts.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #!/bin/sh
    # Force Google Keyboard Shortcuts experimental search in Chrome

    COOKIEJAR=~/Library/Application\ Support/Google/Chrome/Default/Cookies
    OLDCOOKIEVAL=$(sqlite3 "$COOKIEJAR" "select value from cookies where host_key = '.google.com' and name = 'PREF';")
    NEWCOOKIEVAL=$(echo $OLDCOOKIEVAL | sed 's/GM=.*\:S=/GM=1\:ES=WBS\:S=/')

    sqlite3 "$COOKIEJAR" "update cookies set value = '$NEWCOOKIEVAL' where host_key = '.google.com' and name = 'PREF';"