XFILES(1)

NAME
xfiles, xfilesctl, xfilesthumb - X11 file manager

SYNOPSIS
xfiles [-a] [-N name] [-X resources] [directory]
xfilesctl command [file ...]
xfilesthumb filepath thumbpath

DESCRIPTION
xfiles is a file manager for X11. xfiles uses other programs to perform several tasks, such as to open a file, generate thumbnails, or run arbitrary commands.

The options are as follows:

-a  Include directory entries whose name begin with a dot.

-N name
    Specify the res_name member of the XClassHint(3) property. name is used to retrieve resources. If not specified, defaults to the value of the RESOURCES_NAME environment variable, or (if that variable is not set) to the name of the command xfiles was invoked as (that is, the basename(3) of its argv[0]).

-X resources
    Specify additional resources to be added on top of the resources from X's resource database. If not specified, defaults to the value of the RESOURCES_DATA environment variable, or (if that variable is not set) to the empty string.

If no directory is given as argument, xfiles opens at the current directory. Otherwise, it opens at the given directory.

xfilesctl is a script called by xfiles to operate on files. xfilesctl should usually not be called manually. xfilesctl gets a command as argument indicating the kind of interaction to perform with the user. Posible interactions are invoking a menu or popping up a terminal dialog.

xfiles source comes with an example xfilesctl script. But users are encouraged to create their own script satisfying their own needs.

The commands passed to it are as follows:

menu
    xfilesctl is invoked with the menu command when right-clicking a xfiles window. The selected files are given to xfilesctl as further arguments. This command is used to pop up a menu (such as xmenu(1) or pmenu(1)) containing operations to perform on the selected files (such as rename them or send them to the trash).

drop-ask
    xfilesctl is invoked with the drop-ask command when dropping files at a xfiles window while no modifier is pressed. The paths to the dropped files are given to xfilesctl as further arguments. This command is used to pop up a menu containing operations to perform on the dropped files (such as copy them to the current directory, move them, or link them).

drop-copy
    xfilesctl is invoked with the drop-copy command when dropping files at a xfiles window while the Control modifier key is pressed. The paths to the dropped files are given to xfilesctl as further arguments. This command is used to pop up a terminal dialog window asking whether to copy the dropped files to the current working directory.

drop-move
    xfilesctl is invoked with the drop-move command when dropping files at a xfiles window while the Shift modifier key is pressed. The paths to the dropped files are given to xfilesctl as further arguments. This command is used to pop up a terminal dialog window asking whether to move the dropped files to the current working directory.

drop-link
    xfilesctl is invoked with the drop-link command when dropping files at a xfiles window while both the Shift and Control modifier keys are pressed. The paths to the dropped files are given to xfilesctl as further arguments. This command is used to pop up a terminal dialog window asking whether to link the dropped files to the current working directory.

^KEY
    xfilesctl is invoked with a ^KEY command (where "KEY" is the name of a key symbol, such as "a", "F5", or "Delete") when pressing a letter, number or punctuation key with Control, or a plain function (F1~F13) key, or a plain operation key (Delete, BackSpace, etc). The paths to the selected files are given to xfilesctl as further arguments. These commands are used to do whatever the user wants to (for example: send files to trash when clicking "Delete"; pop up a dmenu(1) prompting for a directory to go to when clicking "Ctrl-L"; reload the current directory when clicking "F5"; etc).

^S-KEY
    xfilesctl is invoked with a ^S-KEY command (where "KEY" is the name of a key symbol, such as "a", "F5", or "Delete") when pressing a letter, number or punctuation key with Control and Shift, or a function (F1~F13) key with Shift, or an operation key (Delete, BackSpace, etc) with Shift. The paths to the selected files are given to xfilesctl as further arguments. These commands are used to do whatever the user wants to.

xfilesthumb is a script called by xfiles to create 64x64 ppm image file called (thumbnails). xfilesthumb should usually not be called manually. xfilesthumb gets a filepath as argument containing the full path to the file, and a thumbpath as argument containing the full path to the thumbnail file to be created.

xfiles source comes with an example xfilesthumb script. But users are encouraged to create their own script satisfying their own needs.

USAGE
xfiles is controlled mainly with the mouse, but some actions can also be performed with the keyboard.

xfiles has five modes of operation. In each mode, some mouse or keyboard actions are allowed while others are not. The modes of operation are as follows.

Normal Mode
    This is the mode which xfiles starts in. All actions, except rectangular selection and scroller manipulation, can be performed while in this mode. All other modes are accessible from the normal mode.

