1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-05 22:00:54 +00:00

[config] Changed in more places ~/.elinks -> ~/.config/elinks

This commit is contained in:
Witold Filipczyk 2023-01-26 12:41:46 +01:00
parent 15362c8980
commit 060abde3d6
27 changed files with 45 additions and 45 deletions

View File

@ -105,7 +105,7 @@ Detailed discussion of reducing the executable size can be found in
Now, check the contrib/ directory again. There may be some useful config Now, check the contrib/ directory again. There may be some useful config
file examples there, along with few support tools and some Lua scripts - you file examples there, along with few support tools and some Lua scripts - you
probably want them ;) so just copy hooks.lua to ~/.elinks, and edit the probably want them ;) so just copy hooks.lua to ~/.config/elinks, and edit the
configuration part - it adds various functionality to ELinks, like configuration part - it adds various functionality to ELinks, like
decompression of gzipped files or HTML code rewriting for ELinks-unfriendly decompression of gzipped files or HTML code rewriting for ELinks-unfriendly
websites. websites.
@ -144,7 +144,7 @@ the old (E)Links, so you probably want to make a links symlink pointing to
elinks. elinks.
Then, note that configuration files were moved from /etc to /etc/elinks and Then, note that configuration files were moved from /etc to /etc/elinks and
from ~/.links to ~/.elinks, because the name and format of some of them was from ~/.links to ~/.config/elinks, because the name and format of some of them was
changed: changed:
links.cfg became elinks.conf and you need to convert it with links.cfg became elinks.conf and you need to convert it with

View File

@ -4,5 +4,5 @@ trap exit SIGTERM SIGINT
while true while true
do do
socat -u PIPE:$HOME/.elinks/clipboard.fifo EXEC:"xclip -sel clip" socat -u PIPE:$HOME/.config/elinks/clipboard.fifo EXEC:"xclip -sel clip"
done done

View File

@ -3,7 +3,7 @@
# versions to the new ELinks' elinks.conf. Intended use: # versions to the new ELinks' elinks.conf. Intended use:
# #
# cat .links/html.cfg .links/links.cfg .links/user.cfg | # cat .links/html.cfg .links/links.cfg .links/user.cfg |
# conf-links2elinks.pl > .elinks/elinks.conf # conf-links2elinks.pl > .config/elinks/elinks.conf
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell; if $running_under_some_shell;

View File

@ -3,7 +3,7 @@
# version 1.00 by <grin@tolna.net> # version 1.00 by <grin@tolna.net>
# Released under GPLv2 or later # Released under GPLv2 or later
# #
# Usage: mailcap-convert.pl /etc/mailcap >> ~/.elinks/elinks.conf # Usage: mailcap-convert.pl /etc/mailcap >> ~/.config/elinks/elinks.conf
# #
print "association \"-=BEGIN DEBIAN CONVERT=-\" \"\" \"\" 23 1\n"; print "association \"-=BEGIN DEBIAN CONVERT=-\" \"\" \"\" 23 1\n";

View File

@ -25,7 +25,7 @@ if cp -f "$BMFILE" "${BMFILE}.with_pipes" \
then then
echo "Bookmarks file converted." echo "Bookmarks file converted."
echo "Old file was saved as ${BMFILE}.with_pipes." echo "Old file was saved as ${BMFILE}.with_pipes."
echo "You may want to copy ~/.links/bookmarks to ~/.elinks/bookmarks now." echo "You may want to copy ~/.links/bookmarks to ~/.config/elinks/bookmarks now."
else else
echo "Conversion failure" >&2 echo "Conversion failure" >&2
exit 1 exit 1

View File

@ -1,6 +1,6 @@
# Example keybinding # Example keybinding
# Copy this file to ~/.elinks/ and use include "keybind.conf" in # Copy this file to ~/.config/elinks/ and use include "keybind.conf" in
# "elinks.conf" to include it. # "elinks.conf" to include it.
# vi-like navigation keys # vi-like navigation keys

View File

@ -1,4 +1,4 @@
-- Configuration for hooks.lua file, put in ~/.elinks/ as config.lua. -- Configuration for hooks.lua file, put in ~/.config/elinks/ as config.lua.
-- ** IMPORTANT ** -- ** IMPORTANT **
-- Individual functions may be disabled for security by assigning them -- Individual functions may be disabled for security by assigning them

View File

@ -6,7 +6,7 @@
# URL to be loaded. # URL to be loaded.
# #
# You can also press 'X' to save URL of currently selected link back to # You can also press 'X' to save URL of currently selected link back to
# ~/.elinks/external.url. # ~/.config/elinks/external.url.
# #
# Note that you also need remote.lua loaded in ELinks. # Note that you also need remote.lua loaded in ELinks.
# #
@ -17,4 +17,4 @@
# documented in the doc/remote.txt file. # documented in the doc/remote.txt file.
# #
echo $* >$HOME/.elinks/external.url echo $* >$HOME/.config/elinks/external.url

View File

@ -1,4 +1,4 @@
-- Example hooks.lua file, put in ~/.elinks/ as hooks.lua. -- Example hooks.lua file, put in ~/.config/elinks/ as hooks.lua.
-- TODO: Bookmarks stuff should be completely moved to bm.lua. --pasky -- TODO: Bookmarks stuff should be completely moved to bm.lua. --pasky

View File

@ -1,4 +1,4 @@
# Configuration file for hooks.pl - salt to taste and place in ~/.elinks # Configuration file for hooks.pl - salt to taste and place in ~/.config/elinks
bork: nah # BORKify Google? bork: nah # BORKify Google?
collapse: nope # Collapse all XBEL bookmark folders on exit? collapse: nope # Collapse all XBEL bookmark folders on exit?

View File

