diff --git a/Cargo.toml b/Cargo.toml index d0a3b6e..254fb40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ authors = [ description = "Library for interacting with the system's taskbar / tray / statusbar " license = "MIT/Apache-2.0" repository = "https://github.com/rust-sysbar/rust-sysbar" +edition = "2018" [dependencies] @@ -18,3 +19,6 @@ core-graphics = "0.19.0" objc-foundation = "0.1" objc_id = "0.1" libc = "0.2" + +[target.'cfg(target_os = "linux")'.dependencies] +ksni = "0.2" \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 1a11c7a..1e17947 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,7 @@ #[cfg(target_os = "macos")] mod mac_os; +#[cfg(target_os = "linux")] +mod linux; #[cfg(target_os = "macos")] #[macro_use] @@ -27,3 +29,6 @@ impl Sysbar { #[cfg(target_os = "macos")] type SysbarImpl = mac_os::MacOsSysbar; + +#[cfg(target_os = "linux")] +type SysbarImpl = linux::LinuxSysbar; \ No newline at end of file