From 686e88815c694234af691a629deeba9e04746639 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Thu, 16 Nov 2023 17:32:36 -0800 Subject: [PATCH] removed cli debug flags; updated error messages --- ewwtilities/src/calendar_background.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/ewwtilities/src/calendar_background.rs b/ewwtilities/src/calendar_background.rs index 38d0fd0..8f406c3 100644 --- a/ewwtilities/src/calendar_background.rs +++ b/ewwtilities/src/calendar_background.rs @@ -5,14 +5,11 @@ use serde::{Deserialize, Serialize}; use std::io::stdin; use std::io::IsTerminal; -use crate::CliArgs; -// use serde_json; - -pub fn run_calendar(args: &CliArgs) { +pub fn run_calendar() { let in_pipe = stdin(); if in_pipe.is_terminal() { - error!("Calendar Background process requires an input redirection (use a pipe)"); - panic!("Expected to be used with a pipe, but was not"); + error!("Workspace Selector process requires being run as a terminal process"); + panic!("Expected to be run in a terminal process, but was not"); } let (mut moonrise, mut moonset, mut moonday, mut sunrise, mut sunset): ( @@ -51,9 +48,7 @@ pub fn run_calendar(args: &CliArgs) { moonphase = match phase.trim()[0..2].parse::() { Ok(val) => Some(val), Err(e) => { - if args.debug { - debug!("Error parsing: {e}"); - } + debug!("Error parsing: {e}"); None } }; @@ -142,7 +137,6 @@ pub fn run_calendar(args: &CliArgs) { } } - if !output_state.has_bg { println!("linear-gradient(0deg, rgba(26, 26, 26, 1), rgba(50, 50, 50, 1))"); } else { @@ -152,7 +146,11 @@ pub fn run_calendar(args: &CliArgs) { "#d3d3d3" }; - println!("linear-gradient({}deg, {}, rgba(26, 26, 26, 0.0) 30%)", (output_state.gradient_angle_percentage * 180.0 + 90.0) as i32, gradient_color); + println!( + "linear-gradient({}deg, {}, rgba(26, 26, 26, 0.0) 30%)", + (output_state.gradient_angle_percentage * 180.0 + 90.0) as i32, + gradient_color + ); } // println!("{}", serde_json::to_string(&output_state).unwrap());