From 71fc4d6c0df4d94558cc6ded337fc663b9631916 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Sun, 6 Jun 2021 13:37:56 -0400 Subject: [PATCH] Move unrelated files out of .config --- browser.c | 8 ++++---- man/lariza-usage.1.scd | 10 +++++----- man/lariza.1.scd | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/browser.c b/browser.c index e54f549..f8ea0f1 100644 --- a/browser.c +++ b/browser.c @@ -824,7 +824,7 @@ init_default_web_context(void) webkit_web_context_set_process_model(wc, WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES); - p = g_build_filename(g_get_user_config_dir(), __NAME__, "web_extensions", + p = g_build_filename(g_get_user_data_dir(), __NAME__, "web_extensions", NULL); webkit_web_context_set_web_extensions_directory(wc, p); g_free(p); @@ -1249,7 +1249,7 @@ run_user_scripts(WebKitWebView *web_view) const gchar *entry = NULL; GDir *scriptdir = NULL; - base = g_build_filename(g_get_user_config_dir(), __NAME__, "user-scripts", + base = g_build_filename(g_get_user_data_dir(), __NAME__, "user-scripts", NULL); scriptdir = g_dir_open(base, 0, NULL); if (scriptdir != NULL) { @@ -1299,12 +1299,12 @@ trust_user_certs(WebKitWebContext *wc) const gchar *basedir, *file, *absfile; GDir *dir; - basedir = g_build_filename(g_get_user_config_dir(), __NAME__, "certs", NULL); + basedir = g_build_filename(g_get_user_data_dir(), __NAME__, "certs", NULL); dir = g_dir_open(basedir, 0, NULL); if (dir != NULL) { file = g_dir_read_name(dir); while (file != NULL) { - absfile = g_build_filename(g_get_user_config_dir(), __NAME__, "certs", + absfile = g_build_filename(g_get_user_data_dir(), __NAME__, "certs", file, NULL); cert = g_tls_certificate_new_from_file(absfile, NULL); diff --git a/man/lariza-usage.1.scd b/man/lariza-usage.1.scd index cadf89d..38c0334 100644 --- a/man/lariza-usage.1.scd +++ b/man/lariza-usage.1.scd @@ -21,8 +21,8 @@ new file name will have a suffix such as *.1*, *.2*, *.3*, and so on. # USER-SUPPLIED JAVASCRIPT FILES After a page has been successfully loaded, the directory -_~/.config/lariza/user-scripts_ will be scanned and each file in it ending with -*.js* will be run as a JavaScript file in the context of said page. +_~/.local/share/lariza/user-scripts_ will be scanned and each file in it ending +with *.js* will be run as a JavaScript file in the context of said page. *lariza* comes with the following scripts: @@ -41,7 +41,7 @@ Those bundled scripts are automatically installed on *make install*. To use them, though, make sure to link them to the directory mentioned above. # WEB EXTENSIONS -On startup, WebKit checks _~/.config/lariza/web_extensions_ for any *.so* +On startup, WebKit checks _~/.local/share/lariza/web_extensions_ for any *.so* files. See this blog post for further information on these extensions. @@ -66,8 +66,8 @@ trust additional certificates, such as self-signed certificates, the first thing you should do is try to add the appropriate CAs to your system-wide store. If you wish to add simple exceptions, you can grab the certificate and store it -in the directory _~/.config/lariza/certs_. The filename must be equal to the -hostname: +in the directory _~/.local/share/lariza/certs_. The filename must be equal to +the hostname: $ echo | openssl s_client -connect foo.de:443 | openssl x509 >foo.de diff --git a/man/lariza.1.scd b/man/lariza.1.scd index 706446e..bd2a4e2 100644 --- a/man/lariza.1.scd +++ b/man/lariza.1.scd @@ -39,10 +39,10 @@ XDG variables will be used to construct these paths. *~/.config/lariza/adblock* Adblock patterns. See *lariza-usage*(1). -*~/.config/lariza/certs* +*~/.local/share/lariza/certs* Directory where trusted certificates are stored. See *lariza-usage*(1). -~/.config/lariza/user-scripts +~/.local/share/lariza/user-scripts Directory to store user-supplied JavaScript snippets. See *lariza-usage*(1). ~/.local/share/lariza/web_extensions -- 2.39.2