diff --git a/ewwtilities/src/calendar_background.rs b/ewwtilities/src/calendar_background.rs index 6628294..1f95072 100644 --- a/ewwtilities/src/calendar_background.rs +++ b/ewwtilities/src/calendar_background.rs @@ -142,7 +142,20 @@ pub fn run_calendar(args: &CliArgs) { } } - println!("{}", serde_json::to_string(&output_state).unwrap()); + + if !output_state.has_bg { + println!("rgba(0, 0, 0, 0.0)"); + } else { + let gradient_color = if output_state.is_sun { + "#ffa500" + } else { + "#d3d3d3" + }; + + println!("linear-gradient({}deg, {}, #262626)", (output_state.gradient_angle_percentage * 180.0 - 90.0) as u32, gradient_color); + } + + // println!("{}", serde_json::to_string(&output_state).unwrap()); } fn parse_time(i: &str) -> Option {