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.

713 lines
22 KiB

5 years ago
5 years ago
6 years ago
5 years ago
4 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. 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 i 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 <INSERT> console touch%space
  266. # VIM-like
  267. copymap <UP> k
  268. copymap <DOWN> j
  269. copymap <LEFT> h
  270. copymap <RIGHT> l
  271. copymap <HOME> gg
  272. copymap <END> G
  273. copymap <PAGEDOWN> <C-F>
  274. copymap <PAGEUP> <C-B>
  275. map J move down=0.5 pages=True
  276. map K move up=0.5 pages=True
  277. copymap J <C-D>
  278. copymap K <C-U>
  279. # Jumping around
  280. map H history_go -1
  281. map L history_go 1
  282. map ] move_parent 1
  283. map [ move_parent -1
  284. map } traverse
  285. map ) jump_non
  286. map gh cd ~
  287. map ge cd /etc
  288. map gu cd /usr
  289. map gd cd /dev
  290. map gl cd -r .
  291. map gL cd -r %f
  292. map go cd /opt
  293. map gv cd /var
  294. map gm cd /media
  295. map gM cd /mnt
  296. map gs cd /srv
  297. map gp cd /tmp
  298. map gR eval fm.cd(ranger.RANGERDIR)
  299. map g/ cd /
  300. map g? cd /usr/share/doc/ranger
  301. # External Programs
  302. map E edit
  303. map du shell -p du --max-depth=1 -h --apparent-size
  304. map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
  305. map yp yank path
  306. map yd yank dir
  307. map yn yank name
  308. # Filesystem Operations
  309. map = chmod
  310. map cw console rename%space
  311. map a rename_append
  312. map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
  313. map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
  314. map pp paste
  315. map po paste overwrite=True
  316. map pP paste append=True
  317. map pO paste overwrite=True append=True
  318. map pl paste_symlink relative=False
  319. map pL paste_symlink relative=True
  320. map phl paste_hardlink
  321. map pht paste_hardlinked_subtree
  322. map dD console delete
  323. map dd cut
  324. map ud uncut
  325. map da cut mode=add
  326. map dr cut mode=remove
  327. map dt cut mode=toggle
  328. map yy copy
  329. map uy uncut
  330. map ya copy mode=add
  331. map yr copy mode=remove
  332. map yt copy mode=toggle
  333. # Temporary workarounds
  334. map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
  335. map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
  336. map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
  337. map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
  338. map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
  339. map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
  340. map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
  341. map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
  342. # Searching
  343. map / console search%space
  344. # map gr fzf_select
  345. map rg fzf_select
  346. map n search_next
  347. map N search_next forward=False
  348. map ct search_next order=tag
  349. map cs search_next order=size
  350. map ci search_next order=mimetype
  351. map cc search_next order=ctime
  352. map cm search_next order=mtime
  353. map ca search_next order=atime
  354. # Tabs
  355. map <C-n> tab_new
  356. map <C-w> tab_close
  357. map <TAB> tab_move 1
  358. map <S-TAB> tab_move -1
  359. map <A-Right> tab_move 1
  360. map <A-Left> tab_move -1
  361. map gt tab_move 1
  362. map gT tab_move -1
  363. map gn tab_new
  364. map gc tab_close
  365. map uq tab_restore
  366. map <a-1> tab_open 1
  367. map <a-2> tab_open 2
  368. map <a-3> tab_open 3
  369. map <a-4> tab_open 4
  370. map <a-5> tab_open 5
  371. map <a-6> tab_open 6
  372. map <a-7> tab_open 7
  373. map <a-8> tab_open 8
  374. map <a-9> tab_open 9
  375. # Sorting
  376. map or set sort_reverse!
  377. map oz set sort=random
  378. map os chain set sort=size; set sort_reverse=False
  379. map ob chain set sort=basename; set sort_reverse=False
  380. map on chain set sort=natural; set sort_reverse=False
  381. map om chain set sort=mtime; set sort_reverse=False
  382. map oc chain set sort=ctime; set sort_reverse=False
  383. map oa chain set sort=atime; set sort_reverse=False
  384. map ot chain set sort=type; set sort_reverse=False
  385. map oe chain set sort=extension; set sort_reverse=False
  386. map oS chain set sort=size; set sort_reverse=True
  387. map oB chain set sort=basename; set sort_reverse=True
  388. map oN chain set sort=natural; set sort_reverse=True
  389. map oM chain set sort=mtime; set sort_reverse=True
  390. map oC chain set sort=ctime; set sort_reverse=True
  391. map oA chain set sort=atime; set sort_reverse=True
  392. map oT chain set sort=type; set sort_reverse=True
  393. map oE chain set sort=extension; set sort_reverse=True
  394. map dc get_cumulative_size
  395. # Settings
  396. map zc set collapse_preview!
  397. map zd set sort_directories_first!
  398. map zh set show_hidden!
  399. map <C-h> set show_hidden!
  400. map zI set flushinput!
  401. map zi set preview_images!
  402. map zm set mouse_enabled!
  403. map zp set preview_files!
  404. map zP set preview_directories!
  405. map zs set sort_case_insensitive!
  406. map zu set autoupdate_cumulative_size!
  407. map zv set use_preview_script!
  408. map zf console filter%space
  409. copymap zf zz
  410. # Bookmarks
  411. map `<any> enter_bookmark %any
  412. map '<any> enter_bookmark %any
  413. map b<any> set_bookmark %any
  414. map ub<any> unset_bookmark %any
  415. # map m<bg> draw_bookmarks
  416. # copymap m<bg> um<bg> `<bg> '<bg>
  417. # Generate all the chmod bindings with some python help:
  418. eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
  419. eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
  420. eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
  421. eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
  422. eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
  423. eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
  424. eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
  425. eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
  426. eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
  427. eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
  428. # ===================================================================
  429. # == Define keys for the console
  430. # ===================================================================
  431. # Note: Unmapped keys are passed directly to the console.
  432. # Basic
  433. cmap <tab> eval fm.ui.console.tab()
  434. cmap <s-tab> eval fm.ui.console.tab(-1)
  435. cmap <ESC> eval fm.ui.console.close()
  436. cmap <CR> eval fm.ui.console.execute()
  437. cmap <C-l> redraw_window
  438. copycmap <ESC> <C-c>
  439. copycmap <CR> <C-j>
  440. # Move around
  441. cmap <up> eval fm.ui.console.history_move(-1)
  442. cmap <down> eval fm.ui.console.history_move(1)
  443. cmap <left> eval fm.ui.console.move(left=1)
  444. cmap <right> eval fm.ui.console.move(right=1)
  445. cmap <home> eval fm.ui.console.move(right=0, absolute=True)
  446. cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
  447. cmap <a-left> eval fm.ui.console.move_word(left=1)
  448. cmap <a-right> eval fm.ui.console.move_word(right=1)
  449. # Line Editing
  450. cmap <backspace> eval fm.ui.console.delete(-1)
  451. cmap <delete> eval fm.ui.console.delete(0)
  452. cmap <C-w> eval fm.ui.console.delete_word()
  453. cmap <A-d> eval fm.ui.console.delete_word(backward=False)
  454. cmap <C-k> eval fm.ui.console.delete_rest(1)
  455. cmap <C-u> eval fm.ui.console.delete_rest(-1)
  456. cmap <C-y> eval fm.ui.console.paste()
  457. # And of course the emacs way
  458. copycmap <up> <C-p>
  459. copycmap <down> <C-n>
  460. copycmap <left> <C-b>
  461. copycmap <right> <C-f>
  462. copycmap <home> <C-a>
  463. copycmap <end> <C-e>
  464. copycmap <delete> <C-d>
  465. copycmap <backspace> <C-h>
  466. # Note: There are multiple ways to express backspaces. <backspace> (code 263)
  467. # and <backspace2> (code 127). To be sure, use both.
  468. copycmap <backspace> <backspace2>
  469. # This special expression allows typing in numerals:
  470. cmap <allow_quantifiers> false
  471. # ===================================================================
  472. # == Pager Keybindings
  473. # ===================================================================
  474. # Movement
  475. pmap <down> pager_move down=1
  476. pmap <up> pager_move up=1
  477. pmap <left> pager_move left=4
  478. pmap <right> pager_move right=4
  479. pmap <home> pager_move to=0
  480. pmap <end> pager_move to=-1
  481. pmap <pagedown> pager_move down=1.0 pages=True
  482. pmap <pageup> pager_move up=1.0 pages=True
  483. pmap <C-d> pager_move down=0.5 pages=True
  484. pmap <C-u> pager_move up=0.5 pages=True
  485. copypmap <UP> k <C-p>
  486. copypmap <DOWN> j <C-n> <CR>
  487. copypmap <LEFT> h
  488. copypmap <RIGHT> l
  489. copypmap <HOME> g
  490. copypmap <END> G
  491. copypmap <C-d> d
  492. copypmap <C-u> u
  493. copypmap <PAGEDOWN> n f <C-F> <Space>
  494. copypmap <PAGEUP> p b <C-B>
  495. # Basic
  496. pmap <C-l> redraw_window
  497. pmap <ESC> pager_close
  498. copypmap <ESC> q Q i <F3>
  499. pmap E edit_file
  500. # ===================================================================
  501. # == Taskview Keybindings
  502. # ===================================================================
  503. # Movement
  504. tmap <up> taskview_move up=1
  505. tmap <down> taskview_move down=1
  506. tmap <home> taskview_move to=0
  507. tmap <end> taskview_move to=-1
  508. tmap <pagedown> taskview_move down=1.0 pages=True
  509. tmap <pageup> taskview_move up=1.0 pages=True
  510. tmap <C-d> taskview_move down=0.5 pages=True
  511. tmap <C-u> taskview_move up=0.5 pages=True
  512. copytmap <UP> k <C-p>
  513. copytmap <DOWN> j <C-n> <CR>
  514. copytmap <HOME> g
  515. copytmap <END> G
  516. copytmap <C-u> u
  517. copytmap <PAGEDOWN> n f <C-F> <Space>
  518. copytmap <PAGEUP> p b <C-B>
  519. # Changing priority and deleting tasks
  520. tmap J eval -q fm.ui.taskview.task_move(-1)
  521. tmap K eval -q fm.ui.taskview.task_move(0)
  522. tmap dd eval -q fm.ui.taskview.task_remove()
  523. tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
  524. tmap <pageup> eval -q fm.ui.taskview.task_move(0)
  525. tmap <delete> eval -q fm.ui.taskview.task_remove()
  526. # Basic
  527. tmap <C-l> redraw_window
  528. tmap <ESC> taskview_close
  529. copytmap <ESC> q Q w <C-c>
  530. # ]]] #
  531. # image preview [[[ #
  532. # Use one of the supported image preview protocols
  533. set preview_images true
  534. # Set the preview image method. Supported methods:
  535. #
  536. # * w3m (default):
  537. # Preview images in full color with the external command "w3mimgpreview"?
  538. # This requires the console web browser "w3m" and a supported terminal.
  539. # It has been successfully tested with "xterm" and "urxvt" without tmux.
  540. #
  541. # * iterm2:
  542. # Preview images in full color using iTerm2 image previews
  543. # (http://iterm2.com/images.html). This requires using iTerm1 compiled
  544. # with image preview support.
  545. #
  546. # This feature relies on the dimensions of the terminal's font. By default, a
  547. # width of 8 and height of 11 are used. To use other values, set the options
  548. # iterm2_font_width and iterm2_font_height to the desired values.
  549. #
  550. # * urxvt:
  551. # Preview images in full color using urxvt image backgrounds. This
  552. # requires using urxvt compiled with pixbuf support.
  553. #
  554. # * urxvt-full:
  555. # The same as urxvt but utilizing not only the preview pane but the
  556. # whole terminal window.
  557. # set preview_images_method w3m
  558. # set preview_images_method kitty
  559. # set preview_images_method ueberzug
  560. set preview_images_method urxvt
  561. # set preview_images_method urxvt-full
  562. # ]]] image preview #
  563. # custom [[[ #
  564. # editing ranger config
  565. map R chain shell nvim -p ~/.config/ranger/rc.conf %rangerdir/config/rc.conf; source ~/.config/ranger/rc.conf
  566. map rr source ~/.config/ranger/rc.conf
  567. # backgrounds [[[ #
  568. # map w shell /usr/bin/wal -i %f && sudo ~/st/make-st.sh
  569. map w shell /usr/bin/wal -i %f
  570. map bde shell mv %f /home/kevin/Pictures/Backgrounds/dim/editing
  571. map bdn shell mv %f /home/kevin/Pictures/Backgrounds/dim/non-editing
  572. map bbe shell mv %f /home/kevin/Pictures/Backgrounds/bright/editing
  573. map bbn shell mv %f /home/kevin/Pictures/Backgrounds/bright/non-editing
  574. # map be shell mv %f editing
  575. # map bn shell mv %f non-editing
  576. # ]]] backgrounds #
  577. # bulk rename
  578. map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
  579. map zu shell unzip %f
  580. map zr shell unzip %f && rm %f
  581. map e. open_with evince f
  582. map v. shell $EDITOR %f
  583. source {{ .chezmoi.homedir }}/.config/ranger/key_mappings.conf
  584. map dg shell dragon-drag-and-drop -a -x %p
  585. # map <C-d> shell dragon-drag-and-drop -a -x %p
  586. # a plugin that adds file glyphs / icon support to Ranger:
  587. # https://github.com/alexanderjeurissen/ranger_devicons
  588. default_linemode devicons
  589. # ]]] custom #