Compare commits

...

12 Commits
v0.3.1 ... main

Author SHA1 Message Date
Demmie
59c6dd1e7a
Update Cargo dependencies 2025-07-27 23:11:03 -04:00
Demmie
eafd5a7166
Fix new warnings 2025-07-27 23:00:12 -04:00
Demmie
8dde3b04ab
Update dependencies 2025-05-06 12:53:29 -04:00
2e3s
c85bbf0aaa
Update version to 0.3.2-alpha.3 2025-05-06 11:10:39 -04:00
2e3s
620d5865a9
Merge pull request #48 from vdonich/patch-1
Update watchers priorities
2025-03-18 01:01:13 -04:00
vdonich
bea3a4ac58
Update watchers priorities
Make extension watcher to take precedence over X11 window watcher when available.
This would make Gnome extension be activated correctly, when using XWayland.
2025-03-18 00:18:17 +00:00
2e3s
d1e3540669
Merge pull request #45 from wojnilowicz/fix-spdx
Use SPDX short identifier
2025-02-17 16:24:34 -05:00
Łukasz Wojniłowicz
994b1cec6a Use SPDX short identifier
According to https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields
the license field should be an SPDX license expression.
2025-02-17 18:12:39 +01:00
Demmie
b07d3958bb
Add another connection attempt 2025-01-22 02:22:41 -05:00
Demmie
7ac76da921
Fix client host 2025-01-19 03:43:06 -05:00
Demmie
03e94e2f26
Make bundle server host configurable 2025-01-15 14:46:02 -05:00
Demmie
ff16bd6221
Mention supported formats and RPM 2024-12-24 22:16:49 -05:00
13 changed files with 370 additions and 148 deletions

387
Cargo.lock generated
View File

