Skip to content

Instantly share code, notes, and snippets.

@AdamWagner
Last active November 27, 2018 00:56
Show Gist options
  • Save AdamWagner/aa77f0e37ac0c911410195b27e79b6de to your computer and use it in GitHub Desktop.
Save AdamWagner/aa77f0e37ac0c911410195b27e79b6de to your computer and use it in GitHub Desktop.
surfingkeys
/*
Default key bindings reference:
https://github.com/brookhong/Surfingkeys/blob/master/pages/default.js
#Inpsiring configurations
@mindgitrwx
https://github.com/mindgitrwx/gitconventions/blob/master/SurfingKeys-config-ko.js
@b0o:
https://github.com/b0o/surfingkeys-conf/blob/master/conf.js
*/
Hints.characters = 'dfjkgheriunv';
// Hints.style('border: solid 3px #3a5f82; color#ffffff; background-color: #3a5f82; font-size: 16pt;')
settings.hintAlign = "left";
//testing
// tab movement
//unmap('E', '*')
//unmap('R', '*')
mapkey('H', '#3Move current tab to left', function() {
RUNTIME('previousTab');
})
mapkey('L', '#3Move current tab to right', function() {
RUNTIME('nextTab');
})
// history
map(">_B", "B"); // temp key for "Go one tab history back"
map("B", "S"); // shift + b to go back in history
// open links
map(">_F", "F"); // temp key for "Go one tab history forward"
map("F", "C"); // open link in background tab with shift + F
map('p', '<Alt-i>'); // toggle passthrough mode
mapkey('u', '#3Move current tab to left', function() {
RUNTIME('moveTab', {
step: -1
});
});
mapkey('o', '#3Move current tab to right', function() {
RUNTIME('moveTab', {
step: 1
});
});
mapkey('n', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// only keep scrolling, tab navigation, link actions, and history actions youtube
unmapAllExcept(['j', 'k', 'h', 'l', 'H','L','F', 'f', 'B', 'i', 'v', 'u', 'o'], /youtube.com/);
// only keep tab navigation for calendar & email
unmapAllExcept(['H','L'], /calendar.google.com|mail.google.com|drive.google.com|trello.com/);
settings.tabsThreshold = 20; // don't show the omnibar until there are 20 or more tabs
settings.scrollStepSize = 120
settings.blacklist = []
settings.focusFirstCandidate
// ---- Theme ----//
settings.theme = `
/* Disable RichHints CSS animation */
.expandRichHints {
animation: 0s ease-in-out 1 forwards expandRichHints;
}
.collapseRichHints {
animation: 0s ease-in-out 1 forwards collapseRichHints;
}
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment