commit 5d4149a47e4bdc4652c8af27ef3393ab140be6a0
parent 08738c2df81ed676bf22535f58e8f9f8f99a0e9b
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Sun, 4 Oct 2020 10:56:26 +0200
w3m: add config
Former-commit-id: 019472930d7e10ec4b60390b78e774c948661d12
Diffstat:
6 files changed, 308 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -15,3 +15,7 @@ mpv/scripts/shared/sponsorblock.db*
karabiner/automatic_backups/
rotmgmule/accounts.tsv
scripts/rotmgmule
+w3m/*
+!w3m/config
+!w3m/mailcap
+!w3m/keymap
diff --git a/dot.map b/dot.map
@@ -42,6 +42,7 @@ mps-youtube:
- playlists: ~/.config/mps-youtube/playlists
joplin/keymap.json: ~/.config/joplin/keymap.json
sxiv: ~/.config/sxiv
+w3m: ~/.config/w3m
# Config: X server (Linux)
xinitrc: ~/.xinitrc
diff --git a/shell/env b/shell/env
@@ -20,6 +20,7 @@ export LC_TIME="en_US.UTF-8"
# Force use of XDG Base Directory {{{1
alias irssi="irssi --home=$HOME/.config/irssi"
alias tmux="tmux -f $HOME/.config/tmux/tmux.conf"
+alias w3m="w3m -config $HOME/.config/w3m/config"
export JUPYTER_CONFIG_DIR="$HOME/.config/jupyter"
export BUNDLE_USER_HOME="$HOME/.config/bundle"
export BUNDLE_USER_CACHE="$HOME/.cache/bundle"
diff --git a/w3m/config b/w3m/config
@@ -0,0 +1,147 @@
+tabstop 8
+indent_incr 4
+pixel_per_char 8
+frame 0
+target_self 0
+open_tab_blank 0
+open_tab_dl_list 0
+display_link 0
+display_link_number 0
+decode_url 0
+display_lineinfo 0
+ext_dirlist 1
+dirlist_cmd file:///$LIB/dirlist.cgi
+use_dictcommand 1
+dictcommand file:///$LIB/w3mdict.cgi
+multicol 0
+alt_entity 0
+graphic_char 0
+display_borders 0
+fold_textarea 0
+display_ins_del 1
+ignore_null_img_alt 1
+view_unseenobject 1
+display_image 0
+pseudo_inlines 1
+fold_line 0
+show_lnum 0
+show_srch_str 1
+label_topline 0
+nextpage_topline 0
+color 1
+basic_color terminal
+anchor_color blue
+image_color green
+form_color red
+mark_color cyan
+bg_color terminal
+active_style 0
+active_color cyan
+visited_anchor 0
+visited_color magenta
+pagerline 10000
+use_history 1
+history 100
+save_hist 1
+confirm_qq 1
+close_tab_back 0
+mark 0
+emacs_like_lineedit 0
+vi_prec_num 1
+mark_all_pages 0
+wrap_search 0
+ignorecase_search 1
+use_mouse 1
+reverse_mouse 0
+relative_wheel_scroll 0
+relative_wheel_scroll_ratio 30
+fixed_wheel_scroll_count 5
+clear_buffer 1
+decode_cte 0
+auto_uncompress 0
+preserve_timestamp 1
+keymap_file ~/.config/w3m/keymap
+document_root
+personal_document_root
+cgi_bin
+index_file
+mime_types ~/.mime.types, /usr/local/Cellar/w3m/0.5.3_6/etc/mime.types
+mailcap ~/.config/w3m/mailcap, /usr/local/Cellar/w3m/0.5.3_6/etc/w3m/mailcap
+urimethodmap ~/.config/w3m/urimethodmap, /usr/local/Cellar/w3m/0.5.3_6/etc/w3m/urimethodmap
+editor /usr/local/bin/vim
+mailto_options 1
+mailer
+extbrowser /usr/bin/firefox
+extbrowser2
+extbrowser3
+extbrowser4
+extbrowser5
+extbrowser6
+extbrowser7
+extbrowser8
+extbrowser9
+bgextviewer 1
+use_lessopen 0
+passwd_file ~/.config/w3m/passwd
+disable_secret_security_check 0
+ftppasswd
+ftppass_hostnamegen 1
+pre_form_file ~/.config/w3m/pre_form
+siteconf_file ~/.config/w3m/siteconf
+user_agent
+no_referer 0
+accept_language en;q=1.0
+accept_encoding gzip, compress, bzip, bzip2, deflate
+accept_media text/html, text/*;q=0.5, image/*, video/*
+argv_is_url 1
+retry_http 1
+default_url 1
+follow_redirection 10
+meta_refresh 0
+dns_order 0
+nntpserver
+nntpmode
+max_news 50
+use_proxy 1
+http_proxy
+https_proxy
+ftp_proxy
+no_proxy
+noproxy_netaddr 1
+no_cache 0
+ssl_forbid_method 2, 3
+ssl_verify_server 1
+ssl_cert_file
+ssl_key_file
+ssl_ca_path
+ssl_ca_file
+use_cookie 1
+show_cookie 0
+accept_cookie 1
+accept_bad_cookie 0
+cookie_reject_domains
+cookie_accept_domains
+cookie_avoid_wrong_number_of_dots
+display_charset UTF-8
+document_charset UTF-8
+auto_detect 2
+system_charset UTF-8
+follow_locale 1
+ext_halfdump 0
+use_wide 1
+use_combining 1
+east_asian_width 0
+use_language_tag 1
+ucs_conv 1
+pre_conv 0
+search_conv 1
+fix_width_conv 1
+use_gb12345_map 0
+use_jisx0201 0
+use_jisc6226 0
+use_jisx0201k 0
+use_jisx0212 0
+use_jisx0213 0
+strict_iso2022 1
+gb18030_as_ucs 0
+simple_preserve_space 0
diff --git a/w3m/keymap b/w3m/keymap
@@ -0,0 +1,153 @@
+# Reference: http://epistulus.com/w3m/MANUAL.html
+keymap 0 LINE_BEGIN
+keymap $ LINE_END
+keymap C-g LINE_INFO
+keymap h MOVE_LEFT
+keymap l MOVE_RIGHT
+keymap j MOVE_DOWN
+keymap k MOVE_UP
+keymap H BACK
+keymap g BEGIN
+keymap G END
+keymap C-e UP
+keymap C-y DOWN
+keymap C-f NEXT_PAGE
+keymap C-b PREV_PAGE
+keymap C-d NEXT_HALF_PAGE
+keymap C-u PREV_HALF_PAGE
+
+# ABORT Quit at once
+# ACCESSKEY Pop up accesskey menu
+# ADD_BOOKMARK Add current page to bookmarks
+# ALARM Set alarm
+# BOOKMARK View bookmarks
+# CENTER_H Center on cursor column
+# CENTER_V Center on cursor line
+# CHARSET Change the character encoding for the current document
+# CLOSE_TAB Close tab
+# CLOSE_TAB_MOUSE Close tab at mouse pointer
+# COMMAND Invoke w3m function(s)
+# COOKIE View cookie list
+# CURSOR_TOP Move cursor to the top line on the screen
+# CURSOR_MIDDLE Move cursor to the middle line on the screen
+# CURSOR_BOTTOM Move cursor to the bottom line on the screen
+# DEFAULT_CHARSET Change the default character encoding
+# DEFINE_KEY Define a binding between a key stroke combination and a command
+# DELETE_PREVBUF Delete previous buffer (mainly for local CGI-scripts)
+# DICT_WORD Execute dictionary command (see README.dict)
+# DICT_WORD_AT Execute dictionary command for word at cursor
+# DISPLAY_IMAGE Restart loading and drawing of images
+# DOWNLOAD Save document source
+# DOWNLOAD_LIST Display downloads panel
+# EDIT Edit local source
+# EDIT_SCREEN Edit rendered copy of document
+# EXEC_SHELL Execute shell command and display output
+# EXIT Quit at once
+# EXTERN Display using an external browser
+# EXTERN_LINK Display target using an external browser
+# FRAME Toggle rendering HTML frames
+# GOTO Open specified document in a new buffer
+# GOTO_HOME Return to the homepage (specified HTTP_HOME or WWW_HOME variable)
+# GOTO_LINE Go to the specified line
+# GOTO_LINK Follow current hyperlink in a new buffer
+# GOTO_RELATIVE Go to relative address
+# HELP Show help panel
+# HISTORY Show browsing history
+# INFO Display information about the current document
+# INTERRUPT Suspend w3m to background
+# ISEARCH Incremental search forward
+# ISEARCH_BACK Incremental search backward
+# LEFT Shift screen one column left
+# LINK_BEGIN Move to the first hyperlink
+# LINK_END Move to the last hyperlink
+# LINK_MENU Pop up link element menu
+# LIST Show all URLs referenced
+# LIST_MENU Pop up menu for hyperlinks to browse to
+# LOAD Open local file in a new buffer
+# MAIN_MENU Pop up menu
+# MARK Set/unset mark
+# MARK_MID Turn Message-ID-like strings into hyperlinks
+# MARK_URL Turn URL-like strings into hyperlinks
+# MARK_WORD Turn current word into hyperlink
+# MENU Pop up menu
+# MENU_MOUSE Pop up menu at mouse pointer
+# MOUSE_TOGGLE Toggle mouse support
+# MOVE_DOWN1 Cursor down. With edge touched, slide
+# MOVE_LEFT1 Cursor left. With edge touched, slide
+# MOVE_LIST_MENU Pop up menu to navigate between hyperlinks
+# MOVE_MOUSE Move cursor to mouse pointer
+# MOVE_RIGHT1 Cursor right. With edge touched, slide
+# MOVE_UP Cursor up
+# MOVE_UP1 Cursor up. With edge touched, slide
+# MSGS Display error messages
+# NEW_TAB Open a new tab (with current document)
+# NEXT Switch to the next buffer
+# NEXT_DOWN Move downward to the next hyperlink
+# NEXT_LEFT Move left to the next hyperlink
+# NEXT_LEFT_UP Move left or upward to the next hyperlink
+# NEXT_LINK Move to the next hyperlink
+# NEXT_MARK Go to the next mark
+# NEXT_RIGHT Move right to the next hyperlink
+# NEXT_RIGHT_DOWN Move right or downward to the next hyperlink
+# NEXT_TAB Switch to the next tab
+# NEXT_UP Move upward to the next hyperlink
+# NEXT_VISITED Move to the next visited hyperlink
+# NEXT_WORD Move to the next word
+# NOTHING Do nothing
+# NULL Do nothing
+# OPTIONS Display options setting panel
+# PEEK Show current address
+# PEEK_IMG Show image address
+# PEEK_LINK Show target address
+# PIPE_BUF Pipe current buffer through a shell command and display output
+# PIPE_SHELL Execute shell command and display output
+# PREV Switch to the previous buffer
+# PREV_LINK Move to the previous hyperlink
+# PREV_MARK Go to the previous mark
+# PREV_TAB Switch to the previous tab
+# PREV_VISITED Move to the previous visited hyperlink
+# PREV_WORD Move to the previous word
+# PRINT Save rendered document
+# QUIT Quit with confirmation request
+# READ_SHELL Execute shell command and display output
+# REDO Cancel the last undo
+# REDRAW Draw the screen anew
+# REG_MARK Mark all occurences of a pattern
+# REINIT Reload configuration file
+# RELOAD Load current document anew
+# RESHAPE Re-render document
+# RIGHT Shift screen one column right
+# SAVE Save document source
+# SAVE_IMAGE Save inline image
+# SAVE_LINK Save hyperlink target
+# SAVE_SCREEN Save rendered document
+# SEARCH Search forward
+# SEARCH_BACK Search backward
+# SEARCH_FORE Search forward
+# SEARCH_NEXT Continue search forward
+# SEARCH_PREV Continue search backward
+# SELECT Display buffer-stack panel
+# SELECT_MENU Pop up buffer-stack menu
+# SETENV Set environment variable
+# SET_OPTION Set option
+# SHELL Execute shell command and display output
+# SHIFT_LEFT Shift screen left
+# SHIFT_RIGHT Shift screen right
+# SOURCE Toggle between HTML shown or processed
+# STOP_IMAGE Stop loading and drawing of images
+# SUBMIT Submit form
+# SUSPEND Suspend w3m to background
+# TAB_GOTO Open specified document in a new tab
+# TAB_GOTO_RELATIVE Open relative address in a new tab
+# TAB_LEFT Move left along the tab bar
+# TAB_LINK Follow current hyperlink in a new tab
+# TAB_MENU Pop up tab selection menu
+# TAB_MOUSE Select tab by mouse action
+# TAB_RIGHT Move right along the tab bar
+# UNDO Cancel the last cursor movement
+# VERSION Display the version of w3m
+# VIEW Toggle between HTML shown or processed
+# VIEW_BOOKMARK View bookmarks
+# VIEW_IMAGE Display image in viewer
+# WHEREIS Search forward
+# WRAP_TOGGLE Toggle wrapping mode in searches
diff --git a/w3m/mailcap b/w3m/mailcap
@@ -0,0 +1,2 @@
+image/*; sxiv -a '%s'
+video/*; mpvq '%s'