├── .gitignore ├── CHANGELOG.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── TODO ├── build.rs ├── example_scripts ├── README.md ├── swww_init_according_to_time_of_day.sh ├── swww_randomize.sh └── swww_scheduler.sh ├── fix_zsh_completion.sh ├── src ├── cli.rs ├── communication.rs ├── daemon │ ├── mod.rs │ ├── processor │ │ ├── animations.rs │ │ ├── comp_decomp.rs │ │ └── mod.rs │ └── wayland.rs └── main.rs ├── tests └── integration_tests.rs └── version.sh /.gitignore: -------------------------------------------------------------------------------- 1 | target/* 2 | completions/* 3 | test_images/* 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### Unreleased 2 | 3 | 4 | ### 0.6.0 5 | 6 | **BREAKING CHANGES** 7 | 8 | * `transition-speed` no longer exists. Now, speed is controlled through a 9 | bezier curve (`transition-bezier`), and duration (`transition-duration`) 10 | flags (note this also applies to the env var, SWWW_TRANSITION_SPEED). A 11 | warning was added when we detect the presence of the SWWW_TRANSITION_SPEED 12 | environment variable. This warning will go away in the next release, it is 13 | only there as a means of making sure everyone knows the variable has been 14 | superseeded, and having it in your configs no longer does anything. 15 | 16 | Improvements: 17 | 18 | * New grow transition. Grow and outer transition now accept a --transition-pos 19 | command line argument. By @flick0. 20 | * Transitions `grow` and `outer` now both work with bezier curves (see 21 | breaking changes, above). This allows for finer control in animation speed 22 | than before. Also by @flick0. 23 | * Very slightly faster decompression routine 24 | 25 | ### 0.5.0 26 | 27 | **BREAKING CHANGES**: 28 | 29 | * `swww query` now formats its output as `: ...`, instead of 30 | ` = ...`. This will break your scripts if you relied on the output's 31 | format. 32 | 33 | Improvements: 34 | 35 | * Fixed `swww` getting stuck on a futex when a new monitor was connected (#26) 36 | * New `wipe` transition by @flick0 37 | * Several small code improvements by @WhyNotHugo 38 | * Typo fix (@thebenperson) 39 | 40 | ### 0.4.3 41 | 42 | * Check to see if daemon is REALLY running when we see tha socket already 43 | exists (#11) 44 | * Fix dpi scaling (#22) 45 | 46 | ### 0.4.2 47 | 48 | * Fixed #13. 49 | * Improved error message when daemon isn't running (#18) 50 | 51 | ### 0.4.1 52 | 53 | * Fixed regression where the image was stretched on resize (#16) 54 | 55 | ### 0.4.0 56 | 57 | * implemented the new transition effects 58 | 59 | * refactored socket code 60 | 61 | * refactored event loop initialization code, handling errors properly now 62 | 63 | * BREAKING CHANGE: we are using fast_image_resize to resize our images now. 64 | This makes resizing much faster (enough to smoothly play animations before 65 | caching is done), but it makes it so that the `Gaussian` and `Triangle` 66 | filters no longer exist. Furthermore, the filters `Bilinear` and `Mitchell` 67 | were added. 68 | 69 | * deleted previously deprecated `init -i` and `init -c` options 70 | 71 | ### 0.3.0 72 | 73 | * Limited image formats to: `gif`, `jpeg`, `jpeg_rayon`, `png`, `pnm`, `tga`, 74 | `tiff`, `webp`, `bmp`, `farbfeld` 75 | * Bumbed rust edition to 2021 76 | * Our custom compression is now even faster 77 | * I did a rewrite of the way the code that handled animations was structed. 78 | This made caching a LOT faster, but it incurs in more memory usage, since 79 | we spawn an extra thread to make a pipeline. That said, since this also 80 | greatly simplified the code itself, I considered it an overall positive 81 | change. 82 | * Fixed a bug where the animation wouldn't stop until it had processed all the 83 | frames, even when it was told to. 84 | * Setting a custom names and stack sizes to our threads. The custom name will 85 | help in debugging in the future, and the custom stack sizes lets us push the 86 | memory usage even lower. 87 | * Did all the preparatory work for us to start writing new transition effects. 88 | Ideally they should come in the next version, which should hopefully also be 89 | our first release (since then I will consider swww to be pretty much feature 90 | complete). 91 | 92 | ### 0.2.0 93 | 94 | Using unsafe to speed up decompression. 95 | Also, `swww init -i` and `swww init -c` may now be considered deprecated. 96 | It was originally created to bypass `swww init && swww img ` not 97 | working. Now, however, it seems to be working properly. In hindsight, it was 98 | probably already working for a while, but I failed to test it properly and 99 | thought it was still a problem. 100 | 101 | The `swww init -i` and `swww init -c` options shall remain for now, for 102 | compatibility and just in case a regression happens. Once I am confident 103 | enough, they will be eliminated (that will let me erase around 50 lines of 104 | code, I think). 105 | 106 | ### 0.1.0 107 | 108 | Initial release. 109 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "adler" 7 | version = "1.0.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 10 | 11 | [[package]] 12 | name = "assert_cmd" 13 | version = "2.0.6" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "ba45b8163c49ab5f972e59a8a5a03b6d2972619d486e19ec9fe744f7c2753d3c" 16 | dependencies = [ 17 | "bstr", 18 | "doc-comment", 19 | "predicates", 20 | "predicates-core", 21 | "predicates-tree", 22 | "wait-timeout", 23 | ] 24 | 25 | [[package]] 26 | name = "autocfg" 27 | version = "1.1.0" 28 | source = "registry+https://github.com/rust-lang/crates.io-index" 29 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 30 | 31 | [[package]] 32 | name = "bincode" 33 | version = "1.3.3" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 36 | dependencies = [ 37 | "serde", 38 | ] 39 | 40 | [[package]] 41 | name = "bitflags" 42 | version = "1.3.2" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 45 | 46 | [[package]] 47 | name = "bstr" 48 | version = "1.0.1" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "fca0852af221f458706eb0725c03e4ed6c46af9ac98e6a689d5e634215d594dd" 51 | dependencies = [ 52 | "memchr", 53 | "once_cell", 54 | "regex-automata", 55 | "serde", 56 | ] 57 | 58 | [[package]] 59 | name = "bumpalo" 60 | version = "3.10.0" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" 63 | 64 | [[package]] 65 | name = "bytemuck" 66 | version = "1.11.0" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | checksum = "a5377c8865e74a160d21f29c2d40669f53286db6eab59b88540cbb12ffc8b835" 69 | 70 | [[package]] 71 | name = "byteorder" 72 | version = "1.4.3" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 75 | 76 | [[package]] 77 | name = "calloop" 78 | version = "0.10.1" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" 81 | dependencies = [ 82 | "log", 83 | "nix 0.24.2", 84 | "slotmap", 85 | "thiserror", 86 | "vec_map", 87 | ] 88 | 89 | [[package]] 90 | name = "cc" 91 | version = "1.0.73" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 94 | dependencies = [ 95 | "jobserver", 96 | ] 97 | 98 | [[package]] 99 | name = "cfg-if" 100 | version = "1.0.0" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 103 | 104 | [[package]] 105 | name = "clap" 106 | version = "4.0.29" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | checksum = "4d63b9e9c07271b9957ad22c173bae2a4d9a81127680962039296abcd2f8251d" 109 | dependencies = [ 110 | "bitflags", 111 | "clap_derive", 112 | "clap_lex", 113 | "is-terminal", 114 | "once_cell", 115 | "strsim", 116 | "termcolor", 117 | "terminal_size", 118 | ] 119 | 120 | [[package]] 121 | name = "clap_complete" 122 | version = "4.0.6" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | checksum = "b7b3c9eae0de7bf8e3f904a5e40612b21fb2e2e566456d177809a48b892d24da" 125 | dependencies = [ 126 | "clap", 127 | ] 128 | 129 | [[package]] 130 | name = "clap_derive" 131 | version = "4.0.21" 132 | source = "registry+https://github.com/rust-lang/crates.io-index" 133 | checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" 134 | dependencies = [ 135 | "heck", 136 | "proc-macro-error", 137 | "proc-macro2", 138 | "quote", 139 | "syn", 140 | ] 141 | 142 | [[package]] 143 | name = "clap_lex" 144 | version = "0.3.0" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" 147 | dependencies = [ 148 | "os_str_bytes", 149 | ] 150 | 151 | [[package]] 152 | name = "color_quant" 153 | version = "1.1.0" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 156 | 157 | [[package]] 158 | name = "crc32fast" 159 | version = "1.3.2" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 162 | dependencies = [ 163 | "cfg-if", 164 | ] 165 | 166 | [[package]] 167 | name = "difflib" 168 | version = "0.4.0" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" 171 | 172 | [[package]] 173 | name = "dlib" 174 | version = "0.5.0" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" 177 | dependencies = [ 178 | "libloading", 179 | ] 180 | 181 | [[package]] 182 | name = "doc-comment" 183 | version = "0.3.3" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" 186 | 187 | [[package]] 188 | name = "downcast-rs" 189 | version = "1.2.0" 190 | source = "registry+https://github.com/rust-lang/crates.io-index" 191 | checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" 192 | 193 | [[package]] 194 | name = "either" 195 | version = "1.7.0" 196 | source = "registry+https://github.com/rust-lang/crates.io-index" 197 | checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" 198 | 199 | [[package]] 200 | name = "errno" 201 | version = "0.2.8" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" 204 | dependencies = [ 205 | "errno-dragonfly", 206 | "libc", 207 | "winapi", 208 | ] 209 | 210 | [[package]] 211 | name = "errno-dragonfly" 212 | version = "0.1.2" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 215 | dependencies = [ 216 | "cc", 217 | "libc", 218 | ] 219 | 220 | [[package]] 221 | name = "fast_image_resize" 222 | version = "2.3.0" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | checksum = "2eac341c4758cd07e018fe068757a31fcf25e8eb6338d8a6cd9bdb71467c2052" 225 | dependencies = [ 226 | "num-traits", 227 | "thiserror", 228 | ] 229 | 230 | [[package]] 231 | name = "flate2" 232 | version = "1.0.24" 233 | source = "registry+https://github.com/rust-lang/crates.io-index" 234 | checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" 235 | dependencies = [ 236 | "crc32fast", 237 | "miniz_oxide 0.5.3", 238 | ] 239 | 240 | [[package]] 241 | name = "fork" 242 | version = "0.1.20" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | checksum = "9788ce090af4bf8d6e8f43d3f7d12305c787456387bd2d88856fcda3aa1f0dca" 245 | dependencies = [ 246 | "libc", 247 | ] 248 | 249 | [[package]] 250 | name = "getrandom" 251 | version = "0.2.7" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" 254 | dependencies = [ 255 | "cfg-if", 256 | "libc", 257 | "wasi", 258 | ] 259 | 260 | [[package]] 261 | name = "gif" 262 | version = "0.11.4" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" 265 | dependencies = [ 266 | "color_quant", 267 | "weezl", 268 | ] 269 | 270 | [[package]] 271 | name = "heck" 272 | version = "0.4.0" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" 275 | 276 | [[package]] 277 | name = "hermit-abi" 278 | version = "0.2.6" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 281 | dependencies = [ 282 | "libc", 283 | ] 284 | 285 | [[package]] 286 | name = "image" 287 | version = "0.24.5" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" 290 | dependencies = [ 291 | "bytemuck", 292 | "byteorder", 293 | "color_quant", 294 | "gif", 295 | "jpeg-decoder", 296 | "num-rational", 297 | "num-traits", 298 | "png", 299 | "tiff", 300 | ] 301 | 302 | [[package]] 303 | name = "io-lifetimes" 304 | version = "0.7.3" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "1ea37f355c05dde75b84bba2d767906ad522e97cd9e2eef2be7a4ab7fb442c06" 307 | 308 | [[package]] 309 | name = "io-lifetimes" 310 | version = "1.0.3" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" 313 | dependencies = [ 314 | "libc", 315 | "windows-sys 0.42.0", 316 | ] 317 | 318 | [[package]] 319 | name = "is-terminal" 320 | version = "0.4.1" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | checksum = "927609f78c2913a6f6ac3c27a4fe87f43e2a35367c0c4b0f8265e8f49a104330" 323 | dependencies = [ 324 | "hermit-abi", 325 | "io-lifetimes 1.0.3", 326 | "rustix 0.36.4", 327 | "windows-sys 0.42.0", 328 | ] 329 | 330 | [[package]] 331 | name = "itertools" 332 | version = "0.10.3" 333 | source = "registry+https://github.com/rust-lang/crates.io-index" 334 | checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" 335 | dependencies = [ 336 | "either", 337 | ] 338 | 339 | [[package]] 340 | name = "itoa" 341 | version = "1.0.3" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" 344 | 345 | [[package]] 346 | name = "jobserver" 347 | version = "0.1.24" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" 350 | dependencies = [ 351 | "libc", 352 | ] 353 | 354 | [[package]] 355 | name = "jpeg-decoder" 356 | version = "0.3.0" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" 359 | 360 | [[package]] 361 | name = "js-sys" 362 | version = "0.3.59" 363 | source = "registry+https://github.com/rust-lang/crates.io-index" 364 | checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" 365 | dependencies = [ 366 | "wasm-bindgen", 367 | ] 368 | 369 | [[package]] 370 | name = "keyframe" 371 | version = "1.1.1" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "60708bf7981518d09095d6f5673ce5cf6a64f1e0d9708b554f670e6d9d2bd9a9" 374 | dependencies = [ 375 | "mint", 376 | "num-traits", 377 | ] 378 | 379 | [[package]] 380 | name = "lazy_static" 381 | version = "1.4.0" 382 | source = "registry+https://github.com/rust-lang/crates.io-index" 383 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 384 | 385 | [[package]] 386 | name = "libc" 387 | version = "0.2.134" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb" 390 | 391 | [[package]] 392 | name = "libloading" 393 | version = "0.7.3" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" 396 | dependencies = [ 397 | "cfg-if", 398 | "winapi", 399 | ] 400 | 401 | [[package]] 402 | name = "libm" 403 | version = "0.2.6" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" 406 | 407 | [[package]] 408 | name = "linux-raw-sys" 409 | version = "0.0.46" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" 412 | 413 | [[package]] 414 | name = "linux-raw-sys" 415 | version = "0.1.3" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f" 418 | 419 | [[package]] 420 | name = "log" 421 | version = "0.4.17" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 424 | dependencies = [ 425 | "cfg-if", 426 | ] 427 | 428 | [[package]] 429 | name = "lzzzz" 430 | version = "1.0.4" 431 | source = "registry+https://github.com/rust-lang/crates.io-index" 432 | checksum = "8014d1362004776e6a91e4c15a3aa7830d1b6650a075b51a9969ebb6d6af13bc" 433 | dependencies = [ 434 | "cc", 435 | ] 436 | 437 | [[package]] 438 | name = "memchr" 439 | version = "2.5.0" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 442 | 443 | [[package]] 444 | name = "memmap2" 445 | version = "0.5.5" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | checksum = "3a79b39c93a7a5a27eeaf9a23b5ff43f1b9e0ad6b1cdd441140ae53c35613fc7" 448 | dependencies = [ 449 | "libc", 450 | ] 451 | 452 | [[package]] 453 | name = "memoffset" 454 | version = "0.6.5" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 457 | dependencies = [ 458 | "autocfg", 459 | ] 460 | 461 | [[package]] 462 | name = "minimal-lexical" 463 | version = "0.2.1" 464 | source = "registry+https://github.com/rust-lang/crates.io-index" 465 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 466 | 467 | [[package]] 468 | name = "miniz_oxide" 469 | version = "0.5.3" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" 472 | dependencies = [ 473 | "adler", 474 | ] 475 | 476 | [[package]] 477 | name = "miniz_oxide" 478 | version = "0.6.2" 479 | source = "registry+https://github.com/rust-lang/crates.io-index" 480 | checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" 481 | dependencies = [ 482 | "adler", 483 | ] 484 | 485 | [[package]] 486 | name = "mint" 487 | version = "0.5.9" 488 | source = "registry+https://github.com/rust-lang/crates.io-index" 489 | checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff" 490 | 491 | [[package]] 492 | name = "nix" 493 | version = "0.22.3" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" 496 | dependencies = [ 497 | "bitflags", 498 | "cc", 499 | "cfg-if", 500 | "libc", 501 | "memoffset", 502 | ] 503 | 504 | [[package]] 505 | name = "nix" 506 | version = "0.24.2" 507 | source = "registry+https://github.com/rust-lang/crates.io-index" 508 | checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" 509 | dependencies = [ 510 | "bitflags", 511 | "cfg-if", 512 | "libc", 513 | "memoffset", 514 | ] 515 | 516 | [[package]] 517 | name = "nom" 518 | version = "7.1.1" 519 | source = "registry+https://github.com/rust-lang/crates.io-index" 520 | checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" 521 | dependencies = [ 522 | "memchr", 523 | "minimal-lexical", 524 | ] 525 | 526 | [[package]] 527 | name = "num-integer" 528 | version = "0.1.45" 529 | source = "registry+https://github.com/rust-lang/crates.io-index" 530 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 531 | dependencies = [ 532 | "autocfg", 533 | "num-traits", 534 | ] 535 | 536 | [[package]] 537 | name = "num-rational" 538 | version = "0.4.1" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" 541 | dependencies = [ 542 | "autocfg", 543 | "num-integer", 544 | "num-traits", 545 | ] 546 | 547 | [[package]] 548 | name = "num-traits" 549 | version = "0.2.15" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 552 | dependencies = [ 553 | "autocfg", 554 | "libm", 555 | ] 556 | 557 | [[package]] 558 | name = "num_threads" 559 | version = "0.1.6" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" 562 | dependencies = [ 563 | "libc", 564 | ] 565 | 566 | [[package]] 567 | name = "once_cell" 568 | version = "1.16.0" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" 571 | 572 | [[package]] 573 | name = "os_str_bytes" 574 | version = "6.2.0" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "648001efe5d5c0102d8cea768e348da85d90af8ba91f0bea908f157951493cd4" 577 | 578 | [[package]] 579 | name = "pkg-config" 580 | version = "0.3.25" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" 583 | 584 | [[package]] 585 | name = "png" 586 | version = "0.17.7" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" 589 | dependencies = [ 590 | "bitflags", 591 | "crc32fast", 592 | "flate2", 593 | "miniz_oxide 0.6.2", 594 | ] 595 | 596 | [[package]] 597 | name = "ppv-lite86" 598 | version = "0.2.16" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" 601 | 602 | [[package]] 603 | name = "predicates" 604 | version = "2.1.1" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "a5aab5be6e4732b473071984b3164dbbfb7a3674d30ea5ff44410b6bcd960c3c" 607 | dependencies = [ 608 | "difflib", 609 | "itertools", 610 | "predicates-core", 611 | ] 612 | 613 | [[package]] 614 | name = "predicates-core" 615 | version = "1.0.3" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | checksum = "da1c2388b1513e1b605fcec39a95e0a9e8ef088f71443ef37099fa9ae6673fcb" 618 | 619 | [[package]] 620 | name = "predicates-tree" 621 | version = "1.0.5" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "4d86de6de25020a36c6d3643a86d9a6a9f552107c0559c60ea03551b5e16c032" 624 | dependencies = [ 625 | "predicates-core", 626 | "termtree", 627 | ] 628 | 629 | [[package]] 630 | name = "proc-macro-error" 631 | version = "1.0.4" 632 | source = "registry+https://github.com/rust-lang/crates.io-index" 633 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 634 | dependencies = [ 635 | "proc-macro-error-attr", 636 | "proc-macro2", 637 | "quote", 638 | "syn", 639 | "version_check", 640 | ] 641 | 642 | [[package]] 643 | name = "proc-macro-error-attr" 644 | version = "1.0.4" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 647 | dependencies = [ 648 | "proc-macro2", 649 | "quote", 650 | "version_check", 651 | ] 652 | 653 | [[package]] 654 | name = "proc-macro2" 655 | version = "1.0.47" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" 658 | dependencies = [ 659 | "unicode-ident", 660 | ] 661 | 662 | [[package]] 663 | name = "quote" 664 | version = "1.0.21" 665 | source = "registry+https://github.com/rust-lang/crates.io-index" 666 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 667 | dependencies = [ 668 | "proc-macro2", 669 | ] 670 | 671 | [[package]] 672 | name = "rand" 673 | version = "0.8.5" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 676 | dependencies = [ 677 | "libc", 678 | "rand_chacha", 679 | "rand_core", 680 | ] 681 | 682 | [[package]] 683 | name = "rand_chacha" 684 | version = "0.3.1" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 687 | dependencies = [ 688 | "ppv-lite86", 689 | "rand_core", 690 | ] 691 | 692 | [[package]] 693 | name = "rand_core" 694 | version = "0.6.3" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 697 | dependencies = [ 698 | "getrandom", 699 | ] 700 | 701 | [[package]] 702 | name = "regex-automata" 703 | version = "0.1.10" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 706 | 707 | [[package]] 708 | name = "rustix" 709 | version = "0.35.11" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | checksum = "fbb2fda4666def1433b1b05431ab402e42a1084285477222b72d6c564c417cef" 712 | dependencies = [ 713 | "bitflags", 714 | "errno", 715 | "io-lifetimes 0.7.3", 716 | "libc", 717 | "linux-raw-sys 0.0.46", 718 | "windows-sys 0.36.1", 719 | ] 720 | 721 | [[package]] 722 | name = "rustix" 723 | version = "0.36.4" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "cb93e85278e08bb5788653183213d3a60fc242b10cb9be96586f5a73dcb67c23" 726 | dependencies = [ 727 | "bitflags", 728 | "errno", 729 | "io-lifetimes 1.0.3", 730 | "libc", 731 | "linux-raw-sys 0.1.3", 732 | "windows-sys 0.42.0", 733 | ] 734 | 735 | [[package]] 736 | name = "serde" 737 | version = "1.0.148" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | checksum = "e53f64bb4ba0191d6d0676e1b141ca55047d83b74f5607e6d8eb88126c52c2dc" 740 | dependencies = [ 741 | "serde_derive", 742 | ] 743 | 744 | [[package]] 745 | name = "serde_derive" 746 | version = "1.0.148" 747 | source = "registry+https://github.com/rust-lang/crates.io-index" 748 | checksum = "a55492425aa53521babf6137309e7d34c20bbfbbfcfe2c7f3a047fd1f6b92c0c" 749 | dependencies = [ 750 | "proc-macro2", 751 | "quote", 752 | "syn", 753 | ] 754 | 755 | [[package]] 756 | name = "simplelog" 757 | version = "0.12.0" 758 | source = "registry+https://github.com/rust-lang/crates.io-index" 759 | checksum = "48dfff04aade74dd495b007c831cd6f4e0cee19c344dd9dc0884c0289b70a786" 760 | dependencies = [ 761 | "log", 762 | "termcolor", 763 | "time", 764 | ] 765 | 766 | [[package]] 767 | name = "slotmap" 768 | version = "1.0.6" 769 | source = "registry+https://github.com/rust-lang/crates.io-index" 770 | checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" 771 | dependencies = [ 772 | "version_check", 773 | ] 774 | 775 | [[package]] 776 | name = "smallvec" 777 | version = "1.9.0" 778 | source = "registry+https://github.com/rust-lang/crates.io-index" 779 | checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" 780 | 781 | [[package]] 782 | name = "smithay-client-toolkit" 783 | version = "0.16.0" 784 | source = "registry+https://github.com/rust-lang/crates.io-index" 785 | checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" 786 | dependencies = [ 787 | "bitflags", 788 | "calloop", 789 | "dlib", 790 | "lazy_static", 791 | "log", 792 | "memmap2", 793 | "nix 0.24.2", 794 | "pkg-config", 795 | "wayland-client", 796 | "wayland-cursor", 797 | "wayland-protocols", 798 | ] 799 | 800 | [[package]] 801 | name = "strsim" 802 | version = "0.10.0" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 805 | 806 | [[package]] 807 | name = "swww" 808 | version = "0.6.0" 809 | dependencies = [ 810 | "assert_cmd", 811 | "bincode", 812 | "clap", 813 | "clap_complete", 814 | "fast_image_resize", 815 | "fork", 816 | "image", 817 | "keyframe", 818 | "lazy_static", 819 | "log", 820 | "lzzzz", 821 | "rand", 822 | "serde", 823 | "simplelog", 824 | "smithay-client-toolkit", 825 | ] 826 | 827 | [[package]] 828 | name = "syn" 829 | version = "1.0.104" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce" 832 | dependencies = [ 833 | "proc-macro2", 834 | "quote", 835 | "unicode-ident", 836 | ] 837 | 838 | [[package]] 839 | name = "termcolor" 840 | version = "1.1.3" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 843 | dependencies = [ 844 | "winapi-util", 845 | ] 846 | 847 | [[package]] 848 | name = "terminal_size" 849 | version = "0.2.1" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | checksum = "8440c860cf79def6164e4a0a983bcc2305d82419177a0e0c71930d049e3ac5a1" 852 | dependencies = [ 853 | "rustix 0.35.11", 854 | "windows-sys 0.36.1", 855 | ] 856 | 857 | [[package]] 858 | name = "termtree" 859 | version = "0.2.4" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" 862 | 863 | [[package]] 864 | name = "thiserror" 865 | version = "1.0.37" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" 868 | dependencies = [ 869 | "thiserror-impl", 870 | ] 871 | 872 | [[package]] 873 | name = "thiserror-impl" 874 | version = "1.0.37" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" 877 | dependencies = [ 878 | "proc-macro2", 879 | "quote", 880 | "syn", 881 | ] 882 | 883 | [[package]] 884 | name = "tiff" 885 | version = "0.8.0" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "f17def29300a156c19ae30814710d9c63cd50288a49c6fd3a10ccfbe4cf886fd" 888 | dependencies = [ 889 | "flate2", 890 | "jpeg-decoder", 891 | "weezl", 892 | ] 893 | 894 | [[package]] 895 | name = "time" 896 | version = "0.3.12" 897 | source = "registry+https://github.com/rust-lang/crates.io-index" 898 | checksum = "74b7cc93fc23ba97fde84f7eea56c55d1ba183f495c6715defdfc7b9cb8c870f" 899 | dependencies = [ 900 | "itoa", 901 | "js-sys", 902 | "libc", 903 | "num_threads", 904 | "time-macros", 905 | ] 906 | 907 | [[package]] 908 | name = "time-macros" 909 | version = "0.2.4" 910 | source = "registry+https://github.com/rust-lang/crates.io-index" 911 | checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" 912 | 913 | [[package]] 914 | name = "unicode-ident" 915 | version = "1.0.3" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" 918 | 919 | [[package]] 920 | name = "vec_map" 921 | version = "0.8.2" 922 | source = "registry+https://github.com/rust-lang/crates.io-index" 923 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 924 | 925 | [[package]] 926 | name = "version_check" 927 | version = "0.9.4" 928 | source = "registry+https://github.com/rust-lang/crates.io-index" 929 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 930 | 931 | [[package]] 932 | name = "wait-timeout" 933 | version = "0.2.0" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" 936 | dependencies = [ 937 | "libc", 938 | ] 939 | 940 | [[package]] 941 | name = "wasi" 942 | version = "0.11.0+wasi-snapshot-preview1" 943 | source = "registry+https://github.com/rust-lang/crates.io-index" 944 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 945 | 946 | [[package]] 947 | name = "wasm-bindgen" 948 | version = "0.2.82" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" 951 | dependencies = [ 952 | "cfg-if", 953 | "wasm-bindgen-macro", 954 | ] 955 | 956 | [[package]] 957 | name = "wasm-bindgen-backend" 958 | version = "0.2.82" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" 961 | dependencies = [ 962 | "bumpalo", 963 | "log", 964 | "once_cell", 965 | "proc-macro2", 966 | "quote", 967 | "syn", 968 | "wasm-bindgen-shared", 969 | ] 970 | 971 | [[package]] 972 | name = "wasm-bindgen-macro" 973 | version = "0.2.82" 974 | source = "registry+https://github.com/rust-lang/crates.io-index" 975 | checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" 976 | dependencies = [ 977 | "quote", 978 | "wasm-bindgen-macro-support", 979 | ] 980 | 981 | [[package]] 982 | name = "wasm-bindgen-macro-support" 983 | version = "0.2.82" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" 986 | dependencies = [ 987 | "proc-macro2", 988 | "quote", 989 | "syn", 990 | "wasm-bindgen-backend", 991 | "wasm-bindgen-shared", 992 | ] 993 | 994 | [[package]] 995 | name = "wasm-bindgen-shared" 996 | version = "0.2.82" 997 | source = "registry+https://github.com/rust-lang/crates.io-index" 998 | checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" 999 | 1000 | [[package]] 1001 | name = "wayland-client" 1002 | version = "0.29.4" 1003 | source = "registry+https://github.com/rust-lang/crates.io-index" 1004 | checksum = "91223460e73257f697d9e23d401279123d36039a3f7a449e983f123292d4458f" 1005 | dependencies = [ 1006 | "bitflags", 1007 | "downcast-rs", 1008 | "libc", 1009 | "nix 0.22.3", 1010 | "wayland-commons", 1011 | "wayland-scanner", 1012 | "wayland-sys", 1013 | ] 1014 | 1015 | [[package]] 1016 | name = "wayland-commons" 1017 | version = "0.29.4" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" 1020 | dependencies = [ 1021 | "nix 0.22.3", 1022 | "once_cell", 1023 | "smallvec", 1024 | "wayland-sys", 1025 | ] 1026 | 1027 | [[package]] 1028 | name = "wayland-cursor" 1029 | version = "0.29.4" 1030 | source = "registry+https://github.com/rust-lang/crates.io-index" 1031 | checksum = "c52758f13d5e7861fc83d942d3d99bf270c83269575e52ac29e5b73cb956a6bd" 1032 | dependencies = [ 1033 | "nix 0.22.3", 1034 | "wayland-client", 1035 | "xcursor", 1036 | ] 1037 | 1038 | [[package]] 1039 | name = "wayland-protocols" 1040 | version = "0.29.4" 1041 | source = "registry+https://github.com/rust-lang/crates.io-index" 1042 | checksum = "60147ae23303402e41fe034f74fb2c35ad0780ee88a1c40ac09a3be1e7465741" 1043 | dependencies = [ 1044 | "bitflags", 1045 | "wayland-client", 1046 | "wayland-commons", 1047 | "wayland-scanner", 1048 | ] 1049 | 1050 | [[package]] 1051 | name = "wayland-scanner" 1052 | version = "0.29.4" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "39a1ed3143f7a143187156a2ab52742e89dac33245ba505c17224df48939f9e0" 1055 | dependencies = [ 1056 | "proc-macro2", 1057 | "quote", 1058 | "xml-rs", 1059 | ] 1060 | 1061 | [[package]] 1062 | name = "wayland-sys" 1063 | version = "0.29.4" 1064 | source = "registry+https://github.com/rust-lang/crates.io-index" 1065 | checksum = "d9341df79a8975679188e37dab3889bfa57c44ac2cb6da166f519a81cbe452d4" 1066 | dependencies = [ 1067 | "pkg-config", 1068 | ] 1069 | 1070 | [[package]] 1071 | name = "weezl" 1072 | version = "0.1.7" 1073 | source = "registry+https://github.com/rust-lang/crates.io-index" 1074 | checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" 1075 | 1076 | [[package]] 1077 | name = "winapi" 1078 | version = "0.3.9" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1081 | dependencies = [ 1082 | "winapi-i686-pc-windows-gnu", 1083 | "winapi-x86_64-pc-windows-gnu", 1084 | ] 1085 | 1086 | [[package]] 1087 | name = "winapi-i686-pc-windows-gnu" 1088 | version = "0.4.0" 1089 | source = "registry+https://github.com/rust-lang/crates.io-index" 1090 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1091 | 1092 | [[package]] 1093 | name = "winapi-util" 1094 | version = "0.1.5" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1097 | dependencies = [ 1098 | "winapi", 1099 | ] 1100 | 1101 | [[package]] 1102 | name = "winapi-x86_64-pc-windows-gnu" 1103 | version = "0.4.0" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1106 | 1107 | [[package]] 1108 | name = "windows-sys" 1109 | version = "0.36.1" 1110 | source = "registry+https://github.com/rust-lang/crates.io-index" 1111 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 1112 | dependencies = [ 1113 | "windows_aarch64_msvc 0.36.1", 1114 | "windows_i686_gnu 0.36.1", 1115 | "windows_i686_msvc 0.36.1", 1116 | "windows_x86_64_gnu 0.36.1", 1117 | "windows_x86_64_msvc 0.36.1", 1118 | ] 1119 | 1120 | [[package]] 1121 | name = "windows-sys" 1122 | version = "0.42.0" 1123 | source = "registry+https://github.com/rust-lang/crates.io-index" 1124 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 1125 | dependencies = [ 1126 | "windows_aarch64_gnullvm", 1127 | "windows_aarch64_msvc 0.42.0", 1128 | "windows_i686_gnu 0.42.0", 1129 | "windows_i686_msvc 0.42.0", 1130 | "windows_x86_64_gnu 0.42.0", 1131 | "windows_x86_64_gnullvm", 1132 | "windows_x86_64_msvc 0.42.0", 1133 | ] 1134 | 1135 | [[package]] 1136 | name = "windows_aarch64_gnullvm" 1137 | version = "0.42.0" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" 1140 | 1141 | [[package]] 1142 | name = "windows_aarch64_msvc" 1143 | version = "0.36.1" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 1146 | 1147 | [[package]] 1148 | name = "windows_aarch64_msvc" 1149 | version = "0.42.0" 1150 | source = "registry+https://github.com/rust-lang/crates.io-index" 1151 | checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" 1152 | 1153 | [[package]] 1154 | name = "windows_i686_gnu" 1155 | version = "0.36.1" 1156 | source = "registry+https://github.com/rust-lang/crates.io-index" 1157 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 1158 | 1159 | [[package]] 1160 | name = "windows_i686_gnu" 1161 | version = "0.42.0" 1162 | source = "registry+https://github.com/rust-lang/crates.io-index" 1163 | checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" 1164 | 1165 | [[package]] 1166 | name = "windows_i686_msvc" 1167 | version = "0.36.1" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 1170 | 1171 | [[package]] 1172 | name = "windows_i686_msvc" 1173 | version = "0.42.0" 1174 | source = "registry+https://github.com/rust-lang/crates.io-index" 1175 | checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" 1176 | 1177 | [[package]] 1178 | name = "windows_x86_64_gnu" 1179 | version = "0.36.1" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 1182 | 1183 | [[package]] 1184 | name = "windows_x86_64_gnu" 1185 | version = "0.42.0" 1186 | source = "registry+https://github.com/rust-lang/crates.io-index" 1187 | checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" 1188 | 1189 | [[package]] 1190 | name = "windows_x86_64_gnullvm" 1191 | version = "0.42.0" 1192 | source = "registry+https://github.com/rust-lang/crates.io-index" 1193 | checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" 1194 | 1195 | [[package]] 1196 | name = "windows_x86_64_msvc" 1197 | version = "0.36.1" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 1200 | 1201 | [[package]] 1202 | name = "windows_x86_64_msvc" 1203 | version = "0.42.0" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" 1206 | 1207 | [[package]] 1208 | name = "xcursor" 1209 | version = "0.3.4" 1210 | source = "registry+https://github.com/rust-lang/crates.io-index" 1211 | checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" 1212 | dependencies = [ 1213 | "nom", 1214 | ] 1215 | 1216 | [[package]] 1217 | name = "xml-rs" 1218 | version = "0.8.4" 1219 | source = "registry+https://github.com/rust-lang/crates.io-index" 1220 | checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" 1221 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "swww" 3 | version = "0.6.0" 4 | authors = ["Leonardo Gibrowski Faé "] 5 | edition = "2021" 6 | 7 | [profile.release] 8 | debug = 0 9 | lto = true 10 | opt-level = 3 11 | codegen-units = 1 12 | panic = "abort" # stack unwinding is mostly useless since the user won't be able to see it during normal operation 13 | strip = true 14 | 15 | [profile.bench] 16 | debug = 1 17 | strip = false 18 | 19 | [dependencies] 20 | smithay-client-toolkit = { version = "=0.16.0", default-features = false, features = ["calloop"] } 21 | image = { version = "=0.24.5", default-features = false, features = [ "gif", "jpeg", "png", "pnm", 22 | "tga", "tiff", "webp", "bmp", "farbfeld"]} 23 | log = { version = "=0.4.17", features = ["max_level_debug", "release_max_level_info"] } 24 | simplelog = "=0.12.0" 25 | fork = "=0.1.20" 26 | clap = { version = "=4.0.29", features = ["derive", "wrap_help", "env"] } 27 | lzzzz = "=1.0.4" 28 | serde = { version = "=1.0.148", features = [ "derive" ] } 29 | bincode = "=1.3.3" 30 | lazy_static = "=1.4.0" 31 | fast_image_resize = "=2.3.0" 32 | rand = "=0.8.5" 33 | keyframe = "1.1.1" 34 | 35 | [dev-dependencies] 36 | assert_cmd = "=2.0.6" 37 | 38 | [build-dependencies] 39 | clap = { version = "=4.0.29", features = ["derive", "env"] } 40 | clap_complete = "=4.0.6" 41 | serde = { version = "=1.0.148", features = [ "derive" ] } 42 | 43 | [[test]] 44 | name = "integration_tests" 45 | harness = false 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A Solution to your Wayland Wallpaper Woes 2 | ### Efficient animated wallpaper daemon for wayland, controlled at runtime 3 | 4 | ![animated gif demonstration](https://i.imgur.com/Leuh6wm.gif) 5 | ![image transition demonstration](https://i.imgur.com/fMBFruY.gif) 6 | 7 | ## Dependencies 8 | 9 | - a compositor that implements: 10 | * wlr-layer-shell 11 | * xdg-output 12 | - lz4 (for compressing frames when animating) 13 | 14 | ## Build 15 | 16 | 17 | Packaging status 18 | 19 | 20 | ### Dependencies: 21 | 22 | - Up to date stable rustc compiler and cargo 23 | 24 | To build, clone this repository and run: 25 | ``` 26 | cargo build --release 27 | ``` 28 | Then, put the binary at `target/release/swww` in your path. Optionally, 29 | autocompletion scripts for bash, zsh, fish and elvish are offered in the 30 | `completions` directory. 31 | 32 | ## Features 33 | 34 | - Display animated gifs on your desktop 35 | - Display any image in the formats: 36 | * jpeg 37 | * png 38 | * gif 39 | * pnm 40 | * tga 41 | * tiff 42 | * webp 43 | * bmp 44 | * farbfeld 45 | - Clear the screen with an arbitrary rrggbb color 46 | - Smooth transition effect when you switch images 47 | - Do all of that without having to shutdown and reinitialize the daemon 48 | 49 | ## Why 50 | 51 | There are two main reasons that compelled me to make this, the first, that 52 | [oguri](https://github.com/vilhalmer/oguri) hasn't updated in over a year as I 53 | am writting this (02 Feb 2022), despite there being serious problems with 54 | excess of memory use while displaying certain gifs (see 55 | [this](https://github.com/vilhalmer/oguri/issues/38),for example). The best 56 | alternative I've found for oguri was 57 | [mpvpaper](https://github.com/GhostNaN/mpvpaper), but if felt like quite the 58 | overkill for my purposes. 59 | 60 | Comparing to `oguri`, `swww` uses less cpu power to animate once it has cached 61 | all the frames in the animation. It should also be **significantly** more 62 | memory efficient. 63 | 64 | The second is that, to my knowledge, there is no wallpaper daemon for wayland 65 | that allows you to change the wallpaper at runtime. That is, is order to, for 66 | example, cycle through the images of a directory, you'd have to kill the daemon 67 | and restart it. Not only does it make simple shell scripts a pain to write, it 68 | makes switching from one image to the next to happen very abruptly. 69 | 70 | ## Usage 71 | 72 | Start by initializing the daemon: 73 | ``` 74 | swww init 75 | ``` 76 | Then, simply pass the image you want to display: 77 | ``` 78 | swww img 79 | 80 | # You can also specify outputs: 81 | swww img -o 82 | 83 | # Control how smoothly the transition will happen and/or it's frame rate 84 | # For the step, smaller values = more smooth. Default = 20 85 | # For the frame rate, default is 30. 86 | swww img --transition-step <1 to 255> --transition-fps <1 to 255> 87 | 88 | # There are also many different transition effects: 89 | swww img --transition-type center 90 | 91 | # Note you may also control the above by setting up the SWWW_TRANSITION_FPS, 92 | # SWWW_TRANSITION_STEP, and SWWW_TRANSITION_TYPE environment variables. 93 | 94 | # To see all options, run 95 | swww img --help 96 | ``` 97 | If you would like to know the valid values for *\*, you can query the 98 | daemon. This will also tell you what the current image being displayed is, as 99 | well as the dimensions detected for the outputs. If you need more detailed 100 | information, I would recommend using 101 | [wlr-randr](https://sr.ht/~emersion/wlr-randr/). 102 | ``` 103 | swww query 104 | ``` 105 | Finally, to stop the daemon, kill it: 106 | ``` 107 | swww kill 108 | ``` 109 | For a more complete description, run *swww --help* or *swww \ 110 | --help*. 111 | 112 | Finally, to get a feel for what you can do with some shell scripting, check out 113 | the 'example_scripts' folder. It can help you get started. 114 | 115 | ## Transitions 116 | 117 | #### Example top transition: 118 | 119 | ![top transition demonstration](https://i.imgur.com/ULm6XWI.gif) 120 | 121 | The `left`, `right` and `bottom` transitions all work similarly. 122 | 123 | #### Example outer transition 124 | 125 | ![outer transition demonstration](https://i.imgur.com/o4pSyxW.gif) 126 | 127 | The `center` transition is the opposite: it starts from the center and goes 128 | towards the edges. 129 | 130 | There is also `simple`, which simply fades into the new image, `any`, which is 131 | like `center` but starts at a random point, and `random`, which selects a 132 | transition effect at random. 133 | 134 | ## Troubleshooting 135 | 136 | #### High cpu usage during caching of a gif's frames 137 | 138 | `swww` will use a non-insignificant amount of cpu power while caching the 139 | images. This will be specially noticeable if the images need to be resized 140 | before being displayed. So, if you have a very large `gif`, I would recommend 141 | resizing it **before** sending it to `swww`. That would make the caching phase 142 | much faster, and thus ultimately reduce power consumption. I can personally 143 | recommend [gifsicle](https://github.com/kohler/gifsicle) for this purpose. 144 | 145 | ## About new features 146 | 147 | Broadly speaking, **NEW FEATURES WILL NOT BE ADDED, UNLESS THEY ARE EGREGIOUSLY 148 | SIMPLE**. I made `swww` with the specific usecase of making shell scripts in 149 | mind. So, for example, stuff like timed wallpapers, or a setup that loads a 150 | different image at different times of the day, and so on, should all be done by 151 | combining `swww` with other programs (see the 'example_scripts' for some 152 | examples). 153 | 154 | If you really want some new feature within `swww` itself, I would recommend 155 | forking the repository. 156 | 157 | ## Alternatives 158 | 159 | `swww` isn't really the simplest, mostest minimalest software you could find 160 | for managing wallpapers. If you are looking for something simpler, have a look 161 | at the [awesome-wayland repository list of wallpaper programs 162 | ](https://github.com/natpen/awesome-wayland#wallpaper). I can personally 163 | recommend: 164 | 165 | - [wbg](https://codeberg.org/dnkl/wbg) - probably the simplest of them all. 166 | Strongly recommend if you just care about setting a single png as your 167 | permanent wallpaper on something like a laptop. 168 | - [swaybg](https://github.com/swaywm/swaybg) - made by the wlroots gods 169 | themselves. 170 | - [mpvpaper](https://github.com/GhostNaN/mpvpaper) - if you want to display 171 | videos as your wallpapers. This is also what I used for gifs before making 172 | `swww`. 173 | 174 | ## Acknowledgments 175 | 176 | A huge thanks to everyone involed in the [smithay](https://github.com/Smithay) 177 | project. Making this program would not have been possible without it. In fact, 178 | the first versions of swww were quite literaly copy pasted from the [layer shell 179 | example in the client-toolkit 180 | ](https://github.com/Smithay/client-toolkit/blob/master/examples/layer_shell.rs). 181 | 182 | A big thank-you also to [HakierGrzonzo](https://github.com/HakierGrzonzo), for 183 | setting up the AUR package. 184 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | IMPORTANT: update examples in the readme (our transition effects look much nicer now!) 2 | 3 | When changing the scale, the image does not resize automatically 4 | 5 | Fully automated, complete testing, for every option 6 | 7 | Manpages 8 | -------------------------------------------------------------------------------- /build.rs: -------------------------------------------------------------------------------- 1 | use std::io::Error; 2 | 3 | use clap::CommandFactory; 4 | use clap_complete::{generate_to, Shell}; 5 | 6 | include!("src/cli.rs"); 7 | 8 | const COMPLETION_DIR: &str = "completions"; 9 | const APP_NAME: &str = "swww"; 10 | 11 | fn main() -> Result<(), Error> { 12 | let outdir = completion_dir()?; 13 | let mut app = Swww::command(); 14 | 15 | let shells = [Shell::Bash, Shell::Zsh, Shell::Fish, Shell::Elvish]; 16 | for shell in shells { 17 | let comp_file = generate_to(shell, &mut app, APP_NAME, &outdir)?; 18 | println!( 19 | "cargo:warning=generated shell completion file: {:?}", 20 | comp_file 21 | ); 22 | } 23 | if let Err(e) = std::process::Command::new("./fix_zsh_completion.sh").output() { 24 | println!( 25 | "cargo:warning=FAILED TO RUN fix_zsh_completion.sh SCRIPT: {}", 26 | e 27 | ); 28 | } else { 29 | println!("cargo:warning=ran fix_zsh_completion.sh script."); 30 | } 31 | Ok(()) 32 | } 33 | 34 | fn completion_dir() -> std::io::Result { 35 | let path = PathBuf::from(COMPLETION_DIR); 36 | if !path.is_dir() { 37 | std::fs::create_dir(&path)?; 38 | } 39 | Ok(path) 40 | } 41 | -------------------------------------------------------------------------------- /example_scripts/README.md: -------------------------------------------------------------------------------- 1 | In here you will find example scripts to help you get started writting your own 2 | scripts to work with `swww` for various effects. Currently, there are scripts 3 | for: 4 | 5 | * Randomly going thorugh the images in a directory (swww_randomize.sh) 6 | * Changing with which image `swww` is initialized according to the time of day 7 | (swww_init_according_to_time_of_day.sh) 8 | * Scheduling changes to the wallpaper at different times of day 9 | (swww_scheduler.sh) 10 | -------------------------------------------------------------------------------- /example_scripts/swww_init_according_to_time_of_day.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This allows you to control which image to init the daemon with according 4 | # to the time of day. You may change the match cases as you see fit. 5 | # This currently only takes hours into account, but it should be easy to 6 | # modify to also use minutes, or days of the week, if you want. 7 | # 8 | # Use it simply by calling this script instead of swww init 9 | 10 | case $(date +%H) in 11 | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07) # First 8 hours of the day 12 | # Uncomment bellow to setup the image you wish to display as your 13 | # wallpaper if you run this scritp during the first 8 hours of the 14 | # day 15 | 16 | # swww init && swww img path/to/img 17 | ;; 18 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15) # Middle 8 hours of the day 19 | # Same as above, but for the middle 8 hours of the day 20 | 21 | # swww init && swww img path/to/img 22 | ;; 23 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23) # Final 8 hours of the day 24 | # Same as above, but for the final 8 hours of the day 25 | 26 | # swww init && swww img path/to/img 27 | ;; 28 | esac 29 | -------------------------------------------------------------------------------- /example_scripts/swww_randomize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script will randomly go through the files of a directory, setting it 4 | # up as the wallpaper at regular intervals 5 | # 6 | # NOTE: this script is in bash (not posix shell), because the RANDOM variable 7 | # we use is not defined in posix 8 | 9 | if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then 10 | echo "Usage: 11 | $0 " 12 | exit 1 13 | fi 14 | 15 | # Edit bellow to control the images transition 16 | export SWWW_TRANSITION_FPS=60 17 | export SWWW_TRANSITION_STEP=2 18 | 19 | # This controls (in seconds) when to switch to the next image 20 | INTERVAL=300 21 | 22 | while true; do 23 | find "$1" \ 24 | | while read -r img; do 25 | echo "$((RANDOM % 1000)):$img" 26 | done \ 27 | | sort -n | cut -d':' -f2- \ 28 | | while read -r img; do 29 | swww img "$img" 30 | sleep $INTERVAL 31 | done 32 | done 33 | -------------------------------------------------------------------------------- /example_scripts/swww_scheduler.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This is a script to help you schedule image switching at different times of 4 | # the day. You may use it as-is or as inspiration for something else 5 | 6 | if [ $# -lt 2 ]; then 7 | echo "Usage: 8 | $0