shownotes-w3m-rice/w3m_macros.md
2021-05-28 02:58:56 -07:00

3.0 KiB

W3M Macros - Automate Task

Using macros automate toggling settings like images display or table borders on or off quickly. Smart search similar feature using macros as well for different search engines

  • tutorial video: Link
  • offical website: Link

install requirements

w3m

configuration

$EDITOR ~/.w3m/keymap

# for more help on options
# $ w3m -show-option

# leader key = \
keymap  \\\?    COMMAND       "HELP; SEARCH ^User-Defined; CENTER_V"            # show user custom hotkeys binding
keymap  \\\f    COMMAND       "HELP; SEARCH ^Input Line Editing Mode; CENTER_V" # show field hotkeys binding
keymap  \\\c    COMMAND       "SET_OPTION color=toggle ; RESHAPE"
keymap  \\\u    COMMAND       "SET_OPTION mark_all_pages=toggle ; RELOAD"      # Treat URL-like strings as links in all pages (convert text to url)
keymap  \\\l    COMMAND       "SET_OPTION display_link_number=toggle ; SET_OPTION show_lnum=toggle ; RESHAPE" # toggle hinting mode / line numbers
keymap  \\\h    COMMAND       "SET_OPTION display_link_number=toggle ; RESHAPE" # toggle hinting mode
keymap  \\\n    COMMAND       "SET_OPTION show_lnum=toggle ; RESHAPE"           # toggle line numbers
keymap  \\\b    COMMAND       "SET_OPTION display_borders=toggle ; RESHAPE"
keymap  \\\i    COMMAND       "SET_OPTION display_image=toggle ; RELOAD"
keymap  \\\e    COMMAND       "SET_OPTION user_agent='' ; RELOAD"               # empty user agent
keymap  \\\A    COMMAND       "SET_OPTION user_agent='Opera/9.80 (S60; SymbOS; Opera Mobi/SYB-1107071606; U; en) Presto/2.8.149 Version/11.10' ; RELOAD"
keymap  C-t     COMMAND       "TAB_GOTO https://duckduckgo.com/lite/; NEXT_LINK; GOTO_LINK"
keymap  t       COMMAND       "TAB_GOTO https://duckduckgo.com/lite/; NEXT_LINK; GOTO_LINK"
keymap  sg      COMMAND       "TAB_GOTO https://google.com; GOTO_LINE 6; NEXT_LINK; GOTO_LINK"
keymap  sx      COMMAND       "TAB_GOTO https://stackexchange.com; GOTO_LINE 7; NEXT_LINK; GOTO_LINK"
keymap  \\\m    COMMAND       "SHELL 'man w3m'"

references

contact

             _   _     _      _         
  __ _  ___ | |_| |__ | | ___| |_ _   _ 
 / _` |/ _ \| __| '_ \| |/ _ \ __| | | |
| (_| | (_) | |_| |_) | |  __/ |_| |_| |
 \__, |\___/ \__|_.__/|_|\___|\__|\__,_|
 |___/