mirror of https://github.com/bobwen-dev/hunter
use xdg-open exclusively
This commit is contained in:
parent
cdaacd1ca6
commit
7f708df9bd
|
@ -92,7 +92,7 @@ cargo install (--no-default-features --features=...) --path .
|
||||||
```
|
```
|
||||||
|
|
||||||
## NOTE:
|
## 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
|
## 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):
|
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):
|
||||||
|
|
|
@ -409,7 +409,7 @@ impl FileBrowser {
|
||||||
self.core.get_sender().send(Events::InputEnabled(false))?;
|
self.core.get_sender().send(Events::InputEnabled(false))?;
|
||||||
self.core.screen.suspend().log();
|
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())
|
.args(file.path.file_name())
|
||||||
.status();
|
.status();
|
||||||
|
|
||||||
|
@ -421,10 +421,10 @@ impl FileBrowser {
|
||||||
match status {
|
match status {
|
||||||
Ok(status) =>
|
Ok(status) =>
|
||||||
self.core.show_status(&format!("\"{}\" exited with {}",
|
self.core.show_status(&format!("\"{}\" exited with {}",
|
||||||
"rifle", status)).log(),
|
"xdg-open", status)).log(),
|
||||||
Err(err) =>
|
Err(err) =>
|
||||||
self.core.show_status(&format!("Can't run this \"{}\": {}",
|
self.core.show_status(&format!("Can't run this \"{}\": {}",
|
||||||
"rifle", err)).log()
|
"xdg-open", err)).log()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue