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.

679 lines
21 KiB

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