Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. // Home-row only hints
  2. Hints.characters = 'asdghjkl';
  3.  
  4. // Settings
  5.  
  6. settings.focusFirstCandidate = true;
  7. settings.digitForRepeat = true;
  8. settings.tabsThreshold = 0;
  9. settings.omnibarSuggestionTimeout = 100;
  10. settings.scrollStepSize = 150;
  11. settings.hintAlign = "left";
  12. settings.scrollFriction = 0;
  13.  
  14. // Keys
  15.  
  16. // Easy tab management
  17. mapkey('q', 'Select previous tab', function() {
  18. RUNTIME('previousTab');
  19. });
  20.  
  21. mapkey('w', 'Select next tab', function() {
  22. RUNTIME('nextTab');
  23. });
  24.  
  25. mapkey('Q', 'Move current tab to left', function() {
  26. RUNTIME('moveTab', {
  27. step: -1
  28. });
  29. });
  30.  
  31. mapkey('W', 'Move current tab to right', function() {
  32. RUNTIME('moveTab', {
  33. step: 1
  34. });
  35. });
  36.  
  37. map('a', ':feedkeys 99E', 0, "Go to the first tab");
  38. map('s', ':feedkeys 99R', 0, "Go to the last tab");
  39.  
  40. mapkey('A', 'Move current tab to far left', function() {
  41. RUNTIME('moveTab', {
  42. step: -100
  43. });
  44. });
  45.  
  46. mapkey('S', 'Move current tab to far right', function() {
  47. RUNTIME('moveTab', {
  48. step: 100
  49. });
  50. });
  51.  
  52. mapkey('x', 'Close current tab', function() {
  53. RUNTIME("closeTab");
  54. });
  55.  
  56. mapkey('u', 'Restore closed tab', function() {
  57. RUNTIME("openLast");
  58. });
  59.  
  60. mapkey('l', 'Choose a tab', function() {
  61. Front.chooseTab();
  62. });
  63.  
  64. mapkey('p', 'pin/unpin current tab', function() {
  65. RUNTIME("togglePinTab");
  66. });
  67. mapkey('m', 'mute/unmute current tab', function() {
  68. RUNTIME("muteTab");
  69. });
  70.  
  71. // Opening links
  72.  
  73. mapkey('t', 'Open a URL', function() {
  74. RUNTIME("newTab");
  75. });
  76.  
  77. mapkey('b', 'Open a link in new window', function() {
  78. Hints.create("a:visible", function(link, event) {
  79. window.open(link.getAttribute('href'));
  80. })
  81. });
  82.  
  83. mapkey('c', 'Go back in history', function() {
  84. history.go(-1);
  85. }, {repeatIgnore: true});
  86.  
  87. mapkey('v', 'Go forward in history', function() {
  88. history.go(1);
  89. }, {repeatIgnore: true});
  90.  
  91.  
  92. mapkey('b', 'Open a link in new tab', function() {
  93. Hints.create("a:visible", Hints.dispatchMouseClick, {tabbed: true});
  94. });
  95.  
  96. // Zooming
  97.  
  98. mapkey('=', 'Reset zoom level', function() {
  99. RUNTIME('setZoom', {
  100. zoomFactor: 0
  101. });
  102. });
  103.  
  104. mapkey('+', 'Zoom in', function() {
  105. RUNTIME('setZoom', {
  106. zoomFactor: 0.1
  107. });
  108. });
  109.  
  110. mapkey('-', 'Zoom out', function() {
  111. RUNTIME('setZoom', {
  112. zoomFactor: -0.1
  113. });
  114. });
  115.  
  116. // Theme settings
  117. settings.theme = `
  118. .sk_theme {
  119. font-family: Input Sans Condensed, Charcoal, sans-serif;
  120. font-size: 10pt;
  121. background: #24272e;
  122. color: #abb2bf;
  123. }
  124. .sk_theme tbody {
  125. color: #fff;
  126. }
  127. .sk_theme input {
  128. color: #d0d0d0;
  129. }
  130. .sk_theme .url {
  131. color: #61afef;
  132. }
  133. .sk_theme .annotation {
  134. color: #56b6c2;
  135. }
  136. .sk_theme .omnibar_highlight {
  137. color: #528bff;
  138. }
  139. .sk_theme .omnibar_timestamp {
  140. color: #e5c07b;
  141. }
  142. .sk_theme .omnibar_visitcount {
  143. color: #98c379;
  144. }
  145. .sk_theme #sk_omnibarSearchResult>ul>li:nth-child(odd) {
  146. background: #303030;
  147. }
  148. .sk_theme #sk_omnibarSearchResult>ul>li.focused {
  149. background: #3e4452;
  150. }
  151. #sk_status, #sk_find {
  152. font-size: 20pt;
  153. }`;
  154. // click `Save` button to make above settings to take effect.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement