Removed bash dependency

master
Benjamin Bädorf 2020-07-30 18:42:06 +02:00
parent 0224d5075d
commit 9d33ffbe72
No known key found for this signature in database
GPG Key ID: 4406E80E13CD656C
2 changed files with 3 additions and 5 deletions

View File

@ -4,6 +4,4 @@ version = "0.1.0"
authors = ["Benjamin Bädorf <hello@benjaminbaedorf.eu>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -90,7 +90,7 @@ fn get_valid_screens_for_recording(config: &Config) -> Vec<String> {
command.push_str(workspace.as_str());
}
command.push_str(")) | map(.output) | .[]'");
let output = Command::new("bash")
let output = Command::new("sh")
.args(&["-c", command.as_str()])
.output()
.expect("Couldn't get current focus");
@ -111,7 +111,7 @@ fn get_screen_index(screen: &String) -> String {
let mut command = "swaymsg -t get_outputs | jq -r 'map(.name==\"".to_string();
command.push_str(screen.as_str());
command.push_str("\") | index(true) + 1'");
let output = Command::new("bash")
let output = Command::new("sh")
.args(&["-c", command.as_str()])
.output()
.expect("Couldn't get screen index");
@ -157,7 +157,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let valid_screens = get_valid_screens_for_recording(&config);
let mut recorder = record_screen(&mut config, &valid_screens)?;
let stdout = match Command::new("bash")
let stdout = match Command::new("sh")
.args(&["-c", "swaymsg -t subscribe -m \"['window']\""])
.stdout(Stdio::piped())
.stderr(Stdio::piped())