-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCargo.toml
More file actions
117 lines (102 loc) · 4.57 KB
/
Copy pathCargo.toml
File metadata and controls
117 lines (102 loc) · 4.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[package]
name = "rust_cat"
version = "2.4.2"
edition = "2021"
description = "An animated tray cat (or parrot) whose animation speed tracks real-time CPU usage"
license = "Apache-2.0"
authors = ["Bearice Ren"]
repository = "https://github.com/bearice/RustCat"
homepage = "https://github.com/bearice/RustCat"
keywords = ["tray", "cpu", "monitor", "cat", "kde"]
categories = ["system-monitoring", "gui"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
trayicon = "0.5"
flate2 = "1.1"
# Use the bearice/trayicon-rs fork, which adds `MenuItem::Radio` / `MenuBuilder::radio`
# for mutually-exclusive icon/theme selection and fixes the KDE `LayoutUpdated`
# revision-0 bug that caused the icon menu to behave like a multi-select.
# A git rev is used (not a local path) so the Nix/flake (crane) build, which only
# copies this crate's tree, can fetch the fork reproducibly. For local hacking
# swap in: trayicon = { path = "../trayicon-rs" }
[patch.crates-io]
trayicon = { git = "https://github.com/bearice/trayicon-rs", rev = "e0baa0618f3a4b6babf7d8c9637e00bfbe4af15a" }
[target.'cfg(windows)'.dependencies]
winreg = "0.56.0"
[target.'cfg(target_os = "linux")'.dependencies]
dirs = "6.0"
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = "0.6"
objc2-app-kit = { version = "0.3" }
objc2-foundation = { version = "0.3" }
dirs = "6.0"
dispatch = "0.2.0"
[target.'cfg(windows)'.dependencies.windows]
version = "0.62"
features = [
"Win32_Foundation",
"Win32_UI_WindowsAndMessaging",
"Win32_UI_Shell",
"Win32_System_Threading",
"Win32_System_SystemInformation"
]
[profile.release]
opt-level = "z" # Optimize for size
strip = true # Strip debug symbols
lto = true # Enable Link Time Optimization
codegen-units = 1 # Reduce code generation units
panic = "abort" # Reduce panic code size
[build-dependencies]
flate2 = "1.1"
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"
[package.metadata.winres]
OriginalFilename = "rust_cat.exe"
FileDescription = "💻 => 🐈😺😸😹😻😼😽🐈⬛"
LegalCopyright = "Copyright © 2021 Bearice Ren <https://github.com/bearice/RustCat>"
# --- Debian package metadata (cargo-deb) ---
# Build with: cargo deb
[package.metadata.deb]
name = "rustcat"
maintainer = "Bearice Ren <https://github.com/bearice/RustCat>"
copyright = "2021-2026, Bearice Ren <https://github.com/bearice/RustCat>"
section = "utils"
priority = "optional"
extended-description = """\
RustCat is a lightweight tray application that displays an animated cat or \
parrot icon whose animation speed reflects real-time CPU usage. On Linux it \
integrates with KDE Plasma's system tray via the freedesktop \
StatusNotifierItem (SNI) protocol over D-Bus."""
# The binary only needs the standard C runtime; the helper tools are
# recommended (the app degrades gracefully if they are absent).
depends = "$auto"
recommends = "kdialog, plasma-systemmonitor | ksysguard | gnome-system-monitor"
assets = [
["target/release/rust_cat", "usr/bin/", "755"],
["assets/rustcat.desktop", "usr/share/applications/", "644"],
# Install the 256x256 PNG into the hicolor icon theme so KDE/GNOME
# launchers can resolve Icon=rustcat. .ico is not a supported format
# for the freedesktop icon-name lookup and shows a generic icon.
["assets/rustcat.png", "usr/share/icons/hicolor/256x256/apps/rustcat.png", "644"],
["README.md", "usr/share/doc/rustcat/README", "644"],
["LICENSE", "usr/share/doc/rustcat/LICENSE", "644"],
]
# --- RPM package metadata (cargo-generate-rpm) ---
# Build with: cargo generate-rpm
[package.metadata.generate-rpm]
name = "rustcat"
license = "Apache-2.0"
summary = "Animated tray cat whose speed tracks CPU usage"
description = "RustCat displays an animated cat or parrot tray icon whose animation speed reflects real-time CPU usage. Integrates with KDE Plasma via the StatusNotifierItem D-Bus protocol."
assets = [
{ source = "target/release/rust_cat", dest = "/usr/bin/rust_cat", mode = "755" },
{ source = "assets/rustcat.desktop", dest = "/usr/share/applications/rustcat.desktop", mode = "644" },
# hicolor PNG so launchers resolve Icon=rustcat (.ico is unsupported).
{ source = "assets/rustcat.png", dest = "/usr/share/icons/hicolor/256x256/apps/rustcat.png", mode = "644" },
]
# Dependency fields in cargo-generate-rpm use a table section (not inline
# arrays), per the 0.21 docs. Each key is a package, each value a version
# constraint ("*" = any). These are soft runtime hints.
[package.metadata.generate-rpm.recommends]
kdialog = "*"
plasma-systemmonitor = "*"