[dev] XFiles: A modular X11 file browser and work in progress

From: Lucas de Sena <lucas_AT_seninha.org>
Date: Tue, 3 Jan 2023 15:02:50 -0300

Hi, I have been working the last couple of weeks on XFiles[1], a GUI
file browser for X11 with modular design and appeal to configurability.
I'd like to hear your opinions on the project.

[1]: https://github.com/phillbush/xfiles

I learned how to use Xlib mainly from Suckless applications, and want to
use that knowledge to produce more simple X11 programs I can share with
you.

Being a GUI application, XFiles is controlled by a three-button mouse:
- First button selects and opens files with the $OPENER program.
- Second button pops up the scroller (an alternative to scrollbar)
- Third button calls the $XFILES_CONTEXTCMD program (usually xmenu).

It is also controlled by key presses (arrow keys to highlight a file,
space to select, menu button to call the menu program, Enter to open
a file, etc).

Being a simple application, it does not do much by itself, and depends
on separate applications to complement it:

- It does not open files. Instead, double-clicking (or pressing Enter)
  on a file calls the program set in the $OPENER environment variable
  (xdg-open by default).

- It does not generate or cache thumbnails. Instead, it uses the
  $THUMBNAILER program to generate them. XFiles comes with a thumbnail
  script that uses ffmpegthumbnailer, ImageMagick and pdftoppm to
  generate thumbnails based on files' extensions.

- It does not have a context menu. Instead, it uses a script set in the
  $XFILES_CONTEXTCMD environment variable. This script must call xmenu,
  pmenu, thingmenu, jgmenu, or any other mouse-controllable menu; and
  gets as argument the paths to selected files.

It also does not do copying or pasting. Instead, selected files are
saved into the PRIMARY selection, and you can use xsel(1) or xclip(1)
to perform copying and pasting with the $XFILES_CONTEXTCMD script.

XFiles does not mess with your filesystem unless explicitly told to do
so. Thumbnails (aka miniatures) are only generated and cached when both
the $THUMBNAILER and $THUMBNAILDIR environment variables are set to the
thumbnail script and the directory to save thumbnails, respectively.

You can also use custom icons by setting the $FILE_ICONS environment
variable. XFiles comes with a few .xpm icons I have drawn myself.

More information on the mdoc manual that comes with it.

Hope you like it!

Have a good new year,
Lucas de Sena (aka seninha).
Received on Tue Jan 03 2023 - 19:02:50 CET

This archive was generated by hypermail 2.3.0 : Tue Jan 03 2023 - 19:12:07 CET