rc.conf 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. default_linemode devicons2
  2. # mime
  3. mime ^video|audio, has mpv, X, flag f = mpv -- "$@"
  4. ext x?html?, X, flag f = open -a Librewolf "$@"
  5. ext html|css|java|js|py|cpp|php|c|go|lua = emacs -- "$@"
  6. ext xml|json|pl|rb|bash|conf|sh|m[ark]d[own]|txt = vim "$@"
  7. ext tex = open -a texworks "$@"
  8. mime ^text = vim "$@"
  9. # maps
  10. map xd delete %f
  11. map f console fzf_filter%space
  12. map ex extract
  13. map ec compress
  14. map ep cmus_play
  15. map el cmus_lib
  16. map eq cmus_queue
  17. # Use one of the supported image preview protocols
  18. set preview_images true
  19. set preview_images_method mpv
  20. set use_preview_script true
  21. set preview_script /home/q/.config/ranger/scope.sh
  22. # == Options
  23. # ===================================================================
  24. # Which viewmode should be used? Possible values are:
  25. # miller: Use miller columns which show multiple levels of the hierarchy
  26. # multipane: Midnight-commander like multipane view showing all tabs next
  27. # to each other
  28. set viewmode miller
  29. #set viewmode multipane
  30. # How many columns are there, and what are their relative widths?
  31. set column_ratios 1,3,4
  32. # Which files should be hidden? (regular expression)
  33. set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
  34. # Show hidden files? You can toggle this by typing 'zh'
  35. set show_hidden true
  36. # Ask for a confirmation when running the "delete" command?
  37. # Valid values are "always", "never", "multiple" (default)
  38. # With "multiple", ranger will ask only if you delete multiple files at once.
  39. set confirm_on_delete multiple
  40. # Use non-default path for file preview script?
  41. # ranger ships with scope.sh, a script that calls external programs (see
  42. # README.md for dependencies) to preview images, archives, etc.
  43. #set preview_script ~/.config/ranger/scope.sh
  44. # Use the external preview script or display simple plain text or image previews?
  45. set use_preview_script true
  46. # Automatically count files in the directory, even before entering them?
  47. set automatically_count_files true
  48. # Open all images in this directory when running certain image viewers
  49. # like feh or sxiv? You can still open selected files by marking them.
  50. set open_all_images true
  51. # Be aware of version control systems and display information.
  52. set vcs_aware false
  53. # State of the four backends git, hg, bzr, svn. The possible states are
  54. # disabled, local (only show local info), enabled (show local and remote
  55. # information).
  56. set vcs_backend_git enabled
  57. set vcs_backend_hg disabled
  58. set vcs_backend_bzr disabled
  59. set vcs_backend_svn disabled
  60. # Set the preview image method. Supported methods:
  61. #
  62. # * w3m (default):
  63. # Preview images in full color with the external command "w3mimgpreview"?
  64. # This requires the console web browser "w3m" and a supported terminal.
  65. # It has been successfully tested with "xterm" and "urxvt" without tmux.
  66. #
  67. # * iterm2:
  68. # Preview images in full color using iTerm2 image previews
  69. # (http://iterm2.com/images.html). This requires using iTerm2 compiled
  70. # with image preview support.
  71. #
  72. # This feature relies on the dimensions of the terminal's font. By default, a
  73. # width of 8 and height of 11 are used. To use other values, set the options
  74. # iterm2_font_width and iterm2_font_height to the desired values.
  75. #
  76. # * urxvt:
  77. # Preview images in full color using urxvt image backgrounds. This
  78. # requires using urxvt compiled with pixbuf support.
  79. #
  80. # * urxvt-full:
  81. # The same as urxvt but utilizing not only the preview pane but the
  82. # whole terminal window.
  83. #set preview_images_method urxvt
  84. # Default iTerm2 font size (see: preview_images_method: iterm2)
  85. set iterm2_font_width 8
  86. set iterm2_font_height 11
  87. # Use a unicode "..." character to mark cut-off filenames?
  88. set unicode_ellipsis false
  89. # Show dotfiles in the bookmark preview box?
  90. set show_hidden_bookmarks true
  91. # Which colorscheme to use? These colorschemes are available by default:
  92. # default, jungle, snow, solarized
  93. set colorscheme jungle
  94. # Preview files on the rightmost column?
  95. # And collapse (shrink) the last column if there is nothing to preview?
  96. set preview_files true
  97. set preview_directories true
  98. set collapse_preview true
  99. # Save the console history on exit?
  100. set save_console_history true
  101. # Draw the status bar on top of the browser window (default: bottom)
  102. set status_bar_on_top false
  103. # Draw a progress bar in the status bar which displays the average state of all
  104. # currently running tasks which support progress bars?
  105. set draw_progress_bar_in_status_bar true
  106. # Draw borders around columns?
  107. set draw_borders false
  108. # Display the directory name in tabs?
  109. set dirname_in_tabs false
  110. # Enable the mouse support?
  111. set mouse_enabled true
  112. # Display the file size in the main column or status bar?
  113. set display_size_in_main_column true
  114. set display_size_in_status_bar true
  115. # Display files tags in all columns or only in main column?
  116. set display_tags_in_all_columns true
  117. # Set a title for the window?
  118. set update_title false
  119. # Set the title to "ranger" in the tmux program?
  120. set update_tmux_title false
  121. # Shorten the title if it gets long? The number defines how many
  122. # directories are displayed at once, 0 turns off this feature.
  123. set shorten_title 3
  124. # Show hostname in titlebar?
  125. set hostname_in_titlebar true
  126. # Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
  127. set tilde_in_titlebar false
  128. # How many directory-changes or console-commands should be kept in history?
  129. set max_history_size 20
  130. set max_console_history_size 50
  131. # Try to keep so much space between the top/bottom border when scrolling:
  132. set scroll_offset 8
  133. # Flush the input after each key hit? (Noticeable when ranger lags)
  134. set flushinput true
  135. # Padding on the right when there's no preview?
  136. # This allows you to click into the space to run the file.
  137. set padding_right true
  138. # Save bookmarks (used with mX and `X) instantly?
  139. # This helps to synchronize bookmarks between multiple ranger
  140. # instances but leads to *slight* performance loss.
  141. # When false, bookmarks are saved when ranger is exited.
  142. set autosave_bookmarks true
  143. # Save the "`" bookmark to disk. This can be used to switch to the last
  144. # directory by typing "``".
  145. set save_backtick_bookmark true
  146. # You can display the "real" cumulative size of directories by using the
  147. # command :get_cumulative_size or typing "dc". The size is expensive to
  148. # calculate and will not be updated automatically. You can choose
  149. # to update it automatically though by turning on this option:
  150. set autoupdate_cumulative_size false
  151. # Turning this on makes sense for screen readers:
  152. set show_cursor false
  153. # One of: size, natural, basename, atime, ctime, mtime, type, random
  154. set sort natural
  155. # Additional sorting options
  156. set sort_reverse false
  157. set sort_case_insensitive true
  158. set sort_directories_first true
  159. set sort_unicode false
  160. # Enable this if key combinations with the Alt Key don't work for you.
  161. # (Especially on xterm)
  162. set xterm_alt_key false
  163. # Whether to include bookmarks in cd command
  164. set cd_bookmarks true
  165. # Changes case sensitivity for the cd command tab completion
  166. set cd_tab_case sensitive
  167. # Use fuzzy tab completion with the "cd" command. For example,
  168. # ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
  169. set cd_tab_fuzzy false
  170. # Avoid previewing files larger than this size, in bytes. Use a value of 0 to
  171. # disable this feature.
  172. set preview_max_size 0
  173. # Add the highlighted file to the path in the titlebar
  174. set show_selection_in_titlebar true
  175. # The delay that ranger idly waits for user input, in milliseconds, with a
  176. # resolution of 100ms. Lower delay reduces lag between directory updates but
  177. # increases CPU load.
  178. set idle_delay 2000
  179. # When the metadata manager module looks for metadata, should it only look for
  180. # a ".metadata.json" file in the current directory, or do a deep search and
  181. # check all directories above the current one as well?
  182. set metadata_deep_search false
  183. # Clear all existing filters when leaving a directory
  184. set clear_filters_on_dir_change false
  185. # Disable displaying line numbers in main column
  186. set line_numbers true
  187. # Start line numbers from 1 instead of 0
  188. set one_indexed false
  189. # Save tabs on exit
  190. set save_tabs_on_exit false
  191. # Enable scroll wrapping - moving down while on the last item will wrap around to
  192. # the top and vice versa.
  193. set wrap_scroll false
  194. # Set the global_inode_type_filter to nothing. Possible options: d, f and l for
  195. # directories, files and symlinks respectively.
  196. set global_inode_type_filter
  197. # Use one of the supported image preview protocols
  198. set preview_images true
  199. # Wrap long lines in plain text previews?
  200. set wrap_plaintext_previews true
  201. # Both combines the two.
  202. set draw_borders both
  203. # Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
  204. set update_title true