Surfingkeys Conf Save

🏄 A SurfingKeys config which adds 180+ key mappings & 50+ search engines

Project README

Maddison's SurfingKeys Configuration

This is my configuration for the SurfingKeys browser extension.

It includes:

Table of Contents

  1. Site-Specific Key Mappings
  2. Omnibar Search Engine Integrations
  3. Installation Instructions
  4. Screenshots
  5. License

Features

Site-Specific Key Mappings

global
MappingDescription
FOpen a link in non-active new tab
zfOpen link URL in vim editor
wScroll up
sScroll down
KScroll half page up
JScroll half page down
ghScroll to element targeted by URL hash
giEdit current URL with vim editor
giEdit current URL with vim editor
gIView image in new tab
g.Go to parent domain
ypCopy URL path of current page
yICopy Image URL
yACopy link as Markdown
yOCopy page URL/Title as Org-mode link
yMCopy page URL/Title as Markdown link
yTDuplicate current tab (non-active new tab)
;seEdit Settings
gSOpen Chrome settings
=WLookup whois information for domain
=dLookup dns information for domain
=DLookup all information for domain
=cShow Google's cached version of page
=aShow Archive.org Wayback Machine for page
=AShow Alexa.com info for domain
=sView social discussions for page
=SView summary for page
=oShow outline.com version of page
=bwShow BuiltWith report for page
=waShow Wappalyzer report for page
;pdToggle PDF viewer from SurfingKeys
gxEClose tab to left
gxRClose tab to right
\cghOpen clipboard string as GitHub path (e.g. 'torvalds/linux')
FOpen a link in non-active new tab
ohOpen URL from history
algolia.com
MappingDescription
aOpen search result
amazon.com
MappingDescription
fsFakespot
aView product
cAdd to Cart
RView Product Reviews
QView Product Q&A
AOpen Account page
COpen Cart page
OOpen Orders page
aur.archlinux.org
MappingDescription
aView package
behance.net
MappingDescription
sAppreciate project
bAdd project to collection
aView project
AView project (non-active new tab)
bsky.app
MappingDescription
dCopy user DID
pCopy user post ID
chat.openai.com
MappingDescription
nNew chat
aOpen chat
craigslist.org
MappingDescription
aView listing
devdocs.io
MappingDescription
wScroll sidebar up
sScroll sidebar down
eScroll sidebar page up
dScroll sidebar page down
kScroll body up
jScroll body down
KScroll body page up
JScroll body page down
duckduckgo.com
MappingDescription
aOpen search result
AOpen search result (non-active new tab)
]]Show more results
gOpen search in Google
sghSearch site:github.com
sreSearch site:reddit.com
ebay.com
MappingDescription
fsFakespot
fonts.adobe.com
MappingDescription
aActivate font
sFavorite font
github.com
MappingDescription
AOpen repository Actions page
COpen repository Commits page
IOpen repository Issues page
NOpen notifications page
POpen repository Pull Requests page
ROpen Repository page
SOpen repository Settings page
WOpen repository Wiki page
XOpen repository Security page
OOpen repository Owner's profile page
MOpen your profile page ('Me')
aView Repository
uView User
fView File
cView Commit
iView Issue
pView Pull Request
eView external link
guGo up one path in the URL (GitHub)
sToggle Star
yyCopy Project Path
YCopy Project Path (including domain)
lToggle repo language stats
DOpen in github.dev (new tab)
ddOpen in github.dev
GView on SourceGraph
rView live raw version of file
yrCopy raw link to file
yfCopy link to file
gcpOpen clipboard string as file path in repo
github.io
MappingDescription
ROpen Repository page
gitlab.com
MappingDescription
sToggle Star
yCopy Project Path
YCopy Project Path (including domain)
DView GoDoc for Project
home.nest.com
MappingDescription
=Increment temperature
-Decrement temperature
hSwitch mode to Heat
cSwitch mode to Cool
rSwitch mode to Heat/Cool
oSwitch mode to Off
fSwitch fan On
FSwitch fan Off
ikea.com
MappingDescription
dToggle Product Details
iToggle Product Details
rToggle Product Reviews
COpen Cart page
POpen Profile page
FOpen Favorites page
OOpen Orders page
news.ycombinator.com
MappingDescription
xCollapse comment
XCollapse next comment
sUpvote
SDownvote
aView post (link)
AView post (link and comments)
cView post (comments)
CView post (comments) (non-active new tab)
eView external link
gpGo to parent
]]Next page
[[Prev page
producthunt.com
MappingDescription
aView product (external)
vView product
sUpvote product
raw.githubusercontent.com
MappingDescription
ROpen Repository page
FOpen Source File
reddit.com
MappingDescription
xCollapse comment
XCollapse next comment
sUpvote
SDownvote
eExpand expando
aView post (link)
AView post (link) (non-active new tab)
cView post (comments)
CView post (comments) (non-active new tab)
rescript-lang.org
MappingDescription
iFocus search field
aOpen docs link
LOpen language manual
ROpen ReScript + React docs
GOpen GenType docs
POpen package index
YOpen playground
SOpen syntax lookup
FOpen community forum
AOpen API docs
JOpen JS API docs
BOpen Belt API docs
DOpen DOM API docs
wScroll sidebar up
sScroll sidebar down
eScroll sidebar page up
dScroll sidebar page down
kScroll body up
jScroll body down
KScroll body page up
JScroll body page down
stackoverflow.com
MappingDescription
aView question
twitter.com
MappingDescription
fFollow user
sLike tweet
RRetweet
cComment/Reply
TNew tweet
uGoto user
tGoto tweet
vimeo.com
MappingDescription
FToggle fullscreen
wikipedia.org
MappingDescription
sToggle simple version of current article
aView page
eView external link
ysCopy article summary as Markdown
RView WikiRank for current article
www.google.com
MappingDescription
aOpen search result
AOpen search result (new tab)
dOpen search in DuckDuckGo
www.yelp.com
MappingDescription
fsFakespot
youtube.com
MappingDescription
AOpen video
COpen channel
gHGoto homepage
FToggle fullscreen
YtCopy YouTube video link for current time
YmCopy YouTube video markdown link for current time

There are also mappings to open academic papers from 70+ publishers using a DOI handler.

Omnibar Search Engine Integrations

To open the omnibar integration for a search engine, press the search leader key (a by default) followed by the alias for the desired search engine, as found in the table below.

For example, to open the Wikipedia omnibar integration, type awp.

Alias Name Domain Screenshots
D duckduckgo-lucky duckduckgo.com
G google-lucky www.google.com
af archforums bbs.archlinux.org
al archlinux www.archlinux.org
at alternativeTo alternativeto.net
au AUR aur.archlinux.org :framed_picture:
aw archwiki wiki.archlinux.org
az amazon smile.amazon.com :framed_picture:
ci caniuse caniuse.com
cl craigslist www.craigslist.org
cs chromestore chrome.google.com
dd duckduckgo duckduckgo.com
de define onelook.com :framed_picture:
dh dockerhub hub.docker.com :framed_picture:
di duckduckgo-images duckduckgo.com
dm duckduckgo-maps duckduckgo.com
dn duckduckgo-news duckduckgo.com
do domainr domainr.com :framed_picture:
dv duckduckgo-videos duckduckgo.com
eb ebay www.ebay.com
fa firefox-addons addons.mozilla.org :framed_picture:
fe firefox-extensions addons.mozilla.org
ft firefox-themes addons.mozilla.org
gI google-reverse-image www.google.com
gg golang golang.org
gh github github.com :framed_picture:
gi google-images www.google.com
go google www.google.com
gs google-scholar scholar.google.com
hd hexdocs hex.pm
hf huggingface huggingface.co
hn hackernews news.ycombinator.com :framed_picture:
ho hoogle www.haskell.org :framed_picture:
hw haskellwiki wiki.haskell.org
hx hex hex.pm
jq jquery jquery.com
ka kagi kagi.com
md mdn developer.mozilla.org :framed_picture:
no node nodejs.org
np npm www.npmjs.com
ow owasp www.owasp.org
re reddit www.reddit.com :framed_picture::framed_picture:
se stackexchange stackexchange.com
so stackoverflow stackoverflow.com
th thesaurus www.onelook.com :framed_picture:
ts typescript www.typescriptlang.org
tw twitter twitter.com
un unicode unicode-table.com :framed_picture:
vw vimwiki vim.fandom.com
wa wolframalpha www.wolframalpha.com :framed_picture::framed_picture:
wp wikipedia en.wikipedia.org :framed_picture:
ws wikipedia-simple simple.wikipedia.org
wt wiktionary en.wiktionary.org
yp yelp www.yelp.com
yt youtube www.youtube.com :framed_picture:

∗ requires private API key

† requires local webserver

Installation

Requires Surfingkeys v1.0.0 or newer.

Pre-built

Coming soon!

Build and Install

Dependencies

  • git
  • node.js v17

Procedure

  1. Clone

    $ git clone http://github.com/b0o/surfingkeys-conf
    $ cd surfingkeys-conf
    
  2. Install Node.js dependencies

    $ npm install
    
  3. Gulp Build/Install

    $ npm run gulp install # OR "npm run gulp build" to build to ./build/surfingkeys.js without installing
    

    This will build the final configuration file and place it at ~/.config/surfingkeys.js. If you already have a file in that location, make sure you back it up first!

  4. Load your configuration into the SurfingKeys Extension

    Option A (recommended): Configure SurfingKeys to automatically load the configuration file
    Local File Access (Chrome/Chromium only)
    • I. Visit chrome://extensions/ and enable Allow access to file URLs for the Surfingkeys extension.

    • II. Open the SurfingKeys configuration page: chrome-extension://gfbliohnnapiefjpjlpjnehglfpaknnc/pages/options.html.

    • III. Set the Load settings from option to point to the configuration file.

      Note: you must specify the full, absolute path; the tilde ~ or environment variables like $HOME won't work:

      • Linux: file:///home/{USERNAME}/.config/surfingkeys.js (replace {USERNAME} with your username)
      • macOS: file:///Users/{USERNAME}/.config/surfingkeys.js (replace {USERNAME} with your username)
      • Windows: file://%Homedrive%%Homepath%/surfingkeys.js (This is a guess, please correct me if I'm wrong)
    • IV. Repeat these steps after you make any changes to your configuration files. Your new configuration will be automatically loaded by SurfingKeys.

    Local Web Server (Chrome, Chromium, and Firefox)
    • I. Run the configuration file server:

      See Running the Local Web Server

    • II. Open the SurfingKeys configuration page:

      Chrome: chrome-extension://gfbliohnnapiefjpjlpjnehglfpaknnc/pages/options.html

      Firefox: moz-extension://7b04efeb-0b36-47f6-9f57-70293e5ee7b2/pages/options.html

    • III. Set the Load settings from option to http://localhost:9919

    • IV. SurfingKeys will lose the settings as soon as the local web server shuts down. You will likely want to configure your system to automatically start the server on login.

      If you run Linux with systemd, an example user service is provided in this repo. You will need to modify it to contain the proper path to your surfingkeys-conf repo.

    • V. Repeat the npm run gulp build command from step 4 above after you make any changes to your configuration files. Your new configuration will be automatically loaded by the web server and SurfingKeys will pick it up the next time you load a webpage.

    Option B: Manually copy/paste into the SurfingKeys configuration form
    • I. Copy the contents of ./build/surfingkeys.js (or $HOME/.config/surfingkeys.js if you ran gulp install)

    • II. Paste the contents into the SurfingKeys configuration page:

      Chrome: chrome-extension://gfbliohnnapiefjpjlpjnehglfpaknnc/pages/options.html

      Firefox: moz-extension://7b04efeb-0b36-47f6-9f57-70293e5ee7b2/pages/options.html

    • III. Repeat these steps after you make any changes to your configuration files. Your new configuration will be automatically loaded by SurfingKeys.

Optional: Private API Key Configuration

Some omnibar search engine integrations require private API keys for access (marked with a ∗ in the table above). These keys are to be defined in ./src/conf.priv.js, which should be created based on the template: ./src/conf.priv.example.js. The template contains instructions on how to generate each API key.

Note: The ./src/conf.priv.js does not exist in the repository, you need to copy the template file. The conf.priv.js should not be commited!

  1. Copy the example private configuration:
$ cp ./src/conf.priv.example.js ./src/conf.priv.js
  1. Open ./src/conf.priv.js in your favorite editor and follow the instructions inside:
$ vim ./src/conf.priv.js

Running the Local Web Server

This project provides a local web server which:

  • Serves your configuration file via HTTP
  • Serves additional API routes for certain search engines, like the unicode search engine.

To run the local web server, follow steps 1-3 in the installation instructions above, then run:

$ gulp serve-simple

Alternatively, you can use the gulp serve task, which also automatically rebuilds the configuration file whenever a source file is modified.

If you wish to use the local web server, you will likely want it to start automatically with your PC. If you run Linux with systemd, an example user service is provided for this purpose. You will need to modify it to contain the proper path to your surfingkeys-conf repo.

Note: This starts a local web server on localhost:9919 which serves your built configuration file and additional API endpoints. Depending on your firewall configuration, other devices on your network may be able to read your configuration file, including any private API keys or other secrets you have configured in conf.priv.js. Proceed with caution.

Screenshots

AUR

AUR screenshot

amazon

amazon screenshot

define

define screenshot

dockerhub

dockerhub screenshot

domainr

domainr screenshot

firefox-addons

firefox-addons screenshot

github

github screenshot

hackernews

hackernews screenshot

hoogle

hoogle screenshot

mdn

mdn screenshot

reddit

reddit screenshot

reddit 2

reddit screenshot

thesaurus

thesaurus screenshot

unicode

unicode screenshot

wolframalpha

wolframalpha screenshot

wolframalpha 2

wolframalpha screenshot

wikipedia

wikipedia screenshot

youtube

youtube screenshot

Author

© 2017-2023 Maddison Hellstrom

License

Released under the MIT License
Open Source Agenda is not affiliated with "Surfingkeys Conf" Project. README Source: b0o/surfingkeys-conf
Stars
348
Open Issues
19
Last Commit
3 weeks ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating