obrowse

obrowse is an Open­box pipemenu file browser. It can open files and fold­ers with a pre­de­fined default appli­ca­tion and can dis­play files and fold­ers in sev­eral ways. It has some con­fig­u­ra­tion options shown below.

Usage in shell

tl;dr Skip to next sec­tion for screen­shots and exam­ples on how to set up obrowse in a pipe menu.

For get­ting some hints on call­ing obrowse sim­ply run it in a ter­mi­nal win­dow and read the help message.

$ obrowse
Usage: obrowse.py [options] directory

Options:
  --version           show program's version number and exit
  -h, --help          show this help message and exit
  -n, --no-icons      don’t use file and folder icons
  -d, --dotfiles      show dot files
  -r, --dotfolders    show dot folders
  -f, --folders-only  discard files (only show folders)
  -u, --files-only    discard folder (only show files)
  -m, --mix           don’t separate folders and files
  -p, --pipemenu      print pipemenu even in shell
  -i, --info          prints usage informations

When call­ing obrowse with­out any spe­cial para­me­ters and just pro­vid­ing the direc­tory name it lists all reg­u­lar files and fold­ers in this directory.

$ obrowse.py
examples
--------------------------------------------------------------------------
[D] folder1
[D] folder2
[D] folder3
[D] folder4
[D] folder5
[D] folder6
--------------------------------------------------------------------------
[F] file1
[F] file2
[F] file3
[F] file4
[F] file5
[F] file6

If you want to see hid­den files, too, just use para­me­ter -d. You can add hid­den fold­ers by using -r as addi­tional parameter.

$ obrowse -dr ~/examples
examples
--------------------------------------------------------------------------
[D] folder1
[D] folder2
[D] folder3
[D] folder4
[D] folder5
[D] folder6
--------------------------------------------------------------------------
[F] file1
[F] file2
[F] file3
[F] file4
[F] file5
[F] file6
--------------------------------------------------------------------------
[D] .hiddenfolder1
[D] .hiddenfolder2
[D] .hiddenfolder3
[D] .hiddenfolder4
[D] .hiddenfolder5
[D] .hiddenfolder6
--------------------------------------------------------------------------
[F] .hiddenfile1
[F] .hiddenfile2
[F] .hiddenfile3
[F] .hiddenfile4
[F] .hiddenfile5
[F] .hiddenfile6

If you need only the hid­den files, use -d for show­ing them, and -f and -u for hid­ing reg­u­lar files and folders.

$ obrowse -dfu ~/examples
examples
--------------------------------------------------------------------------
[F] .hiddenfile1
[F] .hiddenfile2
[F] .hiddenfile3
[F] .hiddenfile4
[F] .hiddenfile5
[F] .hiddenfile6

… and so on.

Use obrowse as Open­box pipe menu

Because of some fiddely-​diddely magic (uhm, well … g) obrowe detects wether it’s called in shell or as Open­box pipe menu (if you pass the para­me­ter -p obrowse always prints the pipe menu struc­ture, even if called from an inter­ac­tive shell).

<menu id="browsermyhome" label="home"
  execute=".scripts/obrowse.py ~"
  icon=".icons/tango16/status/info.png" />

All obrowse call exam­ples from shell usage sec­tion are work­ing as pipe menu entries, too.

Example image 1 Example image 2 Example image 3 Example image 4

But let’s stick with the sim­ple call. You need a con­fig­u­ra­tion file located at ${HOME}/.config/obrowse/config.cfg. In this file all the base con­fig­u­ra­tion goes. You need at leas one sec­tion with two options as min­i­mal configuration.

[general]
cmd = rox "%s"
open = open %s

The option cmd defines what pro­gram should be used for open­ing files and fold­ers. You might want to use a MIME aware appli­ca­tion here, such as every mod­erm file man­ager, or xdg-open. The option open defines the text for the folder head­ers. In cmd the para­me­ter %s is the unescaped full path of the filen or folder and in open it’s the basename.

For hav­ing icons (if not dis­abled via -n in obrowse call) you need another section.

[icons]
open = /path/to/open-icon.png
folders = /path/to/folders-icon.png
files = /path/to/files-icon.png

This icons get used by default. I had some tests on MIME aware detec­tion of files and assign­ing the cor­rect icon, but it took waaaaay to long for open fold­ers with a lot of files, so I ditched it and now there are only default icons. But you can assign spe­cial icons for files and fold­ers (please use with care!)

[/home/dirk/examples/folder1/subfolder1-2]
icon = /usr/share/icons/Tango/16x16/actions/stop.png

[/home/dirk/examples/folder2]
icon = /usr/share/icons/Tango/16x16/apps/gnome-help.png

[/home/dirk/examples/file4]
icon = /usr/share/icons/Tango/16x16/status/weather-severe-alert.png

As you can see, the sec­tions are always the com­plete file/​folder name.

Example image 5

I think you got, how this works. It’s use­ful to style spe­cial files and fold­ers in a dif­fer­ent way. For exam­ple your “Doc­u­ments” folder, or an impor­tant file. But same here: If used too much, this will kill the performance.

Another good option is the hide option for spe­cial files/​folders. This works in the same way like the icon option. Instead of set­ting an icon the entry just hides the com­plete file/​folder from obrowse.

[/home/dirk/examples/folder1/subfolder1-4]
hide = True

[/home/dirk/examples/folder2]
hide = do it

[/home/dirk/examples/file4]
hide = false

[/home/dirk/examples/file6]
hide = 

The hide option just has to be present. Doesn’t mat­ter what value you assign to it. Even an empty option line start­ing with hide = is enough.

Example image 6

Don’t for­get: All this options work with hid­den files and fold­ers, too.

Arch Linux

If you use Arch Linux, check die AUR for obrowse-​git. The Arch Linux pack­age uses the lat­est sources from GitHub.

Download sources

See GitHub for details. All my code is available under GPLv3 or later.