@ -1,4 +1,4 @@
# Example ~/.elinks/hooks.pl # Example ~/.config/elinks/hooks.pl
# #
# Copyleft by Russ Rowan (See the file "COPYING" for details.) # Copyleft by Russ Rowan (See the file "COPYING" for details.)
# #
@ -26,7 +26,7 @@ use diagnostics;
=head1 CONFIGURATION FILE =head1 CONFIGURATION FILE
This hooks file reads its configuration from I<~/.elinks/config.pl>. This hooks file reads its configuration from I<~/.config/elinks/config.pl>.
The following is an example of the configuration file: The following is an example of the configuration file:
bork: yep # BORKify Google? bork: yep # BORKify Google?
@ -60,7 +60,7 @@ preference value (like I<cnn> for C<weather: CNN>).
sub loadrc($) sub loadrc($)
{ {
my ($preference) = @_; my ($preference) = @_;
my $configperl = $ENV{'HOME'} . '/.elinks/config.pl'; my $configperl = $ENV{'HOME'} . '/.config/elinks/config.pl';
my $answer = ''; my $answer = '';
open RC, "<$configperl" or return $answer; open RC, "<$configperl" or return $answer;
@ -136,7 +136,7 @@ B<bugmenot> or B<bn>
{ {
($current_url) = $current_url =~ /^.*:\/\/(.*)/; ($current_url) = $current_url =~ /^.*:\/\/(.*)/;
my $bugmenot = 'http://bugmenot.com/view.php?url=' . $current_url; my $bugmenot = 'http://bugmenot.com/view.php?url=' . $current_url;
#my $tempfile = $ENV{'HOME'} . '/.elinks/elinks'; #my $tempfile = $ENV{'HOME'} . '/.config/elinks/elinks';
#my $matrix = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; #my $matrix = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
#for (0..int(rand(7) + 9)) #for (0..int(rand(7) + 9))
#{ #{
@ -186,7 +186,7 @@ B<bugmenot> or B<bn>
or open FILE, '</usr/dict/words' or open FILE, '</usr/dict/words'
or open FILE, '</usr/dict/linux.words' or open FILE, '</usr/dict/linux.words'
or open FILE, '</usr/share/dict/yawl.list' or open FILE, '</usr/share/dict/yawl.list'
or open FILE, $ENV{"HOME"} . '/.elinks/elinks.words' or open FILE, $ENV{"HOME"} . '/.config/elinks/elinks.words'
or return 'http://google.com/webhp?hl=xx-bork'; or return 'http://google.com/webhp?hl=xx-bork';
rand($.) < 1 && ($word = $_) while <FILE>; rand($.) < 1 && ($word = $_) while <FILE>;
close FILE; close FILE;
@ -1313,7 +1313,7 @@ I<bookmarks.folder_state>.
=cut =cut
# collapse XBEL bookmark folders (obsoleted by bookmarks.folder_state) # collapse XBEL bookmark folders (obsoleted by bookmarks.folder_state)
my $bookmarkfile = $ENV{'HOME'} . '/.elinks/bookmarks.xbel'; my $bookmarkfile = $ENV{'HOME'} . '/.config/elinks/bookmarks.xbel';
if (-f $bookmarkfile and loadrc('collapse') eq 'yes') if (-f $bookmarkfile and loadrc('collapse') eq 'yes')
{ {
open BOOKMARKS, "+<$bookmarkfile"; open BOOKMARKS, "+<$bookmarkfile";
@ -1344,7 +1344,7 @@ A few words of wisdom from ELinks the Sage.
die if (loadrc('fortune') =~ /^(none|quiet)$/); die if (loadrc('fortune') =~ /^(none|quiet)$/);
my $cookiejar = 'elinks.fortune'; my $cookiejar = 'elinks.fortune';
my $ohwhynot = `ls /usr/share/doc/elinks*/$cookiejar 2>/dev/null`; my $ohwhynot = `ls /usr/share/doc/elinks*/$cookiejar 2>/dev/null`;
open COOKIES, $ENV{"HOME"} . '/.elinks/' . $cookiejar open COOKIES, $ENV{"HOME"} . '/.config/elinks/' . $cookiejar
or open COOKIES, '/etc/elinks/' . $cookiejar or open COOKIES, '/etc/elinks/' . $cookiejar
or open COOKIES, '/usr/share/elinks/' . $cookiejar or open COOKIES, '/usr/share/elinks/' . $cookiejar
or open COOKIES, $ohwhynot or open COOKIES, $ohwhynot

View File

@ -6,8 +6,8 @@ you should update the accompanying docstrings to reflect your changes and
then generate a new version of the file doc/python.txt (which serves as a then generate a new version of the file doc/python.txt (which serves as a
reference manual for the browser's Python APIs). The embedded interpreter reference manual for the browser's Python APIs). The embedded interpreter
can use introspection to regenerate the python.txt document for you; just can use introspection to regenerate the python.txt document for you; just
copy this file into your ~/.elinks directory and add something like the copy this file into your ~/.config/elinks directory and add something like the
following to ~/.elinks/hooks.py: following to ~/.config/elinks/hooks.py:
import elinks_maint import elinks_maint
elinks.bind_key('F2', elinks_maint.generate_python_txt) elinks.bind_key('F2', elinks_maint.generate_python_txt)

View File

@ -3,7 +3,7 @@
If ELinks is compiled with an embedded Python interpreter, it will try If ELinks is compiled with an embedded Python interpreter, it will try
to import a Python module called hooks when the browser starts up. To to import a Python module called hooks when the browser starts up. To
use Python code from within ELinks, create a file called hooks.py in use Python code from within ELinks, create a file called hooks.py in
the ~/.elinks directory, or in the system-wide configuration directory the ~/.config/elinks directory, or in the system-wide configuration directory
(defined when ELinks was compiled), or in the standard Python search path. (defined when ELinks was compiled), or in the standard Python search path.
An example hooks.py file can be found in the contrib/python directory of An example hooks.py file can be found in the contrib/python directory of
the ELinks source distribution. the ELinks source distribution.
@ -176,7 +176,7 @@ class simple_console:
elinks.bind_key("F5", simple_console) elinks.bind_key("F5", simple_console)
# If you edit ~/.elinks/hooks.py while the browser is running, you can use # If you edit ~/.config/elinks/hooks.py while the browser is running, you can use
# this function to make your changes take effect immediately (without having # this function to make your changes take effect immediately (without having
# to restart ELinks). # to restart ELinks).
# #
@ -227,7 +227,7 @@ class feedreader:
"""Constructor.""" """Constructor."""
if elinks.home is None: if elinks.home is None:
raise elinks.error("Cannot identify unread entries without " raise elinks.error("Cannot identify unread entries without "
"a ~/.elinks configuration directory.") "a ~/.config/elinks configuration directory.")
self._results = {} self._results = {}
self._feeds = feeds self._feeds = feeds
for feed in feeds: for feed in feeds:

View File

@ -1,6 +1,6 @@
/* These are examples for the ELinks SpiderMonkey scripting interface. /* These are examples for the ELinks SpiderMonkey scripting interface.
* Place choice parts in a file named "hooks.js" in your ELinks configuration * Place choice parts in a file named "hooks.js" in your ELinks configuration
* directory (~/.elinks). * directory (~/.config/elinks).
*/ */
elinks.keymaps.main["@"] = function () { elinks.keymaps.main["@"] = function () {

View File

@ -1,4 +1,4 @@
/* To use these examples, copy this file to ~/.elinks/ and set /* To use these examples, copy this file to ~/.config/elinks/ and set
* document.css.stylesheet to "user.css". If you prefer another directory * document.css.stylesheet to "user.css". If you prefer another directory
* or filename, put the appropriate pathname in document.css.stylesheet. * or filename, put the appropriate pathname in document.css.stylesheet.
* ELinks will assume that the path is relative to the its configuration * ELinks will assume that the path is relative to the its configuration

View File

@ -105,7 +105,7 @@ Native file format
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
This is the preferred bookmarks format, which is also used by default. The This is the preferred bookmarks format, which is also used by default. The
bookmarks file is `~/.elinks/bookmarks`, in a simple format: bookmarks file is `~/.config/elinks/bookmarks`, in a simple format:
<name> '\t' <url> [ '\t' <depth> ['\t' <flags>] ] '\n' <name> '\t' <url> [ '\t' <depth> ['\t' <flags>] ] '\n'
@ -154,8 +154,8 @@ XBEL file format
The XBEL file format support was added at some point during the 0.4 The XBEL file format support was added at some point during the 0.4
development by Fabio Boneli. It has never been complete and has plenty of development by Fabio Boneli. It has never been complete and has plenty of
troubles, but generally, it works at the basic level. The bookmarks file is troubles, but generally, it works at the basic level. The bookmarks file is
`~/.elinks/bookmarks.xbel` (thanks to a different filename, you can have both `~/.config/elinks/bookmarks.xbel` (thanks to a different filename, you can have both
XBEL and native bookmarks saved in your `~/.elinks` directory). XBEL and native bookmarks saved in your `~/.config/elinks` directory).
We shall not describe the XBEL file format here, We shall not describe the XBEL file format here,

View File

@ -130,7 +130,7 @@ result, and because we can't cache all combos we need to limit cache size to a
reasonable value and, sometimes, recalculate. reasonable value and, sometimes, recalculate.
Maybe if the calculations will be really heavy, we can save/restore the combinations Maybe if the calculations will be really heavy, we can save/restore the combinations
to file (~/.elinks/colorhist ;) from session to session. to file (~/.config/elinks/colorhist ;) from session to session.
How to make the configuration easy but still powerful How to make the configuration easy but still powerful
----------------------------------------------------- -----------------------------------------------------

View File

@ -127,7 +127,7 @@ name.
The buttons make it possible to perform actions either on selected or marked The buttons make it possible to perform actions either on selected or marked
items or on all items in the manager. Buttons named 'Clear' and 'Save' are items or on all items in the manager. Buttons named 'Clear' and 'Save' are
performed on all items; 'Clear' will delete all items and 'Save' will update performed on all items; 'Clear' will delete all items and 'Save' will update
the runtime state file associated with the manager in the `~/.elinks/` the runtime state file associated with the manager in the `~/.config/elinks/`
directory. Most buttons presses will query you before completing the directory. Most buttons presses will query you before completing the
action. action.

View File

@ -483,7 +483,7 @@ if not compiler.links('''#include <stdint.h>
endif endif
if conf_data.get('CONFIG_QUICKJS') if conf_data.get('CONFIG_QUICKJS')
quickjsdeps = compiler.find_library('quickjs/libquickjs', static: true, dirs: ['/usr/local/lib']) quickjsdeps = compiler.find_library('quickjs/libquickjs', static: true)
deps += quickjsdeps deps += quickjsdeps
deps += dep_atomic deps += dep_atomic
endif endif

View File

@ -825,7 +825,7 @@ union option_info cmdline_options_info[] = {
INIT_OPT_STRING("", N_("Name of directory with configuration file"), INIT_OPT_STRING("", N_("Name of directory with configuration file"),
"config-dir", OPT_ZERO, "", "config-dir", OPT_ZERO, "",
N_("Path of the directory ELinks will read and write its " N_("Path of the directory ELinks will read and write its "
"config and runtime state files to instead of ~/.elinks. " "config and runtime state files to instead of ~/.config/elinks. "
"If the path does not begin with a '/' it is assumed to be " "If the path does not begin with a '/' it is assumed to be "
"relative to your HOME directory.")), "relative to your HOME directory.")),
@ -920,10 +920,10 @@ union option_info cmdline_options_info[] = {
"files (bookmarks, history, etc.) are written to the disk " "files (bookmarks, history, etc.) are written to the disk "
"when this option is used. See also -touch-files.")), "when this option is used. See also -touch-files.")),
INIT_OPT_BOOL("", N_("Disable use of files in ~/.elinks"), INIT_OPT_BOOL("", N_("Disable use of files in ~/.config/elinks"),
"no-home", OPT_ZERO, 0, "no-home", OPT_ZERO, 0,
N_("Disables creation and use of files in the user specific " N_("Disables creation and use of files in the user specific "
"home configuration directory (~/.elinks). It forces default " "home configuration directory (~/.config/elinks). It forces default "
"configuration values to be used and disables saving of " "configuration values to be used and disables saving of "
"runtime state files.")), "runtime state files.")),
@ -997,7 +997,7 @@ union option_info cmdline_options_info[] = {
N_("When enabled, terminfo ncurses functions will be used " N_("When enabled, terminfo ncurses functions will be used "
"instead of hardcoded sequences.")), "instead of hardcoded sequences.")),
INIT_OPT_BOOL("", N_("Touch files in ~/.elinks when running with -no-connect/-session-ring"), INIT_OPT_BOOL("", N_("Touch files in ~/.config/elinks when running with -no-connect/-session-ring"),
"touch-files", OPT_ZERO, 0, "touch-files", OPT_ZERO, 0,
N_("When enabled, runtime state files (bookmarks, history, " N_("When enabled, runtime state files (bookmarks, history, "
"etc.) are written to disk, even when -no-connect or " "etc.) are written to disk, even when -no-connect or "

View File

@ -909,12 +909,12 @@ static union option_info config_options_info[] = {
INIT_OPT_TREE("", N_("Information files"), INIT_OPT_TREE("", N_("Information files"),
"infofiles", OPT_SORT, "infofiles", OPT_SORT,
N_("Options for information files in ~/.elinks.")), N_("Options for information files in ~/.config/elinks.")),
INIT_OPT_INT("infofiles", N_("Save interval"), INIT_OPT_INT("infofiles", N_("Save interval"),
"save_interval", OPT_ZERO, 0, INT_MAX, 300, "save_interval", OPT_ZERO, 0, INT_MAX, 300,
N_("Interval at which to trigger information files in " N_("Interval at which to trigger information files in "
"~/.elinks to be saved to disk if they have changed " "~/.config/elinks to be saved to disk if they have changed "
"(seconds; 0 to disable)")), "(seconds; 0 to disable)")),
INIT_OPT_BOOL("infofiles", N_("Use secure file saving"), INIT_OPT_BOOL("infofiles", N_("Use secure file saving"),

View File

@ -72,7 +72,7 @@ static union option_info ecmascript_options[] = {
INIT_OPT_BOOL("ecmascript", N_("Console log"), INIT_OPT_BOOL("ecmascript", N_("Console log"),
"enable_console_log", OPT_ZERO, 0, "enable_console_log", OPT_ZERO, 0,
N_("When enabled logs will be appended to ~/.elinks/console.log.")), N_("When enabled logs will be appended to ~/.config/elinks/console.log.")),
INIT_OPT_BOOL("ecmascript", N_("Script error reporting"), INIT_OPT_BOOL("ecmascript", N_("Script error reporting"),
"error_reporting", OPT_ZERO, 0, "error_reporting", OPT_ZERO, 0,

View File

@ -250,7 +250,7 @@ save_formhist_to_file(void)
if (sv->value && *sv->value) { if (sv->value && *sv->value) {
/* Obfuscate the value. If we do /* Obfuscate the value. If we do
* $ cat ~/.elinks/formhist * $ cat ~/.config/elinks/formhist
* we don't want someone behind our back to read our * we don't want someone behind our back to read our
* password (androids don't count). */ * password (androids don't count). */
encvalue = base64_encode(sv->value); encvalue = base64_encode(sv->value);

View File

@ -5,7 +5,7 @@ The BitTorrent client is fully usable and has been tested on multiple sites, it
does however still lack certain core functionally and is therefore marked does however still lack certain core functionally and is therefore marked
experimental. Below, various known problems and limitations are listed: experimental. Below, various known problems and limitations are listed:
- Peer IDs should be restorable from ~/.elinks/downloadhist. - Peer IDs should be restorable from ~/.config/elinks/downloadhist.
- It needs to give up on unreachable peers. - It needs to give up on unreachable peers.

View File

@ -64,7 +64,7 @@ init_guile(struct module *module)
if (!path) return; if (!path) return;
if (file_can_read(path)) { if (file_can_read(path)) {
/* Load ~/.elinks/hooks.scm. */ /* Load ~/.config/elinks/hooks.scm. */
scm_c_primitive_load_path(path); scm_c_primitive_load_path(path);
/* hooks.scm should have created a new module (elinks /* hooks.scm should have created a new module (elinks
@ -73,7 +73,7 @@ init_guile(struct module *module)
scm_current_module(); scm_current_module();
/* Return to the user module, import bindings from (elinks /* Return to the user module, import bindings from (elinks
* internal), then load ~/.elinks/user-hooks.scm. */ * internal), then load ~/.config/elinks/user-hooks.scm. */
scm_set_current_module(user_module); scm_set_current_module(user_module);
/* FIXME: better way? i want to use internal_module directly */ /* FIXME: better way? i want to use internal_module directly */

View File

@ -250,7 +250,7 @@ error -- Errors internal to ELinks.\n\
\n\ \n\
Other public objects:\n\ Other public objects:\n\
\n\ \n\
home -- A string containing the pathname of the ~/.elinks directory, or\n\ home -- A string containing the pathname of the ~/.config/elinks directory, or\n\
None if ELinks has no configuration directory.\n"); None if ELinks has no configuration directory.\n");
static PyMethodDef python_methods[] = { static PyMethodDef python_methods[] = {

View File

@ -257,7 +257,7 @@ init_ruby(struct module *module)
if (file_can_read(path)) { if (file_can_read(path)) {
int error = 0; int error = 0;
/* Load ~/.elinks/hooks.rb into the interpreter. */ /* Load ~/.config/elinks/hooks.rb into the interpreter. */
//rb_load_file(path); //rb_load_file(path);
rb_load_protect(rb_str_new2(path), 0, &error); rb_load_protect(rb_str_new2(path), 0, &error);
if (error) if (error)