Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

711 lines
22 KiB

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