blob: 38da74274b70d19a822aca53edfd769b4e5f1dfc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
|
# First get rid of defaults
keymap K NULL
keymap J NULL
keymap SPC NULL
keymap - NULL
keymap + NULL
keymap C-v NULL
keymap ESC-v NULL
keymap C-f NULL
keymap C-b NULL
keymap C-n NULL
keymap C-p NULL
keymap < NULL
keymap > NULL
keymap . NULL
keymap , NULL
keymap ^ NULL
keymap C-a NULL
keymap W NULL
keymap ^[[6~ NULL
keymap ^[[5~ NULL
keymap g NULL
keymap ^[[1~ NULL
keymap ^[[4~ NULL
keymap ESC-< NULL
keymap ESC-> NULL
keymap [ NULL
keymap ] NULL
#keymap ^[[Z NULL #This is shift+tab
keymap ESC-m NULL
keymap ( NULL
keymap ) NULL
keymap C-j NULL
keymap C-m NULL
keymap ESC-C-j NULL
keymap ESC-C-m NULL
keymap ESC-w NULL
keymap ESC-W NULL
keymap C-s NULL
keymap = NULL
keymap ESC-l NULL
keymap U NULL
keymap V NULL
keymap v NULL
keymap R NULL
keymap ESC-s NULL
keymap : NULL
keymap C-q NULL
keymap T NULL
keymap } NULL
keymap { NULL
keymap ESC-a NULL
keymap ESC-b NULL
keymap c NULL
keymap ESC-: NULL
keymap C-h NULL
keymap q NULL
keymap Q NULL
keymap C-w NULL
keymap C-d NULL
keymap C-u NULL
keymap C-e NULL
keymap C-y NULL
keymap 0 NULL
keymap $ NULL
keymap Z NULL
keymap z NULL
keymap ESC-g NULL
keymap gg NULL
keymap G NULL
keymap w NULL
keymap b NULL
keymap C-n NULL
keymap C-p NULL
#keymap ESC-TAB NULL
keymap f NULL
keymap C-o NULL
#keymap TAB NULL
keymap C-j NULL
keymap C-] NULL
#keymap I NULL
keymap ESC-I NULL
keymap ESC-C-j NULL
keymap y NULL
keymap u NULL
keymap i NULL
keymap gC-g NULL
keymap C-g NULL
keymap ";" NULL
keymap M NULL
keymap ESC-M NULL
keymap F NULL
keymap ESC-u NULL
keymap t NULL
keymap @ NULL
keymap "#" NULL
keymap | NULL
keymap B NULL
keymap L NULL
keymap H NULL
keymap s NULL
keymap gf NULL
keymap S NULL
keymap E NULL
keymap ESC-e NULL
keymap C-r NULL
keymap r NULL
keymap C-l NULL
keymap C-t NULL
keymap d NULL
keymap gt NULL
keymap gT NULL
keymap ESC-t NULL
keymap C-wL NULL
keymap C-wH NULL
keymap a NULL
keymap n NULL
keymap N NULL
keymap / NULL
keymap ? NULL
keymap C-@ NULL
keymap ESC-n NULL
keymap ESC-p NULL
keymap \" NULL
keymap ^[[2~ NULL
keymap ^[[28~ NULL
keymap ^[[E NULL
keymap ^[[L NULL
keymap o NULL
keymap C-k NULL
keymap D NULL
keymap m NULL
keymap ESC-c NULL
keymap ESC-o NULL
keymap ESC-k NULL
keymap \\ NULL
keymap ! NULL
#keymap C-z NULL
keymap ZZ NULL
keymap ZQ NULL
#urls operations................................................................
#keymap PEEK #Show current page url.
#Focus in address bar.
keymap o GOTO
keymap C-l GOTO
#Focus in address bar. Open in new tab.
keymap O TAB_GOTO
keymap ef PEEK_LINK #Show link under cursor.
#Execute external browser = open current link in $BROWSER
#tip: number(2-9) + external browser shortcut(M-o) executes executes the
#external browser command linked to the prefix number.
#See "External Program Settings" in "Option Setting Panel"(OPTIONS)
#Open current link with external browser = sensible browser
keymap M-o EXTERN
#copy current url and remove newline at the end.
#keymap yy EXTERN copy_url.sh
keymap yy EXTERN "echo -n %s | xclip -i -selection clipboard"
#keymap yy EXTERN "echo -n %s | xsel -b"
#open link under cursor with external browser = sensible browser
keymap M-p EXTERN_LINK
#Copy link under cursor, It does not copy images urls
keymap yf EXTERN_LINK 'env printf %s "$0" | xsel -b'
#keymap yf EXTERN_LINK copy_url.sh
#follow link in clipboard in the current tab.
keymap p GOTO /usr/lib/w3m/cgi-bin/goto_clipboard.cgi
#follow link in clipboard in new foreground tab.
keymap P TAB_GOTO /usr/lib/w3m/cgi-bin/goto_clipboard.cgi
keymap F TAB_LINK #Follow link in a new foreground tab
#follow link under cursor in new background tab
#keymap COMMAND "TAB_LINK ; PREV_TAB"
keymap f GOTO_LINK
#Follow link in current tab
keymap C-j GOTO_LINK #Follow link (Enter = Ctrl+j)
#scrolling....................................................................
#pager-like scrolling.
keymap gg BEGIN #Go to the top.
#go to line number 5 "5G"
keymap G END #Go to the end.
#keymap C-d NEXT_PAGE
#keymap C-u PREV_PAGE
#Av. Pag = M-[6~ Re. Pag = M-[5~
keymap SPC NEXT_PAGE
#map Shift + space PREV_PAGE note: this is not present in default keymap
#Remap PageUp to Shitf + Space
#URxvt.keysym.Shift-space: \033[5~
keymap zz CENTER_V #center vertical-screen in cursor position
keymap J PREV_TAB
keymap K NEXT_TAB
keymap d CLOSE_TAB
#-bookmarks....................................................................
keymap C-d ADD_BOOKMARK #Add current page to bookmarks
keymap gb VIEW_BOOKMARK #Show bookmarks
keymap :b VIEW_BOOKMARK #Show bookmarks
keymap C-b VIEW_BOOKMARK #Show bookmarks
#-search.......................................................................
keymap / ISEARCH #Enter find mode
keymap C-f ISEARCH #Enter find mode
keymap ? ISEARCH_BACK #Enter find mode backwards (incremental)
#support regex expressions
keymap n SEARCH_NEXT #Find next
keymap N SEARCH_PREV #Find previous
#-Commands....................................................................
#Execute w3m functions.
keymap ! COMMAND
keymap + HELP #View help
keymap * OPTIONS #Option setting panel
#keymap EXEC_SHELL #Execute shell command
#Send rendered document to pipe
keymap | PIPE_BUF
#Execute shell command and browse
#keymap PIPE_SHELL
#Reload configuration files.
keymap M-r REINIT
keymap q QUIT #Quit w3m with confirmation.
keymap ZZ EXIT #Quit w3m without confirmation.
keymap r RELOAD #Reload current page.
#keymap S INTERRUPT #Send w3m to background=C-z in bash
#-save/load.....................................................................
#Save document source (html), sometimes download a gzip file (without extention)
keymap :w DOWNLOAD
keymap C-s DOWNLOAD
#Save redered document
keymap :W PRINT
#keymap ESC-C-J SUBMIT #e.g. execute search in google
#Load local file.
keymap C-o LOAD
#-miscellany....................................................................
keymap C-Y DOWNLOAD_LIST #Show download menu
keymap C-y DOWNLOAD_LIST #Show download menu
keymap ,e EDIT_SCREEN #Edit current rendered document with sensible-editor
keymap ,E EDIT #Edit current local file wtih sensible-editor
keymap M-u LIST #Show list of all links, anchors and images
keymap M-m MOUSE_TOGGLE #Toggle activity of mouse
keymap M-i VIEW_IMAGE #pendant change SC.View image in extern viewer
keymap M-I DISPLAY_IMAGE
#Show Context menu. It has specific option for links under the cursor.
keymap M-c MENU
#-word operations...............................................................
#send word interactively to specified dictionary
#keymap DICT_WORD
#send the word under cursor and send it to specified dictionary
#goldendict must be opened before if not w3m freezes.
#keymap a DICT_WORD_AT
#tests..........................................................................
#Folding lines for plain text files
keymap C-x COMMAND "SET_OPTION fold_line=toggle ; RESHAPE"
#keymap C-x DISPLAY_IMAGE
#keymap C-v MARK_URL
#keymap ; MARK_URL
#keymap C-z MAIN_MENU
#Execute search in search camp (useful when are no buttons to search
#in the non-javascript version) e.g., Youtube.
#keymap C-z SUBMIT
#keymap C-x MOUSE_TOGGLE
#keymap C-v PIPE_SHELL
#
#
# My custom bindings
keymap C-p COMMAND "SAVE_SCREEN /home/lxf/inbox/output.txt && mutt -s 'output test' sng@luxagraf.net < /home/lxf/inbox/output.txt"
#keymap M-p COMMAND "SAVE_SCREEN /home/lxf/inbox/%s.txt"
## fzf search of commands
keymap xx COMMAND "READ_SHELL ~/.w3m/cgi-bin/fnx_fzfmiru.cgi ; BACK ; GOTO file:/cgi-bin/fnx_execute.cgi ; BACK"
keymap sg COMMAND "SET_OPTION dictcommand=file:///cgi-bin/omnibar_google.cgi ; DICT_WORD"
keymap sd COMMAND "SET_OPTION dictcommand=file:///cgi-bin/omnibar_duckduckgo.cgi ; DICT_WORD"
keymap sb COMMAND "SET_OPTION dictcommand=file:///cgi-bin/omnibar_brave.cgi ; DICT_WORD"
# Navigate back without deleting current buffer
keymap H PREV
keymap < PREV
keymap LEFT PREV
keymap I EXTERN_LINK 'feh -. -x -B black -g 1800x1200-15+60 %s &'
# Navigate forward without deleting current buffer
keymap > NEXT
keymap RIGHT NEXT
# Display current buffer URL
keymap c PEEK
# Pop-up menu with open buffers
keymap b SELECT_MENU
# reader view because no one updated their skip to content links when they changed designs
keymap R COMMAND "READ_SHELL 'rdrview $W3M_URL -H 2> /dev/null 1> /tmp/readable.html' ; LOAD /tmp/readable.html"
#### toggle hinting mode (vimium similar)
keymap f-SPC COMMAND "SET_OPTION display_link_number=toggle ; RESHAPE"
#### jump to link number (e.g press 3ff) and hide hinting mode (similar to gg in vim)
keymap ff COMMAND "SET_OPTION display_link_number=0 ; RESHAPE ; LINK_BEGIN"
#### open current cursor link in new tab and hide hinting mode
keymap ft COMMAND "SET_OPTION display_link_number=0 ; RESHAPE ; TAB_LINK"
#### copy link to clipboard (e.g press f-SPC then 4fy to yank url)
keymap fy COMMAND "SET_OPTION display_link_number=0 ; RESHAPE ; LINK_BEGIN ; EXTERN_LINK 'url=%s ; printf "%b" "$url" > /tmp/clipbrd.txt ; printf "%b" "$url" | xsel -b 2>/dev/null ; printf "%b" "$url" | tmux load-buffer - ; printf '%s' "$url" | wl-copy 2>/dev/null ; printf '%s' "$url" | clip 2>/dev/null ; printf '%s' "$url" > /dev/clipboard 2>/dev/null ; printf '%s' "$url" | pbcopy 2>/dev/null ; printf '%s' "$url" | termux-clipboard-set 2>/dev/null'"
#### jump to link number and open it
keymap fo COMMAND "SET_OPTION display_link_number=0 ; RESHAPE ; LINK_BEGIN ; GOTO_LINK"
#### jump to link number and open it in new tab
keymap fn COMMAND "SET_OPTION display_link_number=0 ; RESHAPE ; LINK_BEGIN ; TAB_LINK"
# yank url to multiple clipboard (under cursor)
#keymap yy EXTERN_LINK "url=%s ; printf "%b" "$url" > /tmp/clipbrd.txt ; printf "%b" "$url" | xsel -b 2>/dev/null ; printf "%b" "$url" | tmux load-buffer - ; printf '%s' "$url" | wl-copy 2>/dev/null ; printf '%s' "$url" | clip 2>/dev/null ; printf '%s' "$url" > /dev/clipboard 2>/dev/null ; printf '%s' "$url" | pbcopy 2>/dev/null ; printf '%s' "$url" | termux-clipboard-set 2>/dev/null"
# yank url to multiple clipboard (current page)
#keymap YY EXTERN "url=%s ; printf "%b" "$url" > /tmp/clipbrd.txt ; printf "%b" "$url" | xsel -b 2>/dev/null ; printf "%b" "$url" | tmux load-buffer - ; printf '%s' "$url" | wl-copy 2>/dev/null ; printf '%s' "$url" | clip 2>/dev/null ; printf '%s' "$url" > /dev/clipboard 2>/dev/null ; printf '%s' "$url" | pbcopy 2>/dev/null ; printf '%s' "$url" | termux-clipboard-set 2>/dev/null"
keymap Q COMMAND "EXTERN 'echo %s > ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; READ_SHELL ~/.w3m/cgi-bin/restore_session.cgi ; EXIT"
|