Skip to content

Commit

Permalink
feat: Let users customize fade speed/bezier
Browse files Browse the repository at this point in the history
  • Loading branch information
donovanglover committed Jul 26, 2023
1 parent d6d8490 commit 6129190
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main.rs
Expand Up @@ -13,6 +13,14 @@ struct Cli {
/// How many milliseconds to wait
#[arg(short, long, default_value_t = 800)]
duration: u64,

/// Fade animation speed
#[arg(short, long, default_value_t = 7)]
fade: u64,

/// Bezier curve used for the animation
#[arg(short, long, default_value = "default")]
bezier: String,
}

// (1): Keep track of how many threads are running
Expand Down Expand Up @@ -98,6 +106,10 @@ fn main() -> hyprland::Result<()> {

let _ = Keyword::set("decoration:dim_inactive", "yes");

let result = format!("{}{}{}{}", "fadeDim,1,", cli.fade, ",", cli.bezier);

let _ = Keyword::set("animation", result);

let mut event_listener = EventListener::new();

// On active window changes
Expand Down

0 comments on commit 6129190

Please sign in to comment.