@ -149,9 +149,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.95"
version = "1.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
[[package]]
name = "appdirs"
@ -248,7 +248,7 @@ dependencies = [
"futures-lite",
"parking",
"polling",
"rustix",
"rustix 0.38.42",
"slab",
"tracing",
"windows-sys 0.59.0",
@ -280,7 +280,7 @@ dependencies = [
"cfg-if",
"event-listener",
"futures-lite",
"rustix",
"rustix 0.38.42",
"tracing",
]
@ -307,7 +307,7 @@ dependencies = [
"cfg-if",
"futures-core",
"futures-io",
"rustix",
"rustix 0.38.42",
"signal-hook-registry",
"slab",
"windows-sys 0.59.0",
@ -483,7 +483,7 @@ dependencies = [
"aw-query",
"aw-transform",
"chrono",
"clap 4.5.23",
"clap 4.5.41",
"fern 0.6.2",
"gethostname 0.4.3",
"jemallocator",
@ -499,7 +499,7 @@ dependencies = [
"sd-notify",
"serde",
"serde_json",
"toml",
"toml 0.8.22",
"uuid",
]
@ -519,13 +519,13 @@ dependencies = [
[[package]]
name = "awatcher"
version = "0.3.1"
version = "0.3.2-alpha.3"
dependencies = [
"anyhow",
"aw-datastore",
"aw-server",
"chrono",
"clap 4.5.23",
"clap 4.5.41",
"fern 0.7.1",
"image",
"ksni",
@ -535,7 +535,7 @@ dependencies = [
"serde",
"tempfile",
"tokio",
"toml",
"toml 0.9.2",
"watchers",
]
@ -704,9 +704,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "chrono"
version = "0.4.39"
version = "0.4.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d"
dependencies = [
"android-tzdata",
"iana-time-zone",
@ -714,7 +714,7 @@ dependencies = [
"num-traits",
"serde",
"wasm-bindgen",
"windows-targets 0.52.6",
"windows-link",
]
[[package]]
@ -734,9 +734,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.23"
version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84"
checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9"
dependencies = [
"clap_builder",
"clap_derive",
@ -744,9 +744,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.23"
version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838"
checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d"
dependencies = [
"anstream",
"anstyle",
@ -756,9 +756,9 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "4.5.18"
version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491"
dependencies = [
"heck",
"proc-macro2",
@ -1043,7 +1043,16 @@ version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
dependencies = [
"dirs-sys",
"dirs-sys 0.4.1",
]
[[package]]
name = "dirs"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"
dependencies = [
"dirs-sys 0.5.0",
]
[[package]]
@ -1054,10 +1063,22 @@ checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
dependencies = [
"libc",
"option-ext",
"redox_users",
"redox_users 0.4.6",
"windows-sys 0.48.0",
]
[[package]]
name = "dirs-sys"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
dependencies = [
"libc",
"option-ext",
"redox_users 0.5.0",
"windows-sys 0.59.0",
]
[[package]]
name = "dlib"
version = "0.5.2"
@ -1250,7 +1271,7 @@ dependencies = [
"atomic 0.6.0",
"pear",
"serde",
"toml",
"toml 0.8.22",
"uncased",
"version_check",
]
@ -1312,7 +1333,6 @@ checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
dependencies = [
"futures-channel",
"futures-core",
"futures-executor",
"futures-io",
"futures-sink",
"futures-task",
@ -1335,17 +1355,6 @@ version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
[[package]]
name = "futures-executor"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-io"
version = "0.3.31"
@ -1447,11 +1456,11 @@ dependencies = [
[[package]]
name = "gethostname"
version = "0.5.0"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc3655aa6818d65bc620d6911f05aa7b6aeb596291e1e9f79e52df85583d1e30"
checksum = "fc257fdb4038301ce4b9cd1b3b51704509692bb3ff716a410cbd07925d9dae55"
dependencies = [
"rustix",
"rustix 1.0.7",
"windows-targets 0.52.6",
]
@ -1463,7 +1472,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"libc",
"wasi",
"wasi 0.11.0+wasi-snapshot-preview1",
]
[[package]]
name = "getrandom"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0"
dependencies = [
"cfg-if",
"libc",
"r-efi",
"wasi 0.14.2+wasi-0.2.4",
]
[[package]]
@ -1637,7 +1658,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
"socket2",
"socket2 0.5.7",
"tokio",
"tower-service",
"tracing",
@ -1698,9 +1719,9 @@ dependencies = [
[[package]]
name = "image"
version = "0.25.5"
version = "0.25.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b"
checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a"
dependencies = [
"bytemuck",
"byteorder-lite",
@ -1763,6 +1784,17 @@ dependencies = [
"syn",
]
[[package]]
name = "io-uring"
version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4"
dependencies = [
"bitflags 2.6.0",
"cfg-if",
"libc",
]
[[package]]
name = "ipnet"
version = "2.10.1"
@ -1850,7 +1882,7 @@ dependencies = [
"combine",
"jni-sys",
"log",
"thiserror",
"thiserror 1.0.64",
"walkdir",
]
@ -1893,7 +1925,7 @@ dependencies = [
"dbus",
"dbus-codegen",
"dbus-tree",
"thiserror",
"thiserror 1.0.64",
]
[[package]]
@ -1916,9 +1948,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
[[package]]
name = "libc"
version = "0.2.169"
version = "0.2.174"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
[[package]]
name = "libdbus-sys"
@ -1977,6 +2009,12 @@ version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
name = "linux-raw-sys"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
[[package]]
name = "lock_api"
version = "0.4.12"
@ -1989,9 +2027,9 @@ dependencies = [
[[package]]
name = "log"
version = "0.4.22"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
[[package]]
name = "log-panics"
@ -2100,7 +2138,7 @@ checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
dependencies = [
"hermit-abi 0.3.9",
"libc",
"wasi",
"wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys 0.52.0",
]
@ -2287,9 +2325,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "open"
version = "5.3.1"
version = "5.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c"
checksum = "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95"
dependencies = [
"is-wsl",
"libc",
@ -2507,7 +2545,7 @@ dependencies = [
"concurrent-queue",
"hermit-abi 0.4.0",
"pin-project-lite",
"rustix",
"rustix 0.38.42",
"tracing",
"windows-sys 0.59.0",
]
@ -2610,6 +2648,12 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "r-efi"
version = "5.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
[[package]]
name = "rand"
version = "0.8.5"
@ -2637,7 +2681,7 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
"getrandom 0.2.15",
]
[[package]]
@ -2670,7 +2714,7 @@ dependencies = [
"rand_chacha",
"simd_helpers",
"system-deps",
"thiserror",
"thiserror 1.0.64",
"v_frame",
"wasm-bindgen",
]
@ -2734,9 +2778,20 @@ version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
"getrandom",
"getrandom 0.2.15",
"libredox",
"thiserror",
"thiserror 1.0.64",
]
[[package]]
name = "redox_users"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b"
dependencies = [
"getrandom 0.2.15",
"libredox",
"thiserror 2.0.12",
]
[[package]]
@ -2956,21 +3011,20 @@ dependencies = [
[[package]]
name = "rstest"
version = "0.23.0"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a2c585be59b6b5dd66a9d2084aa1d8bd52fbdb806eafdeffb52791147862035"
checksum = "f5a3193c063baaa2a95a33f03035c8a72b83d97a54916055ba22d35ed3839d49"
dependencies = [
"futures",
"futures-timer",
"futures-util",
"rstest_macros",
"rustc_version",
]
[[package]]
name = "rstest_macros"
version = "0.23.0"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "825ea780781b15345a146be27eaefb05085e337e869bff01b4306a4fd4a9ad5a"
checksum = "9c845311f0ff7951c5506121a9ad75aec44d083c31583b2ea5a30bcb0b0abba0"
dependencies = [
"cfg-if",
"glob",
@ -3059,7 +3113,20 @@ dependencies = [
"bitflags 2.6.0",
"errno",
"libc",
"linux-raw-sys",
"linux-raw-sys 0.4.14",
"windows-sys 0.59.0",
]
[[package]]
name = "rustix"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
dependencies = [
"bitflags 2.6.0",
"errno",
"libc",
"linux-raw-sys 0.9.4",
"windows-sys 0.59.0",
]
@ -3176,9 +3243,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
[[package]]
name = "serde"
version = "1.0.216"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",
]
@ -3197,9 +3264,9 @@ dependencies = [
[[package]]
name = "serde_derive"
version = "1.0.216"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
@ -3249,6 +3316,15 @@ dependencies = [
"serde",
]
[[package]]
name = "serde_spanned"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83"
dependencies = [
"serde",
]
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
@ -3297,7 +3373,7 @@ version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b"
dependencies = [
"dirs",
"dirs 5.0.1",
]
[[package]]
@ -3355,6 +3431,16 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "socket2"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"
dependencies = [
"libc",
"windows-sys 0.59.0",
]
[[package]]
name = "spin"
version = "0.9.8"
@ -3447,7 +3533,7 @@ dependencies = [
"cfg-expr",
"heck",
"pkg-config",
"toml",
"toml 0.8.22",
"version-compare",
]
@ -3459,14 +3545,14 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tempfile"
version = "3.14.0"
version = "3.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1"
dependencies = [
"cfg-if",
"fastrand",
"getrandom 0.3.2",
"once_cell",
"rustix",
"rustix 1.0.7",
"windows-sys 0.59.0",
]
@ -3485,7 +3571,16 @@ version = "1.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84"
dependencies = [
"thiserror-impl",
"thiserror-impl 1.0.64",
]
[[package]]
name = "thiserror"
version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
dependencies = [
"thiserror-impl 2.0.12",
]
[[package]]
@ -3499,6 +3594,17 @@ dependencies = [
"syn",
]
[[package]]
name = "thiserror-impl"
version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "thread_local"
version = "1.1.8"
@ -3568,26 +3674,28 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.42.0"
version = "1.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551"
checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35"
dependencies = [
"backtrace",
"bytes",
"io-uring",
"libc",
"mio",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"slab",
"socket2 0.6.0",
"tokio-macros",
"windows-sys 0.52.0",
"windows-sys 0.59.0",
]
[[package]]
name = "tokio-macros"
version = "2.4.0"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
dependencies = [
"proc-macro2",
"quote",
@ -3630,38 +3738,84 @@ dependencies = [
[[package]]
name = "toml"
version = "0.8.19"
version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"serde_spanned 0.6.8",
"toml_datetime 0.6.9",
"toml_edit",
]
[[package]]
name = "toml_datetime"
version = "0.6.8"
name = "toml"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
checksum = "ed0aee96c12fa71097902e0bb061a5e1ebd766a6636bb605ba401c45c1650eac"
dependencies = [
"indexmap",
"serde",
"serde_spanned 1.0.0",
"toml_datetime 0.7.0",
"toml_parser",
"toml_writer",
"winnow 0.7.12",
]
[[package]]
name = "toml_datetime"
version = "0.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3"
dependencies = [
"serde",
]
[[package]]
name = "toml_datetime"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
version = "0.22.22"
version = "0.22.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e"
dependencies = [
"indexmap",
"serde",
"serde_spanned",
"toml_datetime",
"winnow",
"serde_spanned 0.6.8",
"toml_datetime 0.6.9",
"toml_write",
"winnow 0.7.12",
]
[[package]]
name = "toml_parser"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97200572db069e74c512a14117b296ba0a80a30123fbbb5aa1f4a348f639ca30"
dependencies = [
"winnow 0.7.12",
]
[[package]]
name = "toml_write"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076"
[[package]]
name = "toml_writer"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64"
[[package]]
name = "tower-service"
version = "0.3.3"
@ -3846,7 +4000,7 @@ version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314"
dependencies = [
"getrandom",
"getrandom 0.2.15",
"serde",
]
@ -3916,6 +4070,15 @@ version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasi"
version = "0.14.2+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
dependencies = [
"wit-bindgen-rt",
]
[[package]]
name = "wasm-bindgen"
version = "0.2.93"
@ -3985,14 +4148,14 @@ checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
[[package]]
name = "watchers"
version = "0.3.1"
version = "0.3.2-alpha.3"
dependencies = [
"anyhow",
"async-trait",
"aw-client-rust",
"chrono",
"dirs",
"gethostname 0.5.0",
"dirs 6.0.0",
"gethostname 1.0.2",
"log",
"regex",
"rstest",
@ -4001,7 +4164,7 @@ dependencies = [
"serde_json",
"tempfile",
"tokio",
"toml",
"toml 0.9.2",
"wayland-client",
"wayland-protocols",
"wayland-protocols-plasma",
@ -4018,7 +4181,7 @@ checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6"
dependencies = [
"cc",
"downcast-rs",
"rustix",
"rustix 0.38.42",
"scoped-tls",
"smallvec",
"wayland-sys",
@ -4031,7 +4194,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280"
dependencies = [
"bitflags 2.6.0",
"rustix",
"rustix 0.38.42",
"wayland-backend",
"wayland-scanner",
]
@ -4173,6 +4336,12 @@ dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-link"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
[[package]]
name = "windows-sys"
version = "0.48.0"
@ -4330,6 +4499,15 @@ dependencies = [
"memchr",
]
[[package]]
name = "winnow"
version = "0.7.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95"
dependencies = [
"memchr",
]
[[package]]
name = "winreg"
version = "0.50.0"
@ -4340,6 +4518,15 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "wit-bindgen-rt"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
dependencies = [
"bitflags 2.6.0",
]
[[package]]
name = "x11rb"
version = "0.13.1"
@ -4347,7 +4534,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12"
dependencies = [
"gethostname 0.4.3",
"rustix",
"rustix 0.38.42",
"x11rb-protocol",
]
@ -4411,7 +4598,7 @@ dependencies = [
"tracing",
"uds_windows",
"windows-sys 0.59.0",
"winnow",
"winnow 0.6.20",
"xdg-home",
"zbus_macros",
"zbus_names",

View File

@ -4,7 +4,7 @@ description = "An activity and idle watcher based on ActivityWatch"
version = { workspace = true }
authors = ["Demmie <2e3s19@gmail.com>"]
edition = "2021"
license = "Mozilla Public License 2.0"
license = "MPL-2.0"
repository = "https://github.com/2e3s/awatcher"
[[bin]]
@ -12,29 +12,29 @@ name = "awatcher"
path = "src/main.rs"
[build-dependencies]
image = { version = "0.25.5" }
image = { version = "0.25.6" }
[workspace]
members = ["watchers"]
[workspace.package]
version = "0.3.1"
version = "0.3.2-alpha.3"
[workspace.dependencies]
anyhow = "1.0.95"
log = { version = "0.4.22", features = ["std"] }
tokio = { version = "1.42.0" }
serde = "1.0.216"
anyhow = "1.0.98"
log = { version = "0.4.27", features = ["std"] }
tokio = { version = "1.47.0" }
serde = "1.0.219"
[dev-dependencies]
rstest = "0.23.0"
tempfile = "3.14.0"
rstest = "0.26.1"
tempfile = "3.20.0"
[dependencies]
watchers = { path = "./watchers", default-features = false }
chrono = "0.4.39"
toml = "0.8.19"
clap = { version = "4.5.23", features = ["string"] }
chrono = "0.4.41"
toml = "0.9.2"
clap = { version = "4.5.41", features = ["string"] }
fern = { version = "0.7.1", features = ["colored"] }
log = { workspace = true }
anyhow = { workspace = true }
@ -43,7 +43,7 @@ tokio = { workspace = true, features = ["rt", "macros", "signal"] }
ksni = {version = "0.2.2", optional = true}
aw-server = { git = "https://github.com/ActivityWatch/aw-server-rust", optional = true, rev = "656f3c9" }
aw-datastore = { git = "https://github.com/ActivityWatch/aw-server-rust", optional = true, rev = "656f3c9" }
open = { version = "5.3.1", optional = true }
open = { version = "5.3.2", optional = true }
serde = { workspace = true, optional = true }
[features]

View File

@ -10,13 +10,14 @@ The foundation is [ActivityWatch](https://github.com/ActivityWatch), which inclu
The unbundled watcher is supposed to replace the original idle and active window watchers from the original distribution.
The bundled executable can be used independently as it contains the server, UI and tray.
The binaries for the bundle, bundled DEB and ActivityWatch watchers replacement can be downloaded from
The binaries for the bundle, bundled DEB/RPM and ActivityWatch watchers replacement can be downloaded from
[releases](https://github.com/2e3s/awatcher/releases).
At this moment, neither Flatpak nor AppImage support quering Wayland activity.
### Module for ActivityWatch
- Run `sudo unzip aw-awatcher.zip -d /usr/local/bin` in the console to allow ActivityWatch to detect its presence.
- Or install the provided **aw-awatcher_\*.deb**.
- Or install the provided **aw-awatcher_\*.deb** or **aw-awatcher_\*.rpm**.
- Remove `aw-watcher-window` and `aw-watcher-afk` from autostart at `aw-qt/aw-qt.toml` in [config directory](https://docs.activitywatch.net/en/latest/directories.html#config),
add `aw-awatcher`.
- Restart ActivityWatch. In the Modules submenu there should be a new checked module **aw-awatcher**. Note that awatcher shows up in the Web UI under Timeline as `aw-watcher-window_$HOSTNAME`.

View File

@ -19,10 +19,10 @@ pub async fn run(
);
if !no_tray {
let tray = Tray::new(host, port, config_file, shutdown_sender, manager);
let tray = Tray::new(host.clone(), port, config_file, shutdown_sender, manager);
let service = ksni::TrayService::new(tray);
service.spawn();
}
server::run(port).await;
server::run(host.clone(), port).await;
}

View File

@ -1,6 +1,7 @@
use std::collections::HashMap;
use std::net::Ipv4Addr;
use std::path::PathBuf;
use std::str::FromStr;
use tokio::sync::mpsc::UnboundedSender;
use super::modules::Manager;
@ -22,6 +23,17 @@ impl Tray {
shutdown_sender: UnboundedSender<()>,
watchers_manager: Manager,
) -> Self {
let is_zero_first_octet = match Ipv4Addr::from_str(&server_host) {
Ok(ip) => ip.octets()[0] == 0,
Err(_) => false,
};
let server_host = if is_zero_first_octet {
"localhost".to_string()
} else {
server_host
};
let checks = watchers_manager
.path_watchers
.iter()

View File

@ -1,8 +1,9 @@
use anyhow::anyhow;
use aw_server::endpoints::{build_rocket, AssetResolver, ServerState};
use std::net::ToSocketAddrs;
use std::sync::Mutex;
pub async fn run(port: u16) {
pub async fn run(host: String, port: u16) {
let db_path = aw_server::dirs::db_path(false)
.map_err(|()| anyhow!("DB path is not found"))
.unwrap()
@ -11,8 +12,13 @@ pub async fn run(port: u16) {
.to_string();
let device_id = aw_server::device_id::get_device_id();
let mut config = aw_server::config::create_config(false);
config.address = "127.0.0.1".to_string();
config.port = port;
let mut addrs_iter = (host + ":" + &port.to_string()).to_socket_addrs().unwrap();
let address = addrs_iter.next().unwrap();
info!("Starting server on {address}");
config.address = address.ip().to_string();
config.port = address.port();
let legacy_import = false;
let server_state = ServerState {

View File

@ -25,9 +25,13 @@ async fn main() -> anyhow::Result<(), Box<dyn Error>> {
let config = config.watchers_config;
if config.no_server {
warn!("Not sending to server {}:{}", config.host, config.port);
warn!(
"Not sending to server {}:{}",
config.client_host(),
config.port
);
} else {
info!("Sending to server {}:{}", config.host, config.port);
info!("Sending to server {}:{}", config.client_host(), config.port);
}
info!(
"Idle timeout: {} seconds",

View File

@ -10,7 +10,7 @@ crate-type = ["lib"]
path = "src/lib.rs"
[dev-dependencies]
rstest = "0.23.0"
rstest = "0.26.1"
tempfile = "3.13.0"
[dependencies]
@ -22,13 +22,13 @@ wayland-protocols-wlr = { version = "0.3.5", features = ["client"] }
x11rb = { version = "0.13.1", features = ["screensaver"] }
zbus = {version = "5.1.0", optional = true}
chrono = "0.4.38"
toml = "0.8.19"
dirs = "5.0.1"
toml = "0.9.2"
dirs = "6.0.0"
serde = { workspace = true, features = ["derive"] }
serde_default = "0.2.0"
serde_json = "1.0.132"
regex = "1.11.1"
gethostname = "0.5.0"
gethostname = "1.0.2"
log = { workspace = true }
anyhow = { workspace = true }
async-trait = "0.1.83"

View File

@ -2,6 +2,8 @@ pub mod defaults;
mod file_config;
mod filters;
use std::{net::Ipv4Addr, str::FromStr};
use self::filters::Filter;
use chrono::Duration;
pub use file_config::FileConfig;
@ -17,6 +19,18 @@ pub struct Config {
pub filters: Vec<Filter>,
}
fn normalize_server_host(server_host: &str) -> String {
let is_zero_first_octet = match Ipv4Addr::from_str(server_host) {
Ok(ip) => ip.octets()[0] == 0,
Err(_) => false,
};
if is_zero_first_octet {
"127.0.0.1".to_string()
} else {
server_host.to_string()
}
}
impl Config {
pub fn match_window_data(&self, app_id: &str, title: &str) -> FilterResult {
for filter in &self.filters {
@ -28,4 +42,8 @@ impl Config {
FilterResult::Skip
}
pub fn client_host(&self) -> String {
normalize_server_host(&self.host)
}
}

View File

@ -17,7 +17,7 @@ pub struct ReportClient {
impl ReportClient {
pub async fn new(config: Config) -> anyhow::Result<Self, Box<dyn Error>> {
let client = AwClient::new(&config.host, config.port, "awatcher")?;
let client = AwClient::new(&config.client_host(), config.port, "awatcher")?;
let hostname = gethostname::gethostname().into_string().unwrap();
let idle_bucket_name = format!("aw-watcher-afk_{hostname}");
@ -41,14 +41,14 @@ impl ReportClient {
Fut: Future<Output = Result<T, E>>,
E: std::error::Error + Send + Sync + 'static,
{
for (attempt, &secs) in [1, 2].iter().enumerate() {
for (attempt, &secs) in [1, 2, 4].iter().enumerate() {
match f().await {
Ok(val) => return Ok(val),
Err(e)
if e.to_string()
.contains("tcp connect error: Connection refused") =>
{
warn!("Failed to connect on attempt #{attempt}, retrying: {}", e);
warn!("Failed to connect on attempt #{attempt}, retrying: {e}");
tokio::time::sleep(tokio::time::Duration::from_secs(secs)).await;
}
@ -107,11 +107,7 @@ impl ReportClient {
let mut data = Map::new();
if let Some((inserted_app_id, inserted_title)) = self.get_filtered_data(app_id, title) {
trace!(
"Reporting app_id: {}, title: {}",
inserted_app_id,
inserted_title
);
trace!("Reporting app_id: {inserted_app_id}, title: {inserted_title}");
data.insert("app".to_string(), Value::String(inserted_app_id));
data.insert("title".to_string(), Value::String(inserted_title));
@ -155,13 +151,13 @@ impl ReportClient {
match filter_result {
FilterResult::Replace(replacement) => {
let app_id = if let Some(replace_app_id) = replacement.replace_app_id {
trace!("Replacing app_id by {}", replace_app_id);
trace!("Replacing app_id by {replace_app_id}");
replace_app_id
} else {
app_id.to_string()
};
let title = if let Some(replace_title) = replacement.replace_title {
trace!("Replacing title by {}", replace_title);
trace!("Replacing title by {replace_title}");
replace_title
} else {
title.to_string()

View File

@ -110,15 +110,15 @@ async fn filter_first_supported(
client,
"KWin window (script)"
));
watch!(create_watcher::<x11_window::WindowWatcher>(
client,
"X11 window"
));
#[cfg(feature = "gnome")]
watch!(create_watcher::<gnome_window::WindowWatcher>(
client,
"Gnome window (extension)"
));
watch!(create_watcher::<x11_window::WindowWatcher>(
client,
"X11 window"
));
}
};
@ -138,7 +138,7 @@ pub async fn run_first_supported(client: Arc<ReportClient>, watcher_type: &Watch
error!("Error on {watcher_type} iteration: {e}");
}
Err(_) => {
error!("Timeout on {watcher_type} iteration after {:?}", sleep_time);
error!("Timeout on {watcher_type} iteration after {sleep_time:?}");
}
}

View File

@ -258,8 +258,7 @@ mod tests {
assert_eq!(
self.diff_seconds(*last_input_time),
expected_last_input_seconds_ago,
"{}",
message
"{message}"
);
} else {
panic!("Expected active status");
@ -283,10 +282,9 @@ mod tests {
assert_eq!(
self.diff_seconds(*last_input_time),
last_input_ago,
"{}",
message
"{message}"
);
assert_eq!(duration.num_seconds(), last_input_ago, "{}", message);
assert_eq!(duration.num_seconds(), last_input_ago, "{message}");
} else {
panic!("Expected idle status");
}

View File

@ -92,7 +92,7 @@ impl Dispatch<ZwlrForeignToplevelHandleV1, ()> for ToplevelState {
window.app_id = app_id;
}
HandleEvent::State { state } => {
trace!("State is changed for {id}: {:?}", state);
trace!("State is changed for {id}: {state:?}");
if state.contains(&(HandleState::Activated as u8)) {
trace!("Window is activated: {id}");
toplevel_state.current_window_id = Some(id);