Skip to content

context menu

rovr provides a convenient right-click context menu that gives you quick access to common file operations.

you can open the context menu by:

  • right-clicking on any file or folder in the file list
  • pressing shift+f10 (or your configured keybind)
  • the menu appears at your cursor position with relevant actions

the context menu includes the following built-in operations:

these actions operate within rovr’s clipboard and are defined in rovr/core/file_list_right_click_menu.py:

actiondescription
rovr:copycopy the selected file(s) to rovr’s clipboard
rovr:cutcut the selected file(s) to rovr’s clipboard for moving
rovr:pastepaste files from rovr’s clipboard to the current directory
rovr:newcreate a new file or folder
rovr:renamerename the selected item
rovr:deletedelete the selected file(s)
rovr:zipcompress the selected file(s) into an archive
rovr:unzipextract the contents of a compressed file

these actions interact with your operating system clipboard:

actiondescription
system:copy_highlightedcopy the highlighted file’s path to the system clipboard
system:copy_current_directorycopy the current directory path to the system clipboard
system:copy_to_system_clipcopy rovr’s clipboard contents to the system clipboard

you can create submenus by using the options field instead of action:

right_click = [
{ label = "Open With", options = [
{ label = "VSCode", action = "sh:code \"${selected_files}\"" },
{ label = "Helix", action = 'shh:hx "${selected_files}"' },
] },
]

you can execute shell commands directly from the context menu using special action prefixes. the prefix format is sh[X]: where X determines the execution mode.

prefixmoduledescription
sh:normal shellruns the command without capturing output, rovr remains responsive
shh:hide appsuspends rovr while the command runs, useful for interactive commands
sho:show outputcaptures stdout/stderr and displays as a notification

the command follows the prefix after a colon. for example:

  • sh:code "${selected_files}" — opens vscode normally
  • shh:hx "${highlighted_file}" — opens helix while hiding rovr
  • sho:pwsh -nop -c "(Get-FileHash -Algorithm SHA256 \"${highlighted_file}\").Hash" — shows hash output

shell actions support variable expansions via rovr/functions/utils.py::expand_command:

variabledescription
${highlighted_file}path to the currently highlighted file
${selected_files}space-separated list of all selected file paths (shell-quoted)
${current_working_directory}the current directory path

menu items can be conditionally shown or hidden based on file path, operating system, current directory, or file type. conditions are checked via rovr/core/file_list_right_click_menu.py::ifed.

right_click = [
{ label = "Open in VSCode", action = "sh:code \"${selected_files}\"" },
{ label = "Pixelorama", action = 'sh:pixelorama "${selected_files}"', if = { path = ["*.png", "*.jpg"] } },
{ label = "Windows Only", action = "sh:echo hello", if = { os = ["Windows"] } },
{ label = "Git Projects", action = "sh:git status", if = { cwd = ["C:/Projects/*"] } },
{ label = "Folder Action", action = "sh:do something", if = { directory = true } },
{ label = "File Action", action = "sh:do something", if = { directory = false } },
]
fieldtypedescription
pathlist[str]show only if the file path matches one of these glob patterns (fnmatch)
oslist[str]show only on specified operating systems (case insensitive: Windows, Linux, Darwin)
cwdlist[str]show only if the current working directory matches one of these glob patterns
directoryboolshow only for directories (true) or files (false)

the keyboard shortcut is configured via open_right_click_menu in [keybinds]:

[keybinds]
open_right_click_menu = ["shift+f10"]

the context menu is configured in your config.toml under [settings]:

if you want to add anything, you MUST include the default options, otherwise you will lose them.

[settings]
right_click = [
{ label = "\uf0c5 Copy", options = [
{ label = "\uf07f Copy in rovr", action = "rovr:copy" },
{ label = "\U000f0147 Copy highlighted file path", action = "system:copy_highlighted" },
{ label = "\U000f14e5 Copy current directory path", action = "system:copy_current_directory" },
{ label = "\U000f1265 Copy to OS clipboard", action = "system:copy_to_system_clip" },
] },
{ label = "\uf0c4 Cut", action = "rovr:cut" },
{ label = "\uf429 Paste", action = "rovr:paste" },
{ label = "\uea7f New", action = "rovr:new" },
{ label = "\uf246 Rename", action = "rovr:rename" },
{ label = "\uf014 Delete", action = "rovr:delete" },
{ label = "\uf410 Zip", action = "rovr:zip" },
{ label = "\uf07c Unzip", action = "rovr:unzip" },
]