Selection Mode
    This mode is entered after dragging the pointer on an empty space with the first button in normal mode. In this mode, a rectangle can be drawn, in which any file inside it can be selected. No action other than the rectangular selection can be performed while in this mode. To exit this mode, release the first mouse button.

Scroll Mode
    This mode is entered after opening the scroller with the second button in normal mode. In this mode, the file list can be scrolled up and down by moving the mouse. No action other than scrolling can be performed while in this mode. To exit this mode, press the second mouse button (or release it, if the pointer had not been released nor moved outside the scroller).

Dragging Mode
    This mode is entered after dragging ithe pointer on a file with the first button in normal mode. In this mode, the file icon follows the mouse cursor, indicating that the file can be dropped on another window.

Waiting Mode
    This mode is entered after xfilesctl is called (such as after pressing the third mouse button or dropping a file). In this mode, xfiles is waiting for xfilesctl to exit. No action can be performed while in this mode. To exit this mode, xfilesctl must return.

  Mouse button 1
The first mouse button (usually the left one) is used for selection and opening. Selecting one or more files copies their paths into the PRIMARY X selection. Opening a single file invokes the command specified by the OPENER environment variable with the path to the open file as argument. The OPENER program is invoked in the directory currently open at xfiles.

•   A single click with no modifier on a file's icon selects it (deselecting any other file).

•   A double click with no modifier selects and opens it (deselecting any other file).

•   A single click with a Control modifier does not deselect previously selected files, but adds the clicked file to the selection list instead.

•   A single click with a Shift modifier adds to the selection list any file between the previously selected one and the clicked one.

•   A dragging motion on no file with no modifier draws a rectangle selecting anything inside it (deselecting any other file).

•   A dragging motion on no file with either the Control or Shift modifiers draws a rectangle adding to the selection list anything inside it.

•   A dragging motion on a file initiates a drag-and-drop operation with the selected files. The dragged files can be then dropped on a directory on the current xfiles window, or on another window supporting the XDND protocol. The dragging motion can be modified by Control (forcing a copy operation); Shift (forcing a move operation); or Control + Shift (forcing a symbolik linking operation);

  Mouse button 2, 4, and 5
The second, fourth and fifth buttons (the middle button click, scroll up and scroll down) are used for scrolling. No modifier applies to those buttons. The second button pops up the scroller. The scroller is a small widget that replaces the scrollbar in xfiles; it can be used either as a scrollbar or as Firefox's autoScroll.

•   A press on the second button pops up the scroller. Moving the pointer up or down scrolls the list of files up or down. If the button is release while the pointer is outside the scroller, the scroller is closed.

•   After pressing the second button (as in the previous bullet item), if it is released while the pointer is inside the scroller, the scroller is not closed. The scroller handle (a small bar inside the scroller) can be dragged up and down, scrolling the list of files up or down. Pressing any button closes the scroller.

•   Holding the fourth button scrolls the list of files up.

•   Holding the fifth button scrolls the list of files down.

  Mouse button 3
The third button (usually the right one) is used to pop up a menu with xfilesctl. No modifier applies to that button.

•   Pressing the third button while there are one or more files selected invokes xfilesctl with the paths of all the selected files passed as arguments.

•   Pressing the third button on a file's icon while there's no file selected selects that file and invokes xfilesctl with its path passed as argument.

•   Pressing the third button on nothing while there's no file selected invokes xfilesctl with no argument.

  Mouse buttons 8 and 7
The eighth and ninth mouse buttons (previous and next) are used for navigating through the browsing history.

•   Clicking the eigth mouse button goes to the previously open directory.

•   Clicking the ninth mouse button goes to the next open directory.

  Other mouse buttons
The sixth and seventh mouse buttons (scroll left and scroll right) are not used, since xfiles does not scroll horizontally.

  Default keys.
The following keys (and their number keyboard counterparts) can control xfiles by, for example, scrolling the window, or highlighting or selecting files.

Escape
    Deselect everything.

Enter/Return
    Select and open highlighted file.

Menu
    Invoke xfilesctl with the menu command on selected files.

Space
    Select highlighted file.

PageUp
    Scroll up.

PageDown
    Scroll down.

Home
    Highlight and select the first file (deselecting any other file). If modified by Control, does not deselect previously selected files. If modified by Shift, does not deselect previously selected files, and select any file between the first file and the previously highlighted one.

End Highlight and select the last file (deselecting any other file). If modified by Control, does not deselect previously selected files. If modified by Shift, does not deselect previously selected files, and select any file between the last file and the previously highlighted one.

Left, Down, Up, Right or h, j, k, l
    Highlight and select the file in the given direction (deselecting any other file). If modified by Control, does not deselect previously selected files. If modified by Shift, does not deselect previously selected files, and select any file between the target file and the previously highlighted one.

