summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrabite <rabite@posteo.de>2019-05-23 21:20:35 +0200
committerrabite <rabite@posteo.de>2019-05-23 21:20:35 +0200
commit7f708df9bd161132e41b29896910e119587e0bb0 (patch)
tree7bb49fb70db4a4c8395075eb6e3edc0a7e1a3c2c
parentcdaacd1ca6300a037140c01cce1d788bebf9baee (diff)
use xdg-open exclusively
-rw-r--r--README.md2
-rw-r--r--src/file_browser.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 48893f1..8280691 100644
--- a/README.md
+++ b/README.md
@@ -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):
diff --git a/src/file_browser.rs b/src/file_browser.rs
index e01f4b8..ad15d01 100644
--- a/src/file_browser.rs
+++ b/src/file_browser.rs
@@ -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(())