diff --git a/espanso/src/cli/worker/ui/icon.rs b/espanso/src/cli/worker/ui/icon.rs index 9410052..0b7a3f1 100644 --- a/espanso/src/cli/worker/ui/icon.rs +++ b/espanso/src/cli/worker/ui/icon.rs @@ -29,7 +29,6 @@ const WINDOWS_ICO_BINARY: &[u8] = include_bytes!("../../../res/windows/espanso.i const WINDOWS_RED_ICO_BINARY: &[u8] = include_bytes!("../../../res/windows/espansored.ico"); // TODO: macos -// TODO: linux #[derive(Debug, Default)] pub struct IconPaths { @@ -53,8 +52,15 @@ pub fn load_icon_paths(runtime_dir: &Path) -> Result { }) } +#[cfg(target_os = "linux")] +pub fn load_icon_paths(runtime_dir: &Path) -> Result { + Ok(IconPaths { + logo: Some(extract_icon(ICON_BINARY, &runtime_dir.join("icon.png"))?), + ..Default::default() + }) +} + // TODO: macos -// TODO: linux // TODO: test fn extract_icon(data: &[u8], target_file: &Path) -> Result { diff --git a/espanso/src/res/linux/icon.png b/espanso/src/res/linux/icon.png deleted file mode 100644 index 9bde0d2..0000000 Binary files a/espanso/src/res/linux/icon.png and /dev/null differ