Skip to content

Commit

Permalink
fix: add dump-json to default features
Browse files Browse the repository at this point in the history
  • Loading branch information
InioX committed Nov 13, 2024
1 parent bc520c5 commit ebcff10
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ winapi = { version = "0.3", features = ["winuser"] }
enquote = "1.1.0"

[features]
default = ["dump-json"]
update-informer = ["dep:update-informer"]
web-image = ["dep:reqwest"]
dump-json = ["dep:serde_json"]
Expand Down
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 ebcff10

Please sign in to comment.