bits and bobs from last night

734883d · gmorell · 2026-01-15 15:25

7 files +120 -1

Files changed

modified Cargo.toml
+16 −0
@@ -6,13 +6,29 @@ description = "A Kodi Controller"
6 6 authors = ["Gabe <gabe@neiam.org>"]
7 7 license = "GPLv3"
8 8
9 +
10 +[package.metadata.deb]
11 +assets = [
12 + # target/release path is special, and gets replaced by cargo-deb with the actual target dir path.
13 + ["target/release/cargo-deb", "usr/bin/", "755"],
14 + { source = "LICENSE.md", dest = "/usr/share/doc/neiam-koco/LICENSE", doc = true, mode = "0644" },
15 + { source = "README.md", dest = "/usr/share/doc/neiam-koco/README.md", doc = true, mode = "0644" },
16 + { source = "assets/koco.desktop", dest = "/usr/share/applications/koco.desktop", mode = "644" },
17 + { source = "assets/logo.png", dest = "/usr/share/icons/hicolor/256x256/koco.png", mode = "644" },
18 +]
19 +section = "utility"
20 +license-file = ["LICENSE.md", "4"]
21 +
9 22 [package.metadata.generate-rpm]
10 23 assets = [
11 24 { source = "target/release/koco", dest = "/usr/bin/koco", mode = "0755" },
12 25 { source = "LICENSE.md", dest = "/usr/share/doc/neiam-koco/LICENSE", doc = true, mode = "0644" },
13 26 { source = "README.md", dest = "/usr/share/doc/neiam-koco/README.md", doc = true, mode = "0644" },
27 + { source = "assets/koco.desktop", dest = "/usr/share/applications/koco.desktop", mode = "644" },
28 + { source = "assets/logo.png", dest = "/usr/share/icons/hicolor/256x256/koco.png", mode = "644" },
14 29 ]
15 30
31 +
16 32 [dependencies]
17 33 chrono = "0.4"
18 34 eframe = "0.33.3"
added assets/koco.desktop
+6 −0
@@ -0,0 +1,6 @@
1 +[Desktop Entry]
2 +Type=Application
3 +Exec=koco
4 +Icon=koco
5 +Name=KoCo
6 +
modified ?
+0 −0

Binary file — not rendered.

added assets/logo.svg
+93 −0
@@ -0,0 +1,93 @@
1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
3 +
4 +<svg
5 + width="256"
6 + height="256"
7 + viewBox="0 0 67.733332 67.733333"
8 + version="1.1"
9 + id="svg1"
10 + inkscape:version="1.4.3 (unknown)"
11 + sodipodi:docname="logo.svg"
12 + inkscape:export-filename="logo.png"
13 + inkscape:export-xdpi="96"
14 + inkscape:export-ydpi="96"
15 + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
16 + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
17 + xmlns="http://www.w3.org/2000/svg"
18 + xmlns:svg="http://www.w3.org/2000/svg">
19 + <sodipodi:namedview
20 + id="namedview1"
21 + pagecolor="#505050"
22 + bordercolor="#eeeeee"
23 + borderopacity="1"
24 + inkscape:showpageshadow="0"
25 + inkscape:pageopacity="0"
26 + inkscape:pagecheckerboard="0"
27 + inkscape:deskcolor="#505050"
28 + inkscape:document-units="mm"
29 + inkscape:zoom="2.1981187"
30 + inkscape:cx="147.62624"
31 + inkscape:cy="131.2486"
32 + inkscape:window-width="2880"
33 + inkscape:window-height="1814"
34 + inkscape:window-x="0"
35 + inkscape:window-y="66"
36 + inkscape:window-maximized="1"
37 + inkscape:current-layer="layer1"
38 + showguides="true">
39 + <sodipodi:guide
40 + position="57.394497,15.106532"
41 + orientation="1,0"
42 + id="guide10"
43 + inkscape:locked="false" />
44 + <sodipodi:guide
45 + position="9.8202082,26.643208"
46 + orientation="1,0"
47 + id="guide11"
48 + inkscape:locked="false" />
49 + </sodipodi:namedview>
50 + <defs
51 + id="defs1" />
52 + <g
53 + inkscape:label="Layer 1"
54 + inkscape:groupmode="layer"
55 + id="layer1">
56 + <rect
57 + style="fill:#651d1d;fill-opacity:1;stroke-width:0.225777"
58 + id="rect1-5"
59 + width="67.73333"
60 + height="67.73333"
61 + x="0"
62 + y="0"
63 + rx="7.5810843"
64 + ry="8.6536465" />
65 + <text
66 + xml:space="preserve"
67 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:33.8667px;line-height:0;font-family:'Berkeley Mono';-inkscape-font-specification:'Berkeley Mono Bold';text-align:center;letter-spacing:-7.9375px;word-spacing:0px;text-anchor:middle;fill:#fdf2c6;fill-opacity:1;stroke:none;stroke-width:0.264583"
68 + x="29.36768"
69 + y="31.352081"
70 + id="text7702-6-3-9-3-2-5-9-9"><tspan
71 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:33.8667px;line-height:1;font-family:'B612 Mono';-inkscape-font-specification:'B612 Mono Bold';letter-spacing:-7.9375px;fill:#fdf2c6;fill-opacity:1;stroke-width:0.264583"
72 + sodipodi:role="line"
73 + id="tspan9"
74 + x="29.36768"
75 + y="31.352081">K O</tspan><tspan
76 + sodipodi:role="line"
77 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:33.8667px;line-height:0.8;font-family:'B612 Mono';-inkscape-font-specification:'B612 Mono Bold';letter-spacing:-7.9375px;fill:#fdf2c6;fill-opacity:1;stroke-width:0.264583"
78 + x="29.36768"
79 + y="48.367661"
80 + id="tspan1" /></text>
81 + <text
82 + xml:space="preserve"
83 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:33.8667px;line-height:0;font-family:'Berkeley Mono';-inkscape-font-specification:'Berkeley Mono Bold';text-align:center;letter-spacing:-7.9375px;word-spacing:0px;text-anchor:middle;fill:#fdf2c6;fill-opacity:1;stroke:none;stroke-width:0.264583"
84 + x="33.209412"
85 + y="62.173927"
86 + id="text7702-6-3-9-3-2-5-9-9-4"><tspan
87 + sodipodi:role="line"
88 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:33.8667px;line-height:0.8;font-family:'B612 Mono';-inkscape-font-specification:'B612 Mono Bold';letter-spacing:-7.9375px;fill:#fdf2c6;fill-opacity:1;stroke-width:0.264583"
89 + x="29.240662"
90 + y="62.173927"
91 + id="tspan1-0">C O</tspan></text>
92 + </g>
93 +</svg>
modified src/main.rs
+5 −1
@@ -1563,11 +1563,15 @@ fn main() -> eframe::Result {
1563 1563 // Initialize env_logger to enable RUST_LOG support
1564 1564 env_logger::init();
1565 1565
1566 − let options = eframe::NativeOptions {
1566 + let mut options = eframe::NativeOptions {
1567 1567 viewport: egui::ViewportBuilder::default().with_inner_size([280.0, 400.0]),
1568 1568 ..Default::default()
1569 1569 };
1570 1570
1571 + let d = eframe::icon_data::from_png_bytes(include_bytes!("../assets/logo.png"))
1572 + .expect("The icon data must be valid");
1573 + options.viewport.icon = Some(Arc::new(d));
1574 +
1571 1575 eframe::run_native(
1572 1576 "Koco - Kodi Control",
1573 1577 options,

Parents: 3a12a0e