Skip to content

Commit e132aa7

Browse files
author
Rehan Rana
committed
Potential fix for xfce
1 parent 3025ea3 commit e132aa7

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/lib.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -428,15 +428,12 @@ qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "
428428
.arg("picture-uri")
429429
.arg(format!("'file://{}'", filepath_set));
430430

431-
let xfce_script_beg = r#"xfconf-query -c xfce4-desktop \
432-
-p /backdrop/screen0/monitor0/workspace0/last-image \
433-
-s ""#;
434-
let xfce_script_alt_beg = r#"xfconf-query -c xfce4-desktop \
435-
-p /backdrop/screen0/monitor0/workspace0/last-image \
436-
-s ""#;
437-
let xfce_script_end = r#"""#;
431+
//let xfce_script_beg = r#"xfconf-query -c xfce4-desktop \
432+
//-p /backdrop/screen0/monitor0/workspace0/last-image \
433+
//-s ""#;
434+
let xfce_script_beg = "xfconf-query -c xfce4-desktop -l | grep last-image | while read path; do xfconf-query -c xfce4-desktop -p $path -s ";
435+
let xfce_script_end = r#"; done"#;
438436
let xfce_script = format!("{}{}{}", xfce_script_beg, filepath_set, xfce_script_end);
439-
let xfce_script_alt = format!("{}{}{}", xfce_script_alt_beg, filepath_set, xfce_script_end);
440437

441438
//to avoid uninitialized variable error
442439
//safe because its not used unless custom backend specified
@@ -473,8 +470,6 @@ qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "
473470
} else if xfce.contains(&curr_de) {
474471
run_script::run(xfce_script.as_str(), &vec![], &ScriptOptions::new())
475472
.map_err(|_| Errors::ProgramRunError(String::from("XFCE Wallpaper Adjuster")))?;
476-
run_script::run(xfce_script_alt.as_str(), &vec![], &ScriptOptions::new())
477-
.map_err(|_| Errors::ProgramRunError(String::from("XFCE Wallpaper Adjuster")))?;
478473
} else if !cust_backend || curr_de == UniCase::new("feh") {
479474
feh_handle
480475
.spawn()

0 commit comments

Comments
 (0)