use xdg-open exclusively

This commit is contained in:
rabite 2019-05-23 21:20:35 +02:00
parent cdaacd1ca6
commit 7f708df9bd
2 changed files with 4 additions and 4 deletions

View File

@ -92,7 +92,7 @@ cargo install (--no-default-features --features=...) --path .
```
## NOTE:
hunter uses [ranger's rifle](https://github.com/ranger/ranger/blob/master/ranger/ext/rifle.py) to open files if rifle is in your $PATH. If it can't find rifle it uses xdg-open. It also uses ranger's scope.sh to generate previews for non-text files. A slightly modified version is included in the "extra" directory. Put it in your $PATH somewhere if you want previews for non-text files.
hunter uses ranger's scope.sh to generate previews for non-text files. A slightly modified version is included in the "extra" directory. Put it in your $PATH somewhere if you want previews for non-text files.
## Configuration
hunter reads $XDG_CONFIG_HOME/hunter/config at startup. On macOS it simply reads ~/.config/hunter/config. There are a few options which can be set. The configuration file is read asynchronously, so if it's not read by the time hunter starts drawing you will see its default configuration until the config file is read. Options can be set like this (default config):

View File

@ -409,7 +409,7 @@ impl FileBrowser {
self.core.get_sender().send(Events::InputEnabled(false))?;
self.core.screen.suspend().log();
let status = std::process::Command::new("rifle")
let status = std::process::Command::new("xdg-open")
.args(file.path.file_name())
.status();
@ -421,10 +421,10 @@ impl FileBrowser {
match status {
Ok(status) =>
self.core.show_status(&format!("\"{}\" exited with {}",
"rifle", status)).log(),
"xdg-open", status)).log(),
Err(err) =>
self.core.show_status(&format!("Can't run this \"{}\": {}",
"rifle", err)).log()
"xdg-open", err)).log()
}
}
Ok(())