diff options
Diffstat (limited to '.config/ranger/ranger_new/rc.conf')
-rw-r--r-- | .config/ranger/ranger_new/rc.conf | 725 |
1 files changed, 0 insertions, 725 deletions
diff --git a/.config/ranger/ranger_new/rc.conf b/.config/ranger/ranger_new/rc.conf deleted file mode 100644 index 4c4a5b9..0000000 --- a/.config/ranger/ranger_new/rc.conf +++ /dev/null | |||
@@ -1,725 +0,0 @@ | |||
1 | # =================================================================== | ||
2 | # This file contains the default startup commands for ranger. | ||
3 | # To change them, it is recommended to create either /etc/ranger/rc.conf | ||
4 | # (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom | ||
5 | # commands there. | ||
6 | # | ||
7 | # If you copy this whole file there, you may want to set the environment | ||
8 | # variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice. | ||
9 | # | ||
10 | # The purpose of this file is mainly to define keybindings and settings. | ||
11 | # For running more complex python code, please create a plugin in "plugins/" or | ||
12 | # a command in "commands.py". | ||
13 | # | ||
14 | # Each line is a command that will be run before the user interface | ||
15 | # is initialized. As a result, you can not use commands which rely | ||
16 | # on the UI such as :delete or :mark. | ||
17 | # =================================================================== | ||
18 | |||
19 | # =================================================================== | ||
20 | # == Options | ||
21 | # =================================================================== | ||
22 | |||
23 | # Which viewmode should be used? Possible values are: | ||
24 | # miller: Use miller columns which show multiple levels of the hierarchy | ||
25 | # multipane: Midnight-commander like multipane view showing all tabs next | ||
26 | # to each other | ||
27 | set viewmode miller | ||
28 | #set viewmode multipane | ||
29 | |||
30 | # How many columns are there, and what are their relative widths? | ||
31 | set column_ratios 1,3,4 | ||
32 | |||
33 | # Which files should be hidden? (regular expression) | ||
34 | set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ | ||
35 | |||
36 | # Show hidden files? You can toggle this by typing 'zh' | ||
37 | set show_hidden false | ||
38 | |||
39 | # Ask for a confirmation when running the "delete" command? | ||
40 | # Valid values are "always", "never", "multiple" (default) | ||
41 | # With "multiple", ranger will ask only if you delete multiple files at once. | ||
42 | set confirm_on_delete multiple | ||
43 | |||
44 | # Use non-default path for file preview script? | ||
45 | # ranger ships with scope.sh, a script that calls external programs (see | ||
46 | # README.md for dependencies) to preview images, archives, etc. | ||
47 | set preview_script ~/.config/ranger/scope.sh | ||
48 | |||
49 | # Use the external preview script or display simple plain text or image previews? | ||
50 | set use_preview_script true | ||
51 | |||
52 | # Automatically count files in the directory, even before entering them? | ||
53 | set automatically_count_files true | ||
54 | |||
55 | # Open all images in this directory when running certain image viewers | ||
56 | # like feh or sxiv? You can still open selected files by marking them. | ||
57 | set open_all_images true | ||
58 | |||
59 | # Be aware of version control systems and display information. | ||
60 | set vcs_aware true | ||
61 | |||
62 | # State of the four backends git, hg, bzr, svn. The possible states are | ||
63 | # disabled, local (only show local info), enabled (show local and remote | ||
64 | # information). | ||
65 | set vcs_backend_git enabled | ||
66 | set vcs_backend_hg disabled | ||
67 | set vcs_backend_bzr disabled | ||
68 | set vcs_backend_svn disabled | ||
69 | |||
70 | # Use one of the supported image preview protocols | ||
71 | set preview_images true | ||
72 | |||
73 | # Set the preview image method. Supported methods: | ||
74 | # | ||
75 | # * w3m (default): | ||
76 | # Preview images in full color with the external command "w3mimgpreview"? | ||
77 | # This requires the console web browser "w3m" and a supported terminal. | ||
78 | # It has been successfully tested with "xterm" and "urxvt" without tmux. | ||
79 | # | ||
80 | # * iterm2: | ||
81 | # Preview images in full color using iTerm2 image previews | ||
82 | # (http://iterm2.com/images.html). This requires using iTerm2 compiled | ||
83 | # with image preview support. | ||
84 | # | ||
85 | # This feature relies on the dimensions of the terminal's font. By default, a | ||
86 | # width of 8 and height of 11 are used. To use other values, set the options | ||
87 | # iterm2_font_width and iterm2_font_height to the desired values. | ||
88 | # | ||
89 | # * terminology: | ||
90 | # Previews images in full color in the terminology terminal emulator. | ||
91 | # Supports a wide variety of formats, even vector graphics like svg. | ||
92 | # | ||
93 | # * urxvt: | ||
94 | # Preview images in full color using urxvt image backgrounds. This | ||
95 | # requires using urxvt compiled with pixbuf support. | ||
96 | # | ||
97 | # * urxvt-full: | ||
98 | # The same as urxvt but utilizing not only the preview pane but the | ||
99 | # whole terminal window. | ||
100 | # | ||
101 | # * kitty: | ||
102 | # Preview images in full color using kitty image protocol. | ||
103 | # Requires python PIL or pillow library. | ||
104 | # If ranger does not share the local filesystem with kitty | ||
105 | # the transfer method is changed to encode the whole image; | ||
106 | # while slower, this allows remote previews, | ||
107 | # for example during an ssh session. | ||
108 | # Tmux is unsupported. | ||
109 | set preview_images_method w3m | ||
110 | |||
111 | # Delay in seconds before displaying an image with the w3m method. | ||
112 | # Increase it in case of experiencing display corruption. | ||
113 | set w3m_delay 0.02 | ||
114 | |||
115 | # Default iTerm2 font size (see: preview_images_method: iterm2) | ||
116 | set iterm2_font_width 8 | ||
117 | set iterm2_font_height 11 | ||
118 | |||
119 | # Use a unicode "..." character to mark cut-off filenames? | ||
120 | set unicode_ellipsis false | ||
121 | |||
122 | # BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic). | ||
123 | # Requires the python-bidi pip package | ||
124 | set bidi_support false | ||
125 | |||
126 | # Show dotfiles in the bookmark preview box? | ||
127 | set show_hidden_bookmarks true | ||
128 | |||
129 | # Which colorscheme to use? These colorschemes are available by default: | ||
130 | # default, jungle, snow, solarized | ||
131 | set colorscheme default | ||
132 | |||
133 | # Preview files on the rightmost column? | ||
134 | # And collapse (shrink) the last column if there is nothing to preview? | ||
135 | set preview_files true | ||
136 | set preview_directories true | ||
137 | set collapse_preview true | ||
138 | |||
139 | # Save the console history on exit? | ||
140 | set save_console_history true | ||
141 | |||
142 | # Draw the status bar on top of the browser window (default: bottom) | ||
143 | set status_bar_on_top false | ||
144 | |||
145 | # Draw a progress bar in the status bar which displays the average state of all | ||
146 | # currently running tasks which support progress bars? | ||
147 | set draw_progress_bar_in_status_bar true | ||
148 | |||
149 | # Draw borders around columns? (separators, outline, both, or none) | ||
150 | # Separators are vertical lines between columns. | ||
151 | # Outline draws a box around all the columns. | ||
152 | # Both combines the two. | ||
153 | set draw_borders both | ||
154 | |||
155 | # Display the directory name in tabs? | ||
156 | set dirname_in_tabs true | ||
157 | |||
158 | # Enable the mouse support? | ||
159 | set mouse_enabled true | ||
160 | |||
161 | # Display the file size in the main column or status bar? | ||
162 | set display_size_in_main_column true | ||
163 | set display_size_in_status_bar true | ||
164 | |||
165 | # Display the free disk space in the status bar? | ||
166 | set display_free_space_in_status_bar true | ||
167 | |||
168 | # Display files tags in all columns or only in main column? | ||
169 | set display_tags_in_all_columns true | ||
170 | |||
171 | # Set a title for the window? | ||
172 | set update_title false | ||
173 | |||
174 | # Set the title to "ranger" in the tmux program? | ||
175 | set update_tmux_title true | ||
176 | |||
177 | # Shorten the title if it gets long? The number defines how many | ||
178 | # directories are displayed at once, 0 turns off this feature. | ||
179 | set shorten_title 3 | ||
180 | |||
181 | # Show hostname in titlebar? | ||
182 | set hostname_in_titlebar true | ||
183 | |||
184 | # Abbreviate $HOME with ~ in the titlebar (first line) of ranger? | ||
185 | set tilde_in_titlebar false | ||
186 | |||
187 | # How many directory-changes or console-commands should be kept in history? | ||
188 | set max_history_size 20 | ||
189 | set max_console_history_size 50 | ||
190 | |||
191 | # Try to keep so much space between the top/bottom border when scrolling: | ||
192 | set scroll_offset 8 | ||
193 | |||
194 | # Flush the input after each key hit? (Noticeable when ranger lags) | ||
195 | set flushinput true | ||
196 | |||
197 | # Padding on the right when there's no preview? | ||
198 | # This allows you to click into the space to run the file. | ||
199 | set padding_right true | ||
200 | |||
201 | # Save bookmarks (used with mX and `X) instantly? | ||
202 | # This helps to synchronize bookmarks between multiple ranger | ||
203 | # instances but leads to *slight* performance loss. | ||
204 | # When false, bookmarks are saved when ranger is exited. | ||
205 | set autosave_bookmarks true | ||
206 | |||
207 | # Save the "`" bookmark to disk. This can be used to switch to the last | ||
208 | # directory by typing "``". | ||
209 | set save_backtick_bookmark true | ||
210 | |||
211 | # You can display the "real" cumulative size of directories by using the | ||
212 | # command :get_cumulative_size or typing "dc". The size is expensive to | ||
213 | # calculate and will not be updated automatically. You can choose | ||
214 | # to update it automatically though by turning on this option: | ||
215 | set autoupdate_cumulative_size false | ||
216 | |||
217 | # Turning this on makes sense for screen readers: | ||
218 | set show_cursor false | ||
219 | |||
220 | # One of: size, natural, basename, atime, ctime, mtime, type, random | ||
221 | set sort natural | ||
222 | |||
223 | # Additional sorting options | ||
224 | set sort_reverse false | ||
225 | set sort_case_insensitive true | ||
226 | set sort_directories_first true | ||
227 | set sort_unicode false | ||
228 | |||
229 | # Enable this if key combinations with the Alt Key don't work for you. | ||
230 | # (Especially on xterm) | ||
231 | set xterm_alt_key false | ||
232 | |||
233 | # Whether to include bookmarks in cd command | ||
234 | set cd_bookmarks true | ||
235 | |||
236 | # Changes case sensitivity for the cd command tab completion | ||
237 | set cd_tab_case sensitive | ||
238 | |||
239 | # Use fuzzy tab completion with the "cd" command. For example, | ||
240 | # ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin". | ||
241 | set cd_tab_fuzzy false | ||
242 | |||
243 | # Avoid previewing files larger than this size, in bytes. Use a value of 0 to | ||
244 | # disable this feature. | ||
245 | set preview_max_size 0 | ||
246 | |||
247 | # The key hint lists up to this size have their sublists expanded. | ||
248 | # Otherwise the submaps are replaced with "...". | ||
249 | set hint_collapse_threshold 10 | ||
250 | |||
251 | # Add the highlighted file to the path in the titlebar | ||
252 | set show_selection_in_titlebar true | ||
253 | |||
254 | # The delay that ranger idly waits for user input, in milliseconds, with a | ||
255 | # resolution of 100ms. Lower delay reduces lag between directory updates but | ||
256 | # increases CPU load. | ||
257 | set idle_delay 2000 | ||
258 | |||
259 | # When the metadata manager module looks for metadata, should it only look for | ||
260 | # a ".metadata.json" file in the current directory, or do a deep search and | ||
261 | # check all directories above the current one as well? | ||
262 | set metadata_deep_search false | ||
263 | |||
264 | # Clear all existing filters when leaving a directory | ||
265 | set clear_filters_on_dir_change false | ||
266 | |||
267 | # Disable displaying line numbers in main column. | ||
268 | # Possible values: false, absolute, relative. | ||
269 | set line_numbers false | ||
270 | |||
271 | # When line_numbers=relative show the absolute line number in the | ||
272 | # current line. | ||
273 | set relative_current_zero false | ||
274 | |||
275 | # Start line numbers from 1 instead of 0 | ||
276 | set one_indexed false | ||
277 | |||
278 | # Save tabs on exit | ||
279 | set save_tabs_on_exit false | ||
280 | |||
281 | # Enable scroll wrapping - moving down while on the last item will wrap around to | ||
282 | # the top and vice versa. | ||
283 | set wrap_scroll false | ||
284 | |||
285 | # Set the global_inode_type_filter to nothing. Possible options: d, f and l for | ||
286 | # directories, files and symlinks respectively. | ||
287 | set global_inode_type_filter | ||
288 | |||
289 | # This setting allows to freeze the list of files to save I/O bandwidth. It | ||
290 | # should be 'false' during start-up, but you can toggle it by pressing F. | ||
291 | set freeze_files false | ||
292 | |||
293 | # =================================================================== | ||
294 | # == Local Options | ||
295 | # =================================================================== | ||
296 | # You can set local options that only affect a single directory. | ||
297 | |||
298 | # Examples: | ||
299 | # setlocal path=~/downloads sort mtime | ||
300 | |||
301 | # =================================================================== | ||
302 | # == Command Aliases in the Console | ||
303 | # =================================================================== | ||
304 | |||
305 | alias e edit | ||
306 | alias q quit | ||
307 | alias q! quit! | ||
308 | alias qa quitall | ||
309 | alias qa! quitall! | ||
310 | alias qall quitall | ||
311 | alias qall! quitall! | ||
312 | alias setl setlocal | ||
313 | |||
314 | alias filter scout -prts | ||
315 | alias find scout -aets | ||
316 | alias mark scout -mr | ||
317 | alias unmark scout -Mr | ||
318 | alias search scout -rs | ||
319 | alias search_inc scout -rts | ||
320 | alias travel scout -aefklst | ||
321 | |||
322 | # =================================================================== | ||
323 | # == Define keys for the browser | ||
324 | # =================================================================== | ||
325 | |||
326 | # Basic | ||
327 | map Q quitall | ||
328 | map q quit | ||
329 | copymap q ZZ ZQ | ||
330 | |||
331 | map R reload_cwd | ||
332 | map F set freeze_files! | ||
333 | map <C-r> reset | ||
334 | map <C-l> redraw_window | ||
335 | map <C-c> abort | ||
336 | map <esc> change_mode normal | ||
337 | map ~ set viewmode! | ||
338 | |||
339 | map i display_file | ||
340 | map ? help | ||
341 | map W display_log | ||
342 | map w taskview_open | ||
343 | map S shell $SHELL | ||
344 | |||
345 | map : console | ||
346 | map ; console | ||
347 | map ! console shell%space | ||
348 | map @ console -p6 shell %%s | ||
349 | map # console shell -p%space | ||
350 | map s console shell%space | ||
351 | map r chain draw_possible_programs; console open_with%%space | ||
352 | map f console find%space | ||
353 | map cd console cd%space | ||
354 | |||
355 | map <C-p> chain console; eval fm.ui.console.history_move(-1) | ||
356 | |||
357 | # Change the line mode | ||
358 | map Mf linemode filename | ||
359 | map Mi linemode fileinfo | ||
360 | map Mm linemode mtime | ||
361 | map Mp linemode permissions | ||
362 | map Ms linemode sizemtime | ||
363 | map Mt linemode metatitle | ||
364 | |||
365 | # Tagging / Marking | ||
366 | map t tag_toggle | ||
367 | map ut tag_remove | ||
368 | map "<any> tag_toggle tag=%any | ||
369 | map <Space> mark_files toggle=True | ||
370 | map v mark_files all=True toggle=True | ||
371 | map uv mark_files all=True val=False | ||
372 | map V toggle_visual_mode | ||
373 | map uV toggle_visual_mode reverse=True | ||
374 | |||
375 | # For the nostalgics: Midnight Commander bindings | ||
376 | map <F1> help | ||
377 | map <F2> rename_append | ||
378 | map <F3> display_file | ||
379 | map <F4> edit | ||
380 | map <F5> copy | ||
381 | map <F6> cut | ||
382 | map <F7> console mkdir%space | ||
383 | map <F8> console delete | ||
384 | map <F10> exit | ||
385 | |||
386 | # In case you work on a keyboard with dvorak layout | ||
387 | map <UP> move up=1 | ||
388 | map <DOWN> move down=1 | ||
389 | map <LEFT> move left=1 | ||
390 | map <RIGHT> move right=1 | ||
391 | map <HOME> move to=0 | ||
392 | map <END> move to=-1 | ||
393 | map <PAGEDOWN> move down=1 pages=True | ||
394 | map <PAGEUP> move up=1 pages=True | ||
395 | map <CR> move right=1 | ||
396 | #map <DELETE> console delete | ||
397 | map <INSERT> console touch%space | ||
398 | |||
399 | # VIM-like | ||
400 | copymap <UP> k | ||
401 | copymap <DOWN> j | ||
402 | copymap <LEFT> h | ||
403 | copymap <RIGHT> l | ||
404 | copymap <HOME> gg | ||
405 | copymap <END> G | ||
406 | copymap <PAGEDOWN> <C-F> | ||
407 | copymap <PAGEUP> <C-B> | ||
408 | |||
409 | map J move down=0.5 pages=True | ||
410 | map K move up=0.5 pages=True | ||
411 | copymap J <C-D> | ||
412 | copymap K <C-U> | ||
413 | |||
414 | # Jumping around | ||
415 | map H history_go -1 | ||
416 | map L history_go 1 | ||
417 | map ] move_parent 1 | ||
418 | map [ move_parent -1 | ||
419 | map } traverse | ||
420 | map { traverse_backwards | ||
421 | map ) jump_non | ||
422 | |||
423 | map gh cd ~ | ||
424 | map ge cd /etc | ||
425 | map gu cd /usr | ||
426 | map gd cd /dev | ||
427 | map gl cd -r . | ||
428 | map gL cd -r %f | ||
429 | map go cd /opt | ||
430 | map gv cd /var | ||
431 | map gm cd /media | ||
432 | map gi eval fm.cd('/run/media/' + os.getenv('USER')) | ||
433 | map gM cd /mnt | ||
434 | map gs cd /srv | ||
435 | map gp cd /tmp | ||
436 | map gr cd / | ||
437 | map gR eval fm.cd(ranger.RANGERDIR) | ||
438 | map g/ cd / | ||
439 | map g? cd /usr/share/doc/ranger | ||
440 | |||
441 | # External Programs | ||
442 | map E edit | ||
443 | map du shell -p du --max-depth=1 -h --apparent-size | ||
444 | map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh | ||
445 | map yp yank path | ||
446 | map yd yank dir | ||
447 | map yn yank name | ||
448 | map y. yank name_without_extension | ||
449 | |||
450 | # Filesystem Operations | ||
451 | map = chmod | ||
452 | |||
453 | map cw console rename%space | ||
454 | map a rename_append | ||
455 | map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) | ||
456 | map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) | ||
457 | |||
458 | map pp paste | ||
459 | map po paste overwrite=True | ||
460 | map pP paste append=True | ||
461 | map pO paste overwrite=True append=True | ||
462 | map pl paste_symlink relative=False | ||
463 | map pL paste_symlink relative=True | ||
464 | map phl paste_hardlink | ||
465 | map pht paste_hardlinked_subtree | ||
466 | |||
467 | map dD console delete | ||
468 | |||
469 | map dd cut | ||
470 | map ud uncut | ||
471 | map da cut mode=add | ||
472 | map dr cut mode=remove | ||
473 | map dt cut mode=toggle | ||
474 | |||
475 | map yy copy | ||
476 | map uy uncut | ||
477 | map ya copy mode=add | ||
478 | map yr copy mode=remove | ||
479 | map yt copy mode=toggle | ||
480 | |||
481 | # Temporary workarounds | ||
482 | map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) | ||
483 | map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) | ||
484 | map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) | ||
485 | map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) | ||
486 | map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) | ||
487 | map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) | ||
488 | map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) | ||
489 | map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) | ||
490 | |||
491 | # Searching | ||
492 | map / console search%space | ||
493 | map n search_next | ||
494 | map N search_next forward=False | ||
495 | map ct search_next order=tag | ||
496 | map cs search_next order=size | ||
497 | map ci search_next order=mimetype | ||
498 | map cc search_next order=ctime | ||
499 | map cm search_next order=mtime | ||
500 | map ca search_next order=atime | ||
501 | |||
502 | # Tabs | ||
503 | map <C-n> tab_new | ||
504 | map <C-w> tab_close | ||
505 | map <TAB> tab_move 1 | ||
506 | map <S-TAB> tab_move -1 | ||
507 | map <A-Right> tab_move 1 | ||
508 | map <A-Left> tab_move -1 | ||
509 | map gt tab_move 1 | ||
510 | map gT tab_move -1 | ||
511 | map gn tab_new | ||
512 | map gc tab_close | ||
513 | map uq tab_restore | ||
514 | map <a-1> tab_open 1 | ||
515 | map <a-2> tab_open 2 | ||
516 | map <a-3> tab_open 3 | ||
517 | map <a-4> tab_open 4 | ||
518 | map <a-5> tab_open 5 | ||
519 | map <a-6> tab_open 6 | ||
520 | map <a-7> tab_open 7 | ||
521 | map <a-8> tab_open 8 | ||
522 | map <a-9> tab_open 9 | ||
523 | map <a-r> tab_shift 1 | ||
524 | map <a-l> tab_shift -1 | ||
525 | |||
526 | # Sorting | ||
527 | map or set sort_reverse! | ||
528 | map oz set sort=random | ||
529 | map os chain set sort=size; set sort_reverse=False | ||
530 | map ob chain set sort=basename; set sort_reverse=False | ||
531 | map on chain set sort=natural; set sort_reverse=False | ||
532 | map om chain set sort=mtime; set sort_reverse=False | ||
533 | map oc chain set sort=ctime; set sort_reverse=False | ||
534 | map oa chain set sort=atime; set sort_reverse=False | ||
535 | map ot chain set sort=type; set sort_reverse=False | ||
536 | map oe chain set sort=extension; set sort_reverse=False | ||
537 | |||
538 | map oS chain set sort=size; set sort_reverse=True | ||
539 | map oB chain set sort=basename; set sort_reverse=True | ||
540 | map oN chain set sort=natural; set sort_reverse=True | ||
541 | map oM chain set sort=mtime; set sort_reverse=True | ||
542 | map oC chain set sort=ctime; set sort_reverse=True | ||
543 | map oA chain set sort=atime; set sort_reverse=True | ||
544 | map oT chain set sort=type; set sort_reverse=True | ||
545 | map oE chain set sort=extension; set sort_reverse=True | ||
546 | |||
547 | map dc get_cumulative_size | ||
548 | |||
549 | # Settings | ||
550 | map zc set collapse_preview! | ||
551 | map zd set sort_directories_first! | ||
552 | map zh set show_hidden! | ||
553 | map <C-h> set show_hidden! | ||
554 | copymap <C-h> <backspace> | ||
555 | copymap <backspace> <backspace2> | ||
556 | map zI set flushinput! | ||
557 | map zi set preview_images! | ||
558 | map zm set mouse_enabled! | ||
559 | map zp set preview_files! | ||
560 | map zP set preview_directories! | ||
561 | map zs set sort_case_insensitive! | ||
562 | map zu set autoupdate_cumulative_size! | ||
563 | map zv set use_preview_script! | ||
564 | map zf console filter%space | ||
565 | copymap zf zz | ||
566 | |||
567 | # Filter stack | ||
568 | map .n console filter_stack add name%space | ||
569 | map .m console filter_stack add mime%space | ||
570 | map .d filter_stack add type d | ||
571 | map .f filter_stack add type f | ||
572 | map .l filter_stack add type l | ||
573 | map .| filter_stack add or | ||
574 | map .& filter_stack add and | ||
575 | map .! filter_stack add not | ||
576 | map .r console filter_stack rotate | ||
577 | map .c filter_stack clear | ||
578 | map .* filter_stack decompose | ||
579 | map .p filter_stack pop | ||
580 | map .. filter_stack show | ||
581 | |||
582 | # Bookmarks | ||
583 | map `<any> enter_bookmark %any | ||
584 | map '<any> enter_bookmark %any | ||
585 | map m<any> set_bookmark %any | ||
586 | map um<any> unset_bookmark %any | ||
587 | |||
588 | map m<bg> draw_bookmarks | ||
589 | copymap m<bg> um<bg> `<bg> '<bg> | ||
590 | |||
591 | # Generate all the chmod bindings with some python help: | ||
592 | eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) | ||
593 | eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) | ||
594 | eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) | ||
595 | eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) | ||
596 | eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) | ||
597 | |||
598 | eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) | ||
599 | eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) | ||
600 | eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) | ||
601 | eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) | ||
602 | eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) | ||
603 | |||
604 | # =================================================================== | ||
605 | # == Define keys for the console | ||
606 | # =================================================================== | ||
607 | # Note: Unmapped keys are passed directly to the console. | ||
608 | |||
609 | # Basic | ||
610 | cmap <tab> eval fm.ui.console.tab() | ||
611 | cmap <s-tab> eval fm.ui.console.tab(-1) | ||
612 | cmap <ESC> eval fm.ui.console.close() | ||
613 | cmap <CR> eval fm.ui.console.execute() | ||
614 | cmap <C-l> redraw_window | ||
615 | |||
616 | copycmap <ESC> <C-c> | ||
617 | copycmap <CR> <C-j> | ||
618 | |||
619 | # Move around | ||
620 | cmap <up> eval fm.ui.console.history_move(-1) | ||
621 | cmap <down> eval fm.ui.console.history_move(1) | ||
622 | cmap <left> eval fm.ui.console.move(left=1) | ||
623 | cmap <right> eval fm.ui.console.move(right=1) | ||
624 | cmap <home> eval fm.ui.console.move(right=0, absolute=True) | ||
625 | cmap <end> eval fm.ui.console.move(right=-1, absolute=True) | ||
626 | cmap <a-b> eval fm.ui.console.move_word(left=1) | ||
627 | cmap <a-f> eval fm.ui.console.move_word(right=1) | ||
628 | |||
629 | copycmap <a-b> <a-left> | ||
630 | copycmap <a-f> <a-right> | ||
631 | |||
632 | # Line Editing | ||
633 | cmap <backspace> eval fm.ui.console.delete(-1) | ||
634 | cmap <delete> eval fm.ui.console.delete(0) | ||
635 | cmap <C-w> eval fm.ui.console.delete_word() | ||
636 | cmap <A-d> eval fm.ui.console.delete_word(backward=False) | ||
637 | cmap <C-k> eval fm.ui.console.delete_rest(1) | ||
638 | cmap <C-u> eval fm.ui.console.delete_rest(-1) | ||
639 | cmap <C-y> eval fm.ui.console.paste() | ||
640 | |||
641 | # And of course the emacs way | ||
642 | copycmap <ESC> <C-g> | ||
643 | copycmap <up> <C-p> | ||
644 | copycmap <down> <C-n> | ||
645 | copycmap <left> <C-b> | ||
646 | copycmap <right> <C-f> | ||
647 | copycmap <home> <C-a> | ||
648 | copycmap <end> <C-e> | ||
649 | copycmap <delete> <C-d> | ||
650 | copycmap <backspace> <C-h> | ||
651 | |||
652 | # Note: There are multiple ways to express backspaces. <backspace> (code 263) | ||
653 | # and <backspace2> (code 127). To be sure, use both. | ||
654 | copycmap <backspace> <backspace2> | ||
655 | |||
656 | # This special expression allows typing in numerals: | ||
657 | cmap <allow_quantifiers> false | ||
658 | |||
659 | # =================================================================== | ||
660 | # == Pager Keybindings | ||
661 | # =================================================================== | ||
662 | |||
663 | # Movement | ||
664 | pmap <down> pager_move down=1 | ||
665 | pmap <up> pager_move up=1 | ||
666 | pmap <left> pager_move left=4 | ||
667 | pmap <right> pager_move right=4 | ||
668 | pmap <home> pager_move to=0 | ||
669 | pmap <end> pager_move to=-1 | ||
670 | pmap <pagedown> pager_move down=1.0 pages=True | ||
671 | pmap <pageup> pager_move up=1.0 pages=True | ||
672 | pmap <C-d> pager_move down=0.5 pages=True | ||
673 | pmap <C-u> pager_move up=0.5 pages=True | ||
674 | |||
675 | copypmap <UP> k <C-p> | ||
676 | copypmap <DOWN> j <C-n> <CR> | ||
677 | copypmap <LEFT> h | ||
678 | copypmap <RIGHT> l | ||
679 | copypmap <HOME> g | ||
680 | copypmap <END> G | ||
681 | copypmap <C-d> d | ||
682 | copypmap <C-u> u | ||
683 | copypmap <PAGEDOWN> n f <C-F> <Space> | ||
684 | copypmap <PAGEUP> p b <C-B> | ||
685 | |||
686 | # Basic | ||
687 | pmap <C-l> redraw_window | ||
688 | pmap <ESC> pager_close | ||
689 | copypmap <ESC> q Q i <F3> | ||
690 | pmap E edit_file | ||
691 | |||
692 | # =================================================================== | ||
693 | # == Taskview Keybindings | ||
694 | # =================================================================== | ||
695 | |||
696 | # Movement | ||
697 | tmap <up> taskview_move up=1 | ||
698 | tmap <down> taskview_move down=1 | ||
699 | tmap <home> taskview_move to=0 | ||
700 | tmap <end> taskview_move to=-1 | ||
701 | tmap <pagedown> taskview_move down=1.0 pages=True | ||
702 | tmap <pageup> taskview_move up=1.0 pages=True | ||
703 | tmap <C-d> taskview_move down=0.5 pages=True | ||
704 | tmap <C-u> taskview_move up=0.5 pages=True | ||
705 | |||
706 | copytmap <UP> k <C-p> | ||
707 | copytmap <DOWN> j <C-n> <CR> | ||
708 | copytmap <HOME> g | ||
709 | copytmap <END> G | ||
710 | copytmap <C-u> u | ||
711 | copytmap <PAGEDOWN> n f <C-F> <Space> | ||
712 | copytmap <PAGEUP> p b <C-B> | ||
713 | |||
714 | # Changing priority and deleting tasks | ||
715 | tmap J eval -q fm.ui.taskview.task_move(-1) | ||
716 | tmap K eval -q fm.ui.taskview.task_move(0) | ||
717 | tmap dd eval -q fm.ui.taskview.task_remove() | ||
718 | tmap <pagedown> eval -q fm.ui.taskview.task_move(-1) | ||
719 | tmap <pageup> eval -q fm.ui.taskview.task_move(0) | ||
720 | tmap <delete> eval -q fm.ui.taskview.task_remove() | ||
721 | |||
722 | # Basic | ||
723 | tmap <C-l> redraw_window | ||
724 | tmap <ESC> taskview_close | ||
725 | copytmap <ESC> q Q w <C-c> | ||