Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Actions

The right-click menu is defined by ~/.config/flux/menu.rs. Ctrl+right-click and the contextual actions panel read a menu-*.rs template instead, chosen by the MIME type of the item: menu-<category>-<subtype>.rs, else menu-<category>-all.rs, else menu-all.rs. Templates are looked up in ~/.config/flux/menus/ first, then in ~/.config/flux/. Every line of these files is:

"Label" => "mime_types", "command"[, "toast"][, "no_command_dialog"]

command is either a shell command or one of the builtin::* actions listed below.

Placeholders

Shell commands may contain the following placeholders. Which one is used depends on how many items the command targets: the selection, or the item the menu was opened on when it is not selected, or the current directory when there is neither.

PlaceholderOne targetSeveral targets
%pAbsolute path of the itemAll the paths, shell-quoted and separated by spaces
%dParent directory of the itemThe current directory
%fFile name of the itemNot substituted
%lLine number of the content-search hit, 0 when the item is not a hit0

Every substituted path is wrapped in single quotes, with any ' inside it escaped. A "%p" or '%p' written in the command is replaced together with its quotes, so don't add your own. If a path contains a newline, a carriage return or a NUL byte, the command is not run and Flux shows a toast.

A menu entry whose command contains %l is shown only for a content-search hit, and never in the contextual actions panel.

The toast of a menu.rs shell command is shown after it exits, and a failed command without a toast shows Command failed. An entry from a menu-*.rs template shows its toast as soon as it is clicked.

Builtin actions

The following actions are recognised when command starts with builtin::. They are handled directly by the application and never spawn a shell.

ActionScopeDescription
builtin::copyallCopies the selected files or folders to the clipboard.
builtin::cutallCuts the selected files or folders to the clipboard.
builtin::pastedirectoryPastes items from the clipboard into the current directory.
builtin::open_new_tabdirectoryOpens the selected folder or current location in a new tab.
builtin::renameallTriggers inline filename renaming on the selected item.
builtin::deleteallMoves the selected files or folders to the system trash.
builtin::new_folderdirectoryOpens the new folder creation prompt.
builtin::new_filedirectoryOpens the new file creation prompt.
builtin::toggle_pindirectoryPins or unpins the target folder in the sidebar.
builtin::add_to_quick_listallAdds the selected folder or current directory to the Quick List.
builtin::quick_list_transferallOpens a submenu to move or copy items directly to Quick List slots.
builtin::tagfilefileOpens the file tag editor popover.
builtin::inspect_dirdirectoryOpens the Directory Inspector with disk usage and largest files.
builtin::install_fontsfont/allInstalls the selected font files into ~/.local/share/fonts.
builtin::open_withfilePopulates a dynamic submenu of registered applications for the MIME type.
builtin::open_with_dialogfileOpens the full system application chooser dialog.
builtin::select_folder_icondirectoryOpens the folder icon picker to assign a theme icon.
builtin::set_custom_iconallOpens a file chooser to assign a custom image as file/folder icon.
builtin::reset_custom_iconallRestores the default icon for the selected file or folder.
builtin::set_extension_iconfileSets a custom image icon for the target file's extension globally.
builtin::reset_extension_iconfileResets the custom icon for the target extension back to theme default.
builtin::set_bg_windowimage/allSets the selected image as the main window background.
builtin::set_bg_sidebar_leftimage/allSets the selected image as the left sidebar background.
builtin::set_bg_sidebar_rightimage/allSets the selected image as the right panel background.
builtin::clear_backgroundsallClears all custom background images and resets styling to default.

Worked examples

Flat action - an entry that appears in the top-level context menu:

"Open in Terminal" => "directory", "alacritty --working-directory=%p", "no_command_dialog"

Submenu - the part before > becomes a submenu group:

"Image Convert > To PNG" => "image/webp", "magick %p %p.png"

Placeholder plus toast - %p is substituted, then the toast is shown after the command exits:

"Optimise Image" => "image/png", "oxipng %p", "Image optimised"