From 12b9beddbd5968a458d2a5c7b1490b8947df4a5a Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 15 Jan 2013 12:18:04 +0100 Subject: Conkeror: Use markam instead of linkwave --- .conkerorrc/init.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.conkerorrc/init.js') diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js index 6594523..2646f25 100644 --- a/.conkerorrc/init.js +++ b/.conkerorrc/init.js @@ -1,10 +1,10 @@ require("content-policy.js"); require("favicon"); -load_paths.push("file:///home/slash/var/src/linkwave/conkeror/"); +load_paths.push("file:///home/slash/projects/markam/conkeror/"); theme_load_paths.push("/home/slash/.conkerorrc/themes/"); -require("linkwave"); +require("markam"); define_browser_object_class( "history-url", null, @@ -118,6 +118,7 @@ hint_digits = "arstdhneio"; read_buffer_show_icons = true; title_format_fn = ext_title_format; url_remoting_fn = load_url_in_new_buffer; +markam_program = "/home/slash/projects/markam/src/markam"; define_key(content_buffer_normal_keymap, "h", "find-url-from-history-new-buffer"); -- cgit v1.2.3-54-g00ecf From 777530f57a5c56af9687ce0eeffab4b6f8f70c46 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 16 Jan 2013 01:31:36 +0100 Subject: Conkeror: Allow location along with lh Let the `read_url_local_port_handler' accept an optional path parameter. --- .conkerorrc/init.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '.conkerorrc/init.js') diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js index 2646f25..d7080de 100644 --- a/.conkerorrc/init.js +++ b/.conkerorrc/init.js @@ -228,13 +228,17 @@ function read_url_github_command_handler(input) function read_url_local_port_handler(input) { - var m = /^lh (\d{1,5})$/.exec(input); + var m = /^lh (\d{1,5})(?:\s+([a-zA-Z0-9%/]+))?$/.exec(input), + rv = null; if (m) { - return "http://localhost:" + m[1]; + rv = "http://localhost:" + m[1]; + + if (m[2]) + rv += "/" + m[2]; } - return null; + return rv; } read_url_handler_list = [read_url_local_port_handler, -- cgit v1.2.3-54-g00ecf From 2f27e1e3ac80564ba694de174f42a3922108f626 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 16 Jan 2013 01:31:55 +0100 Subject: Conkeror: Add chickadee webjump From the conkeror wiki --- .conkerorrc/init.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to '.conkerorrc/init.js') diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js index d7080de..7821283 100644 --- a/.conkerorrc/init.js +++ b/.conkerorrc/init.js @@ -112,6 +112,31 @@ define_webjump("arch/packages", "https://www.archlinux.org/packages/?sort=&q=%s&limit=50", $alternative="https://packages.archlinux.org"); +/// Chickadee +// From http://conkeror.org/Webjumps +function chickadee_completer (input, cursor_position, conservative) { + var completions = []; + var content = yield send_http_request( + load_spec({uri: "http://api.call-cc.org/cdoc/ajax/prefix?q="+ + encodeURIComponent(input)})); + if (content.responseText) { + var parser = Cc["@mozilla.org/xmlextras/domparser;1"] + .createInstance(Ci.nsIDOMParser); + var doc = parser.parseFromString(content.responseText, "text/xml"); + var res = doc.getElementsByTagName("li"); + for (let i = 0, n = res.length; i < n; ++i) { + completions.push(res[i].textContent); + } + } + yield co_return(prefix_completer($completions = completions) + (input, cursor_position, conservative)); +} +define_webjump("chickadee", + "http://api.call-cc.org/cdoc?q=%s&query-name=Lookup", + $alternative = "http://api.call-cc.org/doc/", + $completer = chickadee_completer); +/// /Chickadee + // content_policy_bytype_table.object = oni_block_flash; cwd = make_file("/home/slash/downloads/"); hint_digits = "arstdhneio"; -- cgit v1.2.3-54-g00ecf From cfc60ae6dc3296aa0b1b87d1f9543749f2e41768 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 16 Jan 2013 04:13:12 +0100 Subject: Conkeror: Add github dashboard style I don't like it when it's so bright. --- .conkerorrc/Makefile | 2 +- .conkerorrc/init.js | 7 ++ .conkerorrc/styles/Makefile | 4 ++ .conkerorrc/styles/github.css | 160 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 .conkerorrc/styles/Makefile create mode 100644 .conkerorrc/styles/github.css (limited to '.conkerorrc/init.js') diff --git a/.conkerorrc/Makefile b/.conkerorrc/Makefile index d2bc0db..12ed611 100644 --- a/.conkerorrc/Makefile +++ b/.conkerorrc/Makefile @@ -1,5 +1,5 @@ DESTDIR:=$(DESTDIR)/.conkerorrc -modules=themes +modules=themes styles objects=gtk2rc init.js include ../dotfiles.mk diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js index 7821283..811142a 100644 --- a/.conkerorrc/init.js +++ b/.conkerorrc/init.js @@ -268,3 +268,10 @@ function read_url_local_port_handler(input) read_url_handler_list = [read_url_local_port_handler, read_url_github_command_handler]; + +let (sheet = get_home_directory()) { + sheet.append(".conkerorrc"); + sheet.append("styles"); + sheet.append("github.css"); + register_user_stylesheet(make_uri(sheet)); +}; diff --git a/.conkerorrc/styles/Makefile b/.conkerorrc/styles/Makefile new file mode 100644 index 0000000..db06cf3 --- /dev/null +++ b/.conkerorrc/styles/Makefile @@ -0,0 +1,4 @@ +DESTDIR:=$(DESTDIR)/styles +objects=github.css + +include ../../dotfiles.mk diff --git a/.conkerorrc/styles/github.css b/.conkerorrc/styles/github.css new file mode 100644 index 0000000..7fdc415 --- /dev/null +++ b/.conkerorrc/styles/github.css @@ -0,0 +1,160 @@ +@-moz-document url(https://github.com/), url(https://github.com/dashboard) { + #dashboard .filter-bar { + background: #222224 !important; + border-bottom: none !important; + } + + #dashboard .filter-bar li a.filter_selected { + color: #eeeeec !important; + } + + #dashboard .repos { + border: none !important; + background-color: #171719 !important; + } + + #dashboard .repos .bottom-bar { + background-color: #222224 !important; + } + + #dashboard .repos .top-bar { + background: #222224 !important; + border-bottom: none !important; + } + + #dashboard .repos h2 { + color: inherit !important; + } + + #dashboard ul.repo_list li.private { + background: #222224 !important; + } + + #dashboard ul.repo_list li a { + border-width: 0 !important; + } + + #footer { + text-shadow: none !important; + } + + .button .minibutton { + background: #171719 !important; + } + + .header { + background: #222224 !important; + color: #eeeeec !important; + border-bottom: none !important; + text-shadow: none !important; + } + + .header .divider-vertical { + background: #222224 !important; + border-right: none !important; + } + + .header .top-nav a { + color: #eeeeec !important; + } + + .header .topsearch a#advanced_search { + color: #eeeeec !important; + } + + .header #user-links a { + color: #eeeeec !important; + } + + .markdown-body code, + .markdown-body tt{ + background-color: #222224 !important; + border: none !important; + color: #eeeeec !important; + } + + .minibutton.dark-grey { + background: #171719 !important;o + } + + .news .alert { + border-top: none !important; + } + + .news .alert .branch-link, + .news .alert .pull-info { + background: #222224 !important; + color: #eeeeec !important; + } + + .news .alert .gravatar { + background: none !important; + } + + .news .alert .simple .title { + color: #eeeeec !important; + } + + .news .commits li img { + background: none !important; + } + + .news blockquote { + color: #eeeeec !important; + } + + .pagehead .container > ul.tabs { + background: #171719 !important; + border: none !important; + } + + .pagehead .container > ul.tabs li a { + text-shadow: none !important; + border: none !important; + } + + .pagehead .container > ul.tabs li a:hover { + background: #222224 !important; + } + + .pagehead .container > ul.tabs li a.selected { + background: #222224 !important; + } + + .pagehead-actions a.feed { + background: #222224 !important; + border: none !important; + } + + .pagination { + background: #171719 !important; + border: none !important; + } + + .pagination a { + text-shadow: none !important; + border-bottom: none !important; + } + + .pagination a:hover { + background: #222224 !important; + } + + a { + color: #ffbb56 !important; + } + + a:visited { + color: #ee82ee !important; + } + + a.header-logo-blacktocat, + a.header-logo-blacktocat:visited { + color: #eeeeec !important; + } + + body { + background-color: #111113 !important; + color: #eeeeec !important; + } +} -- cgit v1.2.3-54-g00ecf From 2bf4d69583718b2b79a6dbaa41ac8104c5a7878a Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 18 Jan 2013 23:26:21 +0100 Subject: Conkeror: Have C-y open URLs in a new buffer --- .conkerorrc/init.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to '.conkerorrc/init.js') diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js index 811142a..96b5dde 100644 --- a/.conkerorrc/init.js +++ b/.conkerorrc/init.js @@ -145,11 +145,10 @@ title_format_fn = ext_title_format; url_remoting_fn = load_url_in_new_buffer; markam_program = "/home/slash/projects/markam/src/markam"; -define_key(content_buffer_normal_keymap, "h", - "find-url-from-history-new-buffer"); -define_key(content_buffer_normal_keymap, "H", - "find-url-from-history"); define_key(content_buffer_normal_keymap, "C-x C-b", "switch-to-buffer"); +define_key(content_buffer_normal_keymap, "C-y", "paste-url-new-buffer"); +define_key(content_buffer_normal_keymap, "H", "find-url-from-history"); +define_key(content_buffer_normal_keymap, "h", "find-url-from-history-new-buffer"); define_key(default_base_keymap, "C-x f", "follow-new-buffer"); add_hook("before_quit_hook", oni_before_quit_func); -- cgit v1.2.3-54-g00ecf From 14a7381aa82dacf8c93e0fa33d0d035b4f633d9b Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 4 Feb 2013 20:27:24 +0100 Subject: conkeror: Add style for conkeror start page --- .conkerorrc/init.js | 17 +++++++++++------ .conkerorrc/styles/Makefile | 2 +- .conkerorrc/styles/help.css | 19 +++++++++++++++++++ 3 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 .conkerorrc/styles/help.css (limited to '.conkerorrc/init.js') diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js index 96b5dde..6957245 100644 --- a/.conkerorrc/init.js +++ b/.conkerorrc/init.js @@ -23,6 +23,15 @@ function ext_title_format(window) { + window.buffers.current.description; } +function oni_add_sheet(css) { + let (sheet = get_home_directory()) { + sheet.append(".conkerorrc"); + sheet.append("styles"); + sheet.append(css); + register_user_stylesheet(make_uri(sheet)); + }; +} + function oni_before_quit_func() { var w = get_recent_conkeror_window(); var result = (w == null) || @@ -268,9 +277,5 @@ function read_url_local_port_handler(input) read_url_handler_list = [read_url_local_port_handler, read_url_github_command_handler]; -let (sheet = get_home_directory()) { - sheet.append(".conkerorrc"); - sheet.append("styles"); - sheet.append("github.css"); - register_user_stylesheet(make_uri(sheet)); -}; +oni_add_sheet("github.css"); +oni_add_sheet("help.css"); diff --git a/.conkerorrc/styles/Makefile b/.conkerorrc/styles/Makefile index db06cf3..fb44500 100644 --- a/.conkerorrc/styles/Makefile +++ b/.conkerorrc/styles/Makefile @@ -1,4 +1,4 @@ DESTDIR:=$(DESTDIR)/styles -objects=github.css +objects=github.css help.css include ../../dotfiles.mk diff --git a/.conkerorrc/styles/help.css b/.conkerorrc/styles/help.css new file mode 100644 index 0000000..03888b6 --- /dev/null +++ b/.conkerorrc/styles/help.css @@ -0,0 +1,19 @@ +@-moz-document url(chrome://conkeror-help/content/help.html) { + body { + background: #111113 !important; + color: #eeeeec !important; + } + + a { + color: #ffbb56 !important; + } + + a:visited { + color: #ee82ee !important; + } + + pre, .key { + background: #222224 !important; + font-family: "Envy Code R" !important; + } +} -- cgit v1.2.3-54-g00ecf From 11183df0170ce9a9aa6ec8daae32bc3ad628b2a4 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Thu, 7 Feb 2013 08:55:43 +0100 Subject: conkeror: Change hints font --- .conkerorrc/init.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '.conkerorrc/init.js') diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js index 6957245..4658eaa 100644 --- a/.conkerorrc/init.js +++ b/.conkerorrc/init.js @@ -277,5 +277,18 @@ function read_url_local_port_handler(input) read_url_handler_list = [read_url_local_port_handler, read_url_github_command_handler]; +register_user_stylesheet( + "data:text/css," + + escape( + "@namespace url(\"http://www.w3.org/1999/xhtml\");\n" + + "span.__conkeror_hint {\n" + + " font-family: \"Envy Code R\" !important;\n" + + " font-size: 12px !important;\n" + + " line-height: 12px !important;\n" + + " padding: 0 2px !important;\n" + + "}" + ) +); + oni_add_sheet("github.css"); oni_add_sheet("help.css"); -- cgit v1.2.3-54-g00ecf From a1808fd44e44160545d120c3eafcf790320ce003 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sun, 10 Feb 2013 22:08:44 +0100 Subject: conkeror: Add mozrepl initialization --- .conkerorrc/init.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '.conkerorrc/init.js') diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js index 4658eaa..157f125 100644 --- a/.conkerorrc/init.js +++ b/.conkerorrc/init.js @@ -277,6 +277,19 @@ function read_url_local_port_handler(input) read_url_handler_list = [read_url_local_port_handler, read_url_github_command_handler]; +// Mozrepl +let (mozrepl_init = get_home_directory()) { + mozrepl_init.appendRelativePath(".mozrepl-conkeror.js"); + session_pref('extensions.mozrepl.initUrl', make_uri(mozrepl_init).spec); +}; + +if ('@hyperstruct.net/mozlab/mozrepl;1' in Cc) { + let mozrepl = Cc['@hyperstruct.net/mozlab/mozrepl;1'] + .getService(Ci.nsIMozRepl); + if (!mozrepl.isActive()) + mozrepl.start(4242); +} + register_user_stylesheet( "data:text/css," + escape( -- cgit v1.2.3-54-g00ecf