From 96489b3e8c2391bfd4c5b9f9facaf05ec3ea5285 Mon Sep 17 00:00:00 2001 From: pieterdd Date: Sat, 27 Dec 2025 09:51:14 +0100 Subject: [PATCH 01/10] Update relm4 to 0.10 --- Cargo.lock | 598 ++++++++++++++++++++++------------- Cargo.toml | 11 +- build.rs | 14 + icons.toml | 6 - src/frontend/break_window.rs | 16 +- src/frontend/main_window.rs | 11 +- src/icons/mod.rs | 6 + src/main.rs | 4 +- 8 files changed, 415 insertions(+), 251 deletions(-) create mode 100644 build.rs delete mode 100644 icons.toml create mode 100644 src/icons/mod.rs diff --git a/Cargo.lock b/Cargo.lock index 420d594..4ea1be7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,20 +23,11 @@ dependencies = [ "mach 0.1.2", ] -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" @@ -295,21 +286,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - [[package]] name = "bindgen" version = "0.70.1" @@ -379,23 +355,23 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cairo-rs" -version = "0.20.7" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae50b5510d86cf96ac2370e66d8dc960882f3df179d6a5a1e52bd94a1416c0f7" +checksum = "b01fe135c0bd16afe262b6dea349bd5ea30e6de50708cec639aae7c5c14cc7e4" dependencies = [ "bitflags 2.9.0", "cairo-sys-rs", - "glib 0.20.10", + "glib 0.21.5", "libc", ] [[package]] name = "cairo-sys-rs" -version = "0.20.7" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f18b6bb8e43c7eb0f2aac7976afe0c61b6f5fc2ab7bc4c139537ea56c92290df" +checksum = "06c28280c6b12055b5e39e4554271ae4e6630b27c0da9148c4cf6485fc6d245c" dependencies = [ - "glib-sys 0.20.9", + "glib-sys 0.21.5", "libc", "system-deps", ] @@ -460,7 +436,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -596,9 +572,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -654,7 +630,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -760,9 +736,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.1.1" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "miniz_oxide", @@ -903,13 +879,13 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.20.9" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7563afd6ff0a221edfbb70a78add5075b8d9cb48e637a40a24c3ece3fea414d0" +checksum = "debb0d39e3cdd84626edfd54d6e4a6ba2da9a0ef2e796e691c4e9f8646fda00c" dependencies = [ - "gdk-pixbuf-sys 0.20.7", + "gdk-pixbuf-sys 0.21.5", "gio", - "glib 0.20.10", + "glib 0.21.5", "libc", ] @@ -929,43 +905,43 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.20.7" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67f2587c9202bf997476bbba6aaed4f78a11538a2567df002a5f57f5331d0b5c" +checksum = "bd95ad50b9a3d2551e25dd4f6892aff0b772fe5372d84514e9d0583af60a0ce7" dependencies = [ - "gio-sys 0.20.9", - "glib-sys 0.20.9", - "gobject-sys 0.20.9", + "gio-sys 0.21.5", + "glib-sys 0.21.5", + "gobject-sys 0.21.5", "libc", "system-deps", ] [[package]] name = "gdk4" -version = "0.9.6" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4850c9d9c1aecd1a3eb14fadc1cdb0ac0a2298037e116264c7473e1740a32d60" +checksum = "756564212bbe4a4ce05d88ffbd2582581ac6003832d0d32822d0825cca84bfbf" dependencies = [ "cairo-rs", - "gdk-pixbuf 0.20.9", + "gdk-pixbuf 0.21.5", "gdk4-sys", "gio", - "glib 0.20.10", + "glib 0.21.5", "libc", "pango", ] [[package]] name = "gdk4-sys" -version = "0.9.6" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f6eb95798e2b46f279cf59005daf297d5b69555428f185650d71974a910473a" +checksum = "a6d4e5b3ccf591826a4adcc83f5f57b4e59d1925cb4bf620b0d645f79498b034" dependencies = [ "cairo-sys-rs", - "gdk-pixbuf-sys 0.20.7", - "gio-sys 0.20.9", - "glib-sys 0.20.9", - "gobject-sys 0.20.9", + "gdk-pixbuf-sys 0.21.5", + "gio-sys 0.21.5", + "glib-sys 0.21.5", + "gobject-sys 0.21.5", "libc", "pango-sys", "pkg-config", @@ -997,24 +973,18 @@ dependencies = [ "wasi 0.14.2+wasi-0.2.4", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "gio" -version = "0.20.9" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f00c70f8029d84ea7572dd0e1aaa79e5329667b4c17f329d79ffb1e6277487" +checksum = "c5ff48bf600c68b476e61dc6b7c762f2f4eb91deef66583ba8bb815c30b5811a" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-util", - "gio-sys 0.20.9", - "glib 0.20.10", + "gio-sys 0.21.5", + "glib 0.21.5", "libc", "pin-project-lite", "smallvec", @@ -1046,6 +1016,19 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "gio-sys" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0071fe88dba8e40086c8ff9bbb62622999f49628344b1d1bf490a48a29d80f22" +dependencies = [ + "glib-sys 0.21.5", + "gobject-sys 0.21.5", + "libc", + "system-deps", + "windows-sys 0.61.2", +] + [[package]] name = "glib" version = "0.4.1" @@ -1072,7 +1055,7 @@ dependencies = [ "futures-task", "futures-util", "gio-sys 0.20.9", - "glib-macros", + "glib-macros 0.20.7", "glib-sys 0.20.9", "gobject-sys 0.20.9", "libc", @@ -1080,6 +1063,27 @@ dependencies = [ "smallvec", ] +[[package]] +name = "glib" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16de123c2e6c90ce3b573b7330de19be649080ec612033d397d72da265f1bd8b" +dependencies = [ + "bitflags 2.9.0", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys 0.21.5", + "glib-macros 0.21.5", + "glib-sys 0.21.5", + "gobject-sys 0.21.5", + "libc", + "memchr", + "smallvec", +] + [[package]] name = "glib-macros" version = "0.20.7" @@ -1093,6 +1097,19 @@ dependencies = [ "syn", ] +[[package]] +name = "glib-macros" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf59b675301228a696fe01c3073974643365080a76cc3ed5bc2cbc466ad87f17" +dependencies = [ + "heck", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "glib-sys" version = "0.5.0" @@ -1114,6 +1131,16 @@ dependencies = [ "system-deps", ] +[[package]] +name = "glib-sys" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d95e1a3a19ae464a7286e14af9a90683c64d70c02532d88d87ce95056af3e6c" +dependencies = [ + "libc", + "system-deps", +] + [[package]] name = "glob" version = "0.3.2" @@ -1143,24 +1170,35 @@ dependencies = [ "system-deps", ] +[[package]] +name = "gobject-sys" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dca35da0d19a18f4575f3cb99fe1c9e029a2941af5662f326f738a21edaf294" +dependencies = [ + "glib-sys 0.21.5", + "libc", + "system-deps", +] + [[package]] name = "graphene-rs" -version = "0.20.9" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbc5911bfb32d68dcfa92c9510c462696c2f715548fcd7f3f1be424c739de19" +checksum = "2730030ac9db663fd8bfe1e7093742c1cafb92db9c315c9417c29032341fe2f9" dependencies = [ - "glib 0.20.10", + "glib 0.21.5", "graphene-sys", "libc", ] [[package]] name = "graphene-sys" -version = "0.20.7" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a68d39515bf340e879b72cecd4a25c1332557757ada6e8aba8654b4b81d23a" +checksum = "915e32091ea9ad241e4b044af62b7351c2d68aeb24f489a0d7f37a0fc484fd93" dependencies = [ - "glib-sys 0.20.9", + "glib-sys 0.21.5", "libc", "pkg-config", "system-deps", @@ -1168,13 +1206,13 @@ dependencies = [ [[package]] name = "gsk4" -version = "0.9.6" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61f5e72f931c8c9f65fbfc89fe0ddc7746f147f822f127a53a9854666ac1f855" +checksum = "e755de9d8c5896c5beaa028b89e1969d067f1b9bf1511384ede971f5983aa153" dependencies = [ "cairo-rs", "gdk4", - "glib 0.20.10", + "glib 0.21.5", "graphene-rs", "gsk4-sys", "libc", @@ -1183,14 +1221,14 @@ dependencies = [ [[package]] name = "gsk4-sys" -version = "0.9.6" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755059de55fa6f85a46bde8caf03e2184c96bfda1f6206163c72fb0ea12436dc" +checksum = "7ce91472391146f482065f1041876d8f869057b195b95399414caa163d72f4f7" dependencies = [ "cairo-sys-rs", "gdk4-sys", - "glib-sys 0.20.9", - "gobject-sys 0.20.9", + "glib-sys 0.21.5", + "gobject-sys 0.21.5", "graphene-sys", "libc", "pango-sys", @@ -1199,17 +1237,17 @@ dependencies = [ [[package]] name = "gtk4" -version = "0.9.6" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1c491051f030994fd0cde6f3c44f3f5640210308cff1298c7673c47408091d" +checksum = "acb21d53cfc6f7bfaf43549731c43b67ca47d87348d81c8cfc4dcdd44828e1a4" dependencies = [ "cairo-rs", "field-offset", "futures-channel", - "gdk-pixbuf 0.20.9", + "gdk-pixbuf 0.21.5", "gdk4", "gio", - "glib 0.20.10", + "glib 0.21.5", "graphene-rs", "gsk4", "gtk4-macros", @@ -1220,9 +1258,9 @@ dependencies = [ [[package]] name = "gtk4-macros" -version = "0.9.5" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed1786c4703dd196baf7e103525ce0cf579b3a63a0570fe653b7ee6bac33999" +checksum = "3ccfb5a14a3d941244815d5f8101fa12d4577b59cc47245778d8d907b0003e42" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1232,16 +1270,16 @@ dependencies = [ [[package]] name = "gtk4-sys" -version = "0.9.6" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41e03b01e54d77c310e1d98647d73f996d04b2f29b9121fe493ea525a7ec03d6" +checksum = "842577fe5a1ee15d166cd3afe804ce0cab6173bc789ca32e21308834f20088dd" dependencies = [ "cairo-sys-rs", - "gdk-pixbuf-sys 0.20.7", + "gdk-pixbuf-sys 0.21.5", "gdk4-sys", - "gio-sys 0.20.9", - "glib-sys 0.20.9", - "gobject-sys 0.20.9", + "gio-sys 0.21.5", + "glib-sys 0.21.5", + "gobject-sys 0.21.5", "graphene-sys", "gsk4-sys", "libc", @@ -1251,25 +1289,24 @@ dependencies = [ [[package]] name = "gvdb" -version = "0.6.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acfa8cd2aa58da96876eb6276afe617c414d5846d1229274a821c1f8e8aa9e02" +checksum = "b9d94c8a63f94bbc35cf63e105791c5992bd60d4516d41fe5bf3db8d10b30b43" dependencies = [ - "byteorder", "flate2", "quick-xml", - "safe-transmute", "serde", "serde_json", "walkdir", - "zvariant 4.2.0", + "zerocopy", + "zvariant", ] [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" @@ -1321,9 +1358,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", "hashbrown", @@ -1411,13 +1448,13 @@ dependencies = [ [[package]] name = "libadwaita" -version = "0.7.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500135d29c16aabf67baafd3e7741d48e8b8978ca98bac39e589165c8dc78191" +checksum = "fb09e12bf8f73342b3315c839d0a7668cc0ccebd78490c49fec48bab15d5484b" dependencies = [ "gdk4", "gio", - "glib 0.20.10", + "glib 0.21.5", "gtk4", "libadwaita-sys", "libc", @@ -1426,14 +1463,14 @@ dependencies = [ [[package]] name = "libadwaita-sys" -version = "0.7.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6680988058c2558baf3f548a370e4e78da3bf7f08469daa822ac414842c912db" +checksum = "6d7f94227ba87eb596fecada2491f04e357d507324142f77bf76d9e6be4a3e31" dependencies = [ "gdk4-sys", - "gio-sys 0.20.9", - "glib-sys 0.20.9", - "gobject-sys 0.20.9", + "gio-sys 0.21.5", + "glib-sys 0.21.5", + "gobject-sys 0.21.5", "gtk4-sys", "libc", "pango-sys", @@ -1560,9 +1597,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "memoffset" @@ -1590,11 +1627,12 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] @@ -1749,15 +1787,6 @@ dependencies = [ "syn", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - [[package]] name = "oboe" version = "0.6.1" @@ -1814,24 +1843,24 @@ dependencies = [ [[package]] name = "pango" -version = "0.20.9" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1f5dc1b8cf9bc08bfc0843a04ee0fa2e78f1e1fa4b126844a383af4f25f0ec" +checksum = "52d1d85e2078077a065bb7fc072783d5bcd4e51b379f22d67107d0a16937eb69" dependencies = [ "gio", - "glib 0.20.10", + "glib 0.21.5", "libc", "pango-sys", ] [[package]] name = "pango-sys" -version = "0.20.9" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dbb9b751673bd8fe49eb78620547973a1e719ed431372122b20abd12445bab5" +checksum = "b4f06627d36ed5ff303d2df65211fc2e52ba5b17bf18dd80ff3d9628d6e06cfd" dependencies = [ - "glib-sys 0.20.9", - "gobject-sys 0.20.9", + "glib-sys 0.21.5", + "gobject-sys 0.21.5", "libc", "system-deps", ] @@ -1955,9 +1984,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" dependencies = [ "memchr", "serde", @@ -2029,9 +2058,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "relm4" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30837553c1a8cfea1a404c83ec387c5c8ff9358e1060b057c274c5daa5035ad1" +checksum = "6bae902de22fd92e62641f047975abf228573425b9b8de175e8ab5b6cda10379" dependencies = [ "flume", "fragile", @@ -2047,27 +2076,36 @@ dependencies = [ [[package]] name = "relm4-css" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3b924557df1cddc687b60b313c4b76620fdbf0e463afa4b29f67193ccf37f9" +checksum = "37dbe7a114855a22618f0e13595ce6b3f165478c13c2dfc4f4f99614da105797" [[package]] name = "relm4-icons" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15242978b4e65431be4ccd5cf539d3c142518e114b7ecfa72ffd02cd6432e6e3" +checksum = "28869f8322ed72bed568cbb704403037ff62a66c966ded7a862ad5732f108530" dependencies = [ "gtk4", +] + +[[package]] +name = "relm4-icons-build" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f2de558afdd570680a69c96dc9f812b241922c6355dae351f7ffbb5fac675d" +dependencies = [ "gvdb", "serde", - "toml", + "toml 0.9.8", + "walkdir", ] [[package]] name = "relm4-macros" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a895a7455441a857d100ca679bd24a92f91d28b5e3df63296792ac1af2eddde" +checksum = "175fce497fc6f11dde7ea56daa30ff7ad29a534bbc209d59d766659c880ba5f1" dependencies = [ "proc-macro2", "quote", @@ -2087,12 +2125,6 @@ dependencies = [ "symphonia", ] -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - [[package]] name = "rustc-hash" version = "1.1.0" @@ -2146,12 +2178,6 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" -[[package]] -name = "safe-transmute" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3944826ff8fa8093089aba3acb4ef44b9446a99a16f3bf4e74af3f77d340ab7d" - [[package]] name = "same-file" version = "1.0.6" @@ -2175,18 +2201,28 @@ checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -2225,6 +2261,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" +dependencies = [ + "serde_core", +] + [[package]] name = "shlex" version = "1.3.0" @@ -2240,6 +2285,12 @@ dependencies = [ "libc", ] +[[package]] +name = "simd-adler32" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" + [[package]] name = "single-instance" version = "0.3.3" @@ -2270,12 +2321,12 @@ checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "socket2" -version = "0.5.9" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -2307,6 +2358,7 @@ dependencies = [ "mockall", "relm4", "relm4-icons", + "relm4-icons-build", "rodio", "serde", "serde_json", @@ -2374,9 +2426,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.100" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -2392,7 +2444,7 @@ dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml", + "toml 0.8.21", "version-compare", ] @@ -2478,11 +2530,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.2" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "backtrace", "bytes", "libc", "mio", @@ -2491,14 +2542,14 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", @@ -2512,11 +2563,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "900f6c86a685850b1bc9f6223b20125115ee3f31e01207d81655bbcc0aea9231" dependencies = [ "serde", - "serde_spanned", - "toml_datetime", + "serde_spanned 0.6.8", + "toml_datetime 0.6.9", "toml_edit", ] +[[package]] +name = "toml" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned 1.0.3", + "toml_datetime 0.7.3", + "toml_parser", + "toml_writer", + "winnow", +] + [[package]] name = "toml_datetime" version = "0.6.9" @@ -2526,6 +2592,15 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +dependencies = [ + "serde_core", +] + [[package]] name = "toml_edit" version = "0.22.25" @@ -2534,17 +2609,25 @@ checksum = "10558ed0bd2a1562e630926a2d1f0b98c827da99fabd3fe20920a59642504485" dependencies = [ "indexmap", "serde", - "serde_spanned", - "toml_datetime", - "toml_write", + "serde_spanned 0.6.8", + "toml_datetime 0.6.9", "winnow", ] [[package]] -name = "toml_write" -version = "0.1.1" +name = "toml_parser" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" [[package]] name = "tracing" @@ -2792,7 +2875,7 @@ checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.1.1", "windows-result 0.3.2", "windows-strings", ] @@ -2825,6 +2908,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-result" version = "0.1.2" @@ -2840,7 +2929,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" dependencies = [ - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -2849,7 +2938,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" dependencies = [ - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -2888,6 +2977,24 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -2927,13 +3034,30 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -2952,6 +3076,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -2970,6 +3100,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -2988,12 +3124,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -3012,6 +3160,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -3030,6 +3184,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -3048,6 +3208,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -3066,11 +3232,17 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + [[package]] name = "winnow" -version = "0.7.7" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb8234a863ea0e8cd7284fcdd4f145233eb00fee02bbdd9861aec44e6477bc5" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" dependencies = [ "memchr", ] @@ -3137,7 +3309,7 @@ dependencies = [ "xdg-home", "zbus_macros", "zbus_names", - "zvariant 5.4.0", + "zvariant", ] [[package]] @@ -3151,8 +3323,8 @@ dependencies = [ "quote", "syn", "zbus_names", - "zvariant 5.4.0", - "zvariant_utils 3.2.0", + "zvariant", + "zvariant_utils", ] [[package]] @@ -3164,19 +3336,27 @@ dependencies = [ "serde", "static_assertions", "winnow", - "zvariant 5.4.0", + "zvariant", ] [[package]] -name = "zvariant" -version = "4.2.0" +name = "zerocopy" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" +checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" dependencies = [ - "endi", - "serde", - "static_assertions", - "zvariant_derive 4.2.0", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -3190,21 +3370,8 @@ dependencies = [ "serde", "static_assertions", "winnow", - "zvariant_derive 5.4.0", - "zvariant_utils 3.2.0", -] - -[[package]] -name = "zvariant_derive" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", - "zvariant_utils 2.1.0", + "zvariant_derive", + "zvariant_utils", ] [[package]] @@ -3217,18 +3384,7 @@ dependencies = [ "proc-macro2", "quote", "syn", - "zvariant_utils 3.2.0", -] - -[[package]] -name = "zvariant_utils" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "zvariant_utils", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index bac0891..857c83b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,15 +20,15 @@ assets = [ gtk4 = ">= 4.18.4" [dependencies] -adw = { version = "0.7.2", package = "libadwaita", features = ["v1_5", "v1_7"] } +adw = { version = "0.8.1", package = "libadwaita", features = ["v1_5", "v1_7"] } chrono = { version = "0.4.40", features = ["serde"] } clap = { version = "4.5.38", features = ["cargo", "derive"] } dirs = "6.0.0" glib = "0.20.10" -gtk = { version = "0.9.6", package = "gtk4" } +gtk = { version = "0.10.3", package = "gtk4" } libnotify = "1.0.3" -relm4 = { version = "0.9.1", features = ["gnome_47", "libadwaita"] } -relm4-icons = "0.9.0" +relm4 = { version = "0.10", features = ["gnome_47", "libadwaita"] } +relm4-icons = "0.10" rodio = "0.20.1" serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" @@ -38,5 +38,8 @@ tracing = "0.1.41" user-idle2 = "0.6.2" zbus = "5.5.0" +[build-dependencies] +relm4-icons-build = "0.10" + [dev-dependencies] mockall = "0.13.1" diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..b893837 --- /dev/null +++ b/build.rs @@ -0,0 +1,14 @@ +fn main() { + relm4_icons_build::bundle_icons( + // Name of the file that will be generated at `OUT_DIR` + "icon_names.rs", + // Optional app ID + Some("io.github.pieterdd.StretchBreak"), + // Custom base resource path + None::<&str>, + // Directory with custom icons (if any) + None::<&str>, + // List of icons to include + ["timer", "settings", "snooze-filled", "stopwatch"], + ); +} diff --git a/icons.toml b/icons.toml deleted file mode 100644 index 8dad937..0000000 --- a/icons.toml +++ /dev/null @@ -1,6 +0,0 @@ -icons = [ - "timer", - "settings", - "snooze-filled", - "stopwatch", -] diff --git a/src/frontend/break_window.rs b/src/frontend/break_window.rs index 70179ec..9277b6e 100644 --- a/src/frontend/break_window.rs +++ b/src/frontend/break_window.rs @@ -1,13 +1,12 @@ -use relm4_icons::icon_names; -use std::sync::{Arc, Mutex}; -use std::thread::sleep; -use std::time::Duration; - use crate::backend::idle_monitoring::{Clock, IdleChecker, IdleInfo, IdleMonitor, ModeState}; +use crate::icons::icon_names; use chrono::TimeDelta; use gtk::prelude::{BoxExt, ButtonExt, GtkWindowExt, OrientableExt, WidgetExt}; use relm4::{Component, ComponentParts}; use relm4::{ComponentSender, RelmWidgetExt}; +use std::sync::{Arc, Mutex}; +use std::thread::sleep; +use std::time::Duration; pub struct BreakWindowInit { pub idle_monitor_arc: Arc>>, @@ -118,12 +117,7 @@ impl Component for BreakWindow { ComponentParts { model, widgets } } - fn update( - &mut self, - message: Self::Input, - sender: ComponentSender, - root: &Self::Root, - ) { + fn update(&mut self, message: Self::Input, sender: ComponentSender, root: &Self::Root) { match message { BreakWindowMsg::Update => { sender.spawn_oneshot_command(|| { diff --git a/src/frontend/main_window.rs b/src/frontend/main_window.rs index b75f1ed..dd883bb 100644 --- a/src/frontend/main_window.rs +++ b/src/frontend/main_window.rs @@ -10,6 +10,7 @@ use crate::backend::idle_monitoring::{ REQUIRED_PREBREAK_IDLE_STREAK_SECONDS, }; use crate::frontend::formatting::format_timer_timecode; +use crate::icons::icon_names; use adw::prelude::{ActionRowExt, AdwDialogExt, PreferencesRowExt}; use chrono::{DateTime, Local, TimeDelta, Utc}; use gtk::prelude::{BoxExt, ButtonExt, GtkWindowExt, OrientableExt, WidgetExt}; @@ -18,7 +19,6 @@ use relm4::RelmWidgetExt; use relm4::actions::{RelmAction, RelmActionGroup}; use relm4::prelude::ComponentParts; use relm4::{Component, ComponentController, ComponentSender, Controller}; -use relm4_icons::icon_names; use tokio::sync::watch::Receiver; use super::break_window::{BreakWindow, BreakWindowInit}; @@ -96,7 +96,7 @@ impl Component for MainWindow { set_default_height: 200, connect_close_request[sender] => move |_| { sender.input(MainWindowMsg::Hide { notify: true }); - glib::Propagation::Stop + gtk::glib::Propagation::Stop }, adw::ToolbarView { @@ -364,12 +364,7 @@ impl Component for MainWindow { ComponentParts { model, widgets } } - fn update( - &mut self, - message: Self::Input, - sender: ComponentSender, - root: &Self::Root, - ) { + fn update(&mut self, message: Self::Input, sender: ComponentSender, root: &Self::Root) { match message { MainWindowMsg::Update => { sender.spawn_oneshot_command(|| { diff --git a/src/icons/mod.rs b/src/icons/mod.rs new file mode 100644 index 0000000..762d677 --- /dev/null +++ b/src/icons/mod.rs @@ -0,0 +1,6 @@ +#![allow(dead_code)] +#![allow(unused_imports)] +pub mod icon_names { + pub use shipped::*; // Include all shipped icons by default + include!(concat!(env!("OUT_DIR"), "/icon_names.rs")); +} diff --git a/src/main.rs b/src/main.rs index 36d685c..4dd3f53 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,8 @@ use tracing::error; mod frontend; use frontend::main_window::{MainWindow, MainWindowInit}; use zbus::{Connection, Error, Proxy}; +mod icons; +use crate::icons::icon_names; use crate::backend::file_io::PersistableState; mod dbus; @@ -155,7 +157,7 @@ fn main() { } }); - relm4_icons::initialize_icons(); + relm4_icons::initialize_icons(icon_names::GRESOURCE_BYTES, icon_names::RESOURCE_PREFIX); let app = RelmApp::new(APP_ID); app.with_args(vec![]).run::(MainWindowInit { idle_monitor_arc: idle_monitor_arc2, From 534c4521caceaf8c49ded1a514728d458292aaa3 Mon Sep 17 00:00:00 2001 From: pieterdd Date: Sat, 27 Dec 2025 11:57:14 +0100 Subject: [PATCH 02/10] Add widget API --- Cargo.lock | 9 +++-- src/dbus.rs | 31 ++++++++++++----- src/main.rs | 97 ++++++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 105 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4ea1be7..ad6d2f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3361,14 +3361,13 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.4.0" +version = "5.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2df9ee044893fcffbdc25de30546edef3e32341466811ca18421e3cd6c5a3ac" +checksum = "2be61892e4f2b1772727be11630a62664a1826b62efa43a6fe7449521cb8744c" dependencies = [ "endi", "enumflags2", "serde", - "static_assertions", "winnow", "zvariant_derive", "zvariant_utils", @@ -3376,9 +3375,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "5.4.0" +version = "5.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74170caa85b8b84cc4935f2d56a57c7a15ea6185ccdd7eadb57e6edd90f94b2f" +checksum = "da58575a1b2b20766513b1ec59d8e2e68db2745379f961f86650655e862d2006" dependencies = [ "proc-macro-crate", "proc-macro2", diff --git a/src/dbus.rs b/src/dbus.rs index e96bf14..7ca9722 100644 --- a/src/dbus.rs +++ b/src/dbus.rs @@ -2,7 +2,7 @@ use std::{ error::Error, sync::{Arc, Mutex, MutexGuard}, }; -use zbus::object_server::SignalEmitter; +use zbus::{object_server::SignalEmitter, proxy}; use chrono::{DateTime, Duration, Local, TimeDelta, Utc}; use serde::{Deserialize, Serialize}; @@ -19,12 +19,12 @@ use crate::{ static SECS_THRESHOLD_TO_SHOW_RESET_COUNTDOWN: i64 = 15; #[derive(Serialize, Deserialize, PartialEq, Eq, Debug)] -struct WidgetInfo { - normal_timer_value: String, - countdown_to_reset_value: String, +pub(crate) struct WidgetInfo { + pub(crate) normal_timer_value: String, + pub(crate) countdown_to_reset_value: String, prebreak_timer_value: String, // Deprecrated - remove in 0.1.9 - overrun_value: String, - presence_mode: PresenceMode, + pub(crate) overrun_value: String, + pub(crate) presence_mode: PresenceMode, snoozed_until_time: Option, reading_mode: bool, } @@ -137,15 +137,30 @@ struct DBusServer { impl DBusServer { fn _unlock_monitor(&self) -> MutexGuard<'_, IdleMonitor> { - self - .idle_monitor_arc + self.idle_monitor_arc .lock() .expect("Unlocking idle monitor failed") } } +#[proxy( + interface = "io.github.pieterdd.StretchBreak.Core", + default_service = "io.github.pieterdd.StretchBreak.Core", + default_path = "/io/github/pieterdd/StretchBreak/Core" +)] +pub trait DBusApp { + fn reveal_window(&self) -> zbus::Result<()>; + fn get_widget_info(&self) -> zbus::Result; +} + #[interface(name = "io.github.pieterdd.StretchBreak.Core", proxy())] impl DBusServer { + fn get_widget_info(&self) -> String { + let monitor = self._unlock_monitor(); + let widget_info = get_widget_info(&monitor.get_last_idle_info()); + serde_json::to_string(&widget_info).expect("Serde JSON conversion failed") + } + #[zbus(signal)] async fn widget_info_updated( signal_emitter: &SignalEmitter<'_>, diff --git a/src/main.rs b/src/main.rs index 4dd3f53..25a4b31 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,18 +8,18 @@ use backend::idle_monitoring::{ Clock, DebouncedIdleState, IdleChecker, IdleInfo, IdleMonitor, ModeState, }; use chrono::{TimeDelta, Utc}; -use clap::Parser; +use clap::{Parser, Subcommand, ValueEnum}; use dbus::run_server; use relm4::RelmApp; use rodio::{Decoder, OutputStream, Sink}; use single_instance::SingleInstance; -use tokio::runtime::Runtime; use tokio::sync::watch::{Sender, channel}; use tracing::error; mod frontend; use frontend::main_window::{MainWindow, MainWindowInit}; -use zbus::{Connection, Error, Proxy}; +use zbus::{Connection, Error}; mod icons; +use crate::dbus::{DBusAppProxy, WidgetInfo}; use crate::icons::icon_names; use crate::backend::file_io::PersistableState; @@ -112,14 +112,38 @@ fn monitor_idle_forever( } } +#[derive(ValueEnum, Clone, Copy, Debug, PartialEq, Eq)] +enum WidgetApiCommand { + #[value(help = "Outputs time to next break. Empty when break ongoing.")] + TimeToBreak, + #[value( + help = "Outputs time to reset. Empty when user is sufficiently active or just after break finished." + )] + TimeToReset, + #[value(help = "When overdue for a break, outputs how long the user is overdue.")] + Overtime, + #[value(help = "Values are 'active', 'snoozed' or 'muted'.")] + PresenceMode, +} + +#[derive(Clone, Copy, Subcommand)] +enum Operation { + #[command(about = "Status data for desktop widgets that source data from terminal commands.")] + WidgetApi { command: WidgetApiCommand }, +} + #[derive(Parser)] #[command()] struct Cli { - #[arg(long)] + #[arg(long, help = "Background mode: don't show the GUI.")] hide: bool, + + #[command(subcommand)] + operation: Option, } -fn main() { +#[tokio::main] +async fn main() -> zbus::Result<()> { #[cfg(target_os = "linux")] if libnotify::init(APP_ID).is_err() { println!("Warning: could not initialize push notifications"); @@ -127,8 +151,50 @@ fn main() { let cli = Cli::parse(); - let instance = SingleInstance::new(APP_ID).expect("Initializing single instance object failed"); + match cli.operation { + None => start_gui(cli.hide).await, + Some(operation) => { + let connection = Connection::session() + .await + .expect("Could not create DBus connection"); + let proxy = DBusAppProxy::new(&connection) + .await + .expect("Could not open DBus proxy"); + let raw_widget_info = proxy.get_widget_info().await.expect("DBus call failed"); + let widget_info: WidgetInfo = + serde_json::from_str(&raw_widget_info).expect("Could not load widget info"); + + match operation { + Operation::WidgetApi { command } => match command { + WidgetApiCommand::TimeToBreak => { + print!("{}", widget_info.normal_timer_value); + } + WidgetApiCommand::TimeToReset => { + print!("{}", widget_info.countdown_to_reset_value); + } + WidgetApiCommand::Overtime => { + print!("{}", widget_info.overrun_value); + } + WidgetApiCommand::PresenceMode => { + print!( + "{}", + match widget_info.presence_mode { + backend::idle_monitoring::PresenceMode::Active => "active", + backend::idle_monitoring::PresenceMode::Muted => "muted", + backend::idle_monitoring::PresenceMode::SnoozedUntil(_) => + "snoozed", + } + ); + } + }, + } + } + } + Ok(()) +} +async fn start_gui(hide: bool) { + let instance = SingleInstance::new(APP_ID).expect("Initializing single instance object failed"); if instance.is_single() { let persistable_state = PersistableState::load_from_disk().ok(); if persistable_state.is_none() { @@ -142,7 +208,7 @@ fn main() { let (idle_info_sender, idle_info_receiver) = channel(idle_monitor_arc.lock().unwrap().refresh_idle_info()); - let (show_main_window_sender, show_main_window_recv) = channel(!cli.hide); + let (show_main_window_sender, show_main_window_recv) = channel(!hide); thread::spawn(move || monitor_idle_forever(idle_monitor_arc, idle_info_sender)); let idle_info_receiver_ref = idle_info_receiver.clone(); @@ -168,22 +234,15 @@ fn main() { process::exit(0); } else { println!("Stretch Break is already running, revealing its window"); - Runtime::new() - .unwrap() - .block_on(reveal_existing_main_window()) - .ok(); + reveal_existing_main_window() + .await + .expect("Could not communicate with main process"); } } async fn reveal_existing_main_window() -> Result<(), Error> { let connection = Connection::session().await?; - let p = Proxy::new( - &connection, - format!("{APP_ID}.Core"), - "/io/github/pieterdd/StretchBreak/Core", - format!("{APP_ID}.Core"), - ) - .await?; - let _: () = p.call("RevealWindow", &()).await?; + let proxy = DBusAppProxy::new(&connection).await?; + proxy.reveal_window().await?; Ok(()) } From 0b689caf79f0e277aa836975be59f5b251880c6e Mon Sep 17 00:00:00 2001 From: pieterdd Date: Sat, 27 Dec 2025 12:03:47 +0100 Subject: [PATCH 03/10] Remove deprecated prebreak timer value --- src/dbus.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/dbus.rs b/src/dbus.rs index 7ca9722..f65a3c2 100644 --- a/src/dbus.rs +++ b/src/dbus.rs @@ -22,7 +22,6 @@ static SECS_THRESHOLD_TO_SHOW_RESET_COUNTDOWN: i64 = 15; pub(crate) struct WidgetInfo { pub(crate) normal_timer_value: String, pub(crate) countdown_to_reset_value: String, - prebreak_timer_value: String, // Deprecrated - remove in 0.1.9 pub(crate) overrun_value: String, pub(crate) presence_mode: PresenceMode, snoozed_until_time: Option, @@ -82,8 +81,6 @@ fn get_widget_info(idle_info: &IdleInfo) -> WidgetInfo { _ => String::from(""), }, countdown_to_reset_value, - // This field is repurposed for backwards compatibility - remove in 0.1.9 - prebreak_timer_value: overrun_value.clone(), overrun_value, presence_mode: idle_info.presence_mode, snoozed_until_time: match idle_info.presence_mode { @@ -241,7 +238,6 @@ mod tests { WidgetInfo { normal_timer_value: String::from("19:29"), countdown_to_reset_value: String::from(""), - prebreak_timer_value: String::from(""), overrun_value: String::from(""), presence_mode: PresenceMode::Active, snoozed_until_time: None, @@ -270,7 +266,6 @@ mod tests { WidgetInfo { normal_timer_value: String::from(""), countdown_to_reset_value: String::from(""), - prebreak_timer_value: String::from("0:01"), overrun_value: String::from("0:01"), presence_mode: PresenceMode::Active, snoozed_until_time: None, @@ -303,7 +298,6 @@ mod tests { WidgetInfo { normal_timer_value: String::from("19:58"), countdown_to_reset_value: String::from("1:15"), - prebreak_timer_value: String::from(""), overrun_value: String::from(""), presence_mode: PresenceMode::Active, snoozed_until_time: None, @@ -338,7 +332,6 @@ mod tests { WidgetInfo { normal_timer_value: String::from("19:29"), countdown_to_reset_value: String::from(""), - prebreak_timer_value: String::from(""), overrun_value: String::from(""), presence_mode: PresenceMode::SnoozedUntil( Utc.with_ymd_and_hms(2025, 2, 3, 12, 34, 11).unwrap(), @@ -372,7 +365,6 @@ mod tests { WidgetInfo { normal_timer_value: String::from(""), countdown_to_reset_value: String::from("1:25"), - prebreak_timer_value: String::from(""), overrun_value: String::from(""), presence_mode: PresenceMode::Active, snoozed_until_time: None, From 244223ecd0e0770c6fc5cf2e822da2ff808eb35c Mon Sep 17 00:00:00 2001 From: pieterdd Date: Sat, 27 Dec 2025 12:31:21 +0100 Subject: [PATCH 04/10] Expose most GUI functionality via command line This enables custom integrations with Stretch Break. --- src/dbus.rs | 5 ++++ src/main.rs | 85 +++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 68 insertions(+), 22 deletions(-) diff --git a/src/dbus.rs b/src/dbus.rs index f65a3c2..90e546f 100644 --- a/src/dbus.rs +++ b/src/dbus.rs @@ -148,6 +148,11 @@ impl DBusServer { pub trait DBusApp { fn reveal_window(&self) -> zbus::Result<()>; fn get_widget_info(&self) -> zbus::Result; + fn unmute(&self) -> zbus::Result<()>; + fn mute(&self) -> zbus::Result<()>; + fn snooze_for_minutes(&self, num_minutes: i64) -> zbus::Result<()>; + fn trigger_break(&self) -> zbus::Result<()>; + fn set_reading_mode(&self, value: bool) -> zbus::Result<()>; } #[interface(name = "io.github.pieterdd.StretchBreak.Core", proxy())] diff --git a/src/main.rs b/src/main.rs index 25a4b31..23616e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,4 @@ +use std::cmp::max; use std::io::{BufReader, Cursor}; use std::process; use std::sync::{Arc, Mutex}; @@ -8,7 +9,7 @@ use backend::idle_monitoring::{ Clock, DebouncedIdleState, IdleChecker, IdleInfo, IdleMonitor, ModeState, }; use chrono::{TimeDelta, Utc}; -use clap::{Parser, Subcommand, ValueEnum}; +use clap::{ArgAction, Parser, Subcommand, ValueEnum}; use dbus::run_server; use relm4::RelmApp; use rodio::{Decoder, OutputStream, Sink}; @@ -128,6 +129,19 @@ enum WidgetApiCommand { #[derive(Clone, Copy, Subcommand)] enum Operation { + #[command(about = "Stop prompting for breaks for the specified amount of minutes.")] + SnoozeFor { minutes: i64 }, + #[command(about = "Show break prompts until further notice.")] + Unmute, + #[command(about = "Stop prompting for breaks until further notice.")] + Mute, + #[command(about = "Start a break right now.")] + Break, + #[command(about = "When reading mode is active, timer won't reset during idle activity.")] + SetReadingMode { + #[arg(action = ArgAction::Set)] + value: bool, + }, #[command(about = "Status data for desktop widgets that source data from terminal commands.")] WidgetApi { command: WidgetApiCommand }, } @@ -165,28 +179,55 @@ async fn main() -> zbus::Result<()> { serde_json::from_str(&raw_widget_info).expect("Could not load widget info"); match operation { - Operation::WidgetApi { command } => match command { - WidgetApiCommand::TimeToBreak => { - print!("{}", widget_info.normal_timer_value); - } - WidgetApiCommand::TimeToReset => { - print!("{}", widget_info.countdown_to_reset_value); - } - WidgetApiCommand::Overtime => { - print!("{}", widget_info.overrun_value); - } - WidgetApiCommand::PresenceMode => { - print!( - "{}", - match widget_info.presence_mode { - backend::idle_monitoring::PresenceMode::Active => "active", - backend::idle_monitoring::PresenceMode::Muted => "muted", - backend::idle_monitoring::PresenceMode::SnoozedUntil(_) => - "snoozed", - } - ); + Operation::SnoozeFor { minutes } => { + proxy + .snooze_for_minutes(max(minutes, 0)) + .await + .expect("Snooze failed"); + } + Operation::Unmute => { + proxy.unmute().await.expect("Unmute failed"); + } + Operation::Mute => { + proxy.mute().await.expect("Mute failed"); + } + Operation::Break => { + proxy.trigger_break().await.expect("Break failed"); + } + Operation::SetReadingMode { value } => { + proxy.set_reading_mode(value).await.expect("Set failed"); + } + Operation::WidgetApi { command } => { + let raw_widget_info = proxy + .get_widget_info() + .await + .expect("Could not retrieve widget info"); + let widget_info: WidgetInfo = serde_json::from_str(&raw_widget_info) + .expect("Could not parse widget info"); + + match command { + WidgetApiCommand::TimeToBreak => { + print!("{}", widget_info.normal_timer_value); + } + WidgetApiCommand::TimeToReset => { + print!("{}", widget_info.countdown_to_reset_value); + } + WidgetApiCommand::Overtime => { + print!("{}", widget_info.overrun_value); + } + WidgetApiCommand::PresenceMode => { + print!( + "{}", + match widget_info.presence_mode { + backend::idle_monitoring::PresenceMode::Active => "active", + backend::idle_monitoring::PresenceMode::Muted => "muted", + backend::idle_monitoring::PresenceMode::SnoozedUntil(_) => + "snoozed", + } + ); + } } - }, + } } } } From b11f07c3749b67c8e3c2a85242ee44396003d2b5 Mon Sep 17 00:00:00 2001 From: pieterdd Date: Sat, 27 Dec 2025 17:49:59 +0100 Subject: [PATCH 05/10] Document terminal API --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index fe5ac4c..bda528e 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,28 @@ The application was written with GNOME and Linux in mind, but the code is mostly Get the app on Flathub [here](https://flathub.org/apps/io.github.pieterdd.StretchBreak). GNOME users may want to install the [companion extension](https://extensions.gnome.org/extension/8231/stretch-break-companion/) that displays break status and provides settings access from a context menu. For a manual install, run `cargo build --release`. You may need to install additional system-level build dependencies (see [Dockerfile](Dockerfile) for reference). + + +## Terminal API and third-party integrations + +It is possible to control Stretch Break from the terminal: + +``` +$ flatpak run io.github.pieterdd.StretchBreak -h +Usage: stretch-break [OPTIONS] [COMMAND] + +Commands: + snooze-for Stop prompting for breaks for the specified amount of minutes. + unmute Show break prompts until further notice. + mute Stop prompting for breaks until further notice. + break Start a break right now. + set-reading-mode When reading mode is active, timer won't reset during idle activity. + widget-api Status data for desktop widgets that source data from terminal commands. + help Print this message or the help of the given subcommand(s) + +Options: + --hide Background mode: don't show the GUI. + -h, --help Print help +``` + +Use the widget API to get quick access to the status indicator data that's used within the GNOME Shell extension. This can help integrate Stretch Break with KDE, Cinnamon, i3, Sway, Niri or other desktop environments. If you made a custom integration, feel free to tell me about it via the Issues tab! From a55c60726740ee083c945b1c67010d00b3c78dbc Mon Sep 17 00:00:00 2001 From: pieterdd Date: Mon, 29 Dec 2025 23:08:55 +0100 Subject: [PATCH 06/10] Solve timezone issue in test --- src/dbus.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/dbus.rs b/src/dbus.rs index 90e546f..11846eb 100644 --- a/src/dbus.rs +++ b/src/dbus.rs @@ -209,7 +209,7 @@ impl DBusServer { #[cfg(test)] mod tests { - use chrono::{Duration, Local, TimeDelta, TimeZone, Utc}; + use chrono::{DateTime, Duration, Local, TimeDelta, TimeZone, Utc}; use crate::{ backend::idle_monitoring::{ @@ -314,6 +314,7 @@ mod tests { #[test] fn idle_status_muted() { let now = Local::now().to_utc(); + let snoozed_until_time = Utc.with_ymd_and_hms(2025, 2, 3, 12, 34, 11).unwrap(); let info = IdleInfo { idle_since_seconds: 2, last_checked: now, @@ -324,9 +325,7 @@ mod tests { active_since: now.checked_sub_signed(TimeDelta::seconds(20)).unwrap(), }, }, - presence_mode: PresenceMode::SnoozedUntil( - Utc.with_ymd_and_hms(2025, 2, 3, 12, 34, 11).unwrap(), - ), + presence_mode: PresenceMode::SnoozedUntil(snoozed_until_time), reading_mode: false, time_to_break_secs: DEFAULT_TIME_TO_BREAK_SECS, break_length_secs: DEFAULT_BREAK_LENGTH_SECS, @@ -338,10 +337,11 @@ mod tests { normal_timer_value: String::from("19:29"), countdown_to_reset_value: String::from(""), overrun_value: String::from(""), - presence_mode: PresenceMode::SnoozedUntil( - Utc.with_ymd_and_hms(2025, 2, 3, 12, 34, 11).unwrap(), - ), - snoozed_until_time: Some(String::from("13:34")), + presence_mode: PresenceMode::SnoozedUntil(snoozed_until_time), + snoozed_until_time: Some(format!( + "{}", + DateTime::::from(snoozed_until_time).format("%R"), + )), reading_mode: false, } ) From 041a9220e36da84b5e7442f2aca040ff9e629c34 Mon Sep 17 00:00:00 2001 From: pieterdd Date: Mon, 29 Dec 2025 21:34:55 +0100 Subject: [PATCH 07/10] Add CI --- .github/workflows/release-artifacts.yml | 44 ++++++++++++------------- .github/workflows/rust.yml | 23 +++++++++++++ Dockerfile | 11 +++++-- 3 files changed, 53 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml index 1f19a70..c3d4a94 100644 --- a/.github/workflows/release-artifacts.yml +++ b/.github/workflows/release-artifacts.yml @@ -7,25 +7,25 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Build - run: docker build -t tmp . - - name: Run tests - run: docker run --rm tmp cargo test - - name: Extract artifacts - run: | - docker run --name tmp tmp true - docker cp tmp:/build/target/release/stretch-break stretch-break.x86_64 - docker cp tmp:/build/stretch-break.rpm stretch-break.x86_64.rpm - - name: Upload binary - uses: actions/upload-artifact@v4 - with: - name: stretch-break.x86_64 - path: stretch-break.x86_64 - if-no-files-found: error - - name: Upload RPM - uses: actions/upload-artifact@v4 - with: - name: stretch-break.x86_64.rpm - path: stretch-break.x86_64.rpm - if-no-files-found: error + - uses: actions/checkout@v4 + - name: Build + run: docker build -t tmp --target rpm . + - name: Run tests + run: docker run --rm tmp cargo test + - name: Extract artifacts + run: | + docker run --name tmp tmp true + docker cp tmp:/build/target/release/stretch-break stretch-break.x86_64 + docker cp tmp:/build/stretch-break.rpm stretch-break.x86_64.rpm + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: stretch-break.x86_64 + path: stretch-break.x86_64 + if-no-files-found: error + - name: Upload RPM + uses: actions/upload-artifact@v4 + with: + name: stretch-break.x86_64.rpm + path: stretch-break.x86_64.rpm + if-no-files-found: error diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..75be748 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,23 @@ +name: Rust + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: always + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build + run: docker build -t tmp --target debug . + - name: Check lock file + run: docker run --rm tmp cargo check --locked + - name: Run tests + run: docker run --rm tmp cargo test diff --git a/Dockerfile b/Dockerfile index 5fa499a..c75d7c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,16 @@ -FROM fedora +FROM fedora AS base RUN dnf update -y RUN dnf install -y cargo -RUN dnf install -y pkgconf-pkg-config alsa-lib-devel dbus-devel libX11-devel libXScrnSaver-devel glib2-devel cairo-devel cairo-gobject-devel gtk4-devel libadwaita-devel -RUN cargo install cargo-generate-rpm +RUN dnf install -y pkgconf-pkg-config alsa-lib-devel dbus-devel libX11-devel libXScrnSaver-devel glib2-devel cairo-devel cairo-gobject-devel gtk4-devel libadwaita-devel libnotify-devel WORKDIR /build COPY . /build + +FROM base AS debug +RUN cargo build + +FROM base AS rpm +RUN cargo install cargo-generate-rpm RUN cargo build --release RUN cargo generate-rpm -o stretch-break.rpm From 8bad0a76b3d041cf2cebc2859e5cf4e40570022c Mon Sep 17 00:00:00 2001 From: pieterdd Date: Sat, 27 Dec 2025 17:41:33 +0100 Subject: [PATCH 08/10] Add release notes --- meta/io.github.pieterdd.StretchBreak.metainfo.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meta/io.github.pieterdd.StretchBreak.metainfo.xml b/meta/io.github.pieterdd.StretchBreak.metainfo.xml index 0e23678..86f8bb2 100644 --- a/meta/io.github.pieterdd.StretchBreak.metainfo.xml +++ b/meta/io.github.pieterdd.StretchBreak.metainfo.xml @@ -34,9 +34,9 @@ https://github.com/pieterdd/StretchBreak + https://github.com/pieterdd/StretchBreak/issues -

(Stretch Break is still maturing. If you run into an issue, feel free to report it on GitHub!)

Ergonomic support utility that regularly reminds you to take breaks from using your computer. Stretch Break aims to provide an alternative to tools like Workrave and Safe Eyes @@ -60,6 +60,16 @@ + + +

    +
  • Implement widget API for third-party GUI integrations
  • +
  • Implement shell commands to control Stretch Break
  • +
  • Remove deprecated prebreak timer value in DBus API
  • +
  • Update to Relm4 v0.10
  • +
+
+
    From 9497854cf46d218427e5667c9efc6fe5219cef33 Mon Sep 17 00:00:00 2001 From: pieterdd Date: Thu, 1 Jan 2026 12:10:45 +0100 Subject: [PATCH 09/10] Add AI policy --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index bda528e..5579cfa 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,14 @@ Options: ``` Use the widget API to get quick access to the status indicator data that's used within the GNOME Shell extension. This can help integrate Stretch Break with KDE, Cinnamon, i3, Sway, Niri or other desktop environments. If you made a custom integration, feel free to tell me about it via the Issues tab! + + +## AI policy + +- Stretch Break does not accept vibecoded contributions. +- Stretch Break is open to some level of AI assistance in contributions, provided that: + * The author discloses which AI tooling they used + * The author is able to explain what their code does + * There are no quality issues with the code + * The author assumes the same responsibility over AI-written parts as human-written parts + * The author's contribution does not infringe on anyone else's intellectual property rights From 4bf56b7547bf6a145bfe74a0ccc7623ddb391233 Mon Sep 17 00:00:00 2001 From: pieterdd Date: Sat, 27 Dec 2025 17:58:01 +0100 Subject: [PATCH 10/10] Bump version to 0.1.9 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ad6d2f5..5ab7307 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2346,7 +2346,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stretch-break" -version = "0.1.8" +version = "0.1.9" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index 857c83b..2c63da8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stretch-break" -version = "0.1.8" +version = "0.1.9" edition = "2024" exclude = [ ".vscode",