|Michał Góral 1068de3ca2 whitespaces||4 months ago|
|cmake||4 months ago|
|devtools||4 months ago|
|src||4 months ago|
|tests||4 months ago|
|.gitignore||4 months ago|
|CMakeLists.txt||4 months ago|
|LICENSE||4 months ago|
|README.md||4 months ago|
Yet Another xdg-open.
It’s a file opener which replaces a well-known xdg-open script and extends its configuration capabilities. It was directly inspired by Rifle, a file opener for Ranger file manager.
Yaxo uses CMake build system. The following commands will build and install its
Release version in
$ mkdir build && cd build $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make $ make install
You can change installation path like this:
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local ..
Yaxo searches for configuration in e.g.
~/.config/yaxo/yaxorc. Each line of
yaxorc contains a comma-separated list of conditions, followed by a colon,
followed by a command executed when all of conditions are met. Following
conditions are supported:
ext <regex>: regular expression matching a file extension
mime <regex>: regular expression matching file’s mimetype
scheme <regex>: regular expression matching scheme of first passed argument (e.g.
if <property>: a condition checking environment settings. The following properties can be checked:
terminal: set to true if yaxo is executed from a terminal
X: set to true if X server is running
if <property> can be negated by adding exclamation mark before a property
name (so for example
if !terminal assures that command is not executed inside
Conditions are checked from top to bottom. First command which matches all conditions is executed.
ext txt, if terminal: vim -- "$@" ext txt, if X: xterm -e vim -- "$@" mime text/.*, if terminal: vim -- "$@" mime text/.*, if X: st -e vim -- "$@" # Browser. ext x?html?, if X: firefox -- "$@" ext x?html?, if terminal: w3m -- "$@" scheme https?, if X: firefox -- "$@" scheme https?, if terminal: w3m -- "$@" # default file manager mime inode/directory: vifm -- "$@" # catch-all rules ext .*, if terminal: vim -- "$@" ext .*, if !terminal: st -e vim -- "$@"
$ cmake -DTESTS=on .. $ make $ make test (or ./tests)