Support XCLIP_PATH at compilation to control the path to xclip
If the `XCLIP_PATH` env var is set during compilation, it will be used to determine what binary to invoke for copying to the clipboard on Linux. Otherwise `xclip` will be looked up in the `PATH`. Fixes #71.
This commit is contained in:
parent
f9dcdb0531
commit
8bcf0e4a0e
1 changed files with 1 additions and 1 deletions
|
@ -297,7 +297,7 @@ pub fn set_clipboard(content: String) -> Result<(), ClipboardError> {
|
|||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
// Open an xclip process
|
||||
let mut process = match Command::new("xclip")
|
||||
let mut process = match Command::new(option_env!("XCLIP_PATH").unwrap_or("xclip"))
|
||||
.arg("-sel")
|
||||
.arg("clip")
|
||||
.stdin(Stdio::piped())
|
||||
|
|
Loading…
Reference in a new issue