Skip to content

Commit

Permalink
Merge pull request #58 from ysekka/master
Browse files Browse the repository at this point in the history
  • Loading branch information
yavko authored Jun 22, 2023
2 parents d62bec2 + fb3ceda commit 2102b86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/ctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,12 @@ pub mod set_error {
pub mod notify {
use super::*;
use std::time::Duration;
#[repr(u8)]

#[allow(missing_docs)]
#[derive(Copy, Clone)]
#[repr(i8)]
pub enum Icon {
NoIcon = -1,
Warning = 0,
Info = 1,
Hint = 2,
Expand All @@ -189,7 +192,7 @@ pub mod notify {
command!(
Empty,
"notify {} {} {color} {msg}",
icon as u8,
icon as i8,
time.as_millis()
),
)?;
Expand All @@ -207,7 +210,7 @@ pub mod notify {
command!(
Empty,
"notify {} {} {color} {msg}",
icon as u8,
icon as i8,
time.as_millis()
),
)
Expand All @@ -217,8 +220,8 @@ pub mod notify {
}

/// A 8-bit color with a alpha channel
#[derive(MDisplay, Constructor)]
#[display(fmt = "rgba({},{},{},{})", "_0", "_1", "_2", "_3")]
#[derive(Copy, Clone, MDisplay, Constructor)]
#[display(fmt = "rgba({:02x}{:02x}{:02x}{:02x})", "_0", "_1", "_2", "_3")]
pub struct Color(u8, u8, u8, u8);

/// Provides things to setting props
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ pub(crate) mod unix_async {
}

/// This type provides the result type used everywhere in Hyprland-rs
pub type Result<T> = std::result::Result<T, shared::HyprError>;
pub type Result<T> = std::result::Result<T, shared::HyprError>;

0 comments on commit 2102b86

Please sign in to comment.