ROFI-FILE-...R-EXTENDED(1)

πŸ“¦ version 1.3.1, in alpine 3.24, nixos 26.05, nixpkgs unstable

πŸ’… rofi-file-browser-extended β€” the manual, but make it make sense

okay so bestie, you're reading the manual page for rofi-file-browser-extended from the General Commands Manual β€” that's the family this one lives in. It's a plugin for rofi, and it's genuinely so good. Let's get into it 🫢


✨ NAME ✨

rofi-file-browser-extended β€” use rofi to quickly open files. that's it. that's the whole vibe πŸ¦‹


✨ SYNOPSIS ✨

rofi -show file-browser-extended [ -file-browser-dir <dir> ] [ -file-browser-cmd <cmd> ]
rofi -show file-browser-extended [ -file-browser-depth <depth> ] [ -file-browser-follow-symlinks ]
rofi -show file-browser-extended [ -file-browser-oc-cmd <cmd> ] [ -file-browser-oc-search-path ]
fd | rofi -show file-browser-extended -file-browser-stdin

like, pick your fighter. all four are valid πŸ’–


✨ DESCRIPTION ✨

rofi-file-browser-extended is a configurable file browser plugin for rofi. its main use case? quickly open files without having to open a whole window just to navigate to the file. no cap, that's the entire point. it's giving "i have places to be" energy πŸ‘‘


🌸 USAGE 🌸

πŸŽ€ Resuming from the last opened directory

turn this on with -file-browser-resume. the plugin writes the current directory to the "resume file" before exiting, then reads it back on startup. it literally remembers where you were. main character memory 🧠✨

the default resume file location is $XDG_USER_CONFIG_DIR/rofi/file-browser-resume (usually $HOME/config/rofi/file-browser-resume). wanna pick a different one? -file-browser-resume-file has your back πŸ’œ

πŸŽ€ Listing files recursively

-file-browser-depth lets you list files recursively up to a certain depth. and listen β€” a depth of 0 means files are listed without a depth limit. zero = infinite. iconic honestly πŸ”₯

symlinks are not followed by default. -file-browser-follow-symlinks is the option that makes them get followed. and when symlinks are followed, every file is still only reported once. no duplicates, we don't do that here πŸ’…

πŸŽ€ Opening files with custom commands

press the open custom key (scroll down to Key bindings if you don't know it yet) to enter open custom mode on the selected file. the plugin then shows you a whole list of commands to open that file with. obsessed ✨

  • all executables in $PATH can be added to this list with -file-browser-oc-search-path.
  • user-defined commands can be added with -file-browser-oc-cmd (pass the option multiple times to add multiple, obviously πŸŽ€).
  • if no commands are specified, the file to be opened will be shown instead of a list of commands. lowkey anticlimactic but okay.

user-defined commands can optionally specify an icon and a display name (with pango markup). fancy πŸ’–

format:

<command>;icon:<icon-name>;name:<name-to-displayed>

icon and name are optional. the order of icon and name does not matter as long as the command comes first. order? flexible. command? first. periodt.

example:

-file-browser-oc-cmd "gimp"
-file-browser-oc-cmd "pcmanfm-qt;name:pcmanfm;icon:system-file-manager"
-file-browser-oc-cmd "deadbeef --queue;icon:deadbeef;name:deadbeef <i>(queue)</i>"

πŸŽ€ Reading paths from stdin

-file-browser-stdin reads the displayed paths from stdin. paths must either be relative to the starting directory (-file-browser-dir) or absolute. it is not checked if the paths actually exist (we're trusting you πŸ™ˆ). and the paths are not sorted or matched to any exclude patters.

after reading the paths, the plugin behaves no different than usual. you may want to use this option with -file-browser-no-descend and / or -file-browser-stdout to make it more dmenu-like. iykyk 🌈

example:

fd | rofi -show file-browser-extended -file-browser-stdin
fd -a | rofi -show file-browser-extended -file-browser-stdin
ls somedir | rofi -show file-browser-extended -file-browser-stdin -file-browser-dir somedir

✨ CONFIGURATION ✨

the default config file location is $XDG_USER_CONFIG_DIR/rofi/file-browser (usually to $HOME/config/rofi/file-browser). the config file is just newline-separated command line options without the -file-browser- prefix. so chill. so clean. 🧚

example:

cmd        "exo-open"
oc-cmd     "evince;icon:evince"
oc-cmd     "gimp;icon:gimp"
depth      2

open-parent-as-self

comments start with #. quotes inside string arguments must not be escaped. escape sequences are currently not supported β€” yeah, that's a thing, don't come for me πŸ’€

command line options will override the config file (or add to the config file arguments if the option can be specified multiple times). a different config file can be specified with -file-browser-config (multiple by passing the option multiple times). and heads up: all command line options but -file-browser-config itself can be used in the config file. yes, even that one. no, not that one. the other one. πŸŽ€


πŸ¦‹ KEY BINDINGS πŸ¦‹

  • kb-accept-alt, (default: Shift+Return) β€” open custom: open the selected file with a custom command ✨
  • kb-custom-1, (default: Alt+1) β€” open multi: open the selected file without closing rofi. can be used in the prompt of open custom πŸ”₯
  • kb-custom-2, (default: Alt+2) β€” toggle hidden files πŸ™ˆ

key bindings can be changed via command line options (see Command line options/Key bindings). slay πŸ’…


✨ OPTIONS ✨

πŸ’œ Behaviour

  • -file-browser-cmd cmd β€” set the command to open selected files with. (default: xdg-open)
  • -file-browser-dir path β€” set the starting directory. (default: current working directory)
  • -file-browser-resume β€” resume from the last opened directory. (default: disabled)
  • -file-browser-resume-file path β€” set the resume file. when resuming is enabled, the path of the last opened directory is saved to this file. (default: $XDG_USER_CONFIG_DIR/rofi/file-browser-resume)
  • -file-browser-depth depth β€” list files recursively until a depth is reached. a value of 0 means no depth limit. (default: 1)
  • -file-browser-follow-symlinks β€” follow symlinks when listing files recursively. (default: don't follow symlinks) when symlinks are followed, every file is still only reported once.
  • -file-browser-show-hidden β€” show hidden files. (default: hidden)
  • -file-browser-only-dirs β€” only show directories. (default: disabled)
  • -file-browser-only-files β€” only show files. (default: disabled)
  • -file-browser-no-descend β€” open directories instead of descending into them. (default: disabled)
  • -file-browser-open-parent-as-self β€” treat the parent directory (..) as the current directory when opened. (default: disabled)
  • -file-browser-exclude β€” exclude paths by matching the basename to glob patterns. (default: none) supports * and ?.
  • -file-browser-stdin β€” read paths from stdin. (default: disabled) paths must either be relative to the starting directory (-file-browser-dir) or absolute. it is not checked if the files actually exist. the paths are not sorted or matched to any exclude patters.
  • -file-browser-stdout β€” instead of opening files, print absolute paths of selected files to stdout. (default: disabled)
  • -file-browser-oc-search-path β€” search $PATH for executables and display them in open custom mode (after user-defined commands). (default: disabled)
  • -file-browser-oc-cmd cmd β€” specify user-defined commands to be displayed in open custom mode. (default: none) format: <command>;icon:<icon-name>;name:<name-to-displayed> icon and name are optional. the order of icon and name does not matter as long as the command comes first. name may use pango markup.
  • -file-browser-sort-by-type, -file-browser-no-sort-by-type β€” enable / disable sort-by-type (directories first, files second, inaccessible directories last). (default: enabled)
  • -file-browser-sort-by-depth, -file-browser-no-sort-by-depth β€” enable / disable sort-by-depth when listing files recursively. sort-by-type is secondary to sort-by-depth if both are enabled. (default: disabled)
  • -file-browser-hide-parent β€” hide the parent directory (..). (default: shown)
  • -file-browser-config path β€” load options from the specified config file. (default: $XDG_USER_CONFIG_DIR/rofi/file-browser) can be used multiple times to load options from multiple config files. when this option is specified, the default config file will not be loaded. bold move, respect 🫢

πŸ’œ Key bindings

supported key bindings are kb-accept-alt, kb-custom-[0-19] and none (disables the key binding). you can change the actual key bindings that correspond to kb-accept-alt and kb-custom-* in rofi's options. run rofi -show keys to display rofi's key bindings and what they're bound to. run rofi -dump-config or rofi -dump-xresources to get a list of available options. very demure, very informative ✨

  • -file-browser-open-custom-key rofi-key β€” set the key binding for open custom. (default: kb-accept-alt)
  • -file-browser-open-multi-key rofi-key β€” set the key binding for open multi. (default: kb-custom-1)
  • -file-browser-open-toggle-hidden rofi-key β€” set the key binding for toggling hidden files. (default: kb-custom-2)

πŸ’œ Appearance

  • -file-browser-disable-icons β€” disable icons. (default: enabled)
  • -file-browser-disable-thumbnails β€” disable thumbnails for image files. (default: enabled)
  • -file-browser-disable-status β€” disable the status line that shows the current path. (default: enabled)
  • -file-browser-path-sep string β€” set the path separator for the status line. (default: " / ")
  • -file-browser-hide-hidden-symbol string β€” set the indicator that hidden files are hidden. (default: "[-]")
  • -file-browser-show-hidden-symbol string β€” set the indicator that hidden files are shown. (default: "[+]")
  • -file-browser-up-text string β€” set the text for the parent directory. (default: "..")
  • -file-browser-up-icon icon-name β€” set the icon for the parent directory. (default: "go-up")
  • -file-browser-fallback-icon icon-name β€” set the fallback icon used for files without icons (e.g. block devices). (default: "text-x-generic")
  • -file-browser-inaccessible-icon icon-name β€” set the icon for inaccessible directories. (default: "error")

πŸ”§ TROUBLESHOOTING πŸ”§

if you encounter a problem, try running rofi from the command line. the plugin prints error messages if things go wrong β€” literally just read them, bestie 😭. if that doesn't help, feel free to create a new issue on GitHub. we're nice, we promise πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

rofi(1), nftw(3)


okay that's the whole page, go forth and open files at lightning speed ⭐

and that's a wrap, bestie 🌸 β€” this one's from January 2022, in the General Commands Manual, and it's the manual page for rofi-file-browser-extended. mwah πŸ’‹

πŸ“¦ where this page comes from