From 7089660933d9cd2b1454b341c646532b2284277b Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 2 Nov 2014 15:00:17 +0100 Subject: [PATCH] Make Conkeror init username-agnostic --- conkeror/.conkerorrc/init.js | 37 ++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/conkeror/.conkerorrc/init.js b/conkeror/.conkerorrc/init.js index 452ebf1..9391810 100644 --- a/conkeror/.conkerorrc/init.js +++ b/conkeror/.conkerorrc/init.js @@ -4,11 +4,37 @@ require("session"); require("github"); require("reddit"); -load_paths.push("file:///home/slash/projects/cdispass/"); -load_paths.push("file:///home/slash/.conkerorrc/site-js/"); -load_paths.push("file:///home/slash/.conkerorrc/page-modes/"); -theme_load_paths.push("/home/slash/.conkerorrc/themes/"); -opensearch_load_paths.push(make_file("/home/slash/.conkerorrc/search-engines/")); +let (home = get_home_directory()) { + let (projects = home.clone(), + init = home.clone(), + downloads = home.clone()) { + + projects.append('projects'); + init.append('.conkerorrc'); + downloads.append('downloads'); + + let (cdispass = projects.clone(), + site_js = init.clone(), + page_modes = init.clone(), + themes = init.clone(), + search_engines = init.clone()) { + + cdispass.append('cdispass'); + site_js.append('site-js'); + page_modes.append('page-modes'); + themes.append('themes'); + search_engines.append('search-engines'); + + load_paths.push("file://" + cdispass.path); + load_paths.push("file://" + site_js.path); + load_paths.push("file://" + page_modes.path); + theme_load_paths.push(themes.path); + opensearch_load_paths.push(search_engines); + }; + + cwd = downloads; + }; +}; require("cdispass"); require("jira"); @@ -172,7 +198,6 @@ define_webjump("chickadee", /// /Chickadee // content_policy_bytype_table.object = oni_block_flash; -cwd = make_file("/home/slash/downloads/"); hint_digits = "arstdhneio"; read_buffer_show_icons = true; title_format_fn = ext_title_format;