Skip to content

Instantly share code, notes, and snippets.

@marcusramberg
Last active January 18, 2026 20:58
Show Gist options
  • Select an option

  • Save marcusramberg/e38aad81baebe7793d9e695c684326f7 to your computer and use it in GitHub Desktop.

Select an option

Save marcusramberg/e38aad81baebe7793d9e695c684326f7 to your computer and use it in GitHub Desktop.
My SurfingKeys config
// Keybinding customizations
api.cmap('<Ctrl-n>', '<Tab>');
api.cmap('<Ctrl-p>', '<Shift-Tab>');
api.unmap("/", /github.com/);
api.iunmap('<Ctrl-a>');
// Disable SurfingKeys on chrome-extension pages
settings.blocklistPattern = /chrome-extension:\\/\\//i;
settings.modeAfterYank = "Normal";
settings.tabsThreshold = 0;
// Search engine configuration
const SEARCH_ENGINE = "https://kagi.com/search?q=";
api.addSearchAlias("k", "kagi", SEARCH_ENGINE, "s");
api.addSearchAlias("g", "github", "https://github.com/search?q=", "s");
api.addSearchAlias("y", "youtube", "https://www.youtube.com/results?search_query=", "s");
api.addSearchAlias("w", "wikipedia", "https://en.wikipedia.org/wiki/Special:Search?search=", "s");
api.addSearchAlias("n", "npm", "https://www.npmjs.com/search?q=", "s");
settings.defaultSearchEngine = "k";
// Hints configuration - home row keys
api.Hints.characters = 'asdfghjkl';
// Custom keybindings
api.mapkey('ym', 'Copy page as Markdown link', function() {
api.Clipboard.write('[' + document.title + '](' + window.location.href + ')');
});
api.mapkey('gG', 'Open GitHub', function() {
window.location.href = 'https://github.com';
});
api.mapkey('gK', 'Open Kagi', function() {
window.location.href = 'https://kagi.com';
});
settings.theme = `
.sk_theme input {
font-family: "Jetbrains Mono";
}
.sk_theme .url {
font-size: 12px;
}
#sk_omnibarSearchResult li div.url {
font-weight: normal;
}
.sk_theme .omnibar_timestamp {
font-size: 9px;
font-weight: bold;
}
#sk_omnibarSearchArea input {
font-size: 12px;
}
.sk_theme .omnibar_visitcount {
font-size: 13px;
font-weight: bold;
}
body {
font-family: "Jetbrains Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
kbd {
font: 11px "Jetbrains Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
#sk_omnibarSearchArea .prompt, #sk_omnibarSearchArea .resultPage {
font-size: 12px;
}
.sk_theme {
background: #1a1b26;
color: #a9b1d6;
}
.sk_theme tbody {
color: #f7768e;
}
.sk_theme input {
color: #ff9e64;
}
.sk_theme .url {
color: #565f89;
}
#sk_omnibarSearchResult>ul>li {
background: #1a1b26;
}
#sk_omnibarSearchResult ul li:nth-child(odd) {
background: #1a1b26;
}
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
background: #1a1b26;
}
.sk_theme .annotation {
color: #565f89;
}
.sk_theme .focused {
background: #24283b !important;
}
.sk_theme kbd {
background: #a9b1d6;
color: #24283b;
}
.sk_theme .frame {
background: #7aa2f7be;
}
.sk_theme .omnibar_highlight {
color: #7dcfff;
}
.sk_theme .omnibar_folder {
color: #bb9af7;
}
.sk_theme .omnibar_timestamp {
color: #9d7cd8;
}
.sk_theme .omnibar_visitcount {
color: #e0af68;
}
.sk_theme .prompt, .sk_theme .resultPage {
color: #9ece6a;
}
.sk_theme .feature_name {
color: #f7768e;
}
.sk_omnibar_middle #sk_omnibarSearchArea {
border-bottom: 1px solid #1a1b26;
}
#sk_status {
border: 1px solid #1a1b26;
}
#sk_richKeystroke {
background: #1a1b26;
box-shadow: 0px 2px 10px rgba(26, 27, 38, 0.8);
}
#sk_richKeystroke kbd>.candidates {
color: #f7768e;
}
#sk_keystroke {
background-color: #1a1b26;
color: #a9b1d6;
}
kbd {
border: solid 1px #a9b1d6;
border-bottom-color: #a9b1d6;
box-shadow: inset 0 -1px 0 #a9b1d6;
}
#sk_frame {
border: 4px solid #f7768e;
background: #7aa2f7be;
box-shadow: 0px 0px 10px #f7768ecc;
}
#sk_banner {
border: 1px solid #7dcfff;
background: rgb(125, 207, 255);
}
div.sk_tabs_bg {
background: #a9b1d6;
}
div.sk_tab {
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#565f89), color-stop(100%,#24283b));
}
div.sk_tab_title {
color: #a9b1d6;
}
div.sk_tab_url {
color: #7dcfff;
}
div.sk_tab_hint {
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e0af68), color-stop(100%,#ff9e64));
color: #1a1b26;
border: solid 1px #1a1b26;
}
#sk_bubble {
border: 1px solid #a9b1d6;
color: #1a1b26;
background-color: #a9b1d6;
}
#sk_bubble * {
color: #1a1b26 !important;
}
div.sk_arrow[dir=down]>div:nth-of-type(1) {
border-top: 12px solid #a9b1d6;
}
div.sk_arrow[dir=up]>div:nth-of-type(1) {
border-bottom: 12px solid #a9b1d6;
}
div.sk_arrow[dir=down]>div:nth-of-type(2) {
border-top: 10px solid #a9b1d6;
}
div.sk_arrow[dir=up]>div:nth-of-type(2) {
border-bottom: 10px solid #a9b1d6;
}
#sk_omnibar {
width: 100%;
left: 0%;
}`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment