From 1ea820f238f4f657471fb238db6e7b47c7fda69d Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Thu, 3 Apr 2014 19:33:26 -0400 Subject: [PATCH] Pimp out and cleanup conkeror config - enabled new-tabs.js - custom theme for conkeror + favicon support in the mode-line + custom dark theme for mini-buffer and new-tabs + enabled the following pages-modes: - reddit - xkcd - duckduckgo - youtube - Enabled clearlooks gtk theme and thinned out the width of the scrollbars Signed-off-by: Collin J. Doering --- .conkeror.d/conkeror.css | 125 +++++++++++++++++++++++++++++++++++++++ .conkerorrc | 73 +++++++++++++++-------- .gtkrc-2.0 | 24 ++++++++ 3 files changed, 197 insertions(+), 25 deletions(-) create mode 100644 .conkeror.d/conkeror.css create mode 100644 .gtkrc-2.0 diff --git a/.conkeror.d/conkeror.css b/.conkeror.d/conkeror.css new file mode 100644 index 0000000..cb85c7a --- /dev/null +++ b/.conkeror.d/conkeror.css @@ -0,0 +1,125 @@ +/** + * (C) Copyright Collin Doering 2014 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +/** + * File: conkeror.css + * Author: Collin J. Doering + * Date: Apr 2, 2014 + */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +* { + font: 13px Terminus; +} + +/* MINIBUFFER */ +#minibuffer { + background: #000; + color: white; +} + +.mode-line { + background: #000; + color: black; +} + +#minibuffer-prompt { + color: #aaa; +} + +/* TABS */ +#tab2-bar { + border-bottom: 1px solid threedshadow; + background: #000; + color: white; +} + +.tab2 { + -moz-appearance: none; + background: #000; + min-width: 10em; + max-width: 15em; +} + +.tab2-label { + margin-left: 4pt; + padding-top: 1pt; +} + +.tab2-index { + padding: 0pt 3pt 0pt 3pt; + font-weight: 900; + text-align: center; + border-right: 2px solid; + border-left: 2px solid; +} + +.tab2-icon { + width: 16px; + height: 16px +} + +#tab2-bar .tab2[selected=true] { + background: #FFF; + color: #000; + border: 1px solid #999; +} + +#tab2-bar .tab2[selected=true] .tab2-label { + background: #FFF; +} + +/* TABS */ +/* +#tab2-bar { + background: #000; +} + +#tab2-bar .tab2 { + margin: 2px 0 0 2px; + padding: 0; + height: 19px; + border: 1px solid #666; + min-width: 200px; + max-width: 200px; + background: #333; + overflow: hidden; +} + +#tab2-bar .tab2-label { + margin: 0; + color: white; + font: 11px Tahoma; +} + +#tab2-bar .tab2-icon { + height: 16px; + width: 16px; + background: #222; + color: white; + border: 1px solid #999; + font: 900 11px Tahoma; + text-align: center; +} + +#tab2-bar .tab2[selected=true] { + border: 1px solid white; + background: #666; + border: 1px solid #999; +} +*/ \ No newline at end of file diff --git a/.conkerorrc b/.conkerorrc index 2da45f7..9237a48 100644 --- a/.conkerorrc +++ b/.conkerorrc @@ -2,17 +2,15 @@ // Author: Collin J. Doering // Date: Mar 27, 2011 -// REKAHSOFT-MINI +// REKAHSOFT // the default page for new buffers. homepage = "http://www.duckduckgo.com"; -// load urls from the command line in new buffers instead -// of new windows. +// load urls from the command line in new buffers instead of new windows. url_remoting_fn = load_url_in_new_buffer; -// load download buffers in the background in the current -// window, instead of in new windows. +// load download buffers in the background in the current window, instead of in new windows. download_buffer_automatic_open_target = OPEN_NEW_BUFFER_BACKGROUND; // save a keystroke when selecting a dom node by number. @@ -27,14 +25,14 @@ hints_display_url_panel = true; cwd = get_home_directory(); //cwd.append("downloads"); -// set how conkeror will handle certian mime types -content_handlers.set("application/x-bittorrent", content_handler_open_url); - -// external programs for handling various mime types. +// set how conkeror will handle mime types external_content_handlers = { - "*": "emacsclient", - text: { "*": "emacsclient" }, + "*": "emacsclient -c", + text: { "*": "emacsclient -c" }, image: { "*": "feh --scale-down" }, + video: { "*": "mplayer" }, + audio: { "*": "mplayer" }, +// "x-scheme-handler/magnet": "transmission-remote -a", application: { pdf: "zathura", postscript: "zathura", @@ -43,20 +41,29 @@ external_content_handlers = { } }; -external_content_handlers.set("application/pdf", "zathura"); -external_content_handlers.set("video/*", "urxvtc -e mplayer"); -external_content_handlers.set("application/x-bittorrent", "transmission-remote -a"); - -set_protocol_handler("magnet", find_file_in_path("transmission-remote -a")); +// TODO: magnet links do not work +//set_protocol_handler("magnet", find_file_in_path("transmission-remote -a")); // use emacsclient as external editor. -editor_shell_command = "emacsclient"; +editor_shell_command = "emacsclient -c"; -// view source in your editor. +// view source in external editor. view_source_use_external_editor = true; -// let xkcd-mode put the funny alt text into the page. -xkcd_add_title = true; +// Enable and configure some page modes +// See: http://conkeror.org/PageModes +require("page-modes/xkcd.js"); +page_mode_activate(xkcd_mode); +xkcd_add_title = true; // insert alt text into the page + +require("page-modes/reddit.js"); +page_mode_activate(reddit_mode); + +require("page-modes/duckduckgo.js"); +page_mode_activate(duckduckgo_mode); + +require("page-modes/youtube.js"); +page_mode_activate(youtube_mode); // use session module require("session.js"); @@ -64,6 +71,7 @@ session_auto_save_auto_load = true; // Put history completion along side webjumps url_completion_use_history = true; +url_completion_use_bookmarks = true; // Setup some handy web jumps define_webjump("wolframalpha", "http://www.wolframalpha.com/input/?i=%s"); @@ -122,9 +130,9 @@ define_webjump("emacswiki", define_webjump("savannah", "https://savannah.gnu.org/search/?words=%s&type_of_search=soft"); define_webjump("youtube", "http://www.youtube.com/results?search_query=%s&search=Search"); -// END SECTION -// Do a google search if a webjump is not recognized + +// Do a duckduckgo search if a webjump is not recognized read_url_handler_list = [read_url_make_default_webjump_handler("duckduckgo")]; // recognize urls a little diffently (allow one worded default webjumps) @@ -134,8 +142,23 @@ function possibly_valid_url (str) { !(/^\s*$/.test(str)); } -// turn off mode line -mode_line_mode(false); +// setup tabs (see: http://conkeror.org/Tabs) +require("new-tabs.js"); + +// Register stylesheet used to theme new-tabs +register_user_stylesheet("file:///home/collin/.conkeror.d/conkeror.css"); + +// Setup favicon support (in the mode-line) +require("favicon.js"); +add_hook("mode_line_hook", mode_line_adder(buffer_icon_widget), true); +read_buffer_show_icons = true; + +// add loading-count and buffer-count widgets to the mode-line +add_hook("mode_line_hook", mode_line_adder(loading_count_widget), true); +add_hook("mode_line_hook", mode_line_adder(buffer_count_widget), true); + +// remove the clock from the mode-line +remove_hook("mode_line_hook", mode_line_adder(clock_widget)); // force scrolling bars so that incremental search (isearch) works and mousewheel scrolling function enable_scrollbars (buffer) { @@ -144,7 +167,7 @@ function enable_scrollbars (buffer) { add_hook("create_buffer_late_hook", enable_scrollbars); // Enable spellchecking of text boxes -session_pref("layout.spellcheckDefault", 1); +session_pref("layout.spellcheckDefault", 2); // Turn on password management in XUL runner session_pref("signon.rememberSignons", true); diff --git a/.gtkrc-2.0 b/.gtkrc-2.0 new file mode 100644 index 0000000..bfe78b0 --- /dev/null +++ b/.gtkrc-2.0 @@ -0,0 +1,24 @@ +# DO NOT EDIT! This file will be overwritten by LXAppearance. +# Any customization should be done in ~/.gtkrc-2.0.mine instead. + +gtk-theme-name="Clearlooks" +gtk-icon-theme-name="gnome" +gtk-font-name="Terminus 12" +gtk-cursor-theme-name="Adwaita" +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintfull" +include "/home/collin/.gtkrc-2.0.mine" + +style "scrollbar" +{ + GtkScrollbar::slider-width = 14 +} +class "Gtk*Scrollbar" style "scrollbar"