summaryrefslogtreecommitdiffstats
path: root/.config/ranger/ranger_new/rc.conf
diff options
context:
space:
mode:
Diffstat (limited to '.config/ranger/ranger_new/rc.conf')
-rw-r--r--.config/ranger/ranger_new/rc.conf725
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
27set viewmode miller
28#set viewmode multipane
29
30# How many columns are there, and what are their relative widths?
31set column_ratios 1,3,4
32
33# Which files should be hidden? (regular expression)
34set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
35
36# Show hidden files? You can toggle this by typing 'zh'
37set 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.
42set 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.
47set preview_script ~/.config/ranger/scope.sh
48
49# Use the external preview script or display simple plain text or image previews?
50set use_preview_script true
51
52# Automatically count files in the directory, even before entering them?
53set 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.
57set open_all_images true
58
59# Be aware of version control systems and display information.
60set 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).
65set vcs_backend_git enabled
66set vcs_backend_hg disabled
67set vcs_backend_bzr disabled
68set vcs_backend_svn disabled
69
70# Use one of the supported image preview protocols
71set 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.
109set 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.
113set w3m_delay 0.02
114
115# Default iTerm2 font size (see: preview_images_method: iterm2)
116set iterm2_font_width 8
117set iterm2_font_height 11
118
119# Use a unicode "..." character to mark cut-off filenames?
120set 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
124set bidi_support false
125
126# Show dotfiles in the bookmark preview box?
127set show_hidden_bookmarks true
128
129# Which colorscheme to use? These colorschemes are available by default:
130# default, jungle, snow, solarized
131set colorscheme default
132
133# Preview files on the rightmost column?
134# And collapse (shrink) the last column if there is nothing to preview?
135set preview_files true
136set preview_directories true
137set collapse_preview true
138
139# Save the console history on exit?
140set save_console_history true
141
142# Draw the status bar on top of the browser window (default: bottom)
143set 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?
147set 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.
153set draw_borders both
154
155# Display the directory name in tabs?
156set dirname_in_tabs true
157
158# Enable the mouse support?
159set mouse_enabled true
160
161# Display the file size in the main column or status bar?
162set display_size_in_main_column true
163set display_size_in_status_bar true
164
165# Display the free disk space in the status bar?
166set display_free_space_in_status_bar true
167
168# Display files tags in all columns or only in main column?
169set display_tags_in_all_columns true
170
171# Set a title for the window?
172set update_title false
173
174# Set the title to "ranger" in the tmux program?
175set 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.
179set shorten_title 3
180
181# Show hostname in titlebar?
182set hostname_in_titlebar true
183
184# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
185set tilde_in_titlebar false
186
187# How many directory-changes or console-commands should be kept in history?
188set max_history_size 20
189set max_console_history_size 50
190
191# Try to keep so much space between the top/bottom border when scrolling:
192set scroll_offset 8
193
194# Flush the input after each key hit? (Noticeable when ranger lags)
195set 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.
199set 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.
205set autosave_bookmarks true
206
207# Save the "`" bookmark to disk. This can be used to switch to the last
208# directory by typing "``".
209set 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:
215set autoupdate_cumulative_size false
216
217# Turning this on makes sense for screen readers:
218set show_cursor false
219
220# One of: size, natural, basename, atime, ctime, mtime, type, random
221set sort natural
222
223# Additional sorting options
224set sort_reverse false
225set sort_case_insensitive true
226set sort_directories_first true
227set sort_unicode false
228
229# Enable this if key combinations with the Alt Key don't work for you.
230# (Especially on xterm)
231set xterm_alt_key false
232
233# Whether to include bookmarks in cd command
234set cd_bookmarks true
235
236# Changes case sensitivity for the cd command tab completion
237set 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".
241set 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.
245set 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 "...".
249set hint_collapse_threshold 10
250
251# Add the highlighted file to the path in the titlebar
252set 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.
257set 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?
262set metadata_deep_search false
263
264# Clear all existing filters when leaving a directory
265set clear_filters_on_dir_change false
266
267# Disable displaying line numbers in main column.
268# Possible values: false, absolute, relative.
269set line_numbers false
270
271# When line_numbers=relative show the absolute line number in the
272# current line.
273set relative_current_zero false
274
275# Start line numbers from 1 instead of 0
276set one_indexed false
277
278# Save tabs on exit
279set 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.
283set 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.
287set 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.
291set 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
305alias e edit
306alias q quit
307alias q! quit!
308alias qa quitall
309alias qa! quitall!
310alias qall quitall
311alias qall! quitall!
312alias setl setlocal
313
314alias filter scout -prts
315alias find scout -aets
316alias mark scout -mr
317alias unmark scout -Mr
318alias search scout -rs
319alias search_inc scout -rts
320alias travel scout -aefklst
321
322# ===================================================================
323# == Define keys for the browser
324# ===================================================================
325
326# Basic
327map Q quitall
328map q quit
329copymap q ZZ ZQ
330
331map R reload_cwd
332map F set freeze_files!
333map <C-r> reset
334map <C-l> redraw_window
335map <C-c> abort
336map <esc> change_mode normal
337map ~ set viewmode!
338
339map i display_file
340map ? help
341map W display_log
342map w taskview_open
343map S shell $SHELL
344
345map : console
346map ; console
347map ! console shell%space
348map @ console -p6 shell %%s
349map # console shell -p%space
350map s console shell%space
351map r chain draw_possible_programs; console open_with%%space
352map f console find%space
353map cd console cd%space
354
355map <C-p> chain console; eval fm.ui.console.history_move(-1)
356
357# Change the line mode
358map Mf linemode filename
359map Mi linemode fileinfo
360map Mm linemode mtime
361map Mp linemode permissions
362map Ms linemode sizemtime
363map Mt linemode metatitle
364
365# Tagging / Marking
366map t tag_toggle
367map ut tag_remove
368map "<any> tag_toggle tag=%any
369map <Space> mark_files toggle=True
370map v mark_files all=True toggle=True
371map uv mark_files all=True val=False
372map V toggle_visual_mode
373map uV toggle_visual_mode reverse=True
374
375# For the nostalgics: Midnight Commander bindings
376map <F1> help
377map <F2> rename_append
378map <F3> display_file
379map <F4> edit
380map <F5> copy
381map <F6> cut
382map <F7> console mkdir%space
383map <F8> console delete
384map <F10> exit
385
386# In case you work on a keyboard with dvorak layout
387map <UP> move up=1
388map <DOWN> move down=1
389map <LEFT> move left=1
390map <RIGHT> move right=1
391map <HOME> move to=0
392map <END> move to=-1
393map <PAGEDOWN> move down=1 pages=True
394map <PAGEUP> move up=1 pages=True
395map <CR> move right=1
396#map <DELETE> console delete
397map <INSERT> console touch%space
398
399# VIM-like
400copymap <UP> k
401copymap <DOWN> j
402copymap <LEFT> h
403copymap <RIGHT> l
404copymap <HOME> gg
405copymap <END> G
406copymap <PAGEDOWN> <C-F>
407copymap <PAGEUP> <C-B>
408
409map J move down=0.5 pages=True
410map K move up=0.5 pages=True
411copymap J <C-D>
412copymap K <C-U>
413
414# Jumping around
415map H history_go -1
416map L history_go 1
417map ] move_parent 1
418map [ move_parent -1
419map } traverse
420map { traverse_backwards
421map ) jump_non
422
423map gh cd ~
424map ge cd /etc
425map gu cd /usr
426map gd cd /dev
427map gl cd -r .
428map gL cd -r %f
429map go cd /opt
430map gv cd /var
431map gm cd /media
432map gi eval fm.cd('/run/media/' + os.getenv('USER'))
433map gM cd /mnt
434map gs cd /srv
435map gp cd /tmp
436map gr cd /
437map gR eval fm.cd(ranger.RANGERDIR)
438map g/ cd /
439map g? cd /usr/share/doc/ranger
440
441# External Programs
442map E edit
443map du shell -p du --max-depth=1 -h --apparent-size
444map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
445map yp yank path
446map yd yank dir
447map yn yank name
448map y. yank name_without_extension
449
450# Filesystem Operations
451map = chmod
452
453map cw console rename%space
454map a rename_append
455map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
456map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
457
458map pp paste
459map po paste overwrite=True
460map pP paste append=True
461map pO paste overwrite=True append=True
462map pl paste_symlink relative=False
463map pL paste_symlink relative=True
464map phl paste_hardlink
465map pht paste_hardlinked_subtree
466
467map dD console delete
468
469map dd cut
470map ud uncut
471map da cut mode=add
472map dr cut mode=remove
473map dt cut mode=toggle
474
475map yy copy
476map uy uncut
477map ya copy mode=add
478map yr copy mode=remove
479map yt copy mode=toggle
480
481# Temporary workarounds
482map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
483map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
484map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
485map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
486map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
487map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
488map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
489map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
490
491# Searching
492map / console search%space
493map n search_next
494map N search_next forward=False
495map ct search_next order=tag
496map cs search_next order=size
497map ci search_next order=mimetype
498map cc search_next order=ctime
499map cm search_next order=mtime
500map ca search_next order=atime
501
502# Tabs
503map <C-n> tab_new
504map <C-w> tab_close
505map <TAB> tab_move 1
506map <S-TAB> tab_move -1
507map <A-Right> tab_move 1
508map <A-Left> tab_move -1
509map gt tab_move 1
510map gT tab_move -1
511map gn tab_new
512map gc tab_close
513map uq tab_restore
514map <a-1> tab_open 1
515map <a-2> tab_open 2
516map <a-3> tab_open 3
517map <a-4> tab_open 4
518map <a-5> tab_open 5
519map <a-6> tab_open 6
520map <a-7> tab_open 7
521map <a-8> tab_open 8
522map <a-9> tab_open 9
523map <a-r> tab_shift 1
524map <a-l> tab_shift -1
525
526# Sorting
527map or set sort_reverse!
528map oz set sort=random
529map os chain set sort=size; set sort_reverse=False
530map ob chain set sort=basename; set sort_reverse=False
531map on chain set sort=natural; set sort_reverse=False
532map om chain set sort=mtime; set sort_reverse=False
533map oc chain set sort=ctime; set sort_reverse=False
534map oa chain set sort=atime; set sort_reverse=False
535map ot chain set sort=type; set sort_reverse=False
536map oe chain set sort=extension; set sort_reverse=False
537
538map oS chain set sort=size; set sort_reverse=True
539map oB chain set sort=basename; set sort_reverse=True
540map oN chain set sort=natural; set sort_reverse=True
541map oM chain set sort=mtime; set sort_reverse=True
542map oC chain set sort=ctime; set sort_reverse=True
543map oA chain set sort=atime; set sort_reverse=True
544map oT chain set sort=type; set sort_reverse=True
545map oE chain set sort=extension; set sort_reverse=True
546
547map dc get_cumulative_size
548
549# Settings
550map zc set collapse_preview!
551map zd set sort_directories_first!
552map zh set show_hidden!
553map <C-h> set show_hidden!
554copymap <C-h> <backspace>
555copymap <backspace> <backspace2>
556map zI set flushinput!
557map zi set preview_images!
558map zm set mouse_enabled!
559map zp set preview_files!
560map zP set preview_directories!
561map zs set sort_case_insensitive!
562map zu set autoupdate_cumulative_size!
563map zv set use_preview_script!
564map zf console filter%space
565copymap zf zz
566
567# Filter stack
568map .n console filter_stack add name%space
569map .m console filter_stack add mime%space
570map .d filter_stack add type d
571map .f filter_stack add type f
572map .l filter_stack add type l
573map .| filter_stack add or
574map .& filter_stack add and
575map .! filter_stack add not
576map .r console filter_stack rotate
577map .c filter_stack clear
578map .* filter_stack decompose
579map .p filter_stack pop
580map .. filter_stack show
581
582# Bookmarks
583map `<any> enter_bookmark %any
584map '<any> enter_bookmark %any
585map m<any> set_bookmark %any
586map um<any> unset_bookmark %any
587
588map m<bg> draw_bookmarks
589copymap m<bg> um<bg> `<bg> '<bg>
590
591# Generate all the chmod bindings with some python help:
592eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
593eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
594eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
595eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
596eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
597
598eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
599eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
600eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
601eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
602eval 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
610cmap <tab> eval fm.ui.console.tab()
611cmap <s-tab> eval fm.ui.console.tab(-1)
612cmap <ESC> eval fm.ui.console.close()
613cmap <CR> eval fm.ui.console.execute()
614cmap <C-l> redraw_window
615
616copycmap <ESC> <C-c>
617copycmap <CR> <C-j>
618
619# Move around
620cmap <up> eval fm.ui.console.history_move(-1)
621cmap <down> eval fm.ui.console.history_move(1)
622cmap <left> eval fm.ui.console.move(left=1)
623cmap <right> eval fm.ui.console.move(right=1)
624cmap <home> eval fm.ui.console.move(right=0, absolute=True)
625cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
626cmap <a-b> eval fm.ui.console.move_word(left=1)
627cmap <a-f> eval fm.ui.console.move_word(right=1)
628
629copycmap <a-b> <a-left>
630copycmap <a-f> <a-right>
631
632# Line Editing
633cmap <backspace> eval fm.ui.console.delete(-1)
634cmap <delete> eval fm.ui.console.delete(0)
635cmap <C-w> eval fm.ui.console.delete_word()
636cmap <A-d> eval fm.ui.console.delete_word(backward=False)
637cmap <C-k> eval fm.ui.console.delete_rest(1)
638cmap <C-u> eval fm.ui.console.delete_rest(-1)
639cmap <C-y> eval fm.ui.console.paste()
640
641# And of course the emacs way
642copycmap <ESC> <C-g>
643copycmap <up> <C-p>
644copycmap <down> <C-n>
645copycmap <left> <C-b>
646copycmap <right> <C-f>
647copycmap <home> <C-a>
648copycmap <end> <C-e>
649copycmap <delete> <C-d>
650copycmap <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.
654copycmap <backspace> <backspace2>
655
656# This special expression allows typing in numerals:
657cmap <allow_quantifiers> false
658
659# ===================================================================
660# == Pager Keybindings
661# ===================================================================
662
663# Movement
664pmap <down> pager_move down=1
665pmap <up> pager_move up=1
666pmap <left> pager_move left=4
667pmap <right> pager_move right=4
668pmap <home> pager_move to=0
669pmap <end> pager_move to=-1
670pmap <pagedown> pager_move down=1.0 pages=True
671pmap <pageup> pager_move up=1.0 pages=True
672pmap <C-d> pager_move down=0.5 pages=True
673pmap <C-u> pager_move up=0.5 pages=True
674
675copypmap <UP> k <C-p>
676copypmap <DOWN> j <C-n> <CR>
677copypmap <LEFT> h
678copypmap <RIGHT> l
679copypmap <HOME> g
680copypmap <END> G
681copypmap <C-d> d
682copypmap <C-u> u
683copypmap <PAGEDOWN> n f <C-F> <Space>
684copypmap <PAGEUP> p b <C-B>
685
686# Basic
687pmap <C-l> redraw_window
688pmap <ESC> pager_close
689copypmap <ESC> q Q i <F3>
690pmap E edit_file
691
692# ===================================================================
693# == Taskview Keybindings
694# ===================================================================
695
696# Movement
697tmap <up> taskview_move up=1
698tmap <down> taskview_move down=1
699tmap <home> taskview_move to=0
700tmap <end> taskview_move to=-1
701tmap <pagedown> taskview_move down=1.0 pages=True
702tmap <pageup> taskview_move up=1.0 pages=True
703tmap <C-d> taskview_move down=0.5 pages=True
704tmap <C-u> taskview_move up=0.5 pages=True
705
706copytmap <UP> k <C-p>
707copytmap <DOWN> j <C-n> <CR>
708copytmap <HOME> g
709copytmap <END> G
710copytmap <C-u> u
711copytmap <PAGEDOWN> n f <C-F> <Space>
712copytmap <PAGEUP> p b <C-B>
713
714# Changing priority and deleting tasks
715tmap J eval -q fm.ui.taskview.task_move(-1)
716tmap K eval -q fm.ui.taskview.task_move(0)
717tmap dd eval -q fm.ui.taskview.task_remove()
718tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
719tmap <pageup> eval -q fm.ui.taskview.task_move(0)
720tmap <delete> eval -q fm.ui.taskview.task_remove()
721
722# Basic
723tmap <C-l> redraw_window
724tmap <ESC> taskview_close
725copytmap <ESC> q Q w <C-c>