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.

714 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. set sort mtime
  132. # Additional sorting options
  133. set sort_reverse false
  134. set sort_case_insensitive true
  135. set sort_directories_first true
  136. set sort_unicode false
  137. # Enable this if key combinations with the Alt Key don't work for you.
  138. # (Especially on xterm)
  139. set xterm_alt_key false
  140. # Whether to include bookmarks in cd command
  141. set cd_bookmarks true
  142. # Changes case sensitivity for the cd command tab completion
  143. set cd_tab_case sensitive
  144. # Use fuzzy tab completion with the "cd" command. For example,
  145. # ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
  146. set cd_tab_fuzzy false
  147. # Avoid previewing files larger than this size, in bytes. Use a value of 0 to
  148. # disable this feature.
  149. set preview_max_size 0
  150. # Add the highlighted file to the path in the titlebar
  151. set show_selection_in_titlebar true
  152. # The delay that ranger idly waits for user input, in milliseconds, with a
  153. # resolution of 100ms. Lower delay reduces lag between directory updates but
  154. # increases CPU load.
  155. set idle_delay 2000
  156. # When the metadata manager module looks for metadata, should it only look for
  157. # a ".metadata.json" file in the current directory, or do a deep search and
  158. # check all directories above the current one as well?
  159. set metadata_deep_search false
  160. # Clear all existing filters when leaving a directory
  161. set clear_filters_on_dir_change false
  162. # Disable displaying line numbers in main column
  163. set line_numbers false
  164. # Start line numbers from 1 instead of 0
  165. set one_indexed false
  166. # Save tabs on exit
  167. set save_tabs_on_exit false
  168. # Enable scroll wrapping - moving down while on the last item will wrap around to
  169. # the top and vice versa.
  170. set wrap_scroll false
  171. # Set the global_inode_type_filter to nothing. Possible options: d, f and l for
  172. # directories, files and symlinks respectively.
  173. set global_inode_type_filter
  174. # ===================================================================
  175. # == Local Options
  176. # ===================================================================
  177. # You can set local options that only affect a single directory.
  178. # Examples:
  179. # setlocal path=~/downloads sort mtime
  180. # ===================================================================
  181. # == Command Aliases in the Console
  182. # ===================================================================
  183. alias e edit
  184. alias q quit
  185. alias q! quit!
  186. alias qa quitall
  187. alias qa! quitall!
  188. alias qall quitall
  189. alias qall! quitall!
  190. alias setl setlocal
  191. alias filter scout -prt
  192. alias find scout -aeit
  193. alias mark scout -mr
  194. alias unmark scout -Mr
  195. alias search scout -rs
  196. alias search_inc scout -rts
  197. alias travel scout -aefklst
  198. # ===================================================================
  199. # == Define keys for the browser
  200. # ===================================================================
  201. # Basic
  202. map Q quitall
  203. map q quit
  204. copymap q ZZ ZQ
  205. map R reload_cwd
  206. map F set freeze_files!
  207. map <C-r> reset
  208. map <C-l> redraw_window
  209. map <C-c> abort
  210. map <esc> change_mode normal
  211. map ~ set viewmode!
  212. # map id display_file
  213. map ? help
  214. map W display_log
  215. # map w taskview_open
  216. # map S shell $SHELL
  217. map s shell exec fish -C "cd %d"
  218. map : console
  219. map ; console
  220. map ! console shell%space
  221. map @ console -p6 shell %%s
  222. map # console shell -p%space
  223. map S console shell%space
  224. map r chain draw_possible_programs; console open_with%%space
  225. map f console find%space
  226. map cd console cd%space
  227. # Change the line mode
  228. map Mf linemode filename
  229. map Mi linemode fileinfo
  230. map Mm linemode mtime
  231. map Mp linemode permissions
  232. map Ms linemode sizemtime
  233. map Mt linemode metatitle
  234. # Tagging / Marking
  235. map t tag_toggle
  236. map ut tag_remove
  237. map "<any> tag_toggle tag=%any
  238. map <Space> mark_files toggle=True
  239. map v mark_files all=True toggle=True
  240. # unmark/clear selection
  241. map uv mark_files all=True val=False
  242. map V toggle_visual_mode
  243. map uV toggle_visual_mode reverse=True
  244. # For the nostalgics: Midnight Commander bindings
  245. map <F1> help
  246. map <F2> rename_append
  247. map <F3> display_file
  248. map <F4> edit
  249. map <F5> copy
  250. map <F6> cut
  251. map <F7> console mkdir%space
  252. map <F8> console delete
  253. map <F10> exit
  254. # In case you work on a keyboard with dvorak layout
  255. map <UP> move up=1
  256. map <DOWN> move down=1
  257. map <LEFT> move left=1
  258. map <RIGHT> move right=1
  259. map <HOME> move to=0
  260. map <END> move to=-1
  261. map <PAGEDOWN> move down=1 pages=True
  262. map <PAGEUP> move up=1 pages=True
  263. map <CR> move right=1
  264. map <DELETE> console delete
  265. map i console touch%space
  266. map <INSERT> console touch%space
  267. # VIM-like
  268. copymap <UP> k
  269. copymap <DOWN> j
  270. copymap <LEFT> h
  271. copymap <RIGHT> l
  272. copymap <HOME> gg
  273. copymap <END> G
  274. copymap <PAGEDOWN> <C-F>
  275. copymap <PAGEUP> <C-B>
  276. map J move down=0.5 pages=True
  277. map K move up=0.5 pages=True
  278. copymap J <C-D>
  279. copymap K <C-U>
  280. # Jumping around
  281. map H history_go -1
  282. map L history_go 1
  283. map ] move_parent 1
  284. map [ move_parent -1
  285. map } traverse
  286. map ) jump_non
  287. map gh cd ~
  288. map ge cd /etc
  289. map gu cd /usr
  290. map gd cd /dev
  291. map gl cd -r .
  292. map gL cd -r %f
  293. map go cd /opt
  294. map gv cd /var
  295. map gm cd /media
  296. map gM cd /mnt
  297. map gs cd /srv
  298. map gp cd /tmp
  299. map gR eval fm.cd(ranger.RANGERDIR)
  300. map g/ cd /
  301. map g? cd /usr/share/doc/ranger
  302. # External Programs
  303. map E edit
  304. map du shell -p du --max-depth=1 -h --apparent-size
  305. map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
  306. map yp yank path
  307. map yd yank dir
  308. map yn yank name
  309. # Filesystem Operations
  310. map = chmod
  311. map cw console rename%space
  312. map a rename_append
  313. map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
  314. map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
  315. map pp paste
  316. map po paste overwrite=True
  317. map pP paste append=True
  318. map pO paste overwrite=True append=True
  319. map pl paste_symlink relative=False
  320. map pL paste_symlink relative=True
  321. map phl paste_hardlink
  322. map pht paste_hardlinked_subtree
  323. map dD console delete
  324. map dd cut
  325. map ud uncut
  326. map da cut mode=add
  327. map dr cut mode=remove
  328. map dt cut mode=toggle
  329. map yy copy
  330. map uy uncut
  331. map ya copy mode=add
  332. map yr copy mode=remove
  333. map yt copy mode=toggle
  334. # Temporary workarounds
  335. map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
  336. map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
  337. map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
  338. map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
  339. map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
  340. map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
  341. map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
  342. map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
  343. # Searching
  344. map / console search%space
  345. # map gr fzf_select
  346. map rg fzf_select
  347. map n search_next
  348. map N search_next forward=False
  349. map ct search_next order=tag
  350. map cs search_next order=size
  351. map ci search_next order=mimetype
  352. map cc search_next order=ctime
  353. map cm search_next order=mtime
  354. map ca search_next order=atime
  355. # Tabs
  356. map <C-n> tab_new
  357. map <C-w> tab_close
  358. map <TAB> tab_move 1
  359. map <S-TAB> tab_move -1
  360. map <A-Right> tab_move 1
  361. map <A-Left> tab_move -1
  362. map gt tab_move 1
  363. map gT tab_move -1
  364. map gn tab_new
  365. map gc tab_close
  366. map uq tab_restore
  367. map <a-1> tab_open 1
  368. map <a-2> tab_open 2
  369. map <a-3> tab_open 3
  370. map <a-4> tab_open 4
  371. map <a-5> tab_open 5
  372. map <a-6> tab_open 6
  373. map <a-7> tab_open 7
  374. map <a-8> tab_open 8
  375. map <a-9> tab_open 9
  376. # Sorting
  377. map or set sort_reverse!
  378. map oz set sort=random
  379. map os chain set sort=size; set sort_reverse=False
  380. map ob chain set sort=basename; set sort_reverse=False
  381. map on chain set sort=natural; set sort_reverse=False
  382. map om chain set sort=mtime; set sort_reverse=False
  383. map oc chain set sort=ctime; set sort_reverse=False
  384. map oa chain set sort=atime; set sort_reverse=False
  385. map ot chain set sort=type; set sort_reverse=False
  386. map oe chain set sort=extension; set sort_reverse=False
  387. map oS chain set sort=size; set sort_reverse=True
  388. map oB chain set sort=basename; set sort_reverse=True
  389. map oN chain set sort=natural; set sort_reverse=True
  390. map oM chain set sort=mtime; set sort_reverse=True
  391. map oC chain set sort=ctime; set sort_reverse=True
  392. map oA chain set sort=atime; set sort_reverse=True
  393. map oT chain set sort=type; set sort_reverse=True
  394. map oE chain set sort=extension; set sort_reverse=True
  395. map dc get_cumulative_size
  396. # Settings
  397. map zc set collapse_preview!
  398. map zd set sort_directories_first!
  399. map zh set show_hidden!
  400. map <C-h> set show_hidden!
  401. map zI set flushinput!
  402. map zi set preview_images!
  403. map zm set mouse_enabled!
  404. map zp set preview_files!
  405. map zP set preview_directories!
  406. map zs set sort_case_insensitive!
  407. map zu set autoupdate_cumulative_size!
  408. map zv set use_preview_script!
  409. map zf console filter%space
  410. copymap zf zz
  411. # Bookmarks
  412. map `<any> enter_bookmark %any
  413. map '<any> enter_bookmark %any
  414. map b<any> set_bookmark %any
  415. map ub<any> unset_bookmark %any
  416. # map m<bg> draw_bookmarks
  417. # copymap m<bg> um<bg> `<bg> '<bg>
  418. # Generate all the chmod bindings with some python help:
  419. eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
  420. eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
  421. eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
  422. eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
  423. eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
  424. eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
  425. eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
  426. eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
  427. eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
  428. eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
  429. # ===================================================================
  430. # == Define keys for the console
  431. # ===================================================================
  432. # Note: Unmapped keys are passed directly to the console.
  433. # Basic
  434. cmap <tab> eval fm.ui.console.tab()
  435. cmap <s-tab> eval fm.ui.console.tab(-1)
  436. cmap <ESC> eval fm.ui.console.close()
  437. cmap <CR> eval fm.ui.console.execute()
  438. cmap <C-l> redraw_window
  439. copycmap <ESC> <C-c>
  440. copycmap <CR> <C-j>
  441. # Move around
  442. cmap <up> eval fm.ui.console.history_move(-1)
  443. cmap <down> eval fm.ui.console.history_move(1)
  444. cmap <left> eval fm.ui.console.move(left=1)
  445. cmap <right> eval fm.ui.console.move(right=1)
  446. cmap <home> eval fm.ui.console.move(right=0, absolute=True)
  447. cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
  448. cmap <a-left> eval fm.ui.console.move_word(left=1)
  449. cmap <a-right> eval fm.ui.console.move_word(right=1)
  450. # Line Editing
  451. cmap <backspace> eval fm.ui.console.delete(-1)
  452. cmap <delete> eval fm.ui.console.delete(0)
  453. cmap <C-w> eval fm.ui.console.delete_word()
  454. cmap <A-d> eval fm.ui.console.delete_word(backward=False)
  455. cmap <C-k> eval fm.ui.console.delete_rest(1)
  456. cmap <C-u> eval fm.ui.console.delete_rest(-1)
  457. cmap <C-y> eval fm.ui.console.paste()
  458. # And of course the emacs way
  459. copycmap <up> <C-p>
  460. copycmap <down> <C-n>
  461. copycmap <left> <C-b>
  462. copycmap <right> <C-f>
  463. copycmap <home> <C-a>
  464. copycmap <end> <C-e>
  465. copycmap <delete> <C-d>
  466. copycmap <backspace> <C-h>
  467. # Note: There are multiple ways to express backspaces. <backspace> (code 263)
  468. # and <backspace2> (code 127). To be sure, use both.
  469. copycmap <backspace> <backspace2>
  470. # This special expression allows typing in numerals:
  471. cmap <allow_quantifiers> false
  472. # ===================================================================
  473. # == Pager Keybindings
  474. # ===================================================================
  475. # Movement
  476. pmap <down> pager_move down=1
  477. pmap <up> pager_move up=1
  478. pmap <left> pager_move left=4
  479. pmap <right> pager_move right=4
  480. pmap <home> pager_move to=0
  481. pmap <end> pager_move to=-1
  482. pmap <pagedown> pager_move down=1.0 pages=True
  483. pmap <pageup> pager_move up=1.0 pages=True
  484. pmap <C-d> pager_move down=0.5 pages=True
  485. pmap <C-u> pager_move up=0.5 pages=True
  486. copypmap <UP> k <C-p>
  487. copypmap <DOWN> j <C-n> <CR>
  488. copypmap <LEFT> h
  489. copypmap <RIGHT> l
  490. copypmap <HOME> g
  491. copypmap <END> G
  492. copypmap <C-d> d
  493. copypmap <C-u> u
  494. copypmap <PAGEDOWN> n f <C-F> <Space>
  495. copypmap <PAGEUP> p b <C-B>
  496. # Basic
  497. pmap <C-l> redraw_window
  498. pmap <ESC> pager_close
  499. copypmap <ESC> q Q i <F3>
  500. pmap E edit_file
  501. # ===================================================================
  502. # == Taskview Keybindings
  503. # ===================================================================
  504. # Movement
  505. tmap <up> taskview_move up=1
  506. tmap <down> taskview_move down=1
  507. tmap <home> taskview_move to=0
  508. tmap <end> taskview_move to=-1
  509. tmap <pagedown> taskview_move down=1.0 pages=True
  510. tmap <pageup> taskview_move up=1.0 pages=True
  511. tmap <C-d> taskview_move down=0.5 pages=True
  512. tmap <C-u> taskview_move up=0.5 pages=True
  513. copytmap <UP> k <C-p>
  514. copytmap <DOWN> j <C-n> <CR>
  515. copytmap <HOME> g
  516. copytmap <END> G
  517. copytmap <C-u> u
  518. copytmap <PAGEDOWN> n f <C-F> <Space>
  519. copytmap <PAGEUP> p b <C-B>
  520. # Changing priority and deleting tasks
  521. tmap J eval -q fm.ui.taskview.task_move(-1)
  522. tmap K eval -q fm.ui.taskview.task_move(0)
  523. tmap dd eval -q fm.ui.taskview.task_remove()
  524. tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
  525. tmap <pageup> eval -q fm.ui.taskview.task_move(0)
  526. tmap <delete> eval -q fm.ui.taskview.task_remove()
  527. # Basic
  528. tmap <C-l> redraw_window
  529. tmap <ESC> taskview_close
  530. copytmap <ESC> q Q w <C-c>
  531. # ]]] #
  532. # image preview [[[ #
  533. # Use one of the supported image preview protocols
  534. set preview_images true
  535. # Set the preview image method. Supported methods:
  536. #
  537. # * w3m (default):
  538. # Preview images in full color with the external command "w3mimgpreview"?
  539. # This requires the console web browser "w3m" and a supported terminal.
  540. # It has been successfully tested with "xterm" and "urxvt" without tmux.
  541. #
  542. # * iterm2:
  543. # Preview images in full color using iTerm2 image previews
  544. # (http://iterm2.com/images.html). This requires using iTerm1 compiled
  545. # with image preview support.
  546. #
  547. # This feature relies on the dimensions of the terminal's font. By default, a
  548. # width of 8 and height of 11 are used. To use other values, set the options
  549. # iterm2_font_width and iterm2_font_height to the desired values.
  550. #
  551. # * urxvt:
  552. # Preview images in full color using urxvt image backgrounds. This
  553. # requires using urxvt compiled with pixbuf support.
  554. #
  555. # * urxvt-full:
  556. # The same as urxvt but utilizing not only the preview pane but the
  557. # whole terminal window.
  558. # set preview_images_method w3m
  559. # set preview_images_method ueberzug
  560. set preview_images_method kitty
  561. # set preview_images_method urxvt
  562. # set preview_images_method urxvt-full
  563. # ]]] image preview #
  564. # custom [[[ #
  565. # editing ranger config
  566. map R chain shell nvim -p ~/.config/ranger/rc.conf %rangerdir/config/rc.conf; source ~/.config/ranger/rc.conf
  567. map rr source ~/.config/ranger/rc.conf
  568. # backgrounds [[[ #
  569. # map w shell /usr/bin/wal -i %f && sudo ~/st/make-st.sh
  570. map w shell /usr/bin/wal -i %f
  571. map bde shell mv %f /home/kevin/Pictures/Backgrounds/dim/editing
  572. map bdn shell mv %f /home/kevin/Pictures/Backgrounds/dim/non-editing
  573. map bbe shell mv %f /home/kevin/Pictures/Backgrounds/bright/editing
  574. map bbn shell mv %f /home/kevin/Pictures/Backgrounds/bright/non-editing
  575. # map be shell mv %f editing
  576. # map bn shell mv %f non-editing
  577. # ]]] backgrounds #
  578. # bulk rename
  579. map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
  580. map zu shell unzip %f
  581. map zr shell unzip %f && rm %f
  582. map e. open_with evince f
  583. map v. shell $EDITOR %f
  584. source {{ .chezmoi.homeDir }}/.config/ranger/key_mappings.conf
  585. map dg shell dragon-drop -a -x %p
  586. # map <C-d> shell dragon-drag-and-drop -a -x %p
  587. # a plugin that adds file glyphs / icon support to Ranger:
  588. # https://github.com/alexanderjeurissen/ranger_devicons
  589. default_linemode devicons
  590. # ]]] custom #