Skip to content

Commit

Permalink
feat: remove wallpaper.set option
Browse files Browse the repository at this point in the history
  • Loading branch information
InioX committed Nov 13, 2024
1 parent 3964f7b commit 2b173e7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion example/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[config.wallpaper]
command = "swww"
arguments = ["img", "--transition-type", "center"]
set = true
# pre_hook = ""

[config.custom_keywords]
Expand Down
6 changes: 1 addition & 5 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ pub fn set_wallpaper(source: &Source, wallpaper_cfg: wallpaper::Wallpaper) -> Re
#[cfg(feature = "web-image")]

Check warning on line 63 in src/helpers.rs

View workflow job for this annotation

GitHub Actions / cargo fmt

Diff in /home/runner/work/matugen/matugen/src/helpers.rs

Check warning on line 63 in src/helpers.rs

View workflow job for this annotation

GitHub Actions / cargo fmt

Diff in /home/runner/work/matugen/matugen/src/helpers.rs
Source::WebImage { .. } => return Ok(()),
};
if !wallpaper_cfg.set {
return Ok(warn!(
"<d>Wallpaper setting disabled, not setting wallpaper...</>"
));
};

#[cfg(target_os = "windows")]
wallpaper::windows::set(path)?;
#[cfg(target_os = "macos")]
Expand Down
1 change: 0 additions & 1 deletion src/wallpaper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Wallpaper {
pub set: bool,
/// Useful for, for example, killing the wallpaper daemon
pub pre_hook: Option<String>,
pub command: String,
Expand Down

0 comments on commit 2b173e7

Please sign in to comment.