Skip to content

Commit 13ad8f4

Browse files
author
Rehan Rana
committed
Reverting to push back to last release
This reverts commit 979390e.
1 parent d27487f commit 13ad8f4

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

src/lib.rs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -443,17 +443,10 @@ qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "
443443
let xfce_script = format!("{}{}{}", xfce_script_beg, filepath_set, xfce_script_end);
444444
let xfce_script_alt = format!("{}{}{}", xfce_script_alt_beg, filepath_set, xfce_script_end);
445445

446-
//to avoid uninitialized variable error
447-
//safe because its not used unless custom backend specified
448-
let mut backend_split: Vec<&str> = vec![];
449-
450446
let mut cust_backend = false;
451447
if let Some(back) = backend {
452448
curr_de = UniCase::new(back);
453449
cust_backend = true;
454-
for word in back.split_whitespace() {
455-
backend_split.push(word);
456-
}
457450
}
458451

459452
if gnome.contains(&curr_de) {
@@ -480,29 +473,9 @@ qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "
480473
feh_handle
481474
.spawn()
482475
.map_err(|_| Errors::ProgramRunError(String::from("Feh")))?;
483-
} else if cust_backend {
484-
let mut backend_split = backend_split.into_iter();
485-
let mut cust_handle = Command::new(backend_split.next().unwrap());
486-
let mut wall_sent = false;
487-
for word in backend_split {
488-
if word == "!WALL" {
489-
wall_sent = true;
490-
cust_handle.arg(filepath_set);
491-
} else {
492-
cust_handle.arg(word);
493-
}
494-
}
495-
496-
if !wall_sent {
497-
cust_handle.arg(filepath_set);
498-
}
499-
500-
cust_handle.spawn().map_err(|_|Errors::ProgramRunError(curr_de.to_string()))?;
501-
}
502-
else {
476+
} else {
503477
return Err(Errors::BackendNotFoundError(curr_de.to_string()).into());
504478
}
505-
506479
println!("{} has been set as your wallpaper", filepath_set);
507480
Ok(())
508481
}

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub mod time_track;
3535
#[derive(StructOpt, Default)]
3636
#[structopt(
3737
about = "Helps user set a dynamic wallpaper and lockscreen. Make sure the wallpapers are named in numerical order based on the order you want. For more info and help, go to https://github.com/RAR27/dyn-wall-rs",
38+
author = "Rehan Rana <[email protected]>"
3839
)]
3940
#[derive(Serialize, Deserialize, Debug, PartialEq)]
4041
struct Args {

0 commit comments

Comments
 (0)