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.

709 lines
22 KiB

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