This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import gi | |
gi.require_version("Gtk", "3.0") | |
import configparser | |
import dbus | |
import dbus.service | |
import logging | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change tabs with mousewheel | |
// Run into Browser Toolbox console | |
var onTabWheel = function(ev) { | |
if (ev.deltaMode == 1 /* DOM_DELTA_LINE */) { | |
var idx = gBrowser.tabContainer.getIndexOfItem(gBrowser.selectedTab); | |
if (ev.deltaY > 0) { | |
if (idx + 1 < gBrowser.tabs.length) { | |
gBrowser.selectTabAtIndex(idx + 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
settings.smoothScroll = true; | |
Hints.characters = 'cefhijklmnopqrstuvwxz'; | |
map('<Alt-g>', 'sg'); | |
map('<Alt-i>', 'i'); | |
map('<Alt-;>', 'v'); | |
unmapAllExcept(['<Alt-;>', '/', '<Alt-g>', '<Alt-i>']); | |
settings.theme = ` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'counsel) | |
(defun my-nov-find-id-of-file (filename) | |
(interactive) | |
(let ((i 0) | |
(dontbreak t)) | |
(while (and (< i (length nov-documents)) | |
dontbreak) | |
(setq i (1+ i)) | |
(when (string-equal filename (cdr (aref nov-documents i))) | |
(setq dontbreak nil) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/regex-emacs.c b/src/regex-emacs.c | |
index 9b2c14c..015451d 100644 | |
--- a/src/regex-emacs.c | |
+++ b/src/regex-emacs.c | |
@@ -43,6 +43,8 @@ | |
# undef RE_DUP_MAX | |
#endif | |
#define RE_DUP_MAX (0xffff) | |
+#define PREV_CHAR_BOUNDARY(p, limit) ((p)--) | |
+#define STRING_CHAR_AND_LENGTH(p, actual_len) ((actual_len) = 1, *(p)) |