Ctrl +. (Period)
    Hide/show hidden files and directories.

  Extra keys
The letter, digit and punctuation keys, when modified by Control, the function keys (F1~F13), and a few other keys (like "Delete" and "Backspace" can be used, modified or not by Shift, to invoke xfilesctl. The following keys are handled by default by the xfilesctl script provided with xfiles:

Ctrl-G or Ctrl-L
    Invoke dmenu(1) to act as an URL bar and change the current directory.

F5 or Ctrl-R
    Refresh the current directory.

BackSpace
    Go to parent directory.

Delete
    Pop up a terminal dialog asking whether to send selected files to trash.

ICONS
xfiles can display a custom icon for a file based on a glob(3) pattern matching the file. For example, files matching *.png are drawn with the image icon.

The list of icons supported by files and the glob patterns associated to them are the following, in order of precedence of matching.

up_dir
    ".."

archive
    "*.zip, *.tar, *.gz, *.bz2, *.rar"

audio
    "*.mp[23], *.m4a, *m3u, *.ogg, *.opus, *.flac"

core
    "*.core"

image
    "*.xbm, *.xpm, *.p[bgp]m, *.png, *.bmp, *.gif, *.tiff, *.jpeg, *.jpg, *.gif, *.svg"

info
    "*.[1-9], README, README.md, COPYING, LICENSE, COPYRIGHT"

makefile
    "[Mm]akefile, configure, configure"

document
    "*.pdf, *.epub, *.txt, *.ps, *.eps, *.djvu"

object
    "*.o, *.so, *.a"

video
    "*.mp4, *.webm, *.mkv, *.mov, *.ogv"

home_dir
    "~/"

dir "*" (for directories).

file
    "*"

The following icons have no associated glob patterns (but custom patterns can be installled with the fileIcons X resource).
•   executable
•   code
•   config
•   apps_dir
•   code_dir
•   database_dir
•   documents_dir
•   downloads_dir
•   games_dir
•   images_dir
•   config_dir
•   meme_dir
•   mount_dir
•   music_dir
•   videos_dir
•   link_dir

RESOURCES
xfiles understands the following X resources. They must be prefixed with either the "XFiles" class or the name given with the -N command-line option, followed by a period.

activeBackground
    Background color for selected entries.

activeForeground
    Text color for selected entries.

background
    Background color.

faceName
    Font for drawing text. If the value is prefixed with "xft:" (case insensitive), then xfiles uses the Xft library for drawing text; and fallback fonts can be specified by delimiting the fonts with commas. If the value is prefixed with "x:" or "x11:" (case insensitive), then xfiles uses the X11 library for drawing text; if only one font is specified, regular X11 fonts are used; if two or more fonts are specified (delimited with commas), a XFontSet is used (but that is not reliable, and depends on the locale, so it is better to not use more than one X11 font).

faceSize
    The size, in points, of the font. This only affects Xft fonts.

fileIcons
    Sequence of associations between file patterns and icon names. Each association has the form PATTERN=ICON. And associations must be delimited with either newline characters or colon characters. See ICONS above for a list of supported icons.

foreground
    Text color.

opacity
    Background opacity as a floating point number from 0.0 to 1.0.

statusBarEnable, enableStatusBar
    Whether a status bar listing information about the highlighted file should be displayed. The status bar can be enabled (if this resource is set to true) or disabled (if set to false). Either option can be used (they are synonyms).

PROPERTIES
xfiles sets the following properties on its window:

_CONTROL_CWD
    Contains the current working directory.

_CONTROL_STATUS
    Contains information about the current highlighted file (the same information displayed on the status bar, if enabled).

xfiles reads the following properties on its window:

_CONTROL_GOTO
    When this property is changed, xfiles tries to change the directory to the path this property is set to, if possible.

ENVIRONMENT
The following environment variables affect the execution of xfiles.

CACHEDIR
    Path to a cache directory where the thumbnails directory is created.

DISPLAY
    The display to start xfiles on.

OPENER
    Program to be called to open files. Defaults to xdg-open(1).

RESOURCES_NAME
    Specify the name used to retrieve resources. See -N above.

RESOURCES_DATA
    Specify additional resources. See -X above.

XDG_CACHE_HOME
    Value used when CACHEDIR is not set.

The following environment variables are set by xfiles and can affect the execution of the commands run by it.

WINDOWID
    A string containing the id number, in decimal ASCII characters, of the X Window created by the current xfiles process. Note that this string contains the number in decimal notation, not in hexadecimal (as is usually exchanged by a few X applications).

SEE ALSO
dmenu(1), xmenu(1), X(7)