Compare commits
4 changed files with 14 additions and 36 deletions
21
Cargo.toml
21
Cargo.toml
|
|
@ -1,5 +1,3 @@
|
||||||
cargo-features = ["profile-rustflags"]
|
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "itop"
|
name = "itop"
|
||||||
description = "top program, made in iced"
|
description = "top program, made in iced"
|
||||||
|
|
@ -15,23 +13,6 @@ sysinfo = "0.39.6"
|
||||||
version = "0.14.0"
|
version = "0.14.0"
|
||||||
features = [ "canvas", "smol" ]
|
features = [ "canvas", "smol" ]
|
||||||
|
|
||||||
[profile.debug]
|
|
||||||
debug = true
|
|
||||||
strip = "none"
|
|
||||||
debug-assertions = true
|
|
||||||
overflow-checks = true
|
|
||||||
|
|
||||||
[profile.dev]
|
|
||||||
opt-level = 3
|
|
||||||
rustflags = ["-Clink-arg=-fuse-ld=mold"]
|
|
||||||
|
|
||||||
debug = false
|
|
||||||
strip = "debuginfo"
|
|
||||||
debug-assertions = false
|
|
||||||
overflow-checks = false
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
panic = "abort"
|
|
||||||
codegen-units = 1
|
|
||||||
lto = true
|
lto = true
|
||||||
strip = "symbols"
|
codegen-units = 1
|
||||||
|
|
|
||||||
20
flake.lock
generated
20
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"crane": {
|
"crane": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1793836618,
|
"lastModified": 1790899423,
|
||||||
"narHash": "sha256-TREenflwEjxOSq292FYwbc3kEm7TDRtXCZRNWEdjBmg=",
|
"narHash": "sha256-THGtz65UGJU+sonZidRboyCMk+9DclpMF7pwL4uDV4M=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "79fd63528501446749c09f08cad486a58c7d173e",
|
"rev": "47b6b27ed9a3a9181415e4367d0c30ab2a0e0250",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -20,11 +20,11 @@
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1791914995,
|
"lastModified": 1731533236,
|
||||||
"narHash": "sha256-Zf/xfQEAasnwnmEfHqW/4hjDE/s44yn2hD4RuVIZRjA=",
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "b7a79d3fea1e214f6d668d521cecec0c01e26544",
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -35,11 +35,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1794042290,
|
"lastModified": 1791260994,
|
||||||
"narHash": "sha256-VZ8WvA9m3XN36juXyg/GwbDRU2OezOHJlXpJCXkccv0=",
|
"narHash": "sha256-MFBjw66d4h06MvpW6lIl7RwarLteD0sk859CncGwb1Q=",
|
||||||
"rev": "f4a03c008967841f2a0b3cb7c436fc6fc31671f6",
|
"rev": "151fa4e8ddfdd8dd25d945ad94ed54a13de9f6e4",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1113206.f4a03c008967/nixexprs.tar.zst?lastModified=1794042290&rev=f4a03c008967841f2a0b3cb7c436fc6fc31671f6"
|
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1086391.151fa4e8ddfd/nixexprs.tar.zst?lastModified=1791260994&rev=151fa4e8ddfdd8dd25d945ad94ed54a13de9f6e4"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,7 @@
|
||||||
LD_LIBRARY_PATH = lib.makeLibraryPath dlDeps;
|
LD_LIBRARY_PATH = lib.makeLibraryPath dlDeps;
|
||||||
|
|
||||||
inputsFrom = [ crate ];
|
inputsFrom = [ crate ];
|
||||||
packages = with pkgs; [
|
packages = [ pkgs.rust-analyzer ];
|
||||||
rust-analyzer
|
|
||||||
mold
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ impl canvas::Program<app::Message, Theme, Renderer> for Graph {
|
||||||
frame.stroke(
|
frame.stroke(
|
||||||
&canvas::Path::new(|builder| {
|
&canvas::Path::new(|builder| {
|
||||||
for (index, value) in self.timeline.iter().enumerate() {
|
for (index, value) in self.timeline.iter().enumerate() {
|
||||||
let x = index as f32 / (self.timeline.len() - 1) as f32 * bounds.width;
|
let x = index as f32 / self.timeline.len() as f32 * bounds.width;
|
||||||
let y = bounds.height - value / 100. * bounds.height;
|
let y = bounds.height - value / 100. * bounds.height;
|
||||||
builder.line_to(Point::new(x, y))
|
builder.line_to(Point::new(x, y))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue