diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d916666..7c204e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: install system dependencies - run: sudo apt-get update && sudo apt-get install lld cmake libclang-dev libdav1d-dev libexpat1-dev libfontconfig-dev libfreetype-dev libpipewire-0.3-dev libpulse-dev pkg-config libxkbcommon-dev libudev-dev libinput-dev libwayland-dev + run: sudo apt-get update && sudo apt-get install lld cmake libclang-dev libexpat1-dev libfontconfig-dev libfreetype-dev libpipewire-0.3-dev libpulse-dev pkg-config libxkbcommon-dev libudev-dev libinput-dev libwayland-dev - uses: actions/checkout@v6 - name: install toolchain run: rustup toolchain install 1.90.0 --component clippy @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: install system dependencies - run: sudo apt-get update && sudo apt-get install lld cmake libclang-dev libdav1d-dev libexpat1-dev libfontconfig-dev libfreetype-dev libpipewire-0.3-dev libpulse-dev pkg-config libxkbcommon-dev libudev-dev libinput-dev libwayland-dev + run: sudo apt-get update && sudo apt-get install lld cmake libclang-dev libexpat1-dev libfontconfig-dev libfreetype-dev libpipewire-0.3-dev libpulse-dev pkg-config libxkbcommon-dev libudev-dev libinput-dev libwayland-dev - uses: actions/checkout@v6 - name: install toolchain run: rustup show @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: install system dependencies - run: sudo apt-get update && sudo apt-get install lld cmake libclang-dev libdav1d-dev libexpat1-dev libfontconfig-dev libfreetype-dev libpipewire-0.3-dev libpulse-dev pkg-config libxkbcommon-dev libudev-dev libinput-dev libwayland-dev just + run: sudo apt-get update && sudo apt-get install lld cmake libclang-dev libexpat1-dev libfontconfig-dev libfreetype-dev libpipewire-0.3-dev libpulse-dev pkg-config libxkbcommon-dev libudev-dev libinput-dev libwayland-dev just - uses: actions/checkout@v6 - name: install toolchain run: rustup show diff --git a/.zed/settings.json b/.zed/settings.json deleted file mode 100644 index 2cc7b98..0000000 --- a/.zed/settings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "format_on_save": "on", - "lsp": { - "rust-analyzer": { - "initialization_options": { - "check": { - "command": "clippy", - }, - "rustfmt": { - "extraArgs": ["+nightly"], - }, - }, - }, - }, -} diff --git a/Cargo.lock b/Cargo.lock index ea0afba..e9205b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,7 +104,7 @@ dependencies = [ [[package]] name = "accounts-zbus" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#eed01dd3609e90e3c8cd043656734c500956c793" +source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] @@ -132,7 +132,7 @@ checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher 0.4.4", - "cpufeatures 0.2.17", + "cpufeatures", ] [[package]] @@ -189,19 +189,13 @@ checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] name = "alloc-stdlib" -version = "0.2.4" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" dependencies = [ "alloc-no-stdlib", ] -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - [[package]] name = "almost" version = "0.2.0" @@ -215,7 +209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" dependencies = [ "android-properties", - "bitflags 2.13.1", + "bitflags 2.11.1", "cc", "jni", "libc", @@ -242,6 +236,16 @@ dependencies = [ "libc", ] +[[package]] +name = "annotate-snippets" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "710e8eae58854cdc1790fcb56cca04d712a17be849eeb81da2a724bf4bae2bc4" +dependencies = [ + "anstyle", + "unicode-width 0.2.2", +] + [[package]] name = "anstream" version = "1.0.0" @@ -294,9 +298,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.103" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "apply" @@ -321,9 +325,9 @@ checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" [[package]] name = "arc-swap" -version = "1.9.2" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b" +checksum = "6a3a1fd6f75306b68087b831f025c712524bcb19aad54e557b1129cfa0a2b207" dependencies = [ "rustversion", ] @@ -336,7 +340,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -347,9 +351,15 @@ checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.8" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" [[package]] name = "as-slice" @@ -378,7 +388,7 @@ dependencies = [ "enumflags2", "futures-channel", "futures-util", - "rand 0.9.5", + "rand 0.9.4", "raw-window-handle", "serde", "serde_repr", @@ -396,7 +406,7 @@ dependencies = [ "enumflags2", "futures-channel", "futures-util", - "rand 0.9.5", + "rand 0.9.4", "serde", "serde_repr", "tokio", @@ -500,7 +510,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -535,7 +545,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -590,34 +600,21 @@ dependencies = [ [[package]] name = "auto_enums" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4487600931c9a89f8db7ffbdf3fbdd45bb7bd85e26861f659a463cd0dff966" +checksum = "65398a2893f41bce5c9259f6e1a4f03fbae40637c1bdc755b4f387f48c613b03" dependencies = [ "derive_utils", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] name = "autocfg" -version = "1.5.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" - -[[package]] -name = "av-data" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca67ba5d317924c02180c576157afd54babe48a76ebc66ce6d34bb8ba08308e" -dependencies = [ - "byte-slice-cast", - "bytes", - "num-derive", - "num-rational", - "num-traits", -] +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "av-scenechange" @@ -655,9 +652,9 @@ dependencies = [ [[package]] name = "avif-serialize" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7178fe5f7d460b13895ebb9dcb28a3a6216d2df2574a0806cb51b555d297f38" +checksum = "375082f007bd67184fb9c0374614b29f9aaa604ec301635f72338bb65386a53d" dependencies = [ "arrayvec", ] @@ -694,22 +691,21 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.71.1" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.13.1", + "annotate-snippets", + "bitflags 2.11.1", "cexpr", "clang-sys", "itertools 0.13.0", - "log", - "prettyplease", "proc-macro2", "quote", "regex", - "rustc-hash 2.1.3", - "shlex 1.3.0", - "syn 2.0.119", + "rustc-hash 2.1.2", + "shlex", + "syn 2.0.117", ] [[package]] @@ -741,22 +737,13 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.13.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" dependencies = [ "serde_core", ] -[[package]] -name = "bitreader" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "886559b1e163d56c765bc3a985febb4eee8009f625244511d8ee3c432e08c066" -dependencies = [ - "cfg-if", -] - [[package]] name = "bitstream-io" version = "4.10.0" @@ -790,15 +777,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-buffer" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" -dependencies = [ - "hybrid-array", -] - [[package]] name = "block-padding" version = "0.3.3" @@ -853,7 +831,7 @@ dependencies = [ [[package]] name = "bluez-zbus" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#eed01dd3609e90e3c8cd043656734c500956c793" +source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "futures-channel", "futures-util", @@ -863,9 +841,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.7.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f3f6da4992df95bbcd9af42a6c7dcb994498fc9048230405f3b36ff7cd3f145" +checksum = "cfd1e3f8955a5d7de9fab72fc8373fade9fb8a703968cb200ae3dc6cf08e185a" dependencies = [ "bytes", "cfg_aliases 0.2.1", @@ -873,32 +851,23 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "5.0.3" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", ] -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "tinyvec", -] - [[package]] name = "bstr" -version = "1.12.3" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cee35f73844aa3014bb606320a6c1f010249dbdf43342fe54b5a4f6a8ed4b79" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "regex-automata", - "serde_core", + "serde", ] [[package]] @@ -910,24 +879,17 @@ dependencies = [ "num-traits", ] -[[package]] -name = "build_helpers" -version = "0.14.0" -dependencies = [ - "cfg_aliases 0.2.1", -] - [[package]] name = "built" -version = "0.8.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9" +checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64" [[package]] name = "bumpalo" -version = "3.20.3" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "by_address" @@ -935,30 +897,24 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" -[[package]] -name = "byte-slice-cast" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" - [[package]] name = "bytemuck" -version = "1.25.1" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6aedf8ae72766347502cf3cb4f41cf5e9cc37d28bee90f1fdaaae15f9cf9424" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.11.0" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f65693059b6b9c588b9f62fed1cedbf0a8b805631457ea162d68f0de186f3de5" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -975,9 +931,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.12.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "calendrical_calculations" @@ -995,7 +951,7 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "polling", "rustix 1.1.4", "slab", @@ -1025,14 +981,14 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.67" +version = "1.2.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17dd265a7d0f31ef544e1b20e03add05d3b45b491b633b10d67145d2acc1a38" +checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" dependencies = [ "find-msvc-tools", "jobserver", "libc", - "shlex 2.0.1", + "shlex", ] [[package]] @@ -1057,9 +1013,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.20.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb693542bcafa528e198be0ebd9d3632ca5b7c93dbe7237460e199910835997c" +checksum = "3c6b04e07d8080154ed4ac03546d9a2b303cc2fe1901ba0b35b301516e289368" dependencies = [ "smallvec", "target-lexicon", @@ -1085,9 +1041,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.45" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", "js-sys", @@ -1112,15 +1068,15 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common 0.1.7", + "crypto-common", "inout", ] [[package]] name = "clang-sys" -version = "1.9.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -1129,9 +1085,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.4" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91e0c145792ef73a6ad36d27c75ac09f1832222a3c209689d90f534685ee5b7" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", "clap_derive", @@ -1139,9 +1095,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.2" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ "anstream", "anstyle", @@ -1151,14 +1107,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.4" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 3.0.3", + "syn 2.0.117", ] [[package]] @@ -1179,6 +1135,7 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "objc", "objc-foundation", @@ -1188,12 +1145,22 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "dnd", "mime 0.1.0", "smithay-clipboard", ] +[[package]] +name = "clipboard_x11" +version = "0.4.2" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" +dependencies = [ + "thiserror 1.0.69", + "x11rb", +] + [[package]] name = "cocoa" version = "0.25.0" @@ -1295,15 +1262,24 @@ dependencies = [ [[package]] name = "configparser" -version = "3.2.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46dec724fd22199ebde05033a0cbae453bc3b1ecff11eb6a6bb3eec4b90c6a4" +checksum = "e57e3272f0190c3f1584272d613719ba5fc7df7f4942fe542e63d949cf3a649b" [[package]] -name = "const-oid" -version = "0.10.2" +name = "convert_case" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "cookie-factory" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2" [[package]] name = "core-foundation" @@ -1361,7 +1337,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "core-foundation 0.10.1", "libc", ] @@ -1378,6 +1354,7 @@ dependencies = [ [[package]] name = "cosmic-bg-config" version = "1.0.3" +source = "git+https://github.com/pop-os/cosmic-bg#06970d5945b45a634b9ed314f5ca3a86a8502fd8" dependencies = [ "cosmic-config", "derive_setters", @@ -1388,9 +1365,10 @@ dependencies = [ [[package]] name = "cosmic-client-toolkit" -version = "0.2.0" +version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-protocols//?rev=d0e95be#d0e95be25e423cfe523b11111a3666ed7aaf0dc4" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "cosmic-protocols", "libc", "smithay-client-toolkit", @@ -1401,10 +1379,11 @@ dependencies = [ [[package]] name = "cosmic-comp-config" version = "1.0.0" +source = "git+https://github.com/pop-os/cosmic-comp#4df95190db07f7410666cec4d3bf648de90f81dd" dependencies = [ "cosmic-config", "input", - "ron 0.12.2", + "ron 0.12.1", "serde", "tracing", ] @@ -1412,6 +1391,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "1.0.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1421,7 +1401,7 @@ dependencies = [ "iced_futures", "known-folders", "notify", - "ron 0.12.2", + "ron 0.12.1", "serde", "tokio", "tracing", @@ -1432,27 +1412,42 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "1.0.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] name = "cosmic-dbus-a11y" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#eed01dd3609e90e3c8cd043656734c500956c793" +source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] +[[package]] +name = "cosmic-dbus-networkmanager" +version = "0.1.0" +source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" +dependencies = [ + "bitflags 2.11.1", + "derive_builder", + "jiff", + "procfs", + "zbus", + "zvariant", +] + [[package]] name = "cosmic-freedesktop-icons" version = "0.4.0" +source = "git+https://github.com/pop-os/freedesktop-icons#9c562fe3ecf03241a46a60c0078cd6ea10bd75ce" dependencies = [ "bstr", "btoi", "memchr", - "memmap2 0.9.11", + "memmap2 0.9.10", "thiserror 2.0.18", "tracing", "xdg", @@ -1461,6 +1456,7 @@ dependencies = [ [[package]] name = "cosmic-idle-config" version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-idle#c95d066b5b640509a6369634b669ca60dc50e168" dependencies = [ "cosmic-config", "serde", @@ -1468,20 +1464,19 @@ dependencies = [ [[package]] name = "cosmic-mime-apps" -version = "0.2.0" -source = "git+https://github.com/pop-os/cosmic-mime-apps#8fc81e8857e46c018ea21ab985aaf30ac853c007" +version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-mime-apps#673f3758920a7b20d307d356d586deef714df6b0" dependencies = [ "freedesktop-desktop-entry", - "futures-util", "mime 0.3.17", "quick-xml 0.38.4", - "tokio", "xdg", ] [[package]] name = "cosmic-panel-config" -version = "1.3.0" +version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-panel#d518c7d25ef96f1a9696aa8cce008656bf66ece4" dependencies = [ "anyhow", "cosmic-config", @@ -1493,10 +1488,24 @@ dependencies = [ ] [[package]] -name = "cosmic-protocols" -version = "0.2.0" +name = "cosmic-pipewire" +version = "1.0.7" dependencies = [ - "bitflags 2.13.1", + "intmap", + "libspa", + "libspa-sys", + "pipewire", + "serde", + "serde_json", + "tracing", +] + +[[package]] +name = "cosmic-protocols" +version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-protocols//?rev=d0e95be#d0e95be25e423cfe523b11111a3666ed7aaf0dc4" +dependencies = [ + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -1507,7 +1516,8 @@ dependencies = [ [[package]] name = "cosmic-randr" -version = "1.3.0" +version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-randr#6e8e795970fa06d434af22775e415b517f7552d3" dependencies = [ "cosmic-protocols", "indexmap 2.14.0", @@ -1520,7 +1530,8 @@ dependencies = [ [[package]] name = "cosmic-randr-shell" -version = "1.3.0" +version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-randr#6e8e795970fa06d434af22775e415b517f7552d3" dependencies = [ "kdl", "slotmap", @@ -1529,7 +1540,7 @@ dependencies = [ [[package]] name = "cosmic-settings" -version = "1.5.0" +version = "1.0.7" dependencies = [ "accounts-zbus", "anyhow", @@ -1541,6 +1552,7 @@ dependencies = [ "cosmic-bg-config", "cosmic-comp-config", "cosmic-config", + "cosmic-dbus-networkmanager", "cosmic-idle-config", "cosmic-mime-apps", "cosmic-panel-config", @@ -1550,15 +1562,14 @@ dependencies = [ "cosmic-settings-a11y-manager-subscription", "cosmic-settings-accessibility-subscription", "cosmic-settings-airplane-mode-subscription", - "cosmic-settings-audio-client", "cosmic-settings-bluetooth-subscription", - "cosmic-settings-config 0.1.0 (git+https://github.com/pop-os/cosmic-settings-daemon)", + "cosmic-settings-config", "cosmic-settings-daemon-config", + "cosmic-settings-network-manager-subscription", "cosmic-settings-page", - "cosmic-settings-sound", + "cosmic-settings-sound-subscription", "cosmic-settings-upower-subscription", "cosmic-settings-wallpaper", - "cups_rs", "derive_setters", "dirs", "eyre", @@ -1574,23 +1585,21 @@ dependencies = [ "icu", "image", "indexmap 2.14.0", - "intmap", "itertools 0.14.0", "itoa", "jiff", - "libcosmic-yoda", + "libcosmic", "locale1", "locales-rs", "mime 0.3.17", - "nmrs", + "nm-secret-agent-manager", "notify", "num-traits", "pwhash", "regex", - "ron 0.12.2", + "ron 0.12.1", "rust-embed", "rustix 1.1.4", - "secret-service", "secure-string", "serde", "slab", @@ -1612,7 +1621,6 @@ dependencies = [ "xkeysym", "zbus", "zbus_polkit", - "zlink", ] [[package]] @@ -1651,33 +1659,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "cosmic-settings-audio-client" -version = "1.0.0" -source = "git+https://github.com/pop-os/cosmic-settings-daemon#e4d2a74f5115091940f6ea09f730863f74f34758" -dependencies = [ - "cosmic-settings-audio-core", - "dirs", - "futures-util", - "ron 0.12.2", - "serde", - "tokio", - "tokio-util", - "tracing", - "zlink", -] - -[[package]] -name = "cosmic-settings-audio-core" -version = "1.0.0" -source = "git+https://github.com/pop-os/cosmic-settings-daemon#e4d2a74f5115091940f6ea09f730863f74f34758" -dependencies = [ - "dirs", - "ron 0.12.2", - "serde", - "zlink", -] - [[package]] name = "cosmic-settings-bluetooth-subscription" version = "1.0.7" @@ -1693,19 +1674,7 @@ dependencies = [ [[package]] name = "cosmic-settings-config" version = "0.1.0" -dependencies = [ - "cosmic-config", - "ron 0.11.0", - "serde", - "serde_with", - "tracing", - "xkbcommon 0.9.0", -] - -[[package]] -name = "cosmic-settings-config" -version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-settings-daemon#e4d2a74f5115091940f6ea09f730863f74f34758" +source = "git+https://github.com/pop-os/cosmic-settings-daemon#716da6d6af0b252e2f78aba2ad72ee19ae0241e0" dependencies = [ "cosmic-config", "ron 0.11.0", @@ -1717,7 +1686,8 @@ dependencies = [ [[package]] name = "cosmic-settings-daemon" -version = "0.1.1-yoda.1" +version = "0.1.0" +source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] @@ -1725,7 +1695,7 @@ dependencies = [ [[package]] name = "cosmic-settings-daemon-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-settings-daemon#e4d2a74f5115091940f6ea09f730863f74f34758" +source = "git+https://github.com/pop-os/cosmic-settings-daemon#716da6d6af0b252e2f78aba2ad72ee19ae0241e0" dependencies = [ "cosmic-config", "serde", @@ -1743,13 +1713,31 @@ dependencies = [ "zbus", ] +[[package]] +name = "cosmic-settings-network-manager-subscription" +version = "1.0.7" +dependencies = [ + "bitflags 2.11.1", + "cosmic-dbus-networkmanager", + "futures", + "iced_futures", + "itertools 0.14.0", + "nm-secret-agent-manager", + "secret-service", + "secure-string", + "thiserror 2.0.18", + "tokio", + "tracing", + "zbus", +] + [[package]] name = "cosmic-settings-page" version = "1.0.7" dependencies = [ "derive_setters", "downcast-rs 2.0.2", - "libcosmic-yoda", + "libcosmic", "regex", "slab", "slotmap", @@ -1757,12 +1745,26 @@ dependencies = [ ] [[package]] -name = "cosmic-settings-sound" +name = "cosmic-settings-pulse-subscription" version = "0.1.0" dependencies = [ - "cosmic-settings-audio-client", + "futures", + "iced_futures", + "libpulse-binding", + "log", + "rustix 1.1.4", +] + +[[package]] +name = "cosmic-settings-sound-subscription" +version = "1.0.7" +dependencies = [ + "cosmic-pipewire", "futures", "intmap", + "libcosmic", + "numtoa", + "rustix 1.1.4", "tokio", "tracing", ] @@ -1801,17 +1803,18 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.19.0" +version = "0.18.2" +source = "git+https://github.com/pop-os/cosmic-text.git#4d74f795cc771fdcc7ea0f9cacba63fcf036fad6" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "fontdb", "harfrust", "linebender_resource_handle", "log", "rangemap", - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", "self_cell", - "skrifa 0.40.0", + "skrifa", "smol_str", "swash", "sys-locale", @@ -1819,21 +1822,20 @@ dependencies = [ "unicode-linebreak", "unicode-script", "unicode-segmentation", - "unicode-width 0.2.2", ] [[package]] name = "cosmic-theme" version = "1.0.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ "almost", "configparser", "cosmic-config", "csscolorparser", "dirs", - "hex_color", "palette", - "ron 0.12.2", + "ron 0.12.1", "serde", "serde_json", "thiserror 2.0.18", @@ -1848,15 +1850,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cpufeatures" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" -dependencies = [ - "libc", -] - [[package]] name = "crc32fast" version = "1.5.0" @@ -1868,9 +1861,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.7" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1878,18 +1871,18 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.20" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.22" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -1900,11 +1893,12 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "cryoglyph" version = "0.1.0" +source = "git+https://github.com/pop-os/glyphon.git?tag=cosmic-0.14#c49de15bce4d8254ac136d1be9911960cc85ce12" dependencies = [ "cosmic-text", "etagere", "lru", - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", "wgpu", ] @@ -1918,15 +1912,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-common" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" -dependencies = [ - "hybrid-array", -] - [[package]] name = "crypto-mac" version = "0.10.1" @@ -1956,17 +1941,10 @@ dependencies = [ ] [[package]] -name = "cups_rs" -version = "0.3.0" +name = "ctor-lite" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ad179868ddceb8948487316c7094aa251e3efb0ecf15cab88b08f22eabf724" -dependencies = [ - "bindgen", - "chrono", - "libc", - "pkg-config", - "thiserror 1.0.69", -] +checksum = "e162d0c2e2068eb736b71e5597eff0b9944e6b973cd9f37b6a288ab9bf20e300" [[package]] name = "cursor-icon" @@ -1974,6 +1952,16 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core 0.20.11", + "darling_macro 0.20.11", +] + [[package]] name = "darling" version = "0.21.3" @@ -1994,6 +1982,20 @@ dependencies = [ "darling_macro 0.23.0", ] +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.117", +] + [[package]] name = "darling_core" version = "0.21.3" @@ -2005,7 +2007,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -2018,7 +2020,18 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.119", + "syn 2.0.117", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core 0.20.11", + "quote", + "syn 2.0.117", ] [[package]] @@ -2029,7 +2042,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -2040,7 +2053,7 @@ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core 0.23.0", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -2049,68 +2062,47 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" -[[package]] -name = "dav1d" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee89cb860616069c67520dcd66cacdb900b57c799f634a0eb6d91f6e2a82b61" -dependencies = [ - "av-data", - "bitflags 2.13.1", - "dav1d-sys", - "static_assertions", -] - -[[package]] -name = "dav1d-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c91aea6668645415331133ed6f8ddf0e7f40160cd97a12d59e68716a58704b" -dependencies = [ - "libc", - "system-deps", -] - -[[package]] -name = "defmt" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1" -dependencies = [ - "bitflags 1.3.2", - "defmt-macros", -] - -[[package]] -name = "defmt-macros" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8" -dependencies = [ - "defmt-parser", - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "defmt-parser" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" -dependencies = [ - "thiserror 2.0.18", -] - [[package]] name = "deranged" version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ + "powerfmt", "serde_core", ] +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling 0.20.11", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core", + "syn 2.0.117", +] + [[package]] name = "derive_setters" version = "0.1.9" @@ -2120,7 +2112,7 @@ dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -2131,7 +2123,7 @@ checksum = "362f47930db19fe7735f527e6595e4900316b893ebf6d48ad3d31be928d57dd6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -2150,21 +2142,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "crypto-common 0.1.7", + "crypto-common", "subtle", ] -[[package]] -name = "digest" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" -dependencies = [ - "block-buffer 0.12.1", - "const-oid", - "crypto-common 0.2.2", -] - [[package]] name = "dirs" version = "6.0.0" @@ -2192,7 +2173,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.6.2", "libc", "objc2 0.6.4", @@ -2200,13 +2181,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.6" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -2221,8 +2202,9 @@ dependencies = [ [[package]] name = "dnd" version = "0.1.0" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "mime 0.1.0", "raw-window-handle", "smithay-client-toolkit", @@ -2253,6 +2235,46 @@ checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" [[package]] name = "dpi" version = "0.1.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" + +[[package]] +name = "drm" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" +dependencies = [ + "bitflags 2.11.1", + "bytemuck", + "drm-ffi", + "drm-fourcc", + "rustix 0.38.44", +] + +[[package]] +name = "drm-ffi" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" +dependencies = [ + "drm-sys", + "rustix 0.38.44", +] + +[[package]] +name = "drm-fourcc" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" + +[[package]] +name = "drm-sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d09ff881f92f118b11105ba5e34ff8f4adf27b30dae8f12e28c193af1c83176" +dependencies = [ + "libc", + "linux-raw-sys 0.6.5", +] [[package]] name = "dyn-clone" @@ -2262,9 +2284,9 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "either" -version = "1.16.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "endi" @@ -2290,7 +2312,7 @@ checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -2310,7 +2332,7 @@ checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -2377,16 +2399,14 @@ dependencies = [ [[package]] name = "exr" -version = "1.74.2" +version = "1.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711fe42c9964295e01ee3fba3f9fe0e1d24b98886950d68efe81b1c76e21adf3" +checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be" dependencies = [ "bit_field", "half", "lebe", "miniz_oxide", - "num-complex", - "pulp", "rayon-core", "smallvec", "zune-inflate", @@ -2402,15 +2422,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fallible_collections" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88c69768c0a15262df21899142bc6df9b9b823546d4b4b9a7bc2d6c448ec6fd" -dependencies = [ - "hashbrown 0.13.2", -] - [[package]] name = "fast-srgb8" version = "1.0.0" @@ -2437,6 +2448,26 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" +[[package]] +name = "fax" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab" +dependencies = [ + "fax_derive", +] + +[[package]] +name = "fax_derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "fdeflate" version = "0.3.7" @@ -2523,7 +2554,7 @@ dependencies = [ "fluent-syntax", "intl-memoizer", "intl_pluralrules", - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", "self_cell", "smallvec", "unic-langid", @@ -2592,7 +2623,7 @@ checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.9.11", + "memmap2 0.9.10", "slotmap", "tinyvec", "ttf-parser", @@ -2616,7 +2647,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -2661,9 +2692,9 @@ dependencies = [ [[package]] name = "fs-err" -version = "3.3.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91aa448ca50d7e79433bdf3ee8d99215430d2ec02ade5aefab2a073a1822e8a" +checksum = "73fde052dbfc920003cfd2c8e2c6e6d4cc7c1091538c3a24226cec0665ab08c0" dependencies = [ "autocfg", "tokio", @@ -2680,9 +2711,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88cf1f829d945f548cf8fec32c61b1f202b6d93b45848602fc02af4b12ad218" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -2695,9 +2726,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -2705,15 +2736,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -2722,9 +2753,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-lite" @@ -2741,38 +2772,32 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] name = "futures-sink" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" - -[[package]] -name = "futures-timer" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -2795,6 +2820,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix 1.1.4", + "windows-link 0.2.1", +] + [[package]] name = "getrandom" version = "0.2.17" @@ -2820,13 +2855,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.4.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", "libc", "r-efi 6.0.0", + "wasip2", + "wasip3", ] [[package]] @@ -2859,6 +2896,16 @@ dependencies = [ "weezl", ] +[[package]] +name = "gif" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" +dependencies = [ + "color_quant", + "weezl", +] + [[package]] name = "gimli" version = "0.32.3" @@ -2884,9 +2931,9 @@ checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" [[package]] name = "glob" -version = "0.3.4" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "glow" @@ -2910,17 +2957,34 @@ dependencies = [ ] [[package]] -name = "gpu-allocator" -version = "0.28.0" +name = "gpu-alloc" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +dependencies = [ + "bitflags 2.11.1", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +dependencies = [ + "bitflags 2.11.1", +] + +[[package]] +name = "gpu-allocator" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" dependencies = [ - "ash", - "hashbrown 0.16.1", "log", "presser", - "thiserror 2.0.18", - "windows 0.62.2", + "thiserror 1.0.69", + "windows 0.58.0", ] [[package]] @@ -2929,7 +2993,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "gpu-descriptor-types", "hashbrown 0.15.5", ] @@ -2940,14 +3004,14 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", ] [[package]] name = "grid" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40ca9252762c466af32d0b1002e91e4e1bc5398f77455e55474deb466355ff5" +checksum = "f9e2d4c0a8296178d8802098410ca05d86b17a10bb5ab559b3fb404c1f948220" [[package]] name = "guillotiere" @@ -2977,10 +3041,10 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9da2e5ae821f6e96664977bf974d6d6a2d6682f9ccee23e62ec1d134246845f9" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "bytemuck", "core_maths", - "read-fonts 0.37.0", + "read-fonts", "smallvec", ] @@ -2990,15 +3054,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -3014,16 +3069,14 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ - "allocator-api2", - "equivalent", "foldhash 0.2.0", ] [[package]] name = "hashbrown" -version = "0.17.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" [[package]] name = "heck" @@ -3055,17 +3108,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex_color" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37f101bf4c633f7ca2e4b5e136050314503dd198e78e325ea602c327c484ef0" -dependencies = [ - "arrayvec", - "rand 0.8.7", - "serde", -] - [[package]] name = "hexf-parse" version = "0.2.1" @@ -3109,20 +3151,11 @@ checksum = "f558a64ac9af88b5ba400d99b579451af0d39c6d360980045b91aac966d705e2" [[package]] name = "hostname1-zbus" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#eed01dd3609e90e3c8cd043656734c500956c793" +source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] -[[package]] -name = "hybrid-array" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818356c5132c1fede50f837ca96afbe78ff42413047f4abb886217845e1b6c8c" -dependencies = [ - "typenum", -] - [[package]] name = "i18n-config" version = "0.4.8" @@ -3160,20 +3193,20 @@ dependencies = [ [[package]] name = "i18n-embed-fl" -version = "0.10.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602e6bd30c3db2749e13e38b363a3d98d9d41de1d8de7a79c31bb69e45b47cda" +checksum = "e598ed73b67db92f61e04672e599eef2991a262a40e1666735b8a86d2e7e9f30" dependencies = [ "find-crate", "fluent", "fluent-syntax", "i18n-config", "i18n-embed", - "proc-macro-error3", + "proc-macro-error2", "proc-macro2", "quote", "strsim", - "syn 2.0.119", + "syn 2.0.117", "unic-langid", ] @@ -3187,7 +3220,7 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -3217,8 +3250,8 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ - "build_helpers", "dnd", "iced_accessibility", "iced_core", @@ -3238,6 +3271,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ "accesskit", "accesskit_winit", @@ -3246,9 +3280,9 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ - "bitflags 2.13.1", - "build_helpers", + "bitflags 2.11.1", "bytes", "cosmic-client-toolkit", "dnd", @@ -3260,11 +3294,10 @@ dependencies = [ "num-traits", "palette", "raw-window-handle", - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", "serde", "smol_str", "thiserror 2.0.18", - "unicode-segmentation", "web-time", "window_clipboard", ] @@ -3272,6 +3305,7 @@ dependencies = [ [[package]] name = "iced_debug" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ "iced_core", "iced_futures", @@ -3281,11 +3315,12 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ "futures", "iced_core", "log", - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", "tokio", "wasm-bindgen-futures", "wasmtimer", @@ -3294,8 +3329,9 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "bytemuck", "cosmic-text", "half", @@ -3306,7 +3342,7 @@ dependencies = [ "log", "lyon_path", "raw-window-handle", - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", "thiserror 2.0.18", "unicode-segmentation", ] @@ -3314,6 +3350,7 @@ dependencies = [ [[package]] name = "iced_program" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ "iced_graphics", "iced_runtime", @@ -3322,6 +3359,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3333,8 +3371,8 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ - "build_helpers", "bytes", "cosmic-client-toolkit", "dnd", @@ -3349,6 +3387,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ "bytemuck", "cosmic-text", @@ -3357,7 +3396,7 @@ dependencies = [ "kurbo 0.10.4", "log", "resvg", - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", "softbuffer", "tiny-skia", ] @@ -3365,9 +3404,10 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ - "bitflags 2.13.1", - "build_helpers", + "as-raw-xcb-connection", + "bitflags 2.11.1", "bytemuck", "cosmic-client-toolkit", "cryoglyph", @@ -3380,21 +3420,23 @@ dependencies = [ "lyon", "raw-window-handle", "resvg", - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", "rustix 0.38.44", "thiserror 2.0.18", + "tiny-xlib", "wayland-backend", "wayland-client", "wayland-protocols", "wayland-sys", "wgpu", + "x11rb", ] [[package]] name = "iced_widget" version = "0.14.2" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ - "build_helpers", "cosmic-client-toolkit", "dnd", "iced_accessibility", @@ -3404,7 +3446,7 @@ dependencies = [ "num-traits", "ouroboros", "qrcode", - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", "thiserror 2.0.18", "unicode-segmentation", "window_clipboard", @@ -3413,8 +3455,8 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ - "build_helpers", "cosmic-client-toolkit", "cursor-icon", "dnd", @@ -3426,7 +3468,7 @@ dependencies = [ "iced_runtime", "log", "raw-window-handle", - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", "rustix 0.38.44", "thiserror 2.0.18", "wasm-bindgen-futures", @@ -3515,9 +3557,9 @@ checksum = "846b0857ca091204be3c874bc93daaf89d4777e8d2d20b0d3ffe8f671d98014b" [[package]] name = "icu_collator" -version = "2.2.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bbdf98e5e0aa827770acee171ebb568aaab975a36b56afdb5fd0e2f525750bb" +checksum = "b521b92a2666061ddda902769d8a4cf730b5c9529a845cc1b69770b12a6c9a71" dependencies = [ "icu_collator_data", "icu_collections", @@ -3842,6 +3884,12 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f2f8aeca682d874a5247084aa4fb7d1cef9ba45d889c21209a8818dcaaa0ec9" +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "ident_case" version = "1.0.1" @@ -3861,9 +3909,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.2" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -3877,24 +3925,27 @@ checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" dependencies = [ "bytemuck", "byteorder-lite", - "dav1d", + "color_quant", "exr", + "gif 0.14.2", "image-webp", "moxcms", - "mp4parse", "num-traits", "png 0.18.1", + "qoi", "ravif", "rayon", + "rgb", + "tiff", "zune-core 0.5.1", "zune-jpeg 0.5.15", ] [[package]] name = "image-extras" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60d02eb2c9ccbbab470538fce34c7bc3be7b4e59268e65a3171367b296cdb842" +checksum = "86d29ba92ef6970a2685cc758b455d190842b8b9e96c865ffd31cdb9954b7548" dependencies = [ "image", ] @@ -3917,9 +3968,9 @@ checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" [[package]] name = "imgref" -version = "1.12.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89194689a993ab15268672e99e7b0e19da2da3268ac682e8f02d29d4d1434cd7" +checksum = "e7c5cedc30da3a610cac6b4ba17597bdf7152cf974e8aab3afb3d54455e371c8" [[package]] name = "indenter" @@ -3945,7 +3996,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.17.1", + "hashbrown 0.17.0", "serde", "serde_core", ] @@ -3961,20 +4012,20 @@ dependencies = [ [[package]] name = "inotify" -version = "0.11.4" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "153be1941a183ec9ccd095ddbe17a8b8d435ef6c76e9e02451b933c3999af2c8" +checksum = "bd5b3eaf1a28b758ac0faa5a4254e8ab2705605496f1b1f3fbbc3988ad73d199" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "inotify-sys", "libc", ] [[package]] name = "inotify-sys" -version = "0.1.8" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c033f80b2c113cdf91ab7a33faa9cbc014726dcad99880c8609af2a370edf37d" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" dependencies = [ "libc", ] @@ -3991,11 +4042,11 @@ dependencies = [ [[package]] name = "input" -version = "0.10.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9793345a65d71317763a33066b5d8351f8760dde8d4930fe9e39b5f14a7959d" +checksum = "fbdc09524a91f9cacd26f16734ff63d7dc650daffadd2b6f84d17a285bd875a9" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "input-sys", "libc", "log", @@ -4016,7 +4067,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -4093,36 +4144,35 @@ checksum = "2ceaf4c6c48465bead8cb6a0b7c4ee0c86ecbb31239032b9c66ab9a08d2f3ee1" [[package]] name = "jiff" -version = "0.2.32" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "961d16382652bfdd8c6f68b223b26a8c93e0d475c672f414411db31c6c5c900e" +checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" dependencies = [ - "defmt", "jiff-static", "jiff-tzdb-platform", "log", "portable-atomic", "portable-atomic-util", "serde_core", - "windows-link 0.2.1", + "windows-sys 0.61.2", ] [[package]] name = "jiff-static" -version = "0.2.32" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0879bd39df99c4c5e2c6615ccc026391a423dde10532c573e6086eb94a802cc" +checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] name = "jiff-tzdb" -version = "0.1.8" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142bd39932ad231f10513df9ab62661fead8719872150b7ad02a2df79f4e141e" +checksum = "c900ef84826f1338a557697dc8fc601df9ca9af4ac137c7fb61d4c6f2dfd3076" [[package]] name = "jiff-tzdb-platform" @@ -4160,7 +4210,7 @@ dependencies = [ "quote", "rustc_version", "simd_cesu8", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -4188,27 +4238,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" dependencies = [ "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] name = "jobserver" -version = "0.1.35" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.4.3", + "getrandom 0.3.4", "libc", ] [[package]] name = "js-sys" -version = "0.3.103" +version = "0.3.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" +checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" dependencies = [ "cfg-if", "futures-util", + "once_cell", "wasm-bindgen", ] @@ -4265,9 +4316,9 @@ dependencies = [ [[package]] name = "jxl-grid" -version = "0.6.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01671307879a033bfa52e6e8784b941aca770b3f3a7d33830b455b6844f793fb" +checksum = "a0e0ef92d5d60e76bf41098e57e985f523185e08fad54268da448637feca6989" dependencies = [ "tracing", ] @@ -4304,9 +4355,9 @@ dependencies = [ [[package]] name = "jxl-modular" -version = "0.11.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2f045b24c738dd91d482be385512b512721ae08a671bd4b27bf1c47f215235" +checksum = "da758b2f989aafd9eeb39489fe43d7be5a3a0d2ad61cf1bad705eb6990a6053c" dependencies = [ "jxl-bitstream", "jxl-coding", @@ -4318,9 +4369,9 @@ dependencies = [ [[package]] name = "jxl-oxide" -version = "0.12.6" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36c662923f47586880211f3bc7c0d83fb3a9b410d278c7bde93450748abeef3" +checksum = "ee8ecd2678ed70c1eda42b811ccb2e25ab836edeb18e7f1178c1f917ed36b772" dependencies = [ "brotli-decompressor", "bytemuck", @@ -4348,9 +4399,9 @@ dependencies = [ [[package]] name = "jxl-render" -version = "0.12.4" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34386bfdb6a19b5a30cc9beb4d475d537422c31ae8c39bb69640fcce3fcaf19" +checksum = "aa0c3100918bd3c41bb0f8ce1f4f1664e48f3032ff8eeab0d6a2cfc3276f462d" dependencies = [ "bytemuck", "jxl-bitstream", @@ -4418,7 +4469,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fbe853b403ae61a04233030ae8a79d94975281ed9770a1f9e246732b534b28d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "serde", ] @@ -4450,9 +4501,9 @@ dependencies = [ [[package]] name = "kqueue" -version = "1.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "273c0752728918e0ac4976f2b275b6fefb9ecd400585dec929419f3844cd87b5" +checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" dependencies = [ "kqueue-sys", "libc", @@ -4460,11 +4511,11 @@ dependencies = [ [[package]] name = "kqueue-sys" -version = "1.1.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07293a4e297ac234359b510362495713f75ea345d5307140414f20c69ffeb087" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" dependencies = [ - "bitflags 2.13.1", + "bitflags 1.3.2", "libc", ] @@ -4495,6 +4546,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "lebe" version = "0.5.3" @@ -4503,27 +4560,26 @@ checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" [[package]] name = "libc" -version = "0.2.186" +version = "0.2.185" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" [[package]] -name = "libcosmic-yoda" -version = "0.1.0-yoda.2" +name = "libcosmic" +version = "1.0.0" +source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" dependencies = [ "apply", "ashpd 0.12.3", "auto_enums", - "build_helpers", "cosmic-client-toolkit", "cosmic-config", "cosmic-freedesktop-icons", - "cosmic-settings-config 0.1.0", + "cosmic-settings-config", "cosmic-settings-daemon", "cosmic-theme", "css-color", "derive_setters", - "enumflags2", "float-cmp 0.10.0", "freedesktop-desktop-entry", "futures", @@ -4548,11 +4604,11 @@ dependencies = [ "palette", "phf 0.13.1", "rfd", - "ron 0.12.2", + "ron 0.12.1", "rust-embed", "rustix 1.1.4", "serde", - "shlex 1.3.0", + "shlex", "slotmap", "taffy", "thiserror 2.0.18", @@ -4565,9 +4621,9 @@ dependencies = [ [[package]] name = "libfuzzer-sys" -version = "0.4.13" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2" +checksum = "f12a681b7dd8ce12bff52488013ba614b869148d54dd79836ab85aafdd53f08d" dependencies = [ "arbitrary", "cc", @@ -4590,15 +4646,70 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] -name = "libredox" -version = "0.1.18" +name = "libpulse-binding" +version = "2.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c943259e342f1e06ff2da7a83eabdfe7f92ce10262688dbf1895ff0b3e6e4652" +checksum = "909eb3049e16e373680fe65afe6e2a722ace06b671250cc4849557bc57d6a397" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", + "libc", + "libpulse-sys", + "num-derive", + "num-traits", + "winapi", +] + +[[package]] +name = "libpulse-sys" +version = "1.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d74371848b22e989f829cc1621d2ebd74960711557d8b45cfe740f60d0a05e61" +dependencies = [ + "libc", + "num-derive", + "num-traits", + "pkg-config", + "winapi", +] + +[[package]] +name = "libredox" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" +dependencies = [ + "bitflags 2.11.1", "libc", "plain", - "redox_syscall 0.9.0", + "redox_syscall 0.7.4", +] + +[[package]] +name = "libspa" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b8cfa2a7656627b4c92c6b9ef929433acd673d5ab3708cda1b18478ac00df4" +dependencies = [ + "bitflags 2.11.1", + "cc", + "convert_case", + "cookie-factory", + "libc", + "libspa-sys", + "nix", + "nom 8.0.0", + "system-deps", +] + +[[package]] +name = "libspa-sys" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901049455d2eb6decf9058235d745237952f4804bc584c5fcb41412e6adcc6e0" +dependencies = [ + "bindgen", + "cc", + "system-deps", ] [[package]] @@ -4632,6 +4743,12 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" +[[package]] +name = "linux-raw-sys" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7" + [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -4653,7 +4770,7 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" [[package]] name = "locale1" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#eed01dd3609e90e3c8cd043656734c500956c793" +source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] @@ -4693,9 +4810,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.33" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "loop9" @@ -4724,9 +4841,9 @@ dependencies = [ [[package]] name = "lyon_algorithms" -version = "1.0.20" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8575c0d003ae459399623c4def180c63b77f343b1a7fee64f249b349e7699a31" +checksum = "9815fac08e6fd96733a11dce4f9d15a3f338e96a2e2311ee21e1b738efc2bc0f" dependencies = [ "lyon_path", "num-traits", @@ -4805,9 +4922,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.8.3" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "memmap2" @@ -4820,9 +4937,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.11" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" dependencies = [ "libc", ] @@ -4838,11 +4955,11 @@ dependencies = [ [[package]] name = "metal" -version = "0.33.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7047791b5bc903b8cd963014b355f71dc9864a9a0b727057676c1dcae5cbc15" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block", "core-graphics-types 0.2.0", "foreign-types", @@ -4864,6 +4981,7 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "smithay-clipboard", ] @@ -4874,16 +4992,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" -dependencies = [ - "mime 0.3.17", - "unicase", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -4902,9 +5010,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "log", @@ -4922,20 +5030,6 @@ dependencies = [ "pxfm", ] -[[package]] -name = "mp4parse" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63a35203d3c6ce92d5251c77520acb2e57108c88728695aa883f70023624c570" -dependencies = [ - "bitreader", - "byteorder", - "fallible_collections", - "log", - "num-traits", - "static_assertions", -] - [[package]] name = "mutate_once" version = "0.1.2" @@ -4944,13 +5038,13 @@ checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" [[package]] name = "naga" -version = "28.0.0" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "618f667225063219ddfc61251087db8a9aec3c3f0950c916b614e403486f1135" +checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.13.1", + "bitflags 2.11.1", "cfg-if", "cfg_aliases 0.2.1", "codespan-reporting", @@ -4974,7 +5068,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "jni-sys 0.3.1", "log", "ndk-sys", @@ -5005,30 +5099,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] -name = "nmrs" -version = "3.4.2" +name = "nix" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e42c05118e18f29f55eefa2fbfd98a06b0c7a1a829bdb0f328137d358c6013" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags 2.11.1", + "cfg-if", + "cfg_aliases 0.2.1", + "libc", +] + +[[package]] +name = "nm-secret-agent-manager" +version = "0.1.0" +source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ - "async-trait", - "base64", - "bitflags 2.13.1", - "futures", - "futures-timer", - "log", - "serde", - "thiserror 2.0.18", - "tokio", - "uuid", "zbus", - "zvariant", ] [[package]] name = "no_std_io2" -version = "0.9.4" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418abd1b6d34fbf6cae440dc874771b0525a604428704c76e48b29a5e67b8003" +checksum = "b51ed7824b6e07d354605f4abb3d9d300350701299da96642ee084f5ce631550" dependencies = [ "memchr", ] @@ -5064,7 +5158,7 @@ version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "fsevent-sys", "inotify", "kqueue", @@ -5082,7 +5176,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", ] [[package]] @@ -5119,9 +5213,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.8" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -5133,15 +5227,14 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ - "bytemuck", "num-traits", ] [[package]] name = "num-conv" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" [[package]] name = "num-derive" @@ -5151,7 +5244,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -5165,10 +5258,11 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.46" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ + "autocfg", "num-integer", "num-traits", ] @@ -5213,9 +5307,15 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] +[[package]] +name = "numtoa" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e4d8a81ede501fad07191e746a299f4d79f6dcd053bab1b97af4ff5a90099f2" + [[package]] name = "objc" version = "0.2.7" @@ -5267,7 +5367,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -5283,7 +5383,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.6.2", "objc2 0.6.4", "objc2-core-foundation", @@ -5296,7 +5396,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -5308,7 +5408,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.6.2", "dispatch2", "objc2 0.6.4", @@ -5320,7 +5420,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "libc", "objc2-core-foundation", ] @@ -5343,7 +5443,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "objc2-core-foundation", "objc2-core-graphics", ] @@ -5360,7 +5460,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -5372,7 +5472,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.6.2", "objc2 0.6.4", "objc2-core-foundation", @@ -5394,7 +5494,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -5406,7 +5506,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -5419,7 +5519,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "objc2 0.6.4", "objc2-core-foundation", "objc2-foundation 0.3.2", @@ -5469,9 +5569,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orbclient" -version = "0.3.55" +version = "0.3.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747" +checksum = "59aed3b33578edcfa1bc96a321d590d31832b6ad55a26f0313362ce687e9abd6" dependencies = [ "libc", "libredox", @@ -5517,7 +5617,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -5557,7 +5657,7 @@ dependencies = [ "by_address", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -5635,7 +5735,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared 0.11.3", - "rand 0.8.7", + "rand 0.8.5", ] [[package]] @@ -5658,7 +5758,7 @@ dependencies = [ "phf_shared 0.11.3", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -5671,7 +5771,7 @@ dependencies = [ "phf_shared 0.13.1", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", "uncased", ] @@ -5702,22 +5802,22 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.13" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.13" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -5743,6 +5843,34 @@ dependencies = [ "futures-io", ] +[[package]] +name = "pipewire" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9688b89abf11d756499f7c6190711d6dbe5a3acdb30c8fbf001d6596d06a8d44" +dependencies = [ + "anyhow", + "bitflags 2.11.1", + "libc", + "libspa", + "libspa-sys", + "nix", + "once_cell", + "pipewire-sys", + "thiserror 2.0.18", +] + +[[package]] +name = "pipewire-sys" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb028afee0d6ca17020b090e3b8fa2d7de23305aef975c7e5192a5050246ea36" +dependencies = [ + "bindgen", + "libspa-sys", + "system-deps", +] + [[package]] name = "pkg-config" version = "0.3.33" @@ -5774,7 +5902,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "crc32fast", "fdeflate", "flate2", @@ -5855,7 +5983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -5868,25 +5996,25 @@ dependencies = [ ] [[package]] -name = "proc-macro-error-attr3" -version = "3.0.3" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5bfc63c4dc85083c9daaf7112d0261701d4058677c3bff7f2afc44e30ef3e1" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ "proc-macro2", "quote", ] [[package]] -name = "proc-macro-error3" -version = "3.0.3" +name = "proc-macro-error2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0d42490f6b7b143eef32b9e3522e42bf25dadc02c69ed72236f80adb949b5c" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" dependencies = [ - "proc-macro-error-attr3", + "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 3.0.3", + "syn 2.0.117", ] [[package]] @@ -5906,53 +6034,51 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", "version_check", "yansi", ] [[package]] -name = "profiling" -version = "1.0.18" +name = "procfs" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" +checksum = "25485360a54d6861439d60facef26de713b1e126bf015ec8f98239467a2b82f7" +dependencies = [ + "bitflags 2.11.1", + "procfs-core", + "rustix 1.1.4", +] + +[[package]] +name = "procfs-core" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6401bf7b6af22f78b563665d15a22e9aef27775b79b149a66ca022468a4e405" +dependencies = [ + "bitflags 2.11.1", + "hex", +] + +[[package]] +name = "profiling" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" dependencies = [ "profiling-procmacros", ] [[package]] name = "profiling-procmacros" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb" +checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b" dependencies = [ "quote", - "syn 2.0.119", + "syn 2.0.117", ] -[[package]] -name = "pulp" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" -dependencies = [ - "bytemuck", - "cfg-if", - "libm", - "num-complex", - "paste", - "pulp-wasm-simd-flag", - "raw-cpuid", - "reborrow", - "version_check", -] - -[[package]] -name = "pulp-wasm-simd-flag" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" - [[package]] name = "pwhash" version = "1.0.0" @@ -5963,16 +6089,25 @@ dependencies = [ "byteorder", "hmac 0.10.1", "md-5", - "rand 0.8.7", + "rand 0.8.5", "sha-1", "sha2 0.9.9", ] [[package]] name = "pxfm" -version = "0.1.30" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" +checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d" + +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] [[package]] name = "qrcode" @@ -5993,22 +6128,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" dependencies = [ "memchr", + "serde", ] [[package]] name = "quick-xml" -version = "0.39.4" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdcc8dd4e2f670d309a5f0e83fe36dfdc05af317008fea29144da1a2ac858e5e" +checksum = "958f21e8e7ceb5a1aa7fa87fab28e7c75976e0bfe7e23ff069e0a260f894067d" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.46" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -6027,9 +6163,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.8.7" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", @@ -6038,9 +6174,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.5" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.5", @@ -6123,7 +6259,7 @@ dependencies = [ "num-traits", "paste", "profiling", - "rand 0.9.5", + "rand 0.9.4", "rand_chacha 0.9.0", "simd_helpers", "thiserror 2.0.18", @@ -6146,15 +6282,6 @@ dependencies = [ "rgb", ] -[[package]] -name = "raw-cpuid" -version = "11.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" -dependencies = [ - "bitflags 2.13.1", -] - [[package]] name = "raw-window-handle" version = "0.6.2" @@ -6192,48 +6319,22 @@ dependencies = [ "font-types", ] -[[package]] -name = "read-fonts" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ed38b89c2c77ff968c524145ad65fb010f38af5c7a224b53b81d47ac2daa81" -dependencies = [ - "bytemuck", - "font-types", -] - -[[package]] -name = "reborrow" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" - -[[package]] -name = "redox_event" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5018d583d6d2f5499352aea8d177e9067d1eb03ab17c78169d5ba7a30001b15" -dependencies = [ - "bitflags 2.13.1", - "libredox", -] - [[package]] name = "redox_syscall" version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", ] [[package]] name = "redox_syscall" -version = "0.9.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5102a6aaa05aa011a238e178e6bca86d2cb56fc9f586d37cb80f5bca6e07759" +checksum = "f450ad9c3b1da563fb6948a8e0fb0fb9269711c9c73d9ea1de5058c79c8d643a" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", ] [[package]] @@ -6264,14 +6365,14 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] name = "regex" -version = "1.13.1" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -6281,9 +6382,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.16" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -6292,9 +6393,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.11" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "renderdoc-sys" @@ -6308,7 +6409,7 @@ version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43" dependencies = [ - "gif", + "gif 0.13.3", "image-webp", "log", "pico-args", @@ -6359,7 +6460,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db09040cc89e461f1a265139777a2bde7f8d8c67c4936f700c63ce3e2904d468" dependencies = [ "base64", - "bitflags 2.13.1", + "bitflags 2.11.1", "serde", "serde_derive", "unicode-ident", @@ -6367,11 +6468,11 @@ dependencies = [ [[package]] name = "ron" -version = "0.12.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81116b9531d61eabc41aeb228e4b6b2435bcca3233b98cf3b3077d4e6e9debb3" +checksum = "4147b952f3f819eca0e99527022f7d6a8d05f111aeb0a62960c74eb283bec8fc" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "once_cell", "serde", "serde_derive", @@ -6387,9 +6488,9 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] name = "rust-embed" -version = "8.12.0" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e7760e252aaba7b09f4be00e36476cf585bdb68a53552ac954cdf504ab4bc9" +checksum = "04113cb9355a377d83f06ef1f0a45b8ab8cd7d8b1288160717d66df5c7988d27" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -6398,33 +6499,32 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.12.0" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcfc4d6f53af43755f7a723e4b6b8794fcce052a178dd8c6c1dadc5f5343097" +checksum = "da0902e4c7c8e997159ab384e6d0fc91c221375f6894346ae107f47dd0f3ccaa" dependencies = [ - "mime_guess", "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.119", + "syn 2.0.117", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "8.12.0" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ffa149f6aa81b58a5b3011d01a857c4ed12c7a732d2c51947a4c7c692185f0" +checksum = "5bcdef0be6fe7f6fa333b1073c949729274b05f123a0ad7efcb8efd878e5c3b1" dependencies = [ - "sha2 0.11.0", + "sha2 0.10.9", "walkdir", ] [[package]] name = "rustc-demangle" -version = "0.1.28" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb" +checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" [[package]] name = "rustc-hash" @@ -6434,9 +6534,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hash" -version = "2.1.3" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" [[package]] name = "rustc_version" @@ -6453,7 +6553,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "errno", "libc", "linux-raw-sys 0.4.15", @@ -6466,7 +6566,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "errno", "libc", "linux-raw-sys 0.12.1", @@ -6475,9 +6575,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.23" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rustybuzz" @@ -6485,7 +6585,7 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "bytemuck", "core_maths", "log", @@ -6497,12 +6597,6 @@ dependencies = [ "unicode-script", ] -[[package]] -name = "ryu" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" - [[package]] name = "same-file" version = "1.0.6" @@ -6556,7 +6650,7 @@ checksum = "1dd3accc0f3f4bbaf2c9e1957a030dc582028130c67660d44c0a0345a22ca69b" dependencies = [ "ab_glyph", "log", - "memmap2 0.9.11", + "memmap2 0.9.10", "smithay-client-toolkit", "tiny-skia", ] @@ -6604,9 +6698,9 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" -version = "1.0.229" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -6626,29 +6720,29 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.229" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.229" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 2.0.117", ] [[package]] name = "serde_json" -version = "1.0.150" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "indexmap 2.14.0", "itoa", @@ -6666,7 +6760,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -6680,12 +6774,11 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.21.0" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" +checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" dependencies = [ "base64", - "bs58", "chrono", "hex", "indexmap 1.9.3", @@ -6700,14 +6793,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.21.0" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" +checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" dependencies = [ "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -6718,17 +6811,11 @@ checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "digest 0.9.0", "opaque-debug", ] -[[package]] -name = "sha1_smol" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" - [[package]] name = "sha2" version = "0.9.9" @@ -6737,7 +6824,7 @@ checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "digest 0.9.0", "opaque-debug", ] @@ -6749,21 +6836,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "digest 0.10.7", ] -[[package]] -name = "sha2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "digest 0.11.3", -] - [[package]] name = "sharded-slab" version = "0.1.7" @@ -6779,12 +6855,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "shlex" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" - [[package]] name = "signal-hook-registry" version = "1.4.8" @@ -6797,9 +6867,9 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.10" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" [[package]] name = "simd_cesu8" @@ -6837,9 +6907,9 @@ dependencies = [ [[package]] name = "siphasher" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" [[package]] name = "skrifa" @@ -6848,17 +6918,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac" dependencies = [ "bytemuck", - "read-fonts 0.37.0", -] - -[[package]] -name = "skrifa" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c34617370ae968efb7161bb2beb517d9084659aae19e24b89e3db25b46e4564" -dependencies = [ - "bytemuck", - "read-fonts 0.39.2", + "read-fonts", ] [[package]] @@ -6878,9 +6938,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "smithay-client-toolkit" @@ -6888,14 +6948,14 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "bytemuck", "calloop", "calloop-wayland-source", "cursor-icon", "libc", "log", - "memmap2 0.9.11", + "memmap2 0.9.10", "pkg-config", "rustix 1.1.4", "thiserror 2.0.18", @@ -6915,6 +6975,7 @@ dependencies = [ [[package]] name = "smithay-clipboard" version = "0.8.0" +source = "git+https://github.com/pop-os/smithay-clipboard?tag=sctk-0.20#859b02c88f45c554049a67c6ddeec1692ce0e20b" dependencies = [ "libc", "raw-window-handle", @@ -6934,9 +6995,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", "windows-sys 0.61.2", @@ -6945,26 +7006,31 @@ dependencies = [ [[package]] name = "softbuffer" version = "0.4.1" +source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-4.0#a3f77e251e7422803f693df6e3fc313c010c4dcb" dependencies = [ + "as-raw-xcb-connection", "bytemuck", "cfg_aliases 0.2.1", "cocoa", "core-graphics", + "drm", "fastrand", "foreign-types", "js-sys", - "libredox", "log", - "memmap2 0.9.11", + "memmap2 0.9.10", "objc", "raw-window-handle", + "redox_syscall 0.5.18", "rustix 0.38.44", + "tiny-xlib", "wasm-bindgen", "wayland-backend", "wayland-client", "wayland-sys", "web-sys", "windows-sys 0.52.0", + "x11rb", ] [[package]] @@ -6973,7 +7039,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", ] [[package]] @@ -7064,11 +7130,11 @@ dependencies = [ [[package]] name = "swash" -version = "0.2.9" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0811b01ca2c4e8718760713911feaf4675c24f94e50530a015ec646cfb622f7c" +checksum = "842f3cd369c2ba38966204f983eaa5e54a8e84a7d7159ed36ade2b6c335aae64" dependencies = [ - "skrifa 0.42.1", + "skrifa", "yazi", "zeno", ] @@ -7086,20 +7152,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.119" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -7114,7 +7169,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -7149,7 +7204,7 @@ dependencies = [ "cfg-expr", "heck 0.5.0", "pkg-config", - "toml 1.1.3+spec-1.1.0", + "toml 1.1.2+spec-1.1.0", "version-compare", ] @@ -7167,9 +7222,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.13.5" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" +checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" [[package]] name = "temp-dir" @@ -7184,7 +7239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.4.2", "once_cell", "rustix 1.1.4", "windows-sys 0.61.2", @@ -7225,7 +7280,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -7236,25 +7291,40 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] name = "thread_local" -version = "1.1.10" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", ] [[package]] -name = "time" -version = "0.3.53" +name = "tiff" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50" +checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg 0.5.15", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", + "itoa", "num-conv", "powerfmt", "serde_core", @@ -7264,15 +7334,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.9" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.31" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c431b87111666e491a90baa837f914fb45cd5dc3c268591b0220ff5057f2085f" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -7281,7 +7351,7 @@ dependencies = [ [[package]] name = "timedate-zbus" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#eed01dd3609e90e3c8cd043656734c500956c793" +source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] @@ -7312,6 +7382,19 @@ dependencies = [ "strict-num", ] +[[package]] +name = "tiny-xlib" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0324504befd01cab6e0c994f34b2ffa257849ee019d3fb3b64fb2c858887d89e" +dependencies = [ + "as-raw-xcb-connection", + "ctor-lite", + "libloading", + "pkg-config", + "tracing", +] + [[package]] name = "tinystr" version = "0.8.3" @@ -7325,9 +7408,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.12.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" dependencies = [ "tinyvec_macros", ] @@ -7340,9 +7423,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.53.1" +version = "1.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +checksum = "a91135f59b1cbf38c91e73cf3386fca9bb77915c45ce2771460c9d92f0f3d776" dependencies = [ "bytes", "libc", @@ -7363,32 +7446,18 @@ checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] name = "tokio-stream" -version = "0.1.19" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" dependencies = [ "futures-core", "pin-project-lite", "tokio", - "tokio-util", -] - -[[package]] -name = "tokio-util" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", ] [[package]] @@ -7402,9 +7471,9 @@ dependencies = [ [[package]] name = "toml" -version = "1.1.3+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53c96ecdfa941c8fc4fcaed14f99ada8ebed502eef533015095a07e3301d4c3c" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ "indexmap 2.14.0", "serde_core", @@ -7412,7 +7481,7 @@ dependencies = [ "toml_datetime", "toml_parser", "toml_writer", - "winnow 1.0.4", + "winnow 1.0.1", ] [[package]] @@ -7426,14 +7495,14 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.12+spec-1.1.0" +version = "0.25.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" +checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" dependencies = [ "indexmap 2.14.0", "toml_datetime", "toml_parser", - "winnow 1.0.4", + "winnow 1.0.1", ] [[package]] @@ -7442,14 +7511,14 @@ version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow 1.0.4", + "winnow 1.0.1", ] [[package]] name = "toml_writer" -version = "1.1.2+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "tracing" @@ -7471,7 +7540,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -7538,7 +7607,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" dependencies = [ - "rustc-hash 2.1.3", + "rustc-hash 2.1.2", ] [[package]] @@ -7549,9 +7618,9 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" -version = "1.20.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "udev" @@ -7654,9 +7723,9 @@ checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" [[package]] name = "unicode-segmentation" -version = "1.13.3" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" [[package]] name = "unicode-vo" @@ -7676,10 +7745,16 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "upower_dbus" version = "0.3.2" -source = "git+https://github.com/pop-os/dbus-settings-bindings#eed01dd3609e90e3c8cd043656734c500956c793" +source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "serde", "serde_repr", @@ -7752,14 +7827,12 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.23.5" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5fab0d6c3c01ae70085a09cb03d4c7a1d6314e2b3e075392783396d724ca0a" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" dependencies = [ - "getrandom 0.4.3", "js-sys", "serde_core", - "sha1_smol", "wasm-bindgen", ] @@ -7810,18 +7883,27 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.4+wasi-0.2.12" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.126" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" +checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" dependencies = [ "cfg-if", "once_cell", @@ -7832,9 +7914,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.76" +version = "0.4.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" +checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" dependencies = [ "js-sys", "wasm-bindgen", @@ -7842,9 +7924,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.126" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7852,26 +7934,60 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.126" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.126" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap 2.14.0", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.11.1", + "hashbrown 0.15.5", + "indexmap 2.14.0", + "semver", +] + [[package]] name = "wasmtimer" version = "0.4.3" @@ -7906,7 +8022,7 @@ version = "0.31.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "645c7c96bb74690c3189b5c9cb4ca1627062bb23693a4fad9d8c3de958260144" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "rustix 1.1.4", "wayland-backend", "wayland-scanner", @@ -7918,7 +8034,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "cursor-icon", "wayland-backend", ] @@ -7936,11 +8052,11 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.32.13" +version = "0.32.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +checksum = "563a85523cade2429938e790815fd7319062103b9f4a2dc806e9b53b95982d8f" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-scanner", @@ -7953,7 +8069,7 @@ version = "20250721.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7966,7 +8082,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7979,7 +8095,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7992,7 +8108,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -8007,7 +8123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c324a910fd86ebdc364a3e61ec1f11737d3b1d6c273c0239ee8ff4bc0d24b4a" dependencies = [ "proc-macro2", - "quick-xml 0.39.4", + "quick-xml 0.39.2", "quote", ] @@ -8017,7 +8133,7 @@ version = "0.31.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc1846eb04c49182e04f4a099e2a830a2b745610bbc1d61246e206f29c7000a0" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "downcast-rs 1.2.1", "rustix 1.1.4", "wayland-backend", @@ -8038,9 +8154,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.103" +version = "0.3.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" +checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" dependencies = [ "js-sys", "wasm-bindgen", @@ -8064,13 +8180,12 @@ checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "wgpu" -version = "28.0.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cb534d5ffd109c7d1135f34cdae29e60eab94855a625dcfe1705f8bc7ad79f" +checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" dependencies = [ "arrayvec", - "bitflags 2.13.1", - "bytemuck", + "bitflags 2.11.1", "cfg-if", "cfg_aliases 0.2.1", "document-features", @@ -8094,14 +8209,14 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "28.0.1" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23f4642f53f666adcfd2d3218ab174d1e6681101aef18696b90cbe64d1c10f9" +checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" dependencies = [ "arrayvec", "bit-set", "bit-vec", - "bitflags 2.13.1", + "bitflags 2.11.1", "bytemuck", "cfg_aliases 0.2.1", "document-features", @@ -8126,42 +8241,42 @@ dependencies = [ [[package]] name = "wgpu-core-deps-apple" -version = "28.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87b7b696b918f337c486bf93142454080a32a37832ba8a31e4f48221890047da" +checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-emscripten" -version = "28.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b251c331f84feac147de3c4aa3aa45112622a95dd7ee1b74384fa0458dbd79" +checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-windows-linux-android" -version = "28.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ca976e72b2c9964eb243e281f6ce7f14a514e409920920dcda12ae40febaae" +checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-hal" -version = "28.0.1" +version = "27.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d6cb474beb218824dcc9e1ce679d973f719262789bfb27407da560cac20eeb" +checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags 2.13.1", + "bitflags 2.11.1", "block", "bytemuck", "cfg-if", @@ -8169,6 +8284,7 @@ dependencies = [ "core-graphics-types 0.2.0", "glow", "glutin_wgl_sys", + "gpu-alloc", "gpu-allocator", "gpu-descriptor", "hashbrown 0.16.1", @@ -8195,28 +8311,29 @@ dependencies = [ "wasm-bindgen", "web-sys", "wgpu-types", - "windows 0.62.2", - "windows-core 0.62.2", + "windows 0.58.0", + "windows-core 0.58.0", ] [[package]] name = "wgpu-types" -version = "28.0.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e18308757e594ed2cd27dddbb16a139c42a683819d32a2e0b1b0167552f5840c" +checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "bytemuck", "js-sys", "log", + "thiserror 2.0.18", "web-sys", ] [[package]] name = "which" -version = "8.0.5" +version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3ef584124b911bcc3875c2f1472e80f24361ceb789bd1c62b3e9a3df9ff43c" +checksum = "81995fafaaaf6ae47a7d0cc83c67caf92aeb7e5331650ae6ff856f7c0c60c459" dependencies = [ "libc", ] @@ -8255,16 +8372,28 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "clipboard-win", "clipboard_macos", "clipboard_wayland", + "clipboard_x11", "dnd", "mime 0.1.0", "raw-window-handle", "thiserror 1.0.69", ] +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows" version = "0.61.3" @@ -8308,14 +8437,27 @@ dependencies = [ "windows-core 0.62.2", ] +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings 0.1.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-core" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-implement", - "windows-interface", + "windows-implement 0.60.2", + "windows-interface 0.59.3", "windows-link 0.1.3", "windows-result 0.3.4", "windows-strings 0.4.2", @@ -8327,8 +8469,8 @@ version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-implement", - "windows-interface", + "windows-implement 0.60.2", + "windows-interface 0.59.3", "windows-link 0.2.1", "windows-result 0.4.1", "windows-strings 0.5.1", @@ -8356,6 +8498,17 @@ dependencies = [ "windows-threading 0.2.1", ] +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "windows-implement" version = "0.60.2" @@ -8364,7 +8517,18 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] @@ -8375,7 +8539,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] @@ -8410,6 +8574,15 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-result" version = "0.3.4" @@ -8428,6 +8601,16 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-strings" version = "0.4.2" @@ -8698,8 +8881,9 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winit" version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "cfg_aliases 0.2.1", "cursor-icon", "dpi", @@ -8717,14 +8901,16 @@ dependencies = [ "winit-wayland", "winit-web", "winit-win32", + "winit-x11", ] [[package]] name = "winit-android" version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" dependencies = [ "android-activity", - "bitflags 2.13.1", + "bitflags 2.11.1", "dpi", "ndk", "raw-window-handle", @@ -8736,8 +8922,9 @@ dependencies = [ [[package]] name = "winit-appkit" version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.6.2", "dispatch2", "dpi", @@ -8757,21 +8944,24 @@ dependencies = [ [[package]] name = "winit-common" version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" dependencies = [ - "memmap2 0.9.11", + "memmap2 0.9.10", "objc2 0.6.4", "objc2-core-foundation", "smol_str", "tracing", "winit-core", + "x11-dl", "xkbcommon-dl", ] [[package]] name = "winit-core" version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "cursor-icon", "dpi", "keyboard-types", @@ -8783,13 +8973,14 @@ dependencies = [ [[package]] name = "winit-orbital" version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "dpi", "libredox", "orbclient", "raw-window-handle", - "redox_event", + "redox_syscall 0.7.4", "smol_str", "tracing", "winit-core", @@ -8798,8 +8989,9 @@ dependencies = [ [[package]] name = "winit-uikit" version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "block2 0.6.2", "dispatch2", "dpi", @@ -8817,14 +9009,15 @@ dependencies = [ [[package]] name = "winit-wayland" version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" dependencies = [ "ahash", - "bitflags 2.13.1", + "bitflags 2.11.1", "calloop", "cursor-icon", "dpi", "libc", - "memmap2 0.9.11", + "memmap2 0.9.10", "raw-window-handle", "rustix 1.1.4", "sctk-adwaita", @@ -8842,9 +9035,10 @@ dependencies = [ [[package]] name = "winit-web" version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" dependencies = [ "atomic-waker", - "bitflags 2.13.1", + "bitflags 2.11.1", "concurrent-queue", "cursor-icon", "dpi", @@ -8863,8 +9057,9 @@ dependencies = [ [[package]] name = "winit-win32" version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "cursor-icon", "dpi", "raw-window-handle", @@ -8875,6 +9070,29 @@ dependencies = [ "winit-core", ] +[[package]] +name = "winit-x11" +version = "0.31.0-beta.2" +source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" +dependencies = [ + "bitflags 2.11.1", + "bytemuck", + "calloop", + "cursor-icon", + "dpi", + "libc", + "percent-encoding", + "raw-window-handle", + "rustix 1.1.4", + "smol_str", + "tracing", + "winit-common", + "winit-core", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + [[package]] name = "winnow" version = "0.6.24" @@ -8886,18 +9104,109 @@ dependencies = [ [[package]] name = "winnow" -version = "1.0.4" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" dependencies = [ "memchr", ] [[package]] name = "wit-bindgen" -version = "0.57.1" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap 2.14.0", + "prettyplease", + "syn 2.0.117", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.117", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.11.1", + "indexmap 2.14.0", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.14.0", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] [[package]] name = "write16" @@ -8914,6 +9223,39 @@ dependencies = [ "either", ] +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix 1.1.4", + "x11rb-protocol", + "xcursor", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + [[package]] name = "xcursor" version = "0.3.10" @@ -8928,7 +9270,8 @@ checksum = "2fb433233f2df9344722454bc7e96465c9d03bff9d77c248f9e7523fe79585b5" [[package]] name = "xdg-shell-wrapper-config" -version = "1.3.0" +version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-panel#d518c7d25ef96f1a9696aa8cce008656bf66ece4" dependencies = [ "serde", "wayland-protocols-wlr", @@ -8974,7 +9317,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9" dependencies = [ "libc", - "memmap2 0.9.11", + "memmap2 0.9.10", "xkeysym", ] @@ -8985,7 +9328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a974f48060a14e95705c01f24ad9c3345022f4d97441b8a36beb7ed5c4a02d" dependencies = [ "libc", - "memmap2 0.9.11", + "memmap2 0.9.10", "xkeysym", ] @@ -8995,7 +9338,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.11.1", "dlib", "log", "once_cell", @@ -9013,9 +9356,9 @@ dependencies = [ [[package]] name = "xml" -version = "1.3.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "636f85e5ca6488e96401b61eb7de54f4e44755c988af0f52cf90230c312a1a89" +checksum = "b8aa498d22c9bbaf482329839bc5620c46be275a19a812e9a22a2b07529a642a" [[package]] name = "xml-rs" @@ -9058,9 +9401,9 @@ checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5" [[package]] name = "yoke" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -9075,15 +9418,15 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", "synstructure", ] [[package]] name = "zbus" -version = "5.18.0" +version = "5.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe18fb60dc696039e738717b76eaea21e7a4489bbb1885020b43c94236d7e98a" +checksum = "ca82f95dbd3943a40a53cfded6c2d0a2ca26192011846a1810c4256ef92c60bc" dependencies = [ "async-broadcast", "async-executor", @@ -9109,7 +9452,7 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow 1.0.4", + "winnow 0.7.15", "zbus_macros", "zbus_names", "zvariant", @@ -9133,7 +9476,7 @@ checksum = "10da05367f3a7b7553c8cdf8fa91aee6b64afebe32b51c95177957efc47ca3a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", "zbus-lockstep", "zbus_xml", "zvariant", @@ -9141,14 +9484,14 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.18.0" +version = "5.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe96480bed92df2b442a1a30df364e12d08eed03aeb061f2b8dc6afb2be91119" +checksum = "897e79616e84aac4b2c46e9132a4f63b93105d54fe8c0e8f6bffc21fa8d49222" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", "zbus_names", "zvariant", "zvariant_utils", @@ -9156,12 +9499,12 @@ dependencies = [ [[package]] name = "zbus_names" -version = "4.3.4" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e" +checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" dependencies = [ "serde", - "winnow 1.0.4", + "winnow 0.7.15", "zvariant", ] @@ -9180,12 +9523,12 @@ dependencies = [ [[package]] name = "zbus_xml" -version = "5.2.0" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ab0513c0a66a60a8718d5ad712a5094845a20d95b5c1c81e2bd8e904a52b4f" +checksum = "441a0064125265655bccc3a6af6bef56814d9277ac83fce48b1cd7e160b80eac" dependencies = [ + "quick-xml 0.38.4", "serde", - "winnow 1.0.4", "zbus_names", "zvariant", ] @@ -9198,29 +9541,29 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.54" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cbbc0a705a0fd05cc3676525980d2bf5a9bc4adac6d6475209a7887cf59d19" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.54" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", ] [[package]] name = "zerofrom" -version = "0.1.8" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" dependencies = [ "zerofrom-derive", ] @@ -9233,15 +9576,15 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", "synstructure", ] [[package]] name = "zeroize" -version = "1.9.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" [[package]] name = "zerotrie" @@ -9275,81 +9618,14 @@ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", -] - -[[package]] -name = "zlink" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b895b99588dceb73f4d349b8323eabad9a97d48ce83698d475c7223727c6148" -dependencies = [ - "zlink-smol", - "zlink-tokio", -] - -[[package]] -name = "zlink-core" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd12701bd1d42a982b931f0159cf5054bf13d90e7828a8377dfc02ed4b00342d" -dependencies = [ - "futures-util", - "itoa", - "libc", - "pin-project-lite", - "rustix 1.1.4", - "ryu", - "serde", - "serde_json", - "tracing", - "zlink-macros", -] - -[[package]] -name = "zlink-macros" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f2416a5f504dfd7e04fee49f31abafe3314a3f62b4ddaa8e9a5fd496d4dd50" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "zlink-smol" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bc53cd0d636ad753f759aab0abb1f456e985c3938a279d11ebda92340ae37b1" -dependencies = [ - "async-broadcast", - "async-channel", - "async-io", - "futures-lite", - "futures-util", - "pin-project-lite", - "zlink-core", -] - -[[package]] -name = "zlink-tokio" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cbf366ac77ab41bf9a8d43535d3d620a072f7957813e03355d3d010c16cc4f" -dependencies = [ - "futures-util", - "pin-project-lite", - "tokio", - "tokio-stream", - "zlink-core", + "syn 2.0.117", ] [[package]] name = "zmij" -version = "1.0.23" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" [[package]] name = "zune-core" @@ -9392,45 +9668,41 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.13.1" +version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee2a0bcd2a907786a456fff45aaaaf54c9ba5f50b71ae9ec1a4edd200c94911" +checksum = "5708299b21903bbe348e94729f22c49c55d04720a004aa350f1f9c122fd2540b" dependencies = [ "endi", "enumflags2", "serde", "url", - "winnow 1.0.4", + "winnow 0.7.15", "zvariant_derive", "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "5.13.1" +version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38a708216a18780796770bfe3f4739c7c83a3e8f789b755534bbbc06e4e23e12" +checksum = "5b59b012ebe9c46656f9cc08d8da8b4c726510aef12559da3e5f1bf72780752c" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.119", + "syn 2.0.117", "zvariant_utils", ] [[package]] name = "zvariant_utils" -version = "3.5.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90cb9383f9b45290407a1258b202d3f8f01db719eb60b4e4055c6375af4fc7c7" +checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9" dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.119", - "winnow 1.0.4", + "syn 2.0.117", + "winnow 0.7.15", ] - -[[patch.unused]] -name = "winit-x11" -version = "0.31.0-beta.2" diff --git a/Cargo.toml b/Cargo.toml index 40814c9..5a67aae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,25 +1,17 @@ [workspace] -members = ["cosmic-settings", "page", "pages/*", "subscriptions/*"] +members = ["cosmic-settings", "crates/*", "page", "pages/*", "subscriptions/*"] default-members = ["cosmic-settings"] resolver = "3" [workspace.package] -rust-version = "1.93" +rust-version = "1.90" [workspace.dependencies] -cosmic-randr = { path = "../cosmic-randr/lib" } -tokio = { version = "1.53.1", features = ["macros"] } -iced_winit = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/winit", default-features = false } -image = { version = "0.25.10", default-features = false, features = [ - "jpeg", - "png", - "rayon", - "webp", - "hdr", -] } +cosmic-randr = { git = "https://github.com/pop-os/cosmic-randr" } +tokio = { version = "1.49.0", features = ["macros"] } +iced_winit = { git = "https://github.com/pop-os/libcosmic", default-features = false } -[workspace.dependencies.cosmic] -package = "libcosmic-yoda" +[workspace.dependencies.libcosmic] features = [ "dbus-config", "desktop", @@ -28,29 +20,29 @@ features = [ "tokio", "qr_code", ] -path = "/home/lionel/Projets/COSMIC/libcosmic" +git = "https://github.com/pop-os/libcosmic" [workspace.dependencies.cosmic-config] -path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-config" +git = "https://github.com/pop-os/libcosmic" [workspace.dependencies.cosmic-bg-config] -path = "../cosmic-bg/config" +git = "https://github.com/pop-os/cosmic-bg" [workspace.dependencies.cosmic-comp-config] -path = "../cosmic-comp/cosmic-comp-config" +git = "https://github.com/pop-os/cosmic-comp" features = ["output"] [workspace.dependencies.cosmic-idle-config] -path = "../cosmic-idle/cosmic-idle-config" +git = "https://github.com/pop-os/cosmic-idle" [workspace.dependencies.cosmic-panel-config] -path = "../cosmic-panel/cosmic-panel-config" +git = "https://github.com/pop-os/cosmic-panel" [workspace.dependencies.cosmic-randr-shell] -path = "../cosmic-randr/shell" +git = "https://github.com/pop-os/cosmic-randr" [workspace.dependencies.sctk] -version = "0.20.0" +version = "0.20" package = "smithay-client-toolkit" [profile.dev] @@ -67,18 +59,34 @@ inherits = "release" lto = "off" debug = true +# [patch.'https://github.com/pop-os/cosmic-text'] +# cosmic-text = { git = "https://github.com/pop-os/cosmic-text//", rev = "b017d7c" } + [patch.'https://github.com/pop-os/cosmic-protocols'] -cosmic-protocols = { path = "../cosmic-protocols" } -cosmic-client-toolkit = { path = "../cosmic-protocols/client-toolkit" } +cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols//", rev = "d0e95be" } +cosmic-client-toolkit = { git = "https://github.com/pop-os/cosmic-protocols//", rev = "d0e95be" } +# [patch.'https://github.com/pop-os/cosmic-settings-daemon'] +# cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon//", branch = "input_nobuild" } + +# For development and testing purposes [patch.'https://github.com/pop-os/libcosmic'] -cosmic-config = { path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-config" } -cosmic-theme = { path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-theme" } -iced_futures = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/futures" } -iced_winit = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/winit" } +libcosmic = { path = "../libcosmic" } +cosmic-config = { path = "../libcosmic/cosmic-config" } +cosmic-theme = { path = "../libcosmic/cosmic-theme" } +iced_futures = { path = "../libcosmic/iced/futures" } +iced_winit = { path = "../libcosmic/iced/winit" } -[patch.'https://github.com/pop-os/cosmic-text.git'] -cosmic-text = { path = "../cosmic-text" } +# libcosmic = { git = "https://github.com/pop-os/libcosmic//" } +# cosmic-config = { git = "https://github.com/pop-os/libcosmic//" } +# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//" } +# iced_futures = { git = "https://github.com/pop-os/libcosmic//" } +# iced_winit = { git = "https://github.com/pop-os/libcosmic//" } + +# [patch.'https://github.com/pop-os/dbus-settings-bindings'] +# cosmic-dbus-networkmanager = { path = "../dbus-settings-bindings/networkmanager" } +# upower_dbus = { path = "../dbus-settings-bindings/upower" } +# nm-secret-agent-manager = { git = "https://github.com/pop-os/dbus-settings-bindings//", branch = "nm-secret-agent" } [patch.crates-io] atspi = { git = "https://github.com/wash2/atspi" } diff --git a/TESTING.md b/TESTING.md index 8efc53e..43b75fc 100644 --- a/TESTING.md +++ b/TESTING.md @@ -48,13 +48,7 @@ This document provides a regression testing checklist for COSMIC Settings and th ### Sound -- [ ] Output & Input volume sliders work independently -- [ ] Output balance slider works & doesn't get reset by volume slider -- [ ] Amplification toggles work as expected -- [ ] Device profiles can be changed & reflect as expected on the main Sound page -- [ ] Applications using sound appear on the Applications sub-page -- [ ] Application volume and mute controls only affect the selected playback stream -- [ ] Closing an playback stream removes it from the Applications sub-page +TBD after devices/profiles are fixed. ### Power & Battery diff --git a/cosmic-settings/Cargo.toml b/cosmic-settings/Cargo.toml index 35ec946..03c7a70 100644 --- a/cosmic-settings/Cargo.toml +++ b/cosmic-settings/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmic-settings" -version = "1.5.0" +version = "1.0.7" edition = "2024" license = "GPL-3.0-only" publish = false @@ -16,11 +16,13 @@ ashpd = { version = "0.12", default-features = false, features = [ ], optional = true } chrono = "0.4" jiff = "0.2" -clap = { version = "4.6.4", features = ["derive"] } +clap = { version = "4.5.59", features = ["derive"] } color-eyre = "0.6.5" cosmic-bg-config.workspace = true cosmic-comp-config = { workspace = true, optional = true } cosmic-config.workspace = true +cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } +nm-secret-agent-manager = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } cosmic-idle-config.workspace = true cosmic-panel-config = { workspace = true, optional = true } cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", optional = true } @@ -32,37 +34,43 @@ cosmic-settings-accessibility-subscription = { path = "../subscriptions/accessib cosmic-settings-a11y-manager-subscription = { path = "../subscriptions/a11y-manager", optional = true } cosmic-settings-airplane-mode-subscription = { path = "../subscriptions/airplane-mode", optional = true } cosmic-settings-bluetooth-subscription = { path = "../subscriptions/bluetooth", optional = true } -cosmic-settings-sound = { path = "../pages/sound", optional = true } +cosmic-settings-network-manager-subscription = { path = "../subscriptions/network-manager", optional = true } cosmic-settings-upower-subscription = { path = "../subscriptions/upower", optional = true } +cosmic-settings-sound-subscription = { path = "../subscriptions/sound", optional = true, features = [ + "auto-profile-init", +] } cosmic-settings-wallpaper = { path = "../pages/wallpapers" } cosmic-settings-daemon-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true } -cups_rs = { version = "0.3.0", optional = true } derive_setters = "0.1.9" dirs = "6.0.0" eyre = "0.6.12" freedesktop-desktop-entry = "0.8.1" -futures = "0.3.33" +futures = "0.3.32" hostname-validator = "1.1.1" hostname1-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } -i18n-embed-fl = "0.10.1" -image.workspace = true -indexmap = "2.14.0" +i18n-embed-fl = "0.10.0" +image = { version = "0.25", default-features = false, features = [ + "jpeg", + "png", + "rayon", + "webp", + "hdr", +] } +indexmap = "2.13.0" itertools = "0.14.0" -itoa = "1.0.18" -cosmic.workspace = true +itoa = "1.0.17" +libcosmic.workspace = true iced_winit.workspace = true locale1 = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } sysinfo = { version = "=0.38.0", optional = true } -mime-apps = { package = "cosmic-mime-apps", git = "https://github.com/pop-os/cosmic-mime-apps", features = ["tokio"], optional = true } +mime-apps = { package = "cosmic-mime-apps", git = "https://github.com/pop-os/cosmic-mime-apps", optional = true } notify = "8.2.0" -nmrs = { version = "3.4.2", optional = true } -regex = "1.13.1" +regex = "1.12.3" ron = "0.12" -rust-embed = "8.12.0" +rust-embed = "8.11.0" sctk = { workspace = true, optional = true } secure-string = "0.3.0" -secret-service = { version = "5.1.0", features = ["rt-tokio-crypto-rust"], optional = true } -serde = { version = "1.0.229", features = ["derive"] } +serde = { version = "1.0.228", features = ["derive"] } slab = "0.4.12" slotmap = "1.1.1" static_init = "1.0.4" @@ -70,36 +78,29 @@ sunrise = "3.0.0" timedate-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } tokio = { workspace = true, features = ["fs", "io-util", "process", "sync"] } tracing = "0.1.44" -tracing-subscriber = { version = "0.3.23", features = ["env-filter"] } +tracing-subscriber = { version = "0.3.22", features = ["env-filter"] } udev = { version = "0.9.3", optional = true } upower_dbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } bluez-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } url = "2.5.8" xkb-data = "0.2.2" xkeysym = { version = "0.2.1", optional = true } -zbus = { version = "5.18.0", default-features = false, features = [ +zbus = { version = "5.13.2", default-features = false, features = [ "tokio", ], optional = true } zbus_polkit = { version = "5.0.0", optional = true } fontdb = "0.23.0" mime = "0.3.17" -rustix = { version = "1.1.4", features = ["process"] } +rustix = { version = "1.1.3", features = ["process"] } gettext-rs = { version = "0.7.7", features = [ "gettext-system", ], optional = true } num-traits = "0.2" pwhash = "1" -which = "8.0.5" -zlink = "0.5.0" -intmap = "3.1.3" - -[dependencies.cosmic-settings-audio-client] -git = "https://github.com/pop-os/cosmic-settings-daemon" -features = ["codec"] -optional = true +which = "8.0.0" [dependencies.icu] -version = "2.2.0" +version = "2.1.1" features = ["compiled_data"] [dependencies.i18n-embed] @@ -112,11 +113,8 @@ git = "https://github.com/AerynOS/locales-rs" optional = true [features] -default = ["a11y", "avif", "linux", "single-instance", "wgpu", "systemd"] -avif = ["image/avif-native"] +default = ["a11y", "linux", "single-instance", "wgpu"] gettext = ["dep:gettext-rs"] -systemd = [] -openrc = [] # Default features for Linux linux = [ @@ -131,7 +129,6 @@ linux = [ "page-legacy-applications", "page-networking", "page-power", - "page-printers", "page-region", "page-sound", "page-users", @@ -170,13 +167,13 @@ page-input = [ ] page-legacy-applications = ["cosmic-comp-config", "dep:cosmic-randr"] page-networking = [ + "dep:cosmic-settings-network-manager-subscription", "xdg-portal", - "dep:nmrs", - "dep:secret-service", + "dep:cosmic-dbus-networkmanager", + "dep:nm-secret-agent-manager", "dep:zbus", ] page-power = ["dep:upower_dbus", "dep:zbus"] -page-printers = ["dep:cups_rs"] page-region = [ "gettext", "dep:locales-rs", @@ -184,18 +181,18 @@ page-region = [ "dep:zbus", "dep:accounts-zbus", ] -page-sound = ["dep:cosmic-settings-audio-client", "dep:cosmic-settings-sound"] +page-sound = ["dep:cosmic-settings-sound-subscription"] page-users = ["xdg-portal", "dep:accounts-zbus", "dep:zbus", "dep:zbus_polkit"] page-window-management = ["cosmic-comp-config", "dep:cosmic-settings-config"] page-workspaces = ["cosmic-comp-config"] # Other features -a11y = ["cosmic/a11y"] +a11y = ["libcosmic/a11y"] ashpd = ["dep:ashpd"] cosmic-comp-config = ["dep:cosmic-comp-config"] -dbus-config = ["cosmic/dbus-config", "cosmic-config/dbus"] -single-instance = ["cosmic/single-instance"] +dbus-config = ["libcosmic/dbus-config", "cosmic-config/dbus"] +single-instance = ["libcosmic/single-instance"] test = [] -wayland = ["cosmic/wayland", "dep:cosmic-panel-config", "dep:cosmic-randr", "iced_winit/wayland"] -wgpu = ["cosmic/wgpu"] -xdg-portal = ["ashpd", "cosmic/xdg-portal"] +wayland = ["libcosmic/wayland", "dep:cosmic-panel-config", "dep:cosmic-randr", "iced_winit/cctk"] +wgpu = ["libcosmic/wgpu"] +xdg-portal = ["ashpd", "libcosmic/xdg-portal"] diff --git a/cosmic-settings/build.rs b/cosmic-settings/build.rs index 5be3e7c..4f0dd04 100644 --- a/cosmic-settings/build.rs +++ b/cosmic-settings/build.rs @@ -1,5 +1,4 @@ -use std::path::PathBuf; -use std::{env, fs}; +use std::{env, fs, path::PathBuf}; use xdgen::{App, Context, FluentString}; fn main() { diff --git a/cosmic-settings/src/app.rs b/cosmic-settings/src/app.rs index a54eb81..dfac360 100644 --- a/cosmic-settings/src/app.rs +++ b/cosmic-settings/src/app.rs @@ -5,6 +5,7 @@ use crate::PageCommands; use crate::config::Config; #[cfg(feature = "page-accessibility")] use crate::pages::accessibility; +use crate::pages::applications; #[cfg(feature = "page-bluetooth")] use crate::pages::bluetooth; use crate::pages::desktop::{self, appearance}; @@ -16,25 +17,28 @@ use crate::pages::input; use crate::pages::networking; #[cfg(feature = "page-power")] use crate::pages::power; -#[cfg(feature = "page-printers")] -use crate::pages::printers; #[cfg(feature = "page-sound")] use crate::pages::sound; -use crate::pages::{self, applications, system, time}; +use crate::pages::{self, system, time}; use crate::subscription::desktop_files; use crate::widget::{page_title, search_header}; -use cosmic::app::context_drawer::ContextDrawer; -use cosmic::app::{Core, Task}; #[cfg(feature = "wayland")] use cosmic::cctk::{sctk::output::OutputInfo, wayland_client::protocol::wl_output::WlOutput}; -use cosmic::iced::event::{self, PlatformSpecific}; -use cosmic::iced::{self, Length, Subscription, keyboard, window}; -use cosmic::prelude::*; -use cosmic::widget::{ - button, column, container, icon, id_container, nav_bar, row, scrollable, segmented_button, - settings, text_input, +use cosmic::{ + Element, + app::{Core, Task, context_drawer::ContextDrawer}, + iced::{ + self, Length, Subscription, + event::{self, PlatformSpecific}, + keyboard, window, + }, + prelude::*, + surface, + widget::{ + button, column, container, icon, id_container, nav_bar, row, scrollable, segmented_button, + settings, text_input, + }, }; -use cosmic::{Element, surface}; #[cfg(feature = "cosmic-comp-config")] use cosmic_comp_config::CosmicCompConfig; #[cfg(feature = "wayland")] @@ -48,9 +52,8 @@ use desktop::{ #[cfg(feature = "wayland")] use event::wayland; use page::Entity; -use std::borrow::Cow; use std::collections::BTreeSet; -use std::str::FromStr; +use std::{borrow::Cow, str::FromStr}; #[allow(clippy::struct_excessive_bools)] #[allow(clippy::module_name_repetitions)] @@ -118,8 +121,6 @@ impl SettingsApp { } #[cfg(feature = "page-power")] PageCommands::Power => self.pages.page_id::(), - #[cfg(feature = "page-printers")] - PageCommands::Printers => self.pages.page_id::(), #[cfg(feature = "page-region")] PageCommands::RegionLanguage => self.pages.page_id::(), #[cfg(feature = "page-sound")] @@ -229,8 +230,6 @@ impl cosmic::Application for SettingsApp { app.insert_page::(); #[cfg(feature = "page-input")] app.insert_page::(); - #[cfg(feature = "page-printers")] - app.insert_page::(); app.insert_page::(); app.insert_page::(); app.insert_page::(); @@ -584,13 +583,6 @@ impl cosmic::Application for SettingsApp { } } - #[cfg(feature = "page-sound")] - crate::pages::Message::SoundApplications(message) => { - if let Some(page) = self.pages.page_mut::() { - return page.update(message).map(Into::into); - } - } - #[cfg(feature = "page-sound")] crate::pages::Message::SoundDeviceProfiles(message) => { if let Some(page) = self.pages.page_mut::() { @@ -667,13 +659,6 @@ impl cosmic::Application for SettingsApp { } } - #[cfg(feature = "page-printers")] - crate::pages::Message::Printers(message) => { - if let Some(page) = self.pages.page_mut::() { - return page.update(message).map(Into::into); - } - } - #[cfg(feature = "page-networking")] crate::pages::Message::Vpn(message) => { if let Some(page) = self.pages.page_mut::() { @@ -1165,9 +1150,6 @@ impl SettingsApp { } for page in unload { - if page == self.active_page { - continue; - } self.loaded_pages.remove(&page); self.pages.on_leave(page); } diff --git a/cosmic-settings/src/config.rs b/cosmic-settings/src/config.rs index 9856f63..88de69e 100644 --- a/cosmic-settings/src/config.rs +++ b/cosmic-settings/src/config.rs @@ -1,8 +1,10 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only -use cosmic::cosmic_config::{self, ConfigGet, ConfigSet}; -use cosmic::cosmic_theme::palette::Srgba; +use cosmic::{ + cosmic_config::{self, ConfigGet, ConfigSet}, + cosmic_theme::palette::Srgba, +}; const NAME: &str = "com.system76.CosmicSettings"; diff --git a/cosmic-settings/src/localize.rs b/cosmic-settings/src/localize.rs index 3e4d237..25aee1d 100644 --- a/cosmic-settings/src/localize.rs +++ b/cosmic-settings/src/localize.rs @@ -1,8 +1,10 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only -use i18n_embed::fluent::{FluentLanguageLoader, fluent_language_loader}; -use i18n_embed::{DefaultLocalizer, LanguageLoader, Localizer}; +use i18n_embed::{ + DefaultLocalizer, LanguageLoader, Localizer, + fluent::{FluentLanguageLoader, fluent_language_loader}, +}; use rust_embed::RustEmbed; use std::sync::LazyLock; diff --git a/cosmic-settings/src/main.rs b/cosmic-settings/src/main.rs index 8b418d4..cb68840 100644 --- a/cosmic-settings/src/main.rs +++ b/cosmic-settings/src/main.rs @@ -7,12 +7,6 @@ #![allow(clippy::cast_lossless)] #![allow(clippy::too_many_lines)] -#[cfg(not(any(feature = "systemd", feature = "openrc")))] -compile_error!( - "At least one service manager feature must be enabled. \ - Enable 'systemd' or 'openrc' for bluetooth service management." -); - pub mod app; use std::str::FromStr; @@ -22,7 +16,6 @@ pub mod config; #[macro_use] pub mod localize; pub mod pages; -pub mod service_manager; pub mod subscription; pub mod theme; pub mod utils; @@ -31,8 +24,7 @@ pub mod widget; use std::path::PathBuf; use clap::{Parser, Subcommand}; -use cosmic::app::CosmicFlags; -use cosmic::iced::Limits; +use cosmic::{app::CosmicFlags, iced::Limits}; use i18n_embed::DesktopLanguageRequester; use ron::error::SpannedError; use serde::{Deserialize, Serialize}; @@ -122,9 +114,6 @@ pub enum PageCommands { /// Power settings page #[cfg(feature = "page-power")] Power, - /// Printers settings page - #[cfg(feature = "page-printers")] - Printers, /// Region & Language settings page #[cfg(feature = "page-region")] RegionLanguage, diff --git a/cosmic-settings/src/pages/accessibility/magnifier.rs b/cosmic-settings/src/pages/accessibility/magnifier.rs index 7dae60d..d476b71 100644 --- a/cosmic-settings/src/pages/accessibility/magnifier.rs +++ b/cosmic-settings/src/pages/accessibility/magnifier.rs @@ -1,15 +1,20 @@ use std::collections::HashSet; use std::fmt::Write; -use cosmic::iced::core::text::Wrapping; -use cosmic::iced::{Element, Length, stream}; -use cosmic::widget::{self, icon, settings, svg, text}; -use cosmic::{Apply, surface}; +use cosmic::{ + Apply, + iced::core::text::Wrapping, + iced::{Element, Length, stream}, + surface, + widget::{self, icon, settings, svg, text}, +}; use cosmic_comp_config::{ZoomConfig, ZoomMovement}; use cosmic_config::{ConfigGet, ConfigSet}; use cosmic_settings_config::{Action, Binding, shortcuts}; -use cosmic_settings_page::section::{self, Section}; -use cosmic_settings_page::{self as page, Entity}; +use cosmic_settings_page::{ + self as page, Entity, + section::{self, Section}, +}; use futures::SinkExt; use slotmap::SlotMap; use tracing::error; diff --git a/cosmic-settings/src/pages/accessibility/mod.rs b/cosmic-settings/src/pages/accessibility/mod.rs index 919b5e5..f8b75f2 100644 --- a/cosmic-settings/src/pages/accessibility/mod.rs +++ b/cosmic-settings/src/pages/accessibility/mod.rs @@ -1,16 +1,21 @@ -use cosmic::cosmic_theme::{CosmicPalette, ThemeBuilder}; -use cosmic::iced::core::text::Wrapping; -use cosmic::iced::stream; -use cosmic::theme::CosmicTheme; -use cosmic::widget::{dropdown, settings, text}; -use cosmic::{Apply, Element, Task, surface}; +use cosmic::{ + Apply, Element, Task, + cosmic_theme::{CosmicPalette, ThemeBuilder}, + iced::core::text::Wrapping, + iced::stream, + surface, + theme::CosmicTheme, + widget::{dropdown, settings, text}, +}; pub use cosmic_comp_config::ZoomMovement; use cosmic_config::CosmicConfigEntry; use cosmic_settings_a11y_manager_subscription as cosmic_a11y_manager; use cosmic_settings_accessibility_subscription as a11y_bus; use cosmic_settings_daemon_config::CosmicSettingsDaemonConfig; -use cosmic_settings_page::section::{self, Section}; -use cosmic_settings_page::{self as page, Insert}; +use cosmic_settings_page::{ + self as page, Insert, + section::{self, Section}, +}; use futures::SinkExt; use num_traits::FromPrimitive; use slotmap::SlotMap; diff --git a/cosmic-settings/src/pages/applications/default_apps.rs b/cosmic-settings/src/pages/applications/default_apps.rs index 046619e..89b28c0 100644 --- a/cosmic-settings/src/pages/applications/default_apps.rs +++ b/cosmic-settings/src/pages/applications/default_apps.rs @@ -2,23 +2,28 @@ // Copyright 2024 bbb651 // SPDX-License-Identifier: GPL-3.0-only -use cosmic::iced::{Alignment, Length}; -use cosmic::widget::{self, dropdown, icon, settings}; -use cosmic::{Apply, Element, Task, surface}; +use std::{ + borrow::Cow, + collections::{BTreeMap, BTreeSet}, + path::{Path, PathBuf}, + sync::Arc, +}; + +use cosmic::{ + Apply, Element, Task, + iced::Alignment, + surface, + widget::{self, dropdown, icon, settings}, +}; use cosmic_config::{ConfigGet, ConfigSet}; use cosmic_settings_config::shortcuts::SystemActions; use cosmic_settings_config::shortcuts::action::System; use cosmic_settings_page::{self as page, Section, section}; -use freedesktop_desktop_entry::{DesktopEntry, default_paths, get_languages_from_env}; -use mime::Mime; +use freedesktop_desktop_entry::{ + DesktopEntry, Iter as DesktopEntryIter, default_paths, get_languages_from_env, +}; +use mime_apps::App; use slotmap::SlotMap; -use std::borrow::Cow; -use std::collections::BTreeSet; -use std::io::SeekFrom; -use std::path::PathBuf; -use std::str::FromStr; -use std::sync::Arc; -use tokio::io::{AsyncSeekExt, AsyncWriteExt}; const DROPDOWN_WEB_BROWSER: usize = 0; const DROPDOWN_FILE_MANAGER: usize = 1; @@ -47,7 +52,7 @@ pub enum Category { #[derive(Clone, Debug)] pub enum Message { SetDefault(Category, usize), - Update(Arc), + Update(CachedMimeApps), Surface(surface::Action), } @@ -63,27 +68,28 @@ impl From for crate::pages::Message { } } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct CachedMimeApps { - local_list: Option<(mime_apps::List, tokio::fs::File)>, - apps: Vec, - known_mimes: BTreeSet, + pub list: mime_apps::List, + pub local_list: mime_apps::List, + pub apps: Vec, + pub known_mimes: BTreeSet, + pub config_path: Box, } #[derive(Clone, Debug)] pub struct AppMeta { selected: Option, - app_ids: Vec>, + app_ids: Vec, apps: Vec, icons: Vec, } -#[derive(Debug, Default)] +#[derive(Clone, Debug, Default)] pub struct Page { on_enter_handle: Option, mime_apps: Option, shortcuts_config: Option, - update_config: Option>, } impl page::AutoBind for Page {} @@ -107,45 +113,46 @@ impl page::Page for Page { handle.abort(); } - let config_update_handle = self.update_config.take(); - if self.shortcuts_config.is_none() { self.shortcuts_config = cosmic_settings_config::shortcuts::context().ok(); } let (task, on_enter_handle) = Task::future(async move { - // Wait for previous copy operation to complete. - if let Some(handle) = config_update_handle { - _ = handle.await; - } - - let local_list = mime_apps::load_user_mimeapps().await.ok(); - let mut list = mime_apps::List::default(); list.load_from_paths(&mime_apps::list_paths()); - let assocs = mime_apps::associations::load_from_disk(&list); + + let mut local_list = mime_apps::List::default(); + + if let Some(path) = mime_apps::local_list_path() + && let Ok(buffer) = std::fs::read_to_string(&path) + { + local_list.load_from(&buffer); + } + + let assocs = mime_apps::associations::by_app(); let apps = vec![ - load_defaults(&list, &assocs, &["x-scheme-handler/http"]), - load_defaults(&list, &assocs, &["inode/directory"]), - load_defaults(&list, &assocs, &["x-scheme-handler/mailto"]), - load_defaults( - &list, - &assocs, - &["audio/mpeg", "application/ogg", "audio/x-flac", "video/mp4"], - ), - load_defaults(&list, &assocs, &["video/mp4"]), - load_defaults(&list, &assocs, &["image/png"]), - load_defaults(&list, &assocs, &["text/calendar"]), - load_terminal_apps(&list, &assocs).await, - load_defaults(&list, &assocs, &["text/plain"]), + load_defaults(&assocs, &["x-scheme-handler/http"]).await, + load_defaults(&assocs, &["inode/directory"]).await, + load_defaults(&assocs, &["x-scheme-handler/mailto"]).await, + load_defaults(&assocs, &["audio/mp3", "application/ogg", "video/mp4"]).await, + load_defaults(&assocs, &["video/mp4"]).await, + load_defaults(&assocs, &["image/png"]).await, + load_defaults(&assocs, &["text/calendar"]).await, + load_terminal_apps(&assocs).await, + load_defaults(&assocs, &["text/plain"]).await, ]; - Message::Update(Arc::new(CachedMimeApps { + Message::Update(CachedMimeApps { apps, + list, local_list, known_mimes: mime_apps::mime_info::mime_types(), - })) + config_path: dirs::config_dir() + .expect("config dir not found") + .join("mimeapps.list") + .into(), + }) .into() }) .abortable(); @@ -186,7 +193,6 @@ impl Page { "application/ogg", "application/x-cue", "application/x-ogg", - "audio/mpeg", "audio/mp3", "x-content/audio-cdda", ]) @@ -231,16 +237,13 @@ impl Page { "x-scheme-handler/https", ], ), - Category::TextEditor => ( - DROPDOWN_TEXT_EDITOR, - &["application/x-zerosize", "text/plain"], - ), + Category::TextEditor => (DROPDOWN_TEXT_EDITOR, &["text/plain"]), Category::Mime(_mime_type) => return Task::none(), }; let meta = &mut mime_apps.apps[category_id]; - if meta.selected.is_none_or(|selected| selected != id) { + if meta.selected != Some(id) { meta.selected = Some(id); let appid = &meta.app_ids[id]; @@ -251,40 +254,24 @@ impl Page { assign_default_terminal(config, appid); } - if let Some((local_list, local_file)) = mime_apps.local_list.as_mut() { - for mime in mime_types { - if let Ok(mime) = mime.parse() { - tracing::info!(target: "default-apps", ?mime, appid, "setting default for mime"); - local_list.set_default_app(mime, [appid, ".desktop"].concat()); - }; - } - - if let Some(config_update_handle) = self.update_config.take() { - config_update_handle.abort(); - } - - let mut buffer = local_list.to_string(); - buffer.push('\n'); - - if let Ok(mut local_file) = - futures::executor::block_on(local_file.try_clone()) - { - self.update_config = Some(tokio::spawn(async move { - tracing::debug!(target: "default-apps", buffer, "writing to mimeapps config"); - _ = local_file.seek(SeekFrom::Start(0)).await; - _ = local_file.set_len(buffer.len() as u64).await; - _ = local_file.write_all(buffer.as_bytes()).await; - _ = local_file.flush().await; - _ = local_file.seek(SeekFrom::Start(0)).await; - _ = tokio::process::Command::new("update-desktop-database") - .status() - .await; - })); - } + for mime in mime_types { + if let Ok(mime) = mime.parse() { + mime_apps + .local_list + .set_default_app(mime, [appid, ".desktop"].concat()); + }; } + + let mut buffer = mime_apps.local_list.to_string(); + buffer.push('\n'); + + _ = std::fs::write(&mime_apps.config_path, buffer); + _ = std::process::Command::new("update-desktop-database").status(); } } - Message::Update(mime_apps) => self.mime_apps = Arc::into_inner(mime_apps), + Message::Update(mime_apps) => { + self.mime_apps = Some(mime_apps); + } Message::Surface(a) => { return cosmic::task::message(crate::app::Message::Surface(a)); } @@ -294,83 +281,269 @@ impl Page { } } -fn app_item(meta: &AppMeta, label: String, category: Category) -> widget::FlexRow<'_, Message> { - // Avoid creating popup_dropdown for empty app lists. - // Empty categories are rendered as non-interactive text to prevent Wayland crashes. - settings::flex_item( - label, - if meta.apps.is_empty() { - widget::text(fl!("default-apps", "not-installed")).apply(Element::from) - } else { - dropdown::popup_dropdown( - &meta.apps, - Some(meta.selected.unwrap_or(0)), - move |id| Message::SetDefault(category, id), - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |a| crate::app::Message::PageMessage(crate::pages::Message::DefaultApps(a)), - ) - .icons(Cow::Borrowed(&meta.icons)) - .apply(Element::from) - }, - ) - .align_items(Alignment::Center) - .width(Length::Shrink) -} - fn apps() -> Section { Section::default().view::(move |_binder, page, section| { let Some(mime_apps) = page.mime_apps.as_ref() else { return widget::space().into(); }; - settings::section::with_capacity(9) + // Avoid creating popup_dropdown for empty app lists. + // Empty categories are rendered as non-interactive text to prevent Wayland crashes. + settings::section() .title(§ion.title) - .add(app_item( - &mime_apps.apps[DROPDOWN_WEB_BROWSER], - fl!("default-apps", "web-browser"), - Category::WebBrowser, - )) - .add(app_item( - &mime_apps.apps[DROPDOWN_FILE_MANAGER], - fl!("default-apps", "file-manager"), - Category::FileManager, - )) - .add(app_item( - &mime_apps.apps[DROPDOWN_MAIL], - fl!("default-apps", "mail-client"), - Category::Mail, - )) - .add(app_item( - &mime_apps.apps[DROPDOWN_MUSIC], - fl!("default-apps", "music"), - Category::Audio, - )) - .add(app_item( - &mime_apps.apps[DROPDOWN_VIDEO], - fl!("default-apps", "video"), - Category::Video, - )) - .add(app_item( - &mime_apps.apps[DROPDOWN_PHOTO], - fl!("default-apps", "photos"), - Category::Image, - )) - .add(app_item( - &mime_apps.apps[DROPDOWN_CALENDAR], - fl!("default-apps", "calendar"), - Category::Calendar, - )) - .add(app_item( - &mime_apps.apps[DROPDOWN_TERMINAL], - fl!("default-apps", "terminal"), - Category::Terminal, - )) - .add(app_item( - &mime_apps.apps[DROPDOWN_TEXT_EDITOR], - fl!("default-apps", "text-editor"), - Category::TextEditor, - )) + .add({ + let meta = &mime_apps.apps[DROPDOWN_WEB_BROWSER]; + if meta.apps.is_empty() { + settings::flex_item( + fl!("default-apps", "web-browser"), + widget::text(fl!("default-apps", "not-installed")), + ) + .align_items(Alignment::Center) + } else { + settings::flex_item( + fl!("default-apps", "web-browser"), + dropdown::popup_dropdown( + &meta.apps, + meta.selected, + |id| Message::SetDefault(Category::WebBrowser, id), + cosmic::iced::window::Id::RESERVED, + Message::Surface, + |a| { + crate::app::Message::PageMessage( + crate::pages::Message::DefaultApps(a), + ) + }, + ) + .icons(Cow::Borrowed(&meta.icons)), + ) + .align_items(Alignment::Center) + .min_item_width(300.0) + } + }) + .add({ + let meta = &mime_apps.apps[DROPDOWN_FILE_MANAGER]; + if meta.apps.is_empty() { + settings::flex_item( + fl!("default-apps", "file-manager"), + widget::text(fl!("default-apps", "not-installed")), + ) + .align_items(Alignment::Center) + } else { + settings::flex_item( + fl!("default-apps", "file-manager"), + dropdown::popup_dropdown( + &meta.apps, + meta.selected, + |id| Message::SetDefault(Category::FileManager, id), + cosmic::iced::window::Id::RESERVED, + Message::Surface, + |a| { + crate::app::Message::PageMessage( + crate::pages::Message::DefaultApps(a), + ) + }, + ) + .icons(Cow::Borrowed(&meta.icons)), + ) + .align_items(Alignment::Center) + } + }) + .add({ + let meta = &mime_apps.apps[DROPDOWN_MAIL]; + if meta.apps.is_empty() { + settings::flex_item( + fl!("default-apps", "mail-client"), + widget::text(fl!("default-apps", "not-installed")), + ) + .align_items(Alignment::Center) + } else { + settings::flex_item( + fl!("default-apps", "mail-client"), + dropdown::popup_dropdown( + &meta.apps, + meta.selected, + |id| Message::SetDefault(Category::Mail, id), + cosmic::iced::window::Id::RESERVED, + Message::Surface, + |a| { + crate::app::Message::PageMessage( + crate::pages::Message::DefaultApps(a), + ) + }, + ) + .icons(Cow::Borrowed(&meta.icons)), + ) + .align_items(Alignment::Center) + } + }) + .add({ + let meta = &mime_apps.apps[DROPDOWN_MUSIC]; + if meta.apps.is_empty() { + settings::flex_item( + fl!("default-apps", "music"), + widget::text(fl!("default-apps", "not-installed")), + ) + .align_items(Alignment::Center) + } else { + settings::flex_item( + fl!("default-apps", "music"), + dropdown::popup_dropdown( + &meta.apps, + meta.selected, + |id| Message::SetDefault(Category::Audio, id), + cosmic::iced::window::Id::RESERVED, + Message::Surface, + |a| { + crate::app::Message::PageMessage( + crate::pages::Message::DefaultApps(a), + ) + }, + ) + .icons(Cow::Borrowed(&meta.icons)), + ) + .align_items(Alignment::Center) + } + }) + .add({ + let meta = &mime_apps.apps[DROPDOWN_VIDEO]; + if meta.apps.is_empty() { + settings::flex_item( + fl!("default-apps", "video"), + widget::text(fl!("default-apps", "not-installed")), + ) + .align_items(Alignment::Center) + } else { + settings::flex_item( + fl!("default-apps", "video"), + dropdown::popup_dropdown( + &meta.apps, + meta.selected, + |id| Message::SetDefault(Category::Video, id), + cosmic::iced::window::Id::RESERVED, + Message::Surface, + |a| { + crate::app::Message::PageMessage( + crate::pages::Message::DefaultApps(a), + ) + }, + ) + .icons(Cow::Borrowed(&meta.icons)), + ) + .align_items(Alignment::Center) + } + }) + .add({ + let meta = &mime_apps.apps[DROPDOWN_PHOTO]; + if meta.apps.is_empty() { + settings::flex_item( + fl!("default-apps", "photos"), + widget::text(fl!("default-apps", "not-installed")), + ) + .align_items(Alignment::Center) + } else { + settings::flex_item( + fl!("default-apps", "photos"), + dropdown::popup_dropdown( + &meta.apps, + meta.selected, + |id| Message::SetDefault(Category::Image, id), + cosmic::iced::window::Id::RESERVED, + Message::Surface, + |a| { + crate::app::Message::PageMessage( + crate::pages::Message::DefaultApps(a), + ) + }, + ) + .icons(Cow::Borrowed(&meta.icons)), + ) + .align_items(Alignment::Center) + } + }) + .add({ + let meta = &mime_apps.apps[DROPDOWN_CALENDAR]; + if meta.apps.is_empty() { + settings::flex_item( + fl!("default-apps", "calendar"), + widget::text(fl!("default-apps", "not-installed")), + ) + .align_items(Alignment::Center) + } else { + settings::flex_item( + fl!("default-apps", "calendar"), + dropdown::popup_dropdown( + &meta.apps, + meta.selected, + |id| Message::SetDefault(Category::Calendar, id), + cosmic::iced::window::Id::RESERVED, + Message::Surface, + |a| { + crate::app::Message::PageMessage( + crate::pages::Message::DefaultApps(a), + ) + }, + ) + .icons(Cow::Borrowed(&meta.icons)), + ) + .align_items(Alignment::Center) + } + }) + .add({ + let meta = &mime_apps.apps[DROPDOWN_TERMINAL]; + if meta.apps.is_empty() { + settings::flex_item( + fl!("default-apps", "terminal"), + widget::text(fl!("default-apps", "not-installed")), + ) + .align_items(Alignment::Center) + } else { + settings::flex_item( + fl!("default-apps", "terminal"), + dropdown::popup_dropdown( + &meta.apps, + meta.selected, + |id| Message::SetDefault(Category::Terminal, id), + cosmic::iced::window::Id::RESERVED, + Message::Surface, + |a| { + crate::app::Message::PageMessage( + crate::pages::Message::DefaultApps(a), + ) + }, + ) + .icons(Cow::Borrowed(&meta.icons)), + ) + .align_items(Alignment::Center) + } + }) + .add({ + let meta = &mime_apps.apps[DROPDOWN_TEXT_EDITOR]; + if meta.apps.is_empty() { + settings::flex_item( + fl!("default-apps", "text-editor"), + widget::text(fl!("default-apps", "not-installed")), + ) + .align_items(Alignment::Center) + } else { + settings::flex_item( + fl!("default-apps", "text-editor"), + dropdown::popup_dropdown( + &meta.apps, + meta.selected, + |id| Message::SetDefault(Category::TextEditor, id), + cosmic::iced::window::Id::RESERVED, + Message::Surface, + |a| { + crate::app::Message::PageMessage( + crate::pages::Message::DefaultApps(a), + ) + }, + ) + .icons(Cow::Borrowed(&meta.icons)), + ) + .align_items(Alignment::Center) + } + }) .apply(Element::from) .map(crate::pages::Message::DefaultApps) }) @@ -411,71 +584,57 @@ fn assign_default_terminal(config: &cosmic_config::Config, appid: &str) { } } -fn load_defaults( - list: &mime_apps::List, - assocs: &mime_apps::Associations, - for_mimes: &[&str], -) -> AppMeta { +async fn load_defaults(assocs: &BTreeMap, Arc>, for_mimes: &[&str]) -> AppMeta { let mut unsorted = Vec::new(); - let mut default_app = None; + let mut current_app = None; for for_mime in for_mimes { - let Ok(mime) = Mime::from_str(for_mime) else { - continue; + let Ok(mime) = for_mime.parse() else { + return AppMeta { + selected: None, + app_ids: Vec::new(), + apps: Vec::new(), + icons: Vec::new(), + }; }; - for default in list.default_app_for(&mime).into_iter().flatten() { - let appid = default.strip_suffix(".desktop").unwrap_or(default.as_ref()); + let current_app_entry = xdg_mime_query_default(for_mime).await; + let current_appid = current_app_entry + .as_ref() + .and_then(|entry| entry.strip_suffix(".desktop")); - tracing::info!(target: "default-apps", ?mime, appid, "entry for mime"); - if default_app.is_none() { - default_app = assocs.by_app_id.get(appid); - if default_app.is_some() { - break; - } - } + if unsorted.is_empty() { + current_app = current_appid.and_then(|appid| assocs.get(appid)); } - for (appid, app) in mime_apps::apps_for_mime(&mime, assocs) { - if app.icon.is_none() { - continue; - } - - if unsorted.iter().any(|(id, _)| id == appid) { - continue; - } - - unsorted.push((appid.clone(), app.clone())); - } + unsorted.extend( + mime_apps::apps_for_mime(&mime, assocs) + .map(|(app_id, app)| (app_id.clone(), app.clone())), + ); } unsorted.sort_unstable_by_key(|(_, app)| app.name.clone()); + unsorted.dedup_by_key(|(app_id, _)| app_id.clone()); let mut selected = None; let mut app_ids = Vec::new(); let mut apps = Vec::new(); let mut icons = Vec::new(); - let mut id = 0; - for (appid, app) in unsorted.iter() { - let Some(icon) = app.icon.as_deref() else { - continue; - }; - if let Some(default_app) = default_app - && app.name.as_ref() == default_app.name.as_ref() + for (id, (appid, app)) in unsorted.iter().enumerate() { + if let Some(current_app) = current_app + && app.name.as_ref() == current_app.name.as_ref() { selected = Some(id); } app_ids.push(appid.as_ref().into()); apps.push(app.name.as_ref().into()); - icons.push(if icon.starts_with('/') { - icon::from_path(PathBuf::from(icon)) + icons.push(if app.icon.starts_with('/') { + icon::from_path(PathBuf::from(app.icon.as_ref())) } else { - icon::from_name(icon).size(20).handle() + icon::from_name(app.icon.as_ref()).size(20).handle() }); - - id += 1; } AppMeta { @@ -486,55 +645,86 @@ fn load_defaults( } } -async fn load_terminal_apps(list: &mime_apps::List, assocs: &mime_apps::Associations) -> AppMeta { - let mut selected = None; - let mut app_ids = Vec::new(); - let mut apps = Vec::new(); - let mut icons = Vec::new(); +async fn xdg_mime_query_default(mime_type: &str) -> Option { + let output = tokio::process::Command::new("xdg-mime") + .args(["query", "default", mime_type]) + .output() + .await + .ok()?; - let mut terminals: Vec<_> = assocs - .apps - .iter() - .filter(|app| app.is_terminal && app.icon.is_some()) - .collect(); + if !output.status.success() { + return None; + } - terminals.sort_unstable_by_key(|app| app.name.clone()); + String::from_utf8(output.stdout) + .ok() + .map(|string| string.trim().to_owned()) +} - 'outer: for for_mime in [ - "x-scheme-handler/terminal", - "application/x-terminal-emulator", - ] { - let Ok(mime) = Mime::from_str(for_mime) else { - continue; - }; +async fn load_terminal_apps(assocs: &BTreeMap, Arc>) -> AppMeta { + let mut terminals = Vec::new(); + let mut current_app = None; - for default in list.default_app_for(&mime).into_iter().flatten() { - let appid = default.strip_suffix(".desktop").unwrap_or(default.as_ref()); + // Get the current default terminal if set + let current_entry = xdg_mime_query_default("x-scheme-handler/terminal").await; + let current_appid = current_entry + .as_ref() + .and_then(|entry| entry.strip_suffix(".desktop")); - for (id, app) in terminals.iter().enumerate() { - if app.appid.as_ref() == appid { - selected = Some(id); - break 'outer; + // Also check x-terminal-emulator + if current_app.is_none() { + let current_entry = xdg_mime_query_default("application/x-terminal-emulator").await; + let current_appid = current_entry + .as_ref() + .and_then(|entry| entry.strip_suffix(".desktop")); + if let Some(appid) = current_appid { + current_app = assocs.get(appid).cloned(); + } + } + + // Scan desktop entries for terminal applications + for path in DesktopEntryIter::new(default_paths()) { + if let Ok(bytes) = std::fs::read_to_string(&path) + && let Ok(entry) = DesktopEntry::from_str(&path, &bytes, None::<&[&str]>) + { + // Check if it's a terminal application + if entry + .categories() + .map(|cats| cats.contains(&"TerminalEmulator")) + .unwrap_or(false) + { + let id = entry.id(); + if let Some(app) = assocs.get(id) { + if current_appid.as_ref().map(|c| *c == id).unwrap_or(false) { + current_app = Some(app.clone()); + } + terminals.push((Arc::from(id), app.clone())); } } } } - for (id, app) in terminals.into_iter().enumerate() { - let Some(icon) = app.icon.as_deref() else { - continue; - }; + terminals.sort_unstable_by_key(|(_, app): &(Arc, Arc)| app.name.clone()); + terminals.dedup_by(|a, b| a.0 == b.0); - if selected.is_none() && app.appid.as_ref() == "com.system76.CosmicTerm" { + let mut selected = None; + let mut app_ids = Vec::new(); + let mut apps = Vec::new(); + let mut icons = Vec::new(); + + for (id, (appid, app)) in terminals.iter().enumerate() { + if let Some(ref current_app) = current_app + && app.name.as_ref() == current_app.name.as_ref() + { selected = Some(id); } - app_ids.push(app.appid.clone()); + app_ids.push(appid.to_string()); apps.push(app.name.as_ref().into()); - icons.push(if icon.starts_with('/') { - icon::from_path(PathBuf::from(icon)) + icons.push(if app.icon.starts_with('/') { + icon::from_path(PathBuf::from(app.icon.as_ref())) } else { - icon::from_name(icon).size(20).handle() + icon::from_name(app.icon.as_ref()).size(20).handle() }); } diff --git a/cosmic-settings/src/pages/applications/legacy_applications.rs b/cosmic-settings/src/pages/applications/legacy_applications.rs index f2a1b20..a21d605 100644 --- a/cosmic-settings/src/pages/applications/legacy_applications.rs +++ b/cosmic-settings/src/pages/applications/legacy_applications.rs @@ -1,17 +1,25 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only -use std::process::ExitStatus; -use std::sync::Arc; -use std::sync::atomic::{AtomicBool, Ordering}; +use std::{ + process::ExitStatus, + sync::{ + Arc, + atomic::{AtomicBool, Ordering}, + }, +}; -use cosmic::cosmic_config::{self, ConfigGet, ConfigSet}; -use cosmic::iced::stream; -use cosmic::widget::{self, dropdown, settings, text}; -use cosmic::{Apply, Element, Task, surface}; +use cosmic::{ + Apply, Element, Task, + cosmic_config::{self, ConfigGet, ConfigSet}, + iced::stream, + surface, + widget::{self, dropdown, settings, text}, +}; use cosmic_comp_config::{EavesdroppingKeyboardMode, XwaylandDescaling, XwaylandEavesdropping}; use cosmic_randr_shell::List; -use cosmic_settings_page::{self as page, Section, section}; +use cosmic_settings_page::Section; +use cosmic_settings_page::{self as page, section}; use futures::SinkExt; use slotmap::SlotMap; use tokio::sync::oneshot; diff --git a/cosmic-settings/src/pages/applications/startup_apps.rs b/cosmic-settings/src/pages/applications/startup_apps.rs index f7118a4..bbe4488 100644 --- a/cosmic-settings/src/pages/applications/startup_apps.rs +++ b/cosmic-settings/src/pages/applications/startup_apps.rs @@ -1,8 +1,7 @@ use cosmic::app::ContextDrawer; use cosmic::iced::{Alignment, Length}; -use cosmic::widget::text_input::focus; use cosmic::widget::{button, icon, settings, text}; -use cosmic::{Apply, Element, Task, task, widget}; +use cosmic::{Apply, Element, Task, widget}; use cosmic_settings_page::section::Entity; use cosmic_settings_page::{self as page, Content, Info, Section}; use freedesktop_desktop_entry::DesktopEntry; @@ -10,12 +9,8 @@ use itertools::Itertools; use slotmap::{Key, SlotMap}; use std::collections::{HashMap, HashSet}; use std::path::PathBuf; -use std::sync::LazyLock; use tracing::error; -pub static ADD_APPLICATION_SEARCH: LazyLock = - LazyLock::new(|| widget::Id::new("ADD_APPLICATION_SEARCH")); - #[derive(Clone, Debug)] pub struct CachedApps { apps: HashMap>, @@ -56,7 +51,6 @@ pub enum Message { ShowApplicationSidebar(DirectoryType), UpdateApplications(CachedApps), UpdateStartupApplications(CachedApps), - FocusAddApplicationSearch, } #[derive(Clone, Debug, Eq, PartialEq, Hash)] @@ -122,7 +116,6 @@ impl page::Page for Page { let search = widget::search_input("", &self.application_search) .on_input(|i| Message::ApplicationSearch(i).into()) .on_clear(Message::ApplicationSearch(String::new()).into()) - .id(ADD_APPLICATION_SEARCH.clone()) .apply(Element::from); Some( @@ -149,11 +142,8 @@ impl page::Page for Page { let user_entries = freedesktop_desktop_entry::Iter::new(user_dirs.into_iter()).entries(Some(&locales)); - let mut user_entries_vec = user_entries.collect_vec(); - sort_entries_by_name(&mut user_entries_vec, &locales); - let mut apps_hash = HashMap::with_capacity(1); - apps_hash.insert(DirectoryType::User, user_entries_vec); + apps_hash.insert(DirectoryType::User, user_entries.collect_vec()); Message::UpdateStartupApplications(CachedApps { apps: apps_hash, @@ -227,8 +217,7 @@ impl Page { } Message::ShowApplicationSidebar(directory_type) => { self.context = Some(Context::AddApplication(directory_type)); - return cosmic::task::message(crate::app::Message::OpenContextDrawer(self.entity)) - .chain(task::message(Message::FocusAddApplicationSearch)); + return cosmic::task::message(crate::app::Message::OpenContextDrawer(self.entity)); } Message::AddStartupApplication(directory_type, app) => { let mut file_name = app.clone().appid; @@ -257,10 +246,6 @@ impl Page { if let Some(target_apps) = target_apps { let mut new_apps = target_apps.clone(); new_apps.push(app.clone()); - sort_entries_by_name( - &mut new_apps, - &cached_startup_apps.locales, - ); cached_startup_apps .apps @@ -327,26 +312,6 @@ impl Page { self.target_directory_type = None; self.context = None; } - Message::FocusAddApplicationSearch => { - // retry until the widget is in the tree and focused or the dialog is removed. - if matches!(self.context, Some(Context::AddApplication(_))) { - return cosmic::iced::runtime::task::widget( - cosmic::iced::core::widget::operation::focusable::find_focused(), - ) - .collect() - .then(|id| { - if id - .first() - .is_some_and(|id| *id == ADD_APPLICATION_SEARCH.clone()) - { - Task::none() - } else { - focus(ADD_APPLICATION_SEARCH.clone()) - .chain(task::message(Message::FocusAddApplicationSearch)) - } - }); - } - } _ => {} } @@ -468,14 +433,6 @@ fn apps() -> Section { }) } -fn sort_entries_by_name(entries: &mut [DesktopEntry], locales: &[String]) { - entries.sort_by_cached_key(|e| { - e.name(locales) - .map(|n| n.to_lowercase()) - .unwrap_or_else(|| e.appid.to_lowercase()) - }); -} - fn get_all_apps(locales: Vec) -> Vec { let mut dedupe = HashSet::new(); @@ -516,7 +473,5 @@ fn get_all_apps(locales: Vec) -> Vec { dedupe.insert(app_id.to_owned()); } - sort_entries_by_name(&mut result, &locales); - result } diff --git a/cosmic-settings/src/pages/bluetooth/mod.rs b/cosmic-settings/src/pages/bluetooth/mod.rs index 8676665..f8d1338 100644 --- a/cosmic-settings/src/pages/bluetooth/mod.rs +++ b/cosmic-settings/src/pages/bluetooth/mod.rs @@ -3,8 +3,7 @@ use cosmic::iced::core::text::Wrapping; use cosmic::iced::{Alignment, Length, color}; -use cosmic::widget::space::horizontal as horizontal_space; -use cosmic::widget::{self, settings, text}; +use cosmic::widget::{self, settings, space::horizontal as horizontal_space, text}; use cosmic::{Apply, Element, Task, theme}; use cosmic_settings_bluetooth_subscription::*; use cosmic_settings_page::{self as page, Section, section}; @@ -16,25 +15,24 @@ use std::sync::Arc; use std::time::Duration; use zbus::zvariant::OwnedObjectPath; -#[cfg(test)] -use crate::service_manager::MockServiceManager; -use crate::service_manager::ServiceManagerHandle; - enum Dialog { + // RequestAuthorization { + // device: OwnedObjectPath, + // response: oneshot::Sender, + // }, RequestConfirmation { device: String, passkey: u32, response: oneshot::Sender, }, - DisplayPasskey { - device: String, - passkey: u32, - entered: u16, - }, - DisplayPinCode { - device: String, - pincode: String, - }, + // RequestPasskey { + // device: OwnedObjectPath, + // response: oneshot::Sender>, + // }, + // RequestPinCode { + // device: OwnedObjectPath, + // response: oneshot::Sender>, + // }, } #[derive(Default)] @@ -162,8 +160,6 @@ pub struct Page { service_is_active: bool, subscription: Option>, - - service_manager: ServiceManagerHandle, } impl page::Page for Page { @@ -259,85 +255,6 @@ impl page::Page for Page { Some(dialog) } - - Dialog::DisplayPasskey { - device, - passkey, - entered, - } => { - let description = widget::text::body(fl!( - "bluetooth-display-passkey", - "description", - device = device - )) - .wrapping(Wrapping::Word); - - let passkey_str = format!("{passkey:06}"); - let entered = *entered as usize; - - let pin = widget::text::title1(passkey_str) - .width(Length::Fill) - .align_x(Alignment::Center) - .wrapping(Wrapping::None); - - let mut control = widget::column::with_capacity(3).push(description).push(pin); - - // Only show the key progress counter when the device actually - // reports keypress notifications. Most keyboards don't support - // this, so entered stays at 0 for the entire pairing process. - if entered > 0 { - let progress = widget::text::body(format!("{entered} / 6 keys entered")) - .width(Length::Fill) - .align_x(Alignment::Center) - .wrapping(Wrapping::None); - control = control.push(progress); - } - - let control = control.spacing(theme::spacing().space_xxs); - - let cancel_button = - widget::button::standard(fl!("cancel")).on_press(Message::PinCancel); - - let dialog = widget::dialog() - .title(fl!("bluetooth-display-passkey")) - .control(control) - .secondary_action(cancel_button) - .apply(Element::from) - .map(Into::into); - - Some(dialog) - } - - Dialog::DisplayPinCode { device, pincode } => { - let description = widget::text::body(fl!( - "bluetooth-display-pin", - "description", - device = device - )) - .wrapping(Wrapping::Word); - - let pin = widget::text::title1(pincode.clone()) - .width(Length::Fill) - .align_x(Alignment::Center) - .wrapping(Wrapping::None); - - let control = widget::column::with_capacity(2) - .push(description) - .push(pin) - .spacing(theme::spacing().space_xxs); - - let cancel_button = - widget::button::standard(fl!("cancel")).on_press(Message::PinCancel); - - let dialog = widget::dialog() - .title(fl!("bluetooth-display-pin")) - .control(control) - .secondary_action(cancel_button) - .apply(Element::from) - .map(Into::into); - - Some(dialog) - } } } } @@ -484,19 +401,6 @@ impl Page { } Event::UpdatedDevice(path, update) => { - // Dismiss passkey/pin display dialogs when pairing completes, - // since BlueZ may not always send Cancel after a successful pair. - if update - .iter() - .any(|u| matches!(u, DeviceUpdate::Paired(true))) - && matches!( - self.dialog, - Some(Dialog::DisplayPasskey { .. } | Dialog::DisplayPinCode { .. }) - ) - { - self.dialog = None; - } - if let Some(existing) = self.model.devices.get_mut(&path) { tracing::debug!("Device {} updated", existing.address); existing.update(update); @@ -530,18 +434,7 @@ impl Page { } Event::DBusServiceUnknown => { - // D-Bus activation for org.bluez is absent. On systemd this usually - // means bluez isn't installed; on OpenRC it may be installed but lack - // the D-Bus service file. Check the service manager to disambiguate. - if self.service_manager.is_installed() { - // Service manager confirms the service exists — query its real state. - self.bluez_service_unknown = false; - self.service_is_active = self.service_manager.is_active(); - self.service_is_enabled = self.service_manager.is_enabled(); - } else { - // Genuinely not installed — let status() show the unknown message. - self.bluez_service_unknown = true; - } + self.bluez_service_unknown = true; } Event::Agent(message) => { @@ -571,32 +464,6 @@ impl Page { }); } - bluez_zbus::agent1::Message::DisplayPasskey { - device, - passkey, - entered, - } => { - let device = self.model.devices.get(&device).map_or_else( - || device.to_string(), - |device| device.alias_or_addr().to_owned(), - ); - - self.dialog = Some(Dialog::DisplayPasskey { - device, - passkey, - entered, - }); - } - - bluez_zbus::agent1::Message::DisplayPinCode { device, pincode } => { - let device = self.model.devices.get(&device).map_or_else( - || device.to_string(), - |device| device.alias_or_addr().to_owned(), - ); - - self.dialog = Some(Dialog::DisplayPinCode { device, pincode }); - } - bluez_zbus::agent1::Message::RequestPasskey { response, .. } => { _ = response.send(None); } @@ -685,8 +552,8 @@ impl Page { } Message::DBusConnect(connection) => { - self.service_is_active = self.service_manager.is_active(); - self.service_is_enabled = self.service_manager.is_enabled(); + self.service_is_active = systemd::is_bluetooth_active(); + self.service_is_enabled = systemd::is_bluetooth_enabled(); self.connection = Some(connection.clone()); let get_adapters_fut = get_adapters(connection.clone()); @@ -818,9 +685,8 @@ impl Page { } Message::ServiceActivate => { - let activate_future = self.service_manager.activate(); - return cosmic::task::future(async move { - activate_future.await; + return cosmic::task::future(async { + systemd::activate_bluetooth().await; tokio::time::sleep(Duration::from_secs(3)).await; match zbus::Connection::system().await { @@ -831,9 +697,8 @@ impl Page { } Message::ServiceEnable => { - let enable_future = self.service_manager.enable(); - return cosmic::task::future(async move { - enable_future.await; + return cosmic::task::future(async { + systemd::enable_bluetooth().await; tokio::time::sleep(Duration::from_secs(3)).await; match zbus::Connection::system().await { @@ -892,7 +757,7 @@ fn status() -> Section { return bluetooth_service_issue( fl!("bluetooth", "inactive"), fl!("activate"), - Message::ServiceActivate, + Message::ServiceEnable, ); } @@ -1145,65 +1010,36 @@ fn multiple_adapter() -> Section { impl page::AutoBind for Page {} -impl Page { - #[cfg(test)] - fn with_service_manager(service_manager: ServiceManagerHandle) -> Self { - Self { - service_manager, - ..Page::default() - } - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_dbus_service_unknown_with_installed_service_queries_manager() { - let bluetooth = MockServiceManager::new(true, false); - let mut page = Page::with_service_manager(ServiceManagerHandle::new(Box::new(bluetooth))); - let _task = page.update(Message::BluetoothEvent(Event::DBusServiceUnknown)); - - assert!(page.service_is_enabled); - assert!(!page.service_is_active); - assert!(!page.bluez_service_unknown); - } - - #[test] - fn test_dbus_service_unknown_with_uninstalled_service_sets_bluez_unknown() { - let bluetooth = MockServiceManager::new(true, true).with_installed(false); - let mut page = Page::with_service_manager(ServiceManagerHandle::new(Box::new(bluetooth))); - let _task = page.update(Message::BluetoothEvent(Event::DBusServiceUnknown)); - - assert!(page.bluez_service_unknown); - assert!(!page.service_is_enabled); - assert!(!page.service_is_active); - } - - #[test] - fn test_dbus_service_unknown_clears_previously_set_bluez_service_unknown() { - // Simulate a stale state and verify the handler re-checks via is_installed(). - let bluetooth = MockServiceManager::new(true, true); - let mut page = Page::with_service_manager(ServiceManagerHandle::new(Box::new(bluetooth))); - page.bluez_service_unknown = true; - - let _task = page.update(Message::BluetoothEvent(Event::DBusServiceUnknown)); - - assert!(!page.bluez_service_unknown); - } - - #[tokio::test] - async fn test_service_activate_calls_through_to_service_manager() { - let bluetooth = MockServiceManager::new(false, false); - let mut page = Page::with_service_manager(ServiceManagerHandle::new(Box::new(bluetooth))); - let _task = page.update(Message::ServiceActivate); - } - - #[tokio::test] - async fn test_service_enable_calls_through_to_service_manager() { - let bluetooth = MockServiceManager::new(false, false); - let mut page = Page::with_service_manager(ServiceManagerHandle::new(Box::new(bluetooth))); - let _task = page.update(Message::ServiceEnable); +mod systemd { + use futures::FutureExt; + + pub fn activate_bluetooth() -> impl Future + Send { + tokio::process::Command::new("pkexec") + .args(["systemctl", "start", "bluetooth"]) + .status() + .map(|_| ()) + } + + pub fn enable_bluetooth() -> impl Future + Send { + tokio::process::Command::new("pkexec") + .args(["systemctl", "enable", "--now", "bluetooth"]) + .status() + .map(|_| ()) + } + + pub fn is_bluetooth_enabled() -> bool { + std::process::Command::new("systemctl") + .args(["is-enabled", "bluetooth"]) + .status() + .map(|status| status.success()) + .unwrap_or(true) + } + + pub fn is_bluetooth_active() -> bool { + std::process::Command::new("systemctl") + .args(["is-active", "bluetooth"]) + .status() + .map(|status| status.success()) + .unwrap_or(true) } } diff --git a/cosmic-settings/src/pages/desktop/appearance/drawer.rs b/cosmic-settings/src/pages/desktop/appearance/drawer.rs index 32c727e..7b7caa0 100644 --- a/cosmic-settings/src/pages/desktop/appearance/drawer.rs +++ b/cosmic-settings/src/pages/desktop/appearance/drawer.rs @@ -2,11 +2,12 @@ use cosmic::app::{ContextDrawer, context_drawer}; use cosmic::config::CosmicTk; use cosmic::cosmic_config::{Config, ConfigSet}; use cosmic::cosmic_theme::Spacing; -use cosmic::iced::Alignment; use cosmic::iced::core::{Color, Length}; -use cosmic::widget::color_picker::ColorPickerUpdate; -use cosmic::widget::{ColorPickerModel, container, flex_row, row, settings, slider, text}; -use cosmic::{Apply, Element, Task, task, widget}; +use cosmic::widget::{ + ColorPickerModel, color_picker::ColorPickerUpdate, container, flex_row, settings, text, +}; +use cosmic::{Apply, Task}; +use cosmic::{Element, widget}; use cosmic_config::ConfigGet; use std::sync::Arc; use tracing::error; @@ -14,8 +15,11 @@ use tracing::error; use crate::app; use crate::widget::color_picker_context_view; -use super::icon_themes::{IconHandles, IconThemes}; -use super::{ContextView, Message, font_config, icon_themes, theme_manager}; +use super::{ + ContextView, Message, font_config, icon_themes, + icon_themes::{IconHandles, IconThemes}, + theme_manager, +}; pub struct Content { context_view: Option, @@ -36,12 +40,6 @@ pub struct Content { icon_themes: IconThemes, icon_handles: IconHandles, tk_config: Option, - frosted: u8, - glass: f32, - frosted_system_interface: bool, - frosted_windows: bool, - frosted_panel: bool, - frosted_applets: bool, comp_config: cosmic_config::Config, #[cfg(feature = "cosmic-comp-config")] @@ -96,7 +94,7 @@ impl From<&theme_manager::Manager> for Content { application_background: ColorPickerModel::new( &*HEX, &*RGB, - Some(theme.background(false).base.into()), + Some(theme.background.base.into()), theme_manager.get_color(&ContextView::ApplicationBackground), ), container_background: ColorPickerModel::new( @@ -108,7 +106,7 @@ impl From<&theme_manager::Manager> for Content { interface_text: ColorPickerModel::new( &*HEX, &*RGB, - Some(theme.background(false).on.into()), + Some(theme.background.on.into()), theme_manager.get_color(&ContextView::InterfaceText), ), control_component: ColorPickerModel::new( @@ -124,12 +122,6 @@ impl From<&theme_manager::Manager> for Content { theme_manager.get_color(&ContextView::AccentWindowHint), ), font_config: font_config::Model::new(), - frosted: theme.frosted as u8, - glass: theme.alpha_map.guess_offset(), - frosted_system_interface: theme.frosted_system_interface, - frosted_windows: theme.frosted_windows, - frosted_panel: theme.frosted_panel, - frosted_applets: theme.frosted_applets, icons_fetched: false, icon_global: cosmic::config::apply_theme_global(), icon_fetch_handle: None, @@ -153,16 +145,6 @@ impl Content { } } - pub fn preserve_from(&mut self, previous: &mut Content) { - self.font_config - .take_families_from(&mut previous.font_config); - - self.icons_fetched = previous.icons_fetched; - self.icon_theme_active = previous.icon_theme_active; - self.icon_themes = std::mem::take(&mut previous.icon_themes); - self.icon_handles = std::mem::take(&mut previous.icon_handles); - } - pub fn update_font( &mut self, message: FontMessage, @@ -303,40 +285,6 @@ impl Content { Task::none() } - pub fn update_frosted_system_interface(&mut self, v: bool) -> Task { - self.frosted_system_interface = v; - - Task::none() - } - - pub fn update_frosted_windows(&mut self, v: bool) -> Task { - self.frosted_windows = v; - - Task::none() - } - - pub fn update_frosted_panel(&mut self, v: bool) -> Task { - self.frosted_panel = v; - - Task::none() - } - - pub fn update_frosted_applets(&mut self, v: bool) -> Task { - self.frosted_applets = v; - - Task::none() - } - - pub fn update_blur(&mut self, v: u8) -> Task { - self.frosted = v; - Task::none() - } - - pub fn update_glass(&mut self, v: f32) -> Task { - self.glass = v; - Task::none() - } - pub fn on_open(&mut self, context_view: &ContextView) -> Task { match *context_view { ContextView::IconsAndToolkit => { @@ -352,7 +300,6 @@ impl Content { } ContextView::MonospaceFont | ContextView::SystemFont => { self.font_config.reset(); - return task::message(super::Message::FocusFontInput); } _ => {} } @@ -384,7 +331,7 @@ impl Content { self.application_background = ColorPickerModel::new( &*HEX, &*RGB, - Some(manager.theme().background(false).base.into()), + Some(manager.theme().background.base.into()), manager.get_color(&ContextView::ApplicationBackground), ); self.custom_accent = ColorPickerModel::new( @@ -402,7 +349,7 @@ impl Content { self.interface_text = ColorPickerModel::new( &*HEX, &*RGB, - Some(manager.theme().background(false).on.into()), + Some(manager.theme().background.on.into()), manager.get_color(&ContextView::InterfaceText), ); self.control_component = ColorPickerModel::new( @@ -528,10 +475,6 @@ impl Content { self.shadow_and_corners(), crate::pages::Message::CloseContextDrawer, ), - ContextView::FrostedGlass => context_drawer( - self.frosted_glass(), - crate::pages::Message::CloseContextDrawer, - ), }) } @@ -615,66 +558,4 @@ impl Content { .apply(Element::from) .map(crate::pages::Message::Appearance) } - - pub fn frosted_glass(&self) -> Element<'_, crate::pages::Message> { - settings::section() - .add( - settings::item::builder(fl!("style", "frosted-panels")) - .description(fl!("style", "frosted-panels-desc")) - .toggler(self.frosted_panel, Message::FrostedPanel), - ) - .add( - settings::item::builder(fl!("style", "frosted-applets")) - .description(fl!("style", "frosted-applets-desc")) - .toggler(self.frosted_applets, Message::FrostedApplets), - ) - .add( - settings::item::builder(fl!("style", "frosted-system-interface")) - .description(fl!("style", "frosted-system-interface-desc")) - .toggler( - self.frosted_system_interface, - Message::FrostedSystemInterface, - ), - ) - .add( - settings::item::builder(fl!("style", "frosted-windows")) - .description(fl!("style", "frosted-windows-desc")) - .toggler(self.frosted_windows, Message::FrostedWindows), - ) - .add( - settings::item::builder(fl!("style", "frosted-thickness")).flex_control({ - row::with_children(vec![ - text::body(fl!("style", "less")).into(), - slider(0..=13, self.frosted, Message::Blur) - .width(Length::Fill) - .apply(cosmic::widget::container) - .max_width(250) - .into(), - text::body(fl!("style", "more")).into(), - ]) - .align_y(Alignment::Center) - .spacing(8) - .width(Length::Fill) - }), - ) - .add( - settings::item::builder(fl!("style", "glass-opacity")).flex_control({ - row::with_children(vec![ - text::body(fl!("style", "less")).into(), - slider(0.0..=1.0, self.glass, Message::Glass) - .step(0.05) - .width(Length::Fill) - .apply(cosmic::widget::container) - .max_width(250) - .into(), - text::body(fl!("style", "more")).into(), - ]) - .align_y(Alignment::Center) - .spacing(8) - .width(Length::Fill) - }), - ) - .apply(Element::from) - .map(crate::pages::Message::Appearance) - } } diff --git a/cosmic-settings/src/pages/desktop/appearance/font_config.rs b/cosmic-settings/src/pages/desktop/appearance/font_config.rs index 2f88b13..d2b2558 100644 --- a/cosmic-settings/src/pages/desktop/appearance/font_config.rs +++ b/cosmic-settings/src/pages/desktop/appearance/font_config.rs @@ -1,10 +1,13 @@ // Copyright 2024 System76 // SPDX-License-Identifier: GPL-3.0-only -use std::sync::{Arc, LazyLock}; +use std::sync::Arc; -use cosmic::config::{CosmicTk, FontConfig}; -use cosmic::{Apply, Element, Task, widget}; +use cosmic::{ + Apply, Element, Task, + config::{CosmicTk, FontConfig}, + widget, +}; use cosmic_config::ConfigSet; use crate::app; @@ -12,8 +15,6 @@ use crate::widget::selection_context_item; use super::{ContextView, Message, drawer}; -pub static FONT_SEARCH: LazyLock = LazyLock::new(|| widget::Id::new("FONT_SEARCH")); - const INTERFACE_FONT: &str = "interface_font"; const MONOSPACE_FONT: &str = "monospace_font"; @@ -93,11 +94,6 @@ impl Model { self.font_filter.clear(); } - pub fn take_families_from(&mut self, other: &mut Model) { - self.interface_font_families = std::mem::take(&mut other.interface_font_families); - self.monospace_font_families = std::mem::take(&mut other.monospace_font_families); - } - pub fn font_loaded( &mut self, mono: Vec>, @@ -171,7 +167,6 @@ impl Model { .on_clear(Message::DrawerFont(drawer::FontMessage::Search( String::new(), ))) - .id(FONT_SEARCH.clone()) .apply(Element::from) .map(crate::pages::Message::Appearance) } diff --git a/cosmic-settings/src/pages/desktop/appearance/icon_themes.rs b/cosmic-settings/src/pages/desktop/appearance/icon_themes.rs index 112568c..5dc4620 100644 --- a/cosmic-settings/src/pages/desktop/appearance/icon_themes.rs +++ b/cosmic-settings/src/pages/desktop/appearance/icon_themes.rs @@ -1,13 +1,14 @@ // Copyright 2024 System76 // SPDX-License-Identifier: GPL-3.0-only -use std::collections::BTreeMap; -use std::path::PathBuf; +use std::{collections::BTreeMap, path::PathBuf}; use super::Message; -use cosmic::Element; -use cosmic::iced::{Background, Length}; -use cosmic::widget::{button, icon, text}; +use cosmic::{ + Element, + iced::{Background, Length}, + widget::{button, icon, text}, +}; use tokio::io::AsyncBufReadExt; const ICON_PREV_N: usize = 6; diff --git a/cosmic-settings/src/pages/desktop/appearance/mod.rs b/cosmic-settings/src/pages/desktop/appearance/mod.rs index 7ab3061..aa28ea8 100644 --- a/cosmic-settings/src/pages/desktop/appearance/mod.rs +++ b/cosmic-settings/src/pages/desktop/appearance/mod.rs @@ -16,24 +16,23 @@ use cosmic::app::ContextDrawer; use cosmic::config::CosmicTk; use cosmic::cosmic_config::{Config, ConfigSet, CosmicConfigEntry}; use cosmic::cosmic_theme::palette::{FromColor, Hsv, Srgb}; -use cosmic::cosmic_theme::{CornerRadii, Density, Roundness, ThemeBuilder, ThemeMode}; +use cosmic::cosmic_theme::{CornerRadii, Density, ThemeBuilder, ThemeMode}; #[cfg(feature = "xdg-portal")] use cosmic::dialog::file_chooser::{self, FileFilter}; use cosmic::iced::Subscription; use cosmic::iced::core::{Alignment, Length}; -use cosmic::widget::color_picker::ColorPickerUpdate; -use cosmic::widget::space::horizontal; -use cosmic::widget::text_input::focus; -use cosmic::widget::{button, container, row, settings, text}; -use cosmic::{Apply, Element, Task, task, widget}; +use cosmic::widget::{ + button, color_picker::ColorPickerUpdate, container, row, settings, space::horizontal, text, +}; +use cosmic::{Apply, Element, Task, widget}; #[cfg(feature = "wayland")] use cosmic_panel_config::CosmicPanelConfig; -use cosmic_settings_page::{self as page, Section, section}; +use cosmic_settings_page::Section; +use cosmic_settings_page::{self as page, section}; use ron::ser::PrettyConfig; use slotmap::{Key, SlotMap}; use crate::app; -use crate::pages::desktop::appearance::font_config::FONT_SEARCH; #[derive(Clone, Copy, Debug)] pub enum ContextView { @@ -41,7 +40,6 @@ pub enum ContextView { ApplicationBackground, ContainerBackground, ControlComponent, - FrostedGlass, #[cfg(feature = "cosmic-comp-config")] ShadowAndCorners, CustomAccent, @@ -141,7 +139,6 @@ pub enum Message { #[cfg(feature = "xdg-portal")] ExportSuccess, - FocusFontInput, GapSize(u32), #[cfg(feature = "xdg-portal")] ImportError, @@ -160,12 +157,6 @@ pub enum Message { UseDefaultWindowHint(bool), WindowHintSize(u32), Daytime(bool), - Blur(u8), - Glass(f32), - FrostedPanel(bool), - FrostedApplets(bool), - FrostedSystemInterface(bool), - FrostedWindows(bool), } impl From for crate::app::Message { @@ -180,6 +171,56 @@ impl From for crate::pages::Message { } } +#[derive(Debug, Clone, Copy)] +pub enum Roundness { + Round, + SlightlyRound, + Square, +} + +impl From for CornerRadii { + fn from(value: Roundness) -> Self { + match value { + Roundness::Round => CornerRadii { + radius_0: [0.0; 4], + radius_xs: [4.0; 4], + radius_s: [8.0; 4], + radius_m: [16.0; 4], + radius_l: [32.0; 4], + radius_xl: [160.0; 4], + }, + Roundness::SlightlyRound => CornerRadii { + radius_0: [0.0; 4], + radius_xs: [2.0; 4], + radius_s: [8.0; 4], + radius_m: [8.0; 4], + radius_l: [8.0; 4], + radius_xl: [8.0; 4], + }, + Roundness::Square => CornerRadii { + radius_0: [0.0; 4], + radius_xs: [2.0; 4], + radius_s: [2.0; 4], + radius_m: [2.0; 4], + radius_l: [2.0; 4], + radius_xl: [2.0; 4], + }, + } + } +} + +impl From for Roundness { + fn from(value: CornerRadii) -> Self { + if (value.radius_m[0] - 16.0).abs() < 0.01 { + Self::Round + } else if (value.radius_m[0] - 8.0).abs() < 0.01 { + Self::SlightlyRound + } else { + Self::Square + } + } +} + impl Page { #[allow(clippy::too_many_lines)] pub fn update(&mut self, message: Message) -> Task { @@ -200,9 +241,6 @@ impl Page { Message::DrawerOpen(context_view) => { self.context_view = Some(context_view); - let mut previous = - std::mem::replace(&mut self.drawer, drawer::Content::from(&self.theme_manager)); - self.drawer.preserve_from(&mut previous); tasks.push(cosmic::task::message( crate::app::Message::OpenContextDrawer(self.entity), )); @@ -251,8 +289,8 @@ impl Page { #[cfg(feature = "wayland")] tokio::task::spawn(async move { - Self::update_dock_padding(r); Self::update_panel_radii(r); + Self::update_dock_padding(r); }); } @@ -518,86 +556,6 @@ impl Page { self.drawer.reset(&self.theme_manager); } } - - Message::FocusFontInput => { - // retry until the widget is in the tree and focused or the dialog is removed. - if matches!( - self.context_view, - Some(ContextView::SystemFont | ContextView::MonospaceFont) - ) { - return cosmic::iced::runtime::task::widget( - cosmic::iced::core::widget::operation::focusable::find_focused(), - ) - .collect() - .then(|id| { - if id.first().is_some_and(|id| *id == FONT_SEARCH.clone()) { - Task::none() - } else { - focus(FONT_SEARCH.clone()).chain(task::message(Message::FocusFontInput)) - } - }); - } - } - Message::Blur(b) => { - let Ok(blur_strength) = b.try_into() else { - tracing::error!("Invalid blur strength: {b}"); - return Task::none(); - }; - theme_staged = self.theme_manager.set_frosted(blur_strength).map(|_| { - self.drawer.reset(&self.theme_manager); - theme_manager::ThemeStaged::Current - }); - - tasks.push(self.drawer.update_blur(blur_strength as u8)); - } - Message::Glass(glass) => { - let mut alpha_map = cosmic::cosmic_theme::AlphaMap::default(); - let glass_offset_min = alpha_map.extremely_high_2; - let glass_offset_max = 1.0 - alpha_map.extremely_low; - let offset = (glass - 0.5) / 0.5 - * if glass < 0.5 { - glass_offset_min - } else { - glass_offset_max - }; - alpha_map = alpha_map.offset(offset); - - // TODO optimize and apply to both light and dark themes - theme_staged = self.theme_manager.set_glass(alpha_map).map(|_| { - self.drawer.reset(&self.theme_manager); - theme_manager::ThemeStaged::Current - }); - - tasks.push(self.drawer.update_glass(glass)); - } - Message::FrostedSystemInterface(v) => { - theme_staged = self.theme_manager.set_frosted_system_interface(v).map(|_| { - self.drawer.reset(&self.theme_manager); - theme_manager::ThemeStaged::Current - }); - tasks.push(self.drawer.update_frosted_system_interface(v)); - } - Message::FrostedWindows(v) => { - theme_staged = self.theme_manager.set_frosted_windows(v).map(|_| { - self.drawer.reset(&self.theme_manager); - theme_manager::ThemeStaged::Current - }); - tasks.push(self.drawer.update_frosted_windows(v)); - } - Message::FrostedPanel(v) => { - theme_staged = self.theme_manager.set_frosted_panel(v).map(|_| { - self.drawer.reset(&self.theme_manager); - theme_manager::ThemeStaged::Current - }); - tasks.push(self.drawer.update_frosted_panel(v)); - } - Message::FrostedApplets(v) => { - theme_staged = self.theme_manager.set_frosted_applets(v).map(|_| { - self.drawer.reset(&self.theme_manager); - theme_manager::ThemeStaged::Current - }); - tasks.push(self.drawer.update_frosted_applets(v)); - } } let mut tasks = cosmic::Task::batch(tasks); @@ -612,66 +570,113 @@ impl Page { } // TODO: cache panel and dock configs so that they needn't be re-read - #[cfg(feature = "wayland")] - fn load_panel_config(name: &str) -> Option<(Config, CosmicPanelConfig)> { - let helper = CosmicPanelConfig::cosmic_config(name).ok()?; - let config = CosmicPanelConfig::get_entry(&helper).ok()?; - (config.name == name).then_some((helper, config)) - } - #[cfg(feature = "wayland")] pub fn update_panel_radii(roundness: Roundness) { - let corner_radii: CornerRadii = roundness.into(); - let radius = corner_radii.radius_xl[0] as u32; + let panel_config_helper = CosmicPanelConfig::cosmic_config("Panel").ok(); + let dock_config_helper = CosmicPanelConfig::cosmic_config("Dock").ok(); - for name in ["Panel", "Dock"] { - let Some((helper, mut config)) = Self::load_panel_config(name) else { - continue; - }; + let mut panel_config = panel_config_helper.as_ref().and_then(|config_helper| { + let panel_config = CosmicPanelConfig::get_entry(config_helper).ok()?; + (panel_config.name == "Panel").then_some(panel_config) + }); - let new_radius = if config.anchor_gap { - radius - } else if !config.expand_to_edges { - radius.min(12) + let mut dock_config = dock_config_helper.as_ref().and_then(|config_helper| { + let panel_config = CosmicPanelConfig::get_entry(config_helper).ok()?; + (panel_config.name == "Dock").then_some(panel_config) + }); + + if let Some(panel_config_helper) = panel_config_helper.as_ref() + && let Some(panel_config) = panel_config.as_mut() + { + let radii = if panel_config.anchor_gap { + let cornder_radii: CornerRadii = roundness.into(); + cornder_radii.radius_xl[0] as u32 + } else if matches!(roundness, Roundness::Round) && !panel_config.expand_to_edges { + 12 } else { 0 }; - if let Err(why) = config.set_border_radius(&helper, new_radius) { - tracing::error!(?why, "Error updating {name} corner radii"); + if let Err(why) = panel_config.set_border_radius(panel_config_helper, radii) { + tracing::error!(?why, "Error updating panel corner radii"); + } + } + + if let Some(dock_config_helper) = dock_config_helper.as_ref() + && let Some(dock_config) = dock_config.as_mut() + { + let radii = if dock_config.anchor_gap { + let cornder_radii: CornerRadii = roundness.into(); + cornder_radii.radius_xl[0] as u32 + } else if matches!(roundness, Roundness::Round) && !dock_config.expand_to_edges { + 12 + } else { + 0 + }; + + if let Err(why) = dock_config.set_border_radius(dock_config_helper, radii) { + tracing::error!(?why, "Error updating dock corner radii"); } } } #[cfg(feature = "wayland")] pub fn update_dock_padding(roundness: Roundness) { - let Some((helper, mut config)) = Self::load_panel_config("Dock") else { - return; - }; + let dock_config_helper = CosmicPanelConfig::cosmic_config("Dock").ok(); - let padding = match roundness { - Roundness::Round | Roundness::SlightlyRound => 4, - Roundness::Square => 0, - }; + let mut dock_config = dock_config_helper.as_ref().and_then(|config_helper| { + let panel_config = CosmicPanelConfig::get_entry(config_helper).ok()?; + (panel_config.name == "Dock").then_some(panel_config) + }); - if let Err(why) = config.set_padding(&helper, padding) { - tracing::error!(?why, "Error updating dock padding"); + if let Some(dock_config_helper) = dock_config_helper.as_ref() + && let Some(dock_config) = dock_config.as_mut() + { + let padding = match roundness { + Roundness::Round => 4, + Roundness::SlightlyRound => 4, + Roundness::Square => 0, + }; + + if let Err(why) = dock_config.set_padding(dock_config_helper, padding) { + tracing::error!(?why, "Error updating dock padding"); + } } } + // TODO: cache panel and dock configs so that they needn't be re-read #[cfg(feature = "wayland")] pub fn update_panel_spacing(density: Density) { let spacing: cosmic::cosmic_theme::Spacing = density.into(); - let space_none = spacing.space_none as u32; + let space_none = spacing.space_none; + let panel_config_helper = CosmicPanelConfig::cosmic_config("Panel").ok(); + let dock_config_helper = CosmicPanelConfig::cosmic_config("Dock").ok(); + let mut panel_config = panel_config_helper.as_ref().and_then(|config_helper| { + let panel_config = CosmicPanelConfig::get_entry(config_helper).ok()?; + (panel_config.name == "Panel").then_some(panel_config) + }); + let mut dock_config = dock_config_helper.as_ref().and_then(|config_helper| { + let panel_config = CosmicPanelConfig::get_entry(config_helper).ok()?; + (panel_config.name == "Dock").then_some(panel_config) + }); - for name in ["Panel", "Dock"] { - let Some((helper, mut config)) = Self::load_panel_config(name) else { - continue; - }; - if let Err(err) = config.set_spacing(&helper, space_none) { - tracing::error!(?err, "Error updating {name} spacing"); + if let Some(panel_config_helper) = panel_config_helper.as_ref() + && let Some(panel_config) = panel_config.as_mut() + { + let update = panel_config.set_spacing(panel_config_helper, space_none as u32); + if let Err(err) = update { + tracing::error!(?err, "Error updating panel spacing"); } - } + }; + + if let Some(dock_config_helper) = dock_config_helper.as_ref() + && let Some(dock_config) = dock_config.as_mut() + { + let update = dock_config.set_spacing(dock_config_helper, space_none as u32); + if let Err(err) = update { + tracing::error!(?err, "Error updating dock spacing"); + } + }; } fn can_reset(&self) -> bool { diff --git a/cosmic-settings/src/pages/desktop/appearance/style.rs b/cosmic-settings/src/pages/desktop/appearance/style.rs index cfce2b1..6db3477 100644 --- a/cosmic-settings/src/pages/desktop/appearance/style.rs +++ b/cosmic-settings/src/pages/desktop/appearance/style.rs @@ -1,12 +1,9 @@ -use cosmic::iced::core::text::Wrapping; -use cosmic::iced::core::{Alignment, Length}; +use cosmic::iced::core::{Alignment, Length, text::Wrapping}; use cosmic::widget::icon::{from_name, icon}; use cosmic::widget::{button, container, settings, text}; use cosmic::{Apply, Element}; use cosmic_settings_page::Section; -use crate::pages::desktop::appearance::ContextView; - use super::{Message, Page, Roundness}; #[allow(clippy::too_many_lines)] @@ -15,7 +12,6 @@ pub fn section() -> Section { round = fl!("style", "round"); slightly_round = fl!("style", "slightly-round"); square = fl!("style", "square"); - frosted_glass = fl!("style", "frosted-glass"); }); let dark_round_style = from_name("illustration-appearance-dark-style-round").handle(); @@ -140,10 +136,6 @@ pub fn section() -> Section { ) .center_x(Length::Fill), ) - .add(crate::widget::go_next_item( - &descriptions[frosted_glass], - Message::DrawerOpen(ContextView::FrostedGlass), - )) .apply(Element::from) .map(crate::pages::Message::Appearance) }) diff --git a/cosmic-settings/src/pages/desktop/appearance/theme_manager.rs b/cosmic-settings/src/pages/desktop/appearance/theme_manager.rs index ac26c63..12d8cc6 100644 --- a/cosmic-settings/src/pages/desktop/appearance/theme_manager.rs +++ b/cosmic-settings/src/pages/desktop/appearance/theme_manager.rs @@ -1,8 +1,8 @@ use cosmic::cosmic_config::{Config, ConfigSet, CosmicConfigEntry}; use cosmic::cosmic_theme::palette::{Srgb, Srgba}; use cosmic::cosmic_theme::{ - AlphaMap, BlurStrength, CornerRadii, DARK_THEME_BUILDER_ID, LIGHT_THEME_BUILDER_ID, Spacing, - Theme, ThemeBuilder, ThemeMode, + CornerRadii, DARK_THEME_BUILDER_ID, LIGHT_THEME_BUILDER_ID, Spacing, Theme, ThemeBuilder, + ThemeMode, }; use cosmic::iced::core::Color; @@ -74,7 +74,7 @@ impl From<(Option, Option, Option>)> for ThemeCustomi .success(theme.success.base.color) .warning(theme.warning.base.color) .neutral_tint(theme.palette.neutral_5.color) - .text_tint(theme.background(false).on.color); + .text_tint(theme.background.on.color); theme_builder.gaps = theme.gaps; @@ -160,6 +160,20 @@ impl Default for Manager { impl Manager { pub fn build_theme(&mut self, stage: ThemeStaged) -> Task { + macro_rules! theme_transaction { + ($config:ident, $current_theme:ident, $new_theme:ident, { $($name:ident;)+ }) => { + let tx = $config.transaction(); + + $( + if $current_theme.$name != $new_theme.$name { + _ = tx.set(stringify!($name), $new_theme.$name.clone()); + } + )+ + + _ = tx.commit(); + } + } + let map_data_fn = |customizer: &ThemeCustomizer| { (customizer.builder.0.clone(), customizer.theme.1.clone()) }; @@ -185,80 +199,32 @@ impl Manager { cosmic::task::future(async move { for (builder, config) in data.by_ref() { if let Some(config) = config { - let cur = match Theme::get_entry(&config) { + let current_theme = match Theme::get_entry(&config) { Ok(theme) => theme, Err((_errs, theme)) => theme, }; - let new = builder.build(); - - // do this without the macro - let tx = config.transaction(); - - if cur.accent != new.accent { - _ = tx.set("accent", new.accent.clone()); - } - if cur.accent_button != new.accent_button { - _ = tx.set("accent_button", new.accent_button.clone()); - } - if cur.background(false) != new.background(false) { - _ = tx.set("background", new.background(false).clone()); - } - if cur.background(true) != new.background(true) { - _ = tx.set("transparent_background", new.background(true).clone()); - } - if cur.button != new.button { - _ = tx.set("button", new.button.clone()); - } - if cur.destructive != new.destructive { - _ = tx.set("destructive", new.destructive.clone()); - } - if cur.destructive_button != new.destructive_button { - _ = tx.set("destructive_button", new.destructive_button.clone()); - } - if cur.link_button != new.link_button { - _ = tx.set("link_button", new.link_button.clone()); - } - if cur.icon_button != new.icon_button { - _ = tx.set("icon_button", new.icon_button.clone()); - } - if cur.palette != new.palette { - _ = tx.set("palette", new.palette.clone()); - } - if cur.primary(false) != new.primary(false) { - _ = tx.set("primary", new.primary(false).clone()); - } - if cur.secondary(false) != new.secondary(false) { - _ = tx.set("secondary", new.secondary(false).clone()); - } - if cur.primary(true) != new.primary(true) { - _ = tx.set("transparent_primary", new.primary(true).clone()); - } - if cur.secondary(true) != new.secondary(true) { - _ = tx.set("transparent_secondary", new.secondary(true).clone()); - } - if cur.shade != new.shade { - _ = tx.set("shade", new.shade.clone()); - } - if cur.success != new.success { - _ = tx.set("success", new.success.clone()); - } - if cur.text_button != new.text_button { - _ = tx.set("text_button", new.text_button.clone()); - } - if cur.warning != new.warning { - _ = tx.set("warning", new.warning.clone()); - } - if cur.warning_button != new.warning_button { - _ = tx.set("warning_button", new.warning_button.clone()); - } - if cur.window_hint != new.window_hint { - _ = tx.set("window_hint", new.window_hint.clone()); - } - if cur.accent_text != new.accent_text { - _ = tx.set("accent_text", new.accent_text.clone()); - } - _ = tx.commit(); + let new_theme = builder.build(); + theme_transaction!(config, current_theme, new_theme, { + accent; + accent_button; + background; + button; + destructive; + destructive_button; + link_button; + icon_button; + palette; + primary; + secondary; + shade; + success; + text_button; + warning; + warning_button; + window_hint; + accent_text; + }); } } @@ -394,39 +360,6 @@ impl Manager { Some(ThemeStaged::Both) } - pub fn set_frosted(&mut self, frosted: BlurStrength) -> Option { - self.dark.set_frosted(frosted)?; - self.light.set_frosted(frosted)?; - Some(ThemeStaged::Both) - } - - pub fn set_glass(&mut self, alpha_map: AlphaMap) -> Option { - self.dark.set_glass(alpha_map)?; - self.light.set_glass(alpha_map)?; - Some(ThemeStaged::Both) - } - - pub fn set_frosted_panel(&mut self, enabled: bool) -> Option { - self.dark.set_frosted_panel(enabled)?; - self.light.set_frosted_panel(enabled)?; - Some(ThemeStaged::Both) - } - pub fn set_frosted_applets(&mut self, enabled: bool) -> Option { - self.dark.set_frosted_applets(enabled)?; - self.light.set_frosted_applets(enabled)?; - Some(ThemeStaged::Both) - } - pub fn set_frosted_system_interface(&mut self, enabled: bool) -> Option { - self.dark.set_frosted_system_interface(enabled)?; - self.light.set_frosted_system_interface(enabled)?; - Some(ThemeStaged::Both) - } - pub fn set_frosted_windows(&mut self, enabled: bool) -> Option { - self.dark.set_frosted_windows(enabled)?; - self.light.set_frosted_windows(enabled)?; - Some(ThemeStaged::Both) - } - pub fn get_color(&self, context: &ContextView) -> Option { match *context { ContextView::CustomAccent => self.custom_accent().map(Color::from), @@ -607,81 +540,6 @@ impl ThemeCustomizer { Some(ThemeStaged::Current) } - pub fn set_frosted(&mut self, frosted: BlurStrength) -> Option { - let config = self.builder.1.as_ref()?; - - self.builder.0.set_frosted(config, frosted).ok()?; - self.theme - .0 - .set_frosted(self.theme.1.as_ref()?, frosted) - .ok()?; - - Some(ThemeStaged::Current) - } - - pub fn set_glass(&mut self, alpha_map: AlphaMap) -> Option { - let config = self.builder.1.as_ref()?; - - self.builder.0.set_alpha_map(config, alpha_map).ok()?; - self.theme - .0 - .set_alpha_map(self.theme.1.as_ref()?, alpha_map) - .ok()?; - - Some(ThemeStaged::Current) - } - - pub fn set_frosted_windows(&mut self, enabled: bool) -> Option { - let config = self.builder.1.as_ref()?; - - self.builder.0.set_frosted_windows(config, enabled).ok()?; - self.theme - .0 - .set_frosted_windows(self.theme.1.as_ref()?, enabled) - .ok()?; - - Some(ThemeStaged::Current) - } - - pub fn set_frosted_system_interface(&mut self, enabled: bool) -> Option { - let config = self.builder.1.as_ref()?; - - self.builder - .0 - .set_frosted_system_interface(config, enabled) - .ok()?; - self.theme - .0 - .set_frosted_system_interface(self.theme.1.as_ref()?, enabled) - .ok()?; - - Some(ThemeStaged::Current) - } - - pub fn set_frosted_applets(&mut self, enabled: bool) -> Option { - let config = self.builder.1.as_ref()?; - - self.builder.0.set_frosted_applets(config, enabled).ok()?; - self.theme - .0 - .set_frosted_applets(self.theme.1.as_ref()?, enabled) - .ok()?; - - Some(ThemeStaged::Current) - } - - pub fn set_frosted_panel(&mut self, enabled: bool) -> Option { - let config = self.builder.1.as_ref()?; - - self.builder.0.set_frosted_panel(config, enabled).ok()?; - self.theme - .0 - .set_frosted_panel(self.theme.1.as_ref()?, enabled) - .ok()?; - - Some(ThemeStaged::Current) - } - // set active hints is set on all themes to be consistent between dark & light themes. pub fn set_active_hint(&mut self, active_hint: u32) -> Option { let config = self.builder.1.as_ref()?; diff --git a/cosmic-settings/src/pages/desktop/dock/applets.rs b/cosmic-settings/src/pages/desktop/dock/applets.rs index a8a9dc4..5dc1923 100644 --- a/cosmic-settings/src/pages/desktop/dock/applets.rs +++ b/cosmic-settings/src/pages/desktop/dock/applets.rs @@ -1,16 +1,22 @@ -use cosmic::app::ContextDrawer; -use cosmic::cosmic_config::CosmicConfigEntry; -use cosmic::iced::{Alignment, Length}; -use cosmic::widget::{button, container, row}; -use cosmic::{Apply, Element, Task}; +use cosmic::{ + Apply, Element, Task, + app::ContextDrawer, + cosmic_config::CosmicConfigEntry, + iced::{Alignment, Length}, + widget::{button, container, row}, +}; use cosmic_panel_config::CosmicPanelConfig; use cosmic_settings_page::{self as page, Section, section}; use slotmap::{Key, SlotMap}; use std::borrow::Cow; -use crate::app; -use crate::pages::desktop::panel::applets_inner::{self, AppletsPage, ContextDrawerVariant, lists}; -use crate::pages::{self}; +use crate::{ + app, + pages::{ + self, + desktop::panel::applets_inner::{self, AppletsPage, ContextDrawerVariant, lists}, + }, +}; pub(crate) struct Page { inner: applets_inner::Page, diff --git a/cosmic-settings/src/pages/desktop/dock/mod.rs b/cosmic-settings/src/pages/desktop/dock/mod.rs index a118e91..40738aa 100644 --- a/cosmic-settings/src/pages/desktop/dock/mod.rs +++ b/cosmic-settings/src/pages/desktop/dock/mod.rs @@ -1,8 +1,11 @@ use std::collections::HashMap; -use cosmic::cosmic_config::{ConfigSet, CosmicConfigEntry}; -use cosmic::widget::{settings, text}; -use cosmic::{Apply, Element, Task}; +use cosmic::Apply; +use cosmic::{ + Element, Task, + cosmic_config::{ConfigSet, CosmicConfigEntry}, + widget::{settings, text}, +}; use cosmic_panel_config::{CosmicPanelConfig, CosmicPanelContainerConfig}; use cosmic_settings_page::{self as page, Section, section}; use slotmap::SlotMap; diff --git a/cosmic-settings/src/pages/desktop/panel/applets_inner.rs b/cosmic-settings/src/pages/desktop/panel/applets_inner.rs index 8f75940..bd0ed6c 100644 --- a/cosmic-settings/src/pages/desktop/panel/applets_inner.rs +++ b/cosmic-settings/src/pages/desktop/panel/applets_inner.rs @@ -10,21 +10,23 @@ use cosmic::iced; use cosmic::iced::core::clipboard::IconSurface; use cosmic::widget::{Column, button, column, container, icon, list_column, row, text, text_input}; -use cosmic::cosmic_config::{Config, CosmicConfigEntry}; -use cosmic::iced::core::widget::{Operation, Tree, tree}; -use cosmic::iced::core::{Clipboard, Shell, Widget, layout, renderer, window}; -use cosmic::iced::runtime::Task; -use cosmic::iced::runtime::core::id::Id; -use cosmic::iced::{ - Alignment, Border, Color, Length, Point, Rectangle, Size, Vector, event, mouse, overlay, touch, +use cosmic::{ + Apply, Element, + cosmic_config::{Config, CosmicConfigEntry}, + iced::core::{ + Clipboard, Shell, Widget, layout, renderer, + widget::{Operation, Tree, tree}, + }, + iced::runtime::{Task, core::id::Id}, + iced::{ + Alignment, Border, Color, Length, Point, Rectangle, Size, Vector, core::window, event, + mouse, overlay, touch, + }, + theme, }; -use cosmic::{Apply, Element, theme}; -use std::borrow::Cow; -use std::fmt::Debug; -use std::mem; use std::path::{Path, PathBuf}; -use std::sync::LazyLock; +use std::{borrow::Cow, fmt::Debug, mem, sync::LazyLock}; use crate::{app, pages}; use cosmic_panel_config::CosmicPanelConfig; diff --git a/cosmic-settings/src/pages/desktop/panel/inner.rs b/cosmic-settings/src/pages/desktop/panel/inner.rs index ea54337..bcd7bb3 100644 --- a/cosmic-settings/src/pages/desktop/panel/inner.rs +++ b/cosmic-settings/src/pages/desktop/panel/inner.rs @@ -1,11 +1,12 @@ -use cosmic::cctk::sctk::reexports::client::Proxy; -use cosmic::cctk::sctk::reexports::client::backend::ObjectId; -use cosmic::cctk::sctk::reexports::client::protocol::wl_output::WlOutput; -use cosmic::cosmic_config::{self, CosmicConfigEntry}; -use cosmic::cosmic_theme::{Density, Roundness}; -use cosmic::iced::{Alignment, Length}; -use cosmic::widget::{button, container, dropdown, row, settings, slider, space, text}; -use cosmic::{Element, Task, surface}; +use cosmic::{ + Element, Task, + cctk::sctk::reexports::client::{Proxy, backend::ObjectId, protocol::wl_output::WlOutput}, + cosmic_config::{self, CosmicConfigEntry}, + cosmic_theme::Density, + iced::{Alignment, Length}, + surface, + widget::{button, container, dropdown, row, settings, slider, space, text}, +}; use cosmic::Apply; use cosmic_config::ConfigSet; @@ -14,15 +15,16 @@ use cosmic_panel_config::{ CosmicPanelOuput, PanelAnchor, PanelSize, }; use cosmic_settings_page::{self as page, Section}; -use std::collections::HashMap; -use std::time::Duration; +use std::{collections::HashMap, time::Duration}; + +use crate::pages::desktop::appearance::Roundness; pub struct PageInner { pub(crate) config_helper: Option, pub(crate) panel_config: Option, + pub size: Option, pub opacity: f32, pub opacity_changing: bool, - pub size: PanelSize, pub outputs: Vec, pub anchors: Vec, pub backgrounds: Vec, @@ -38,9 +40,9 @@ impl Default for PageInner { Self { config_helper: Option::default(), panel_config: Option::default(), + size: Option::default(), opacity: 0.0, opacity_changing: false, - size: PanelSize::M, outputs: vec![fl!("all-displays")], anchors: vec![ Anchor(PanelAnchor::Left).to_string(), @@ -118,7 +120,7 @@ pub(crate) fn behavior_and_position< .title(§ion.title) .add( settings::item::builder(&descriptions[autohide_label]) - .toggler(panel_config.autohide_enabled(), Message::AutoHidePanel), + .toggler(panel_config.autohide.is_some(), Message::AutoHidePanel), ) .add(settings::item( &descriptions[position], @@ -207,7 +209,9 @@ pub(crate) fn style< text::body(fl!("small")).into(), slider( 0..=4, - match inner.size { + match inner.size.as_ref().expect( + "PageInner.size is None even though PageInner.panel_config is Some", + ) { PanelSize::XS => 0, PanelSize::S => 1, PanelSize::M => 2, @@ -502,7 +506,7 @@ impl PageInner { if let Err(err) = default.write_entry(config) { tracing::error!(?err, "Error resetting panel config."); } - self.size.clone_from(&default.size); + self.size = Some(default.size.clone()); self.system_default = Some(default.clone()); self.panel_config.clone_from(&self.system_default); } else { @@ -542,10 +546,18 @@ impl PageInner { Message::AutoHidePanel(enabled) => { if enabled { _ = panel_config.set_exclusive_zone(helper, false); - _ = panel_config.set_autohide(helper, AutoHide::OnOverlap); + _ = panel_config.set_autohide( + helper, + Some(AutoHide { + wait_time: 1000, + transition_time: 200, + handle_size: 4, + unhide_delay: 200, + }), + ); } else { _ = panel_config.set_exclusive_zone(helper, true); - _ = panel_config.set_autohide(helper, AutoHide::Never); + _ = panel_config.set_autohide(helper, None); } } Message::PanelAnchor(i) => { @@ -579,21 +591,30 @@ impl PageInner { } let theme = cosmic::theme::system_preference(); let theme = theme.cosmic(); - let radius = theme.corner_radii.radius_xl[0] as u32; - let new_radius = if enabled { - radius - } else if !panel_config.expand_to_edges { - radius.min(12) + let radius = theme.corner_radii; + let roundness: Roundness = radius.into(); + let new_radius; + if enabled { + let radii = theme.corner_radii.radius_xl[0] as u32; + new_radius = radii; + } else if matches!(roundness, Roundness::Round) && !panel_config.expand_to_edges { + new_radius = 12; } else { - 0 - }; + new_radius = 0; + } _ = panel_config.set_border_radius(helper, new_radius).unwrap(); } Message::PanelSize(size) => { - self.size = size; + self.size = Some(size); } Message::PanelSizeCommit => { - _ = panel_config.set_size(helper, self.size.clone()); + _ = panel_config.set_size( + helper, + self.size + .as_ref() + .expect("PageInner.size is None even though it should be Some, since PageInner.panel_config is Some") + .clone() + ); // Reset any size overrides the user might have set _ = panel_config.set_size_center(helper, None); _ = panel_config.set_size_wings(helper, None); @@ -611,14 +632,17 @@ impl PageInner { let theme = cosmic::theme::system_preference(); let theme = theme.cosmic(); - let radius = theme.corner_radii.radius_xl[0] as u32; - let new_radius = if panel_config.anchor_gap { - radius - } else if !enabled { - radius.min(12) + let radius = theme.corner_radii; + let roundness: Roundness = radius.into(); + let new_radius; + if panel_config.anchor_gap { + let radii = theme.corner_radii.radius_xl[0] as u32; + new_radius = radii; + } else if matches!(roundness, Roundness::Round) && !enabled { + new_radius = 12; } else { - 0 - }; + new_radius = 0; + } _ = panel_config.set_border_radius(helper, new_radius).unwrap(); } Message::OpacityRequest(opacity) => { @@ -653,7 +677,7 @@ impl PageInner { } } Message::PanelConfig(c) => { - self.size = c.size.clone(); + self.size = Some(c.size.clone()); self.panel_config = Some(*c); return Task::none(); } diff --git a/cosmic-settings/src/pages/desktop/panel/mod.rs b/cosmic-settings/src/pages/desktop/panel/mod.rs index 72aa66b..7748618 100644 --- a/cosmic-settings/src/pages/desktop/panel/mod.rs +++ b/cosmic-settings/src/pages/desktop/panel/mod.rs @@ -1,7 +1,6 @@ use std::collections::HashMap; -use cosmic::Task; -use cosmic::cosmic_config::CosmicConfigEntry; +use cosmic::{Task, cosmic_config::CosmicConfigEntry}; use cosmic_panel_config::{CosmicPanelConfig, CosmicPanelContainerConfig}; use cosmic_settings_page::{self as page, Section, section}; use slotmap::SlotMap; @@ -80,6 +79,7 @@ impl Default for Page { // If the config is not present, it will be created with the default values and the name will not match (panel_config.name == "Panel").then_some(panel_config) }); + let size = panel_config.as_ref().map(|c| c.size.clone()); let system_default = cosmic::cosmic_config::Config::system( &format!("{}.Panel", cosmic_panel_config::NAME), CosmicPanelConfig::VERSION, @@ -99,6 +99,7 @@ impl Default for Page { inner: PageInner { config_helper, panel_config, + size, container_config, outputs_map: HashMap::new(), system_default, diff --git a/cosmic-settings/src/pages/desktop/wallpaper/mod.rs b/cosmic-settings/src/pages/desktop/wallpaper/mod.rs index cb98b7b..7f99b25 100644 --- a/cosmic-settings/src/pages/desktop/wallpaper/mod.rs +++ b/cosmic-settings/src/pages/desktop/wallpaper/mod.rs @@ -7,25 +7,37 @@ pub mod widgets; pub use config::Config; use url::Url; -use std::collections::HashMap; -use std::path::{Path, PathBuf}; -use std::sync::Arc; +use std::{ + collections::HashMap, + path::{Path, PathBuf}, + sync::Arc, +}; -use cosmic::app::ContextDrawer; #[cfg(feature = "xdg-portal")] use cosmic::dialog::file_chooser; -use cosmic::iced::core::text::{Ellipsize, EllipsizeHeightLimit}; -use cosmic::iced::runtime::core::image::Handle as ImageHandle; -use cosmic::iced::{Alignment, Color, Length, Subscription, window}; -use cosmic::widget::color_picker::ColorPickerUpdate; -use cosmic::widget::segmented_button::{self, SingleSelectModel}; -use cosmic::widget::space::horizontal as horizontal_space; -use cosmic::widget::{ - ColorPickerModel, button, dropdown, icon, list_column, row, settings, tab_bar, text, +use cosmic::{ + Apply, Element, Task, + iced::core::text::{Ellipsize, EllipsizeHeightLimit}, + widget::{ColorPickerModel, color_picker::ColorPickerUpdate, icon}, +}; +use cosmic::{app::ContextDrawer, iced::runtime::core::image::Handle as ImageHandle}; +use cosmic::{ + iced::Subscription, + widget::{ + button, dropdown, list_column, row, + segmented_button::{self, SingleSelectModel}, + settings, + space::horizontal as horizontal_space, + tab_bar, text, + }, +}; +use cosmic::{ + iced::{Alignment, Color, Length, window}, + surface, }; -use cosmic::{Apply, Element, Task, surface}; use cosmic_bg_config::Source; -use cosmic_settings_page::{self as page, Section, section}; +use cosmic_settings_page::Section; +use cosmic_settings_page::{self as page, section}; use cosmic_settings_wallpaper::{self as wallpaper, Entry, ScalingMode}; use image::imageops::FilterType::Lanczos3; use image::{ImageBuffer, Rgba}; @@ -65,7 +77,7 @@ pub enum Message { AddFolder(Arc>), /// Adds a new image file the system wallpaper folder. #[cfg(feature = "xdg-portal")] - AddFiles(Arc, file_chooser::Error>>), + AddFile(Arc>), /// Cache currently displayed image. CacheDisplayImage, /// Selects an option in the category dropdown menu. @@ -787,11 +799,11 @@ impl Page { .title(fl!("wallpaper", "image-dialog")) .accept_label(fl!("dialog-add")) .modal(false) - .open_files() + .open_file() .await - .map(|response| response.urls().to_vec()); + .map(|response| response.url().to_owned()); - let message = Message::AddFiles(Arc::new(dialog_result)); + let message = Message::AddFile(Arc::new(dialog_result)); let page_message = crate::pages::Message::DesktopWallpaper(message); crate::Message::PageMessage(page_message) }); @@ -862,11 +874,6 @@ impl Page { #[cfg(feature = "xdg-portal")] Message::AddFolder(result) => { let path = match dialog_response(result) { - DialogResponse::Paths(_) => { - // TODO find if there is a use of multi folder addition. - tracing::warn!("unexpected multi-path response for folder dialog"); - return Task::none(); - } DialogResponse::Path(path) => path, DialogResponse::Error(why) => { tracing::error!(why, "dialog response error"); @@ -892,30 +899,27 @@ impl Page { } #[cfg(feature = "xdg-portal")] - Message::AddFiles(result) => { - let paths = match dialog_response_multi(result) { - DialogResponse::Paths(paths) => paths, - DialogResponse::Path(path) => vec![path], // not really but for the sake of consistency.. + Message::AddFile(result) => { + let path = match dialog_response(result) { + DialogResponse::Path(path) => path, DialogResponse::Error(why) => { tracing::error!(why, "dialog response error"); return Task::none(); } }; - let tasks = paths.into_iter().filter(|path| path.is_file()).map(|path| { + if path.is_file() { tracing::info!(?path, "opening custom image"); // Loads a single custom image and its thumbnail for display in the backgrounds view. - cosmic::Task::future(async move { + return cosmic::Task::future(async move { let result = wallpaper::load_image_with_thumbnail(path); let message = Message::ImageAdd(result.map(Arc::new)); let page_message = crate::pages::Message::DesktopWallpaper(message); crate::Message::PageMessage(page_message) - }) - }); - - return Task::batch(tasks); + }); + } } Message::Event(event) => match event { @@ -1425,33 +1429,27 @@ pub fn settings() -> Section { enum DialogResponse { Error(String), Path(PathBuf), - Paths(Vec), -} - -#[cfg(feature = "xdg-portal")] -fn unwrap_dialog_response(result: Arc>) -> Result { - let Some(result) = Arc::into_inner(result) else { - return Err(String::from("Arc::into_inner returned None")); - }; - - result.map_err(|why| { - let mut source: &dyn std::error::Error = &why; - let mut string = format!("open dialog subscription errored\n cause: {source}"); - - while let Some(new_source) = source.source() { - string.push_str(&format!("\n cause: {new_source}")); - source = new_source; - } - - string - }) } #[cfg(feature = "xdg-portal")] fn dialog_response(result: Arc>) -> DialogResponse { - let selection = match unwrap_dialog_response(result) { - Ok(selection) => selection, - Err(why) => return DialogResponse::Error(why), + let Some(result) = Arc::into_inner(result) else { + return DialogResponse::Error(String::from("Arc::into_inner returned None")); + }; + + let selection = match result { + Ok(response) => response, + Err(why) => { + let mut source: &dyn std::error::Error = &why; + let mut string = format!("open dialog subscription errored\n cause: {source}"); + + while let Some(new_source) = source.source() { + string.push_str(&format!("\n cause: {new_source}")); + source = new_source; + } + + return DialogResponse::Error(string); + } }; let Ok(path) = selection.to_file_path() else { @@ -1460,22 +1458,3 @@ fn dialog_response(result: Arc>) -> DialogRespo DialogResponse::Path(path) } - -#[cfg(feature = "xdg-portal")] -fn dialog_response_multi(result: Arc, file_chooser::Error>>) -> DialogResponse { - let selections = match unwrap_dialog_response(result) { - Ok(selections) => selections, - Err(why) => return DialogResponse::Error(why), - }; - - let mut paths = Vec::with_capacity(selections.len()); - for selection in selections { - let Ok(path) = selection.to_file_path() else { - tracing::warn!("not a valid file path: {}", selection.path()); - continue; - }; - paths.push(path); - } - - DialogResponse::Paths(paths) -} diff --git a/cosmic-settings/src/pages/desktop/wallpaper/widgets.rs b/cosmic-settings/src/pages/desktop/wallpaper/widgets.rs index e71efde..f9d2bcb 100644 --- a/cosmic-settings/src/pages/desktop/wallpaper/widgets.rs +++ b/cosmic-settings/src/pages/desktop/wallpaper/widgets.rs @@ -3,8 +3,8 @@ use super::Message; use cosmic::iced::Radius; -use cosmic::iced::core::gradient::Linear; -use cosmic::iced::core::{Background, Border, Color, Degrees, Length}; +use cosmic::iced::core::Border; +use cosmic::iced::core::{Background, Color, Degrees, Length, gradient::Linear}; use cosmic::iced::runtime::core::image::Handle as ImageHandle; use cosmic::prelude::*; use cosmic::widget::{Space, button, container}; diff --git a/cosmic-settings/src/pages/desktop/window_management.rs b/cosmic-settings/src/pages/desktop/window_management.rs index d83211e..7b68acc 100644 --- a/cosmic-settings/src/pages/desktop/window_management.rs +++ b/cosmic-settings/src/pages/desktop/window_management.rs @@ -1,14 +1,18 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only -use cosmic::iced::Length; -use cosmic::widget::{self, settings}; -use cosmic::{Apply, Element, surface}; +use cosmic::{ + Apply, Element, + iced::Length, + surface, + widget::{self, settings}, +}; use cosmic_comp_config::CosmicCompConfig; use cosmic_config::{ConfigGet, ConfigSet}; use cosmic_settings_config::{Action, Binding, Shortcuts, shortcuts}; -use cosmic_settings_page::{self as page, Section, section}; +use cosmic_settings_page::Section; +use cosmic_settings_page::{self as page, section}; use slotmap::SlotMap; use tracing::error; @@ -92,7 +96,7 @@ impl Default for Page { fl!("super-key", "launcher"), fl!("super-key", "workspaces"), fl!("super-key", "applications"), - fl!("super-key", "none"), + fl!("super-key", "disable"), ], super_key_active: super_key_active_config(), comp_config, @@ -243,7 +247,7 @@ pub fn window_management() -> Section { _launcher = fl!("super-key", "launcher"); _workspaces = fl!("super-key", "workspaces"); _applications = fl!("super-key", "applications"); - _none = fl!("super-key", "none"); + _disable = fl!("super-key", "disable"); edge_gravity = fl!("edge-gravity"); }); diff --git a/cosmic-settings/src/pages/desktop/workspaces.rs b/cosmic-settings/src/pages/desktop/workspaces.rs index ecb93a3..6f5e1f2 100644 --- a/cosmic-settings/src/pages/desktop/workspaces.rs +++ b/cosmic-settings/src/pages/desktop/workspaces.rs @@ -3,11 +3,15 @@ // TODO make settings work -use cosmic::cosmic_config::{self, ConfigGet, ConfigSet}; -use cosmic::widget::{self, settings}; -use cosmic::{Apply, Element, surface}; +use cosmic::{ + Apply, Element, + cosmic_config::{self, ConfigGet, ConfigSet}, + surface, + widget::{self, settings}, +}; use cosmic_comp_config::workspace::{Action, WorkspaceConfig, WorkspaceLayout, WorkspaceMode}; -use cosmic_settings_page::{self as page, Section, section}; +use cosmic_settings_page::Section; +use cosmic_settings_page::{self as page, section}; use slotmap::SlotMap; use tracing::error; diff --git a/cosmic-settings/src/pages/display/arrangement.rs b/cosmic-settings/src/pages/display/arrangement.rs index 0f8fe89..61d99e4 100644 --- a/cosmic-settings/src/pages/display/arrangement.rs +++ b/cosmic-settings/src/pages/display/arrangement.rs @@ -5,9 +5,11 @@ use cosmic::Renderer; use cosmic::iced::core::renderer::Quad; use cosmic::iced::core::widget::{Tree, tree}; use cosmic::iced::core::{ - self as core, Border, Clipboard, Element, Layout, Length, Point, Rectangle, - Renderer as IcedRenderer, Shell, Size, Widget, alignment, layout, mouse, renderer, text, touch, + self as core, Border, Clipboard, Element, Layout, Length, Rectangle, Renderer as IcedRenderer, + Shell, Size, Widget, }; +use cosmic::iced::core::{Point, layout, mouse, renderer, touch}; +use cosmic::iced::core::{alignment, text}; use cosmic::widget::segmented_button::{self, SingleSelectModel}; use cosmic_randr_shell::{self as randr, OutputKey}; use randr::Transform; @@ -244,13 +246,11 @@ impl Widget for Arrangement<'_ if let Some(ref on_placement) = self.on_placement { shell.publish(on_placement( output_key, - ((region.x - state.max_dimensions.0 - bounds.x) * UNIT_PIXELS).round() - as i32, + ((region.x - state.max_dimensions.0 - bounds.x) * UNIT_PIXELS) as i32, ((region.y - (state.max_dimensions.1 / VERTICAL_DISPLAY_OVERHEAD) - bounds.y) - * UNIT_PIXELS) - .round() as i32, + * UNIT_PIXELS) as i32, )); } diff --git a/cosmic-settings/src/pages/display/mod.rs b/cosmic-settings/src/pages/display/mod.rs index 95dddf7..1b73211 100644 --- a/cosmic-settings/src/pages/display/mod.rs +++ b/cosmic-settings/src/pages/display/mod.rs @@ -20,10 +20,9 @@ use cosmic_settings_page::{self as page, Section, section}; use futures::SinkExt; use indexmap::Equivalent; use slotmap::{Key, SecondaryMap, SlotMap}; -use std::collections::BTreeMap; -use std::process::ExitStatus; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, LazyLock}; +use std::{collections::BTreeMap, process::ExitStatus}; use tokio::sync::oneshot; static DPI_SCALES: &[u32] = &[50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300]; @@ -913,8 +912,8 @@ impl Page { Some(orientation) => self.set_dialog( Randr::Transform(match orientation { 1 => Transform::Rotate90, - 2 => Transform::Rotate180, - 3 => Transform::Rotate270, + 2 => Transform::Flipped180, + 3 => Transform::Flipped270, _ => Transform::Normal, }), &request, diff --git a/cosmic-settings/src/pages/input/keyboard/mod.rs b/cosmic-settings/src/pages/input/keyboard/mod.rs index 714ae0a..468ecbb 100644 --- a/cosmic-settings/src/pages/input/keyboard/mod.rs +++ b/cosmic-settings/src/pages/input/keyboard/mod.rs @@ -5,96 +5,50 @@ pub mod shortcuts; use std::cmp; -use cosmic::app::{ContextDrawer, context_drawer}; -use cosmic::cosmic_config::{self, ConfigSet}; -use cosmic::iced::{Alignment, Length}; -use cosmic::widget::{self, ListColumn, button, container, icon, list, row, settings}; -use cosmic::{Apply, Element, Task, theme}; +use cosmic::{ + Apply, Element, Task, + app::{ContextDrawer, context_drawer}, + cosmic_config::{self, ConfigSet}, + iced::{Alignment, Length}, + theme, + widget::{self, ListColumn, button, container, icon, list, row, settings}, +}; use cosmic_comp_config::{KeyboardConfig, NumlockState, XkbConfig}; use cosmic_settings_page::{self as page, Section, section}; use itertools::Itertools; use slotmap::{DefaultKey, Key, SlotMap}; -/// Contains all options for mapping a [SpecialKey]. -/// The available options differ for each key being mapped. -enum SpecialKeyAlternative { - AltLeft, - AltRight, - Ctrl, - CtrlRight, - SwapWithCtrl, - Super, - SuperLeft, - SuperRight, - CapsLock, - ScrollLock, - MenuKey, - Backspace, - Escape, - SwapWithEscape, - PrintScreen, - None, -} -impl SpecialKeyAlternative { - fn display_text(&self) -> String { - match self { - Self::AltLeft => fl!("keyboard-special-char", "alt-left"), - Self::AltRight => fl!("keyboard-special-char", "alt-right"), - Self::Ctrl => fl!("keyboard-special-char", "ctrl"), - Self::CtrlRight => fl!("keyboard-special-char", "ctrl-right"), - Self::SwapWithCtrl => fl!("keyboard-special-char", "swap-with-ctrl"), - Self::Super => fl!("keyboard-special-char", "super"), - Self::SuperLeft => fl!("keyboard-special-char", "super-left"), - Self::SuperRight => fl!("keyboard-special-char", "super-right"), - Self::CapsLock => fl!("keyboard-special-char", "caps"), - Self::ScrollLock => fl!("keyboard-special-char", "scroll-lock"), - Self::MenuKey => fl!("keyboard-special-char", "menu"), - Self::Backspace => fl!("keyboard-special-char", "backspace"), - Self::Escape => fl!("keyboard-special-char", "escape"), - Self::SwapWithEscape => fl!("keyboard-special-char", "swap-with-escape"), - Self::PrintScreen => fl!("keyboard-special-char", "print-screen"), - Self::None => fl!("keyboard-special-char", "none"), - } - } -} - -/// The second/right value is the key identifier, which is how it will be saved to the configuration. -/// These values are different for each [SpecialKey], even for the same [SpecialKeyAlternative]. -/// The identifier starts with a prefix defined by [SpecialKey::prefixes]. -type SpecialKeyOption = (SpecialKeyAlternative, &'static str); - -/// Available options for [SpecialKey::Compose]. -static COMPOSE_OPTIONS: &[SpecialKeyOption] = &[ +static COMPOSE_OPTIONS: &[(&str, &str)] = &[ // ("Left Alt", "compose:lalt"), XXX? - (SpecialKeyAlternative::AltRight, "compose:ralt"), - (SpecialKeyAlternative::SuperLeft, "compose:lwin"), - (SpecialKeyAlternative::SuperRight, "compose:rwin"), - (SpecialKeyAlternative::MenuKey, "compose:menu"), - (SpecialKeyAlternative::CtrlRight, "compose:rctrl"), - (SpecialKeyAlternative::CapsLock, "compose:caps"), - (SpecialKeyAlternative::ScrollLock, "compose:sclk"), - (SpecialKeyAlternative::PrintScreen, "compose:prsc"), + ("Right Alt", "compose:ralt"), + ("Left Super", "compose:lwin"), + ("Right Super", "compose:rwin"), + ("Menu key", "compose:menu"), + ("Right Ctrl", "compose:rctrl"), + ("Caps Lock", "compose:caps"), + ("Scroll Lock", "compose:sclk"), + ("Print Screen", "compose:prsc"), ]; -/// Available options for [SpecialKey::AlternateCharacters]. -static ALTERNATE_CHARACTER_OPTIONS: &[SpecialKeyOption] = &[ - (SpecialKeyAlternative::AltLeft, "lv3:lalt_switch"), - (SpecialKeyAlternative::AltRight, "lv3:ralt_switch"), - (SpecialKeyAlternative::SuperLeft, "lv3:lwin_switch"), - (SpecialKeyAlternative::SuperRight, "lv3:rwin_switch"), - (SpecialKeyAlternative::MenuKey, "lv3:menu_switch"), + +static ALTERNATE_CHARACTER_OPTIONS: &[(&str, &str)] = &[ + ("Left Alt", "lv3:lalt_switch"), + ("Right Alt", "lv3:ralt_switch"), + ("Left Super", "lv3:lwin_switch"), + ("Right Super", "lv3:rwin_switch"), + ("Menu key", "lv3:menu_switch"), // ("Right Ctrl", "lv3:"), XXX - (SpecialKeyAlternative::CapsLock, "lv3:caps_switch"), + ("Caps Lock", "lv3:caps_switch"), // ("Scroll Lock", "lv3:"), XXX // ("Print Screen", "lv3"), XXX ]; -/// Available options for [SpecialKey::CapsLock]. -static CAPS_LOCK_OPTIONS: &[SpecialKeyOption] = &[ - (SpecialKeyAlternative::Escape, "caps:escape"), - (SpecialKeyAlternative::SwapWithEscape, "caps:swapescape"), - (SpecialKeyAlternative::Backspace, "caps:backspace"), - (SpecialKeyAlternative::Super, "caps:super"), - (SpecialKeyAlternative::Ctrl, "caps:ctrl_modifier"), - (SpecialKeyAlternative::SwapWithCtrl, "ctrl:swapcaps"), + +static CAPS_LOCK_OPTIONS: &[(&str, &str)] = &[ + ("Escape", "caps:escape"), + ("Swap with Escape", "caps:swapescape"), + ("Backspace", "caps:backspace"), + ("Super", "caps:super"), + ("Control", "caps:ctrl_modifier"), + ("Swap with Control", "ctrl:swapcaps"), ]; #[derive(Clone, Debug)] @@ -192,9 +146,9 @@ pub enum SpecialKey { impl SpecialKey { pub fn title(self) -> String { match self { - Self::Compose => fl!("keyboard-special-char", "compose"), - Self::AlternateCharacters => fl!("keyboard-special-char", "alternate"), - Self::CapsLock => fl!("keyboard-special-char", "caps"), + Self::Compose => "Compose".to_string(), + Self::AlternateCharacters => "Alternate Characters".to_string(), + Self::CapsLock => "Caps Lock".to_string(), } } @@ -287,7 +241,7 @@ fn input_source( } fn special_char_radio_row<'a>( - desc: String, + desc: &'a str, value: Option<&'static str>, current_value: Option<&'a str>, ) -> list::ListButton<'a, Message> { @@ -667,22 +621,14 @@ impl Page { let mut list = cosmic::widget::list_column(); if matches!(special_key, SpecialKey::CapsLock) { - list = list.add(special_char_radio_row( - SpecialKeyAlternative::CapsLock.display_text(), - None, - current, - )); + list = list.add(special_char_radio_row("Caps Lock", None, current)); } else { - list = list.add(special_char_radio_row( - SpecialKeyAlternative::None.display_text(), - None, - current, - )); + list = list.add(special_char_radio_row("None", None, current)); } list = options .iter() - .map(|(key, id)| special_char_radio_row(key.display_text(), Some(id), current)) + .map(|(desc, id)| special_char_radio_row(desc, Some(id), current)) .fold(list, ListColumn::add); widget::column::with_capacity(2) diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs index 5e6a558..70e1952 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs @@ -8,7 +8,7 @@ use cosmic::iced::keyboard::{Key, Location, Modifiers}; use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit; use cosmic::iced::platform_specific::shell::wayland::keymap; use cosmic::iced::{self, Alignment, Length}; -use cosmic::widget::{self, button, icon, list, settings, text}; +use cosmic::widget::{self, button, icon, settings, text}; use cosmic::{Apply, Element, Task, theme}; use cosmic_config::{ConfigGet, ConfigSet}; use cosmic_settings_config::shortcuts::{self, Action, Binding, Shortcuts}; @@ -652,8 +652,7 @@ impl Model { modifiers, .. }) => { - use cosmic::iced::keyboard::Key; - use cosmic::iced::keyboard::key::Named; + use cosmic::iced::keyboard::{Key, key::Named}; if matches!( key, @@ -670,8 +669,7 @@ impl Model { location, .. }) => { - use cosmic::iced::keyboard::Key; - use cosmic::iced::keyboard::key::Named; + use cosmic::iced::keyboard::{Key, key::Named}; if matches!( key, @@ -867,11 +865,13 @@ fn context_drawer<'a>( } /// Display a shortcut as a list item -fn shortcut_item( - custom: bool, - id: usize, - data: &ShortcutModel, -) -> list::ListButton<'_, ShortcutMessage> { +fn shortcut_item(custom: bool, id: usize, data: &ShortcutModel) -> Element<'_, ShortcutMessage> { + #[derive(Copy, Clone, Debug)] + enum LocalMessage { + Remove, + Show, + } + let bindings = data .bindings .iter() @@ -880,7 +880,7 @@ fn shortcut_item( .map(|(_, shortcut)| text::body(shortcut.binding.to_string()).into()) .collect::>(); - let shortcuts: Element = if bindings.is_empty() { + let shortcuts: Element = if bindings.is_empty() { text::body(fl!("disabled")).into() } else { widget::column::with_children(bindings) @@ -900,7 +900,7 @@ fn shortcut_item( .push(icon::from_name("go-next-symbolic").size(16)) .push_maybe(custom.then(|| { widget::button::icon(icon::from_name("edit-delete-symbolic")) - .on_press(ShortcutMessage::DeleteShortcut(id)) + .on_press(LocalMessage::Remove) })) .align_y(Alignment::Center) .spacing(8); @@ -909,7 +909,14 @@ fn shortcut_item( .flex_control(control) .align_items(Alignment::Center) .spacing(16) - .width(Length::Shrink) - .apply(list::button) - .on_press(ShortcutMessage::ShowShortcut(id, data.description.clone())) + .apply(widget::container) + .class(theme::Container::List) + .apply(widget::button::custom) + .class(theme::Button::Transparent) + .on_press(LocalMessage::Show) + .apply(Element::from) + .map(move |message| match message { + LocalMessage::Show => ShortcutMessage::ShowShortcut(id, data.description.clone()), + LocalMessage::Remove => ShortcutMessage::DeleteShortcut(id), + }) } diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/custom.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/custom.rs index d15f4dc..7b04dea 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/custom.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/custom.rs @@ -590,8 +590,7 @@ impl page::Page for Page { &self, core: &cosmic::Core, ) -> cosmic::iced::Subscription { - use cosmic::iced::event::listen_with; - use cosmic::iced::{self}; + use cosmic::iced::{self, event::listen_with}; cosmic::iced::Subscription::batch(vec![ if self.add_shortcut.active @@ -606,8 +605,7 @@ impl page::Page for Page { modifiers, .. }) => { - use cosmic::iced::keyboard::Key; - use cosmic::iced::keyboard::key::Named; + use cosmic::iced::keyboard::{Key, key::Named}; if matches!( key, Key::Named(Named::Super | Named::Alt | Named::Control | Named::Shift) @@ -626,8 +624,7 @@ impl page::Page for Page { location, .. }) => { - use cosmic::iced::keyboard::Key; - use cosmic::iced::keyboard::key::Named; + use cosmic::iced::keyboard::{Key, key::Named}; if matches!( key, Key::Named(Named::Super | Named::Alt | Named::Control | Named::Shift) diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/manage_windows.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/manage_windows.rs index 394f5fe..3d14669 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/manage_windows.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/manage_windows.rs @@ -2,9 +2,8 @@ // SPDX-License-Identifier: GPL-3.0-only use super::{ShortcutMessage, ShortcutModel}; -use cosmic::app::ContextDrawer; use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit; -use cosmic::{Element, Task}; +use cosmic::{Element, Task, app::ContextDrawer}; use cosmic_settings_config::shortcuts::Action; use cosmic_settings_config::shortcuts::action::ResizeDirection; use cosmic_settings_page::{self as page, Section, section}; diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs index 12b77b9..5a5b1bb 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs @@ -15,16 +15,16 @@ pub mod tiling; use cosmic::app::ContextDrawer; use cosmic::iced::Length; -use cosmic::widget::list::ListButton; -use cosmic::widget::{self, settings, text}; -use cosmic::{Apply, Element, Task}; +use cosmic::widget::{self, icon, settings, text}; +use cosmic::{Apply, Element, Task, theme}; use cosmic_config::ConfigGet; use cosmic_settings_config::Binding; use cosmic_settings_config::shortcuts::action::{ Direction, FocusDirection, Orientation, ResizeDirection, }; use cosmic_settings_config::shortcuts::{self, Action, Shortcuts}; -use cosmic_settings_page::{self as page, Section, section}; +use cosmic_settings_page::Section; +use cosmic_settings_page::{self as page, section}; use itertools::Itertools; use shortcuts::action::System as SystemAction; use slab::Slab; @@ -222,13 +222,11 @@ impl Page { self.search.localized = SecondaryMap::new(); self.search.input = String::new(); self.search_model.on_clear(); - self.modified.accessibility = 0; + self.modified.custom = 0; self.modified.manage_windows = 0; self.modified.move_windows = 0; self.modified.nav = 0; self.modified.system = 0; - self.modified.window_tiling = 0; - self.modified.custom = 0; } fn reload_search(&mut self) { @@ -410,13 +408,11 @@ impl Search { .fold( Slab::with_capacity(self.actions.len()), |mut slab, (_, action)| { - if !slab.iter().any(|(_, model)| &model.action == action) { - slab.insert(ShortcutModel::new( - &self.defaults, - &self.shortcuts, - action.clone(), - )); - } + slab.insert(ShortcutModel::new( + &self.defaults, + &self.shortcuts, + action.clone(), + )); slab }, @@ -501,18 +497,32 @@ fn shortcuts() -> Section { } /// Display a category as a list item -fn category_item(category: Category, name: &str, modified: u16) -> ListButton<'_, Message> { - crate::widget::go_next_with_item( - name, - (modified > 0).then(|| text::body(fl!("modified", count = modified)).apply(Element::from)), - Message::Category(category), - ) +fn category_item(category: Category, name: &str, modified: u16) -> Element<'_, Message> { + let icon = icon::from_name("go-next-symbolic").size(16); + + let control = if modified == 0 { + Element::from(icon) + } else { + widget::row::with_capacity(2) + .push(text::body(fl!("modified", count = modified))) + .push(icon) + .into() + }; + + settings::item::builder(name) + .control(control) + .spacing(16) + .apply(widget::container) + .class(theme::Container::List) + .apply(widget::button::custom) + .class(theme::Button::Transparent) + .width(Length::Fill) + .on_press(Message::Category(category)) + .into() } fn action_category(action: &Action) -> Option { - Some(if accessibility::actions().contains(action) { - Category::Accessibility - } else if manage_windows::actions().contains(action) { + Some(if manage_windows::actions().contains(action) { Category::ManageWindow } else if move_window::actions().contains(action) { Category::MoveWindow @@ -520,8 +530,6 @@ fn action_category(action: &Action) -> Option { Category::Nav } else if system::actions().contains(action) { Category::System - } else if tiling::actions().contains(action) { - Category::WindowTiling } else { return None; }) diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/move_window.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/move_window.rs index 15389ed..f0ca09c 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/move_window.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/move_window.rs @@ -2,9 +2,8 @@ // SPDX-License-Identifier: GPL-3.0-only // use super::{ShortcutMessage, ShortcutModel}; -use cosmic::app::ContextDrawer; use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit; -use cosmic::{Element, Task}; +use cosmic::{Element, Task, app::ContextDrawer}; use cosmic_settings_config::shortcuts::Action; use cosmic_settings_config::shortcuts::action::Direction; use cosmic_settings_page::{self as page, Section, section}; diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs index 788f147..02c2277 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs @@ -2,9 +2,8 @@ // SPDX-License-Identifier: GPL-3.0-only use super::{ShortcutMessage, ShortcutModel}; -use cosmic::app::ContextDrawer; use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit; -use cosmic::{Element, Task}; +use cosmic::{Element, Task, app::ContextDrawer}; use cosmic_settings_config::shortcuts::Action; use cosmic_settings_config::shortcuts::action::System as SystemAction; use cosmic_settings_page::{self as page, Section, section}; diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/tiling.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/tiling.rs index 1b40522..aa0717d 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/tiling.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/tiling.rs @@ -2,9 +2,8 @@ // SPDX-License-Identifier: GPL-3.0-only use super::{ShortcutMessage, ShortcutModel}; -use cosmic::app::ContextDrawer; use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit; -use cosmic::{Element, Task}; +use cosmic::{Element, Task, app::ContextDrawer}; use cosmic_settings_config::shortcuts::Action; use cosmic_settings_config::shortcuts::action::Orientation; use cosmic_settings_page::{self as page, Section, section}; diff --git a/cosmic-settings/src/pages/input/mod.rs b/cosmic-settings/src/pages/input/mod.rs index 10613dc..560f740 100644 --- a/cosmic-settings/src/pages/input/mod.rs +++ b/cosmic-settings/src/pages/input/mod.rs @@ -2,8 +2,10 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::app; -use cosmic::Task; -use cosmic::cosmic_config::{self, ConfigGet, ConfigSet}; +use cosmic::{ + Task, + cosmic_config::{self, ConfigGet, ConfigSet}, +}; use cosmic_comp_config::input::{ AccelConfig, AccelProfile, ClickMethod, InputConfig, ScrollConfig, ScrollMethod, TapButtonMap, TapConfig, diff --git a/cosmic-settings/src/pages/input/mouse.rs b/cosmic-settings/src/pages/input/mouse.rs index 849820f..a32eb57 100644 --- a/cosmic-settings/src/pages/input/mouse.rs +++ b/cosmic-settings/src/pages/input/mouse.rs @@ -5,7 +5,8 @@ use cosmic::iced::{Alignment, Length}; use cosmic::widget::{self, row, settings, text}; use cosmic::{Apply, Element}; use cosmic_comp_config::input::AccelProfile; -use cosmic_settings_page::{self as page, Section, section}; +use cosmic_settings_page::Section; +use cosmic_settings_page::{self as page, section}; use slotmap::SlotMap; use super::Message; diff --git a/cosmic-settings/src/pages/input/touchpad.rs b/cosmic-settings/src/pages/input/touchpad.rs index 29d167c..ba667ef 100644 --- a/cosmic-settings/src/pages/input/touchpad.rs +++ b/cosmic-settings/src/pages/input/touchpad.rs @@ -8,7 +8,8 @@ use cosmic::{Apply, Element}; use cosmic_comp_config::CosmicCompConfig; use cosmic_comp_config::input::{AccelProfile, ClickMethod, ScrollMethod}; use cosmic_comp_config::workspace::{WorkspaceConfig, WorkspaceLayout}; -use cosmic_settings_page::{self as page, Section, section}; +use cosmic_settings_page::Section; +use cosmic_settings_page::{self as page, section}; use slotmap::SlotMap; use tracing::error; diff --git a/cosmic-settings/src/pages/mod.rs b/cosmic-settings/src/pages/mod.rs index eaeeb82..3a148af 100644 --- a/cosmic-settings/src/pages/mod.rs +++ b/cosmic-settings/src/pages/mod.rs @@ -17,8 +17,6 @@ pub mod input; pub mod networking; #[cfg(feature = "page-power")] pub mod power; -#[cfg(feature = "page-printers")] -pub mod printers; #[cfg(feature = "page-sound")] pub mod sound; pub mod system; @@ -84,15 +82,11 @@ pub enum Message { PanelApplet(desktop::panel::applets_inner::Message), #[cfg(feature = "page-power")] Power(power::Message), - #[cfg(feature = "page-printers")] - Printers(printers::Message), #[cfg(feature = "page-region")] Region(time::region::Message), #[cfg(feature = "page-sound")] Sound(sound::Message), #[cfg(feature = "page-sound")] - SoundApplications(sound::applications::Message), - #[cfg(feature = "page-sound")] SoundDeviceProfiles(sound::device_profiles::Message), StartupApps(applications::startup_apps::Message), #[cfg(feature = "page-users")] diff --git a/cosmic-settings/src/pages/networking/backend.rs b/cosmic-settings/src/pages/networking/backend.rs deleted file mode 100644 index db0e3be..0000000 --- a/cosmic-settings/src/pages/networking/backend.rs +++ /dev/null @@ -1,1881 +0,0 @@ -// Copyright 2026 System76 -// SPDX-License-Identifier: GPL-3.0-only - -use std::collections::{BTreeMap, HashMap}; -use std::fmt; -use std::net::Ipv4Addr; -use std::path::Path; -use std::sync::Arc; -use std::time::Duration; - -use futures::channel::mpsc::{UnboundedReceiver, UnboundedSender, unbounded}; -use futures::{FutureExt, SinkExt, StreamExt}; -use nmrs::agent::{SecretAgent, SecretAgentFlags, SecretRequest, SecretResponder, SecretSetting}; -use nmrs::raw::zbus; -use nmrs::raw::zvariant::{Dict, OwnedObjectPath, OwnedValue, Str, Value}; -use nmrs::{ - ActiveConnection, ConnectType, ConnectionOptions, EapOptions, NetworkEvent, NetworkManager, - SavedConnection, SettingsSummary, WifiKeyMgmt, WifiSecurity, -}; -use secure_string::SecureString; -use tokio::sync::oneshot; - -pub type SSID = Arc; -pub type UUID = Arc; - -const NM_DEST: &str = "org.freedesktop.NetworkManager"; -const NM_PATH: &str = "/org/freedesktop/NetworkManager"; -const NM_IFACE: &str = "org.freedesktop.NetworkManager"; -const SECRET_ID: &str = "com.system76.CosmicSettings.NetworkManager"; - -#[derive(Debug)] -pub enum Error { - Message(String), -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::Message(message) => f.write_str(message), - } - } -} - -impl std::error::Error for Error {} - -impl From for Error { - fn from(value: nmrs::ConnectionError) -> Self { - Self::Message(value.to_string()) - } -} - -impl From for Error { - fn from(value: zbus::Error) -> Self { - Self::Message(value.to_string()) - } -} - -pub mod hw_address { - #[derive(Clone, PartialEq, Eq, Default, Debug, PartialOrd, Ord)] - pub struct HwAddress { - octets: Vec, - } - - impl HwAddress { - pub fn from_str(arg: &str) -> Option { - let segments: Vec<&str> = arg.split(':').collect(); - if segments.len() != 6 && segments.len() != 8 { - return None; - } - - let mut octets = Vec::with_capacity(segments.len()); - for segment in segments { - if segment.len() != 2 { - return None; - } - octets.push(u8::from_str_radix(segment, 16).ok()?); - } - - Some(Self { octets }) - } - } - - impl std::fmt::Display for HwAddress { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let hex_parts: Vec = self - .octets - .iter() - .map(|byte| format!("{byte:02x}")) - .collect(); - write!(f, "{}", hex_parts.join(":")) - } - } -} - -pub mod available_wifi { - use std::sync::Arc; - - use nmrs::raw::zvariant::OwnedObjectPath; - - use super::devices::DeviceState; - use super::hw_address::HwAddress; - - #[derive(Debug, Clone, PartialEq, Eq)] - pub struct AccessPoint { - pub ssid: Arc, - pub strength: u8, - pub state: DeviceState, - pub working: bool, - pub path: OwnedObjectPath, - pub hw_address: HwAddress, - pub secured: bool, - pub wps_push: bool, - pub network_type: NetworkType, - pub interface: Option, - pub bssid: Option, - } - - #[derive(Debug, Clone, Copy, PartialEq, Eq)] - pub enum NetworkType { - Open, - PskOrSae, - Sae, - EAP, - } -} - -pub mod current_networks { - use std::net::Ipv4Addr; - - use super::devices::ActiveConnectionState; - - #[derive(Debug, Clone, PartialEq, Eq)] - pub enum ActiveConnectionInfo { - Wired { - name: String, - hw_address: String, - speed: u32, - ip_addresses: Vec, - }, - WiFi { - name: String, - ip_addresses: Vec, - hw_address: String, - state: ActiveConnectionState, - strength: u8, - }, - Vpn { - name: String, - ip_addresses: Vec, - }, - } - - impl ActiveConnectionInfo { - pub fn name(&self) -> String { - match self { - Self::Wired { name, .. } | Self::WiFi { name, .. } | Self::Vpn { name, .. } => { - name.clone() - } - } - } - } -} - -pub mod devices { - use std::sync::Arc; - - use nmrs::raw::zvariant::OwnedObjectPath; - use nmrs::{NetworkManager, SavedConnection, SettingsSummary}; - - use super::{Error, active_connection_by_interface, owned_path, saved_matches_device}; - - #[derive(Debug, Clone, Copy, Eq, PartialEq)] - pub enum DeviceType { - Ethernet, - Wifi, - WifiP2P, - Loopback, - Bluetooth, - Vlan, - WireGuard, - Other(u32), - } - - impl From for DeviceType { - fn from(value: nmrs::DeviceType) -> Self { - match value { - nmrs::DeviceType::Ethernet => Self::Ethernet, - nmrs::DeviceType::Wifi => Self::Wifi, - nmrs::DeviceType::WifiP2P => Self::WifiP2P, - nmrs::DeviceType::Loopback => Self::Loopback, - nmrs::DeviceType::Bluetooth => Self::Bluetooth, - nmrs::DeviceType::Vlan => Self::Vlan, - nmrs::DeviceType::Other(v) => Self::Other(v), - _ => Self::Other(0), - } - } - } - - #[derive(Debug, Clone, Copy, Eq, PartialEq)] - pub enum DeviceState { - Unknown, - Unmanaged, - Unavailable, - Disconnected, - Prepare, - Config, - NeedAuth, - IpConfig, - IpCheck, - Secondaries, - Activated, - Deactivating, - Failed, - Other(u32), - } - - impl From for DeviceState { - fn from(value: nmrs::DeviceState) -> Self { - match value { - nmrs::DeviceState::Unmanaged => Self::Unmanaged, - nmrs::DeviceState::Unavailable => Self::Unavailable, - nmrs::DeviceState::Disconnected => Self::Disconnected, - nmrs::DeviceState::Prepare => Self::Prepare, - nmrs::DeviceState::Config => Self::Config, - nmrs::DeviceState::NeedAuth => Self::NeedAuth, - nmrs::DeviceState::IpConfig => Self::IpConfig, - nmrs::DeviceState::IpCheck => Self::IpCheck, - nmrs::DeviceState::Secondaries => Self::Secondaries, - nmrs::DeviceState::Activated => Self::Activated, - nmrs::DeviceState::Deactivating => Self::Deactivating, - nmrs::DeviceState::Failed => Self::Failed, - nmrs::DeviceState::Other(0) => Self::Unknown, - nmrs::DeviceState::Other(v) => Self::Other(v), - _ => Self::Unknown, - } - } - } - - #[derive(Debug, Clone, Copy, Eq, PartialEq)] - pub enum ActiveConnectionState { - Unknown, - Activating, - Activated, - Deactivating, - Deactivated, - Other(u32), - } - - impl From for ActiveConnectionState { - fn from(value: nmrs::ActiveConnectionState) -> Self { - match value { - nmrs::ActiveConnectionState::Activating => Self::Activating, - nmrs::ActiveConnectionState::Activated => Self::Activated, - nmrs::ActiveConnectionState::Deactivating => Self::Deactivating, - nmrs::ActiveConnectionState::Deactivated => Self::Deactivated, - nmrs::ActiveConnectionState::Unknown => Self::Unknown, - nmrs::ActiveConnectionState::Other(v) => Self::Other(v), - _ => Self::Unknown, - } - } - } - - #[derive(Debug, Clone, Eq, PartialEq)] - pub struct DeviceInfo { - pub path: OwnedObjectPath, - pub device_type: DeviceType, - pub interface: String, - pub state: DeviceState, - pub active_connection: Option<(DeviceConnection, ActiveConnectionState)>, - pub available_connections: Vec, - pub known_connections: Vec, - } - - #[derive(Debug, Clone, Eq, PartialEq)] - pub struct DeviceConnection { - pub path: OwnedObjectPath, - pub id: String, - pub uuid: Arc, - } - - #[derive(Debug, Clone, Eq, PartialEq)] - pub struct KnownDeviceConnection { - pub id: String, - pub uuid: Arc, - } - - pub async fn list( - nm: &NetworkManager, - device_type_filter: fn(DeviceType) -> bool, - ) -> Result, Error> { - let (devices_res, saved_res, active_res) = futures::join!( - nm.list_devices(), - nm.list_saved_connections(), - nm.list_active_connections() - ); - - let saved = saved_res?; - let active = active_res.unwrap_or_default(); - let mut out = Vec::new(); - - for device in devices_res? { - let device_type = DeviceType::from(device.device_type); - if !device_type_filter(device_type) { - continue; - } - - let Ok(path) = owned_path(&device.path) else { - continue; - }; - - let matching_saved: Vec<&SavedConnection> = saved - .iter() - .filter(|connection| { - saved_matches_device(connection, device_type, &device.interface) - }) - .collect(); - - let available_connections = matching_saved - .iter() - .map(|connection| DeviceConnection { - path: connection.path.clone(), - id: connection.id.clone(), - uuid: Arc::from(connection.uuid.as_str()), - }) - .collect(); - - let known_connections = matching_saved - .iter() - .map(|connection| KnownDeviceConnection { - id: connection.id.clone(), - uuid: Arc::from(connection.uuid.as_str()), - }) - .collect(); - - let active_connection = - active_connection_by_interface(&active, &device.interface).map(|connection| { - ( - DeviceConnection { - path: connection.path.clone(), - id: connection.id.clone(), - uuid: Arc::from(connection.uuid.as_str()), - }, - connection.state, - ) - }); - - out.push(DeviceInfo { - path, - device_type, - interface: device.interface, - state: DeviceState::from(device.state), - active_connection, - available_connections, - known_connections, - }); - } - - Ok(out) - } - - pub fn is_wifi_summary(summary: &SettingsSummary) -> bool { - matches!(summary, SettingsSummary::Wifi { .. }) - } -} - -#[derive(Debug, Clone)] -pub struct ActiveConnectionRecord { - path: OwnedObjectPath, - id: String, - uuid: String, - state: devices::ActiveConnectionState, -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct NetworkManagerState { - pub wireless_access_points: Vec, - pub active_conns: Vec, - pub known_access_points: Vec, - pub wifi_enabled: bool, - pub airplane_mode: bool, -} - -impl Default for NetworkManagerState { - fn default() -> Self { - Self { - wireless_access_points: Vec::new(), - active_conns: Vec::new(), - known_access_points: Vec::new(), - wifi_enabled: false, - airplane_mode: false, - } - } -} - -impl NetworkManagerState { - pub async fn new(nm: &NetworkManager) -> Result { - let (wifi_state, airplane_mode, active_conns, access_points, saved_connections) = futures::join!( - nm.wifi_state(), - nm.airplane_mode_state(), - nm.list_active_connections(), - nm.list_access_points(None), - nm.list_saved_connections() - ); - - let active_conns = active_conns.unwrap_or_default(); - let saved_connections = saved_connections.unwrap_or_default(); - - let mut wireless_access_points = access_points - .unwrap_or_default() - .into_iter() - .filter(|ap| !ap.ssid.is_empty() && ap.ssid != "") - .map(access_point_from_nmrs) - .fold( - BTreeMap::<(String, SSID), available_wifi::AccessPoint>::new(), - |mut acc, ap| { - let key = (ap.interface.clone().unwrap_or_default(), ap.ssid.clone()); - let replace = acc - .get(&key) - .is_none_or(|existing| existing.strength < ap.strength); - if replace { - acc.insert(key, ap); - } - acc - }, - ) - .into_values() - .collect::>(); - wireless_access_points.sort_by(|a, b| b.strength.cmp(&a.strength)); - - let active_infos = active_connection_infos(active_conns); - let saved_wifi = saved_wifi_profiles(&saved_connections); - - let mut known_access_points = Vec::new(); - for saved in saved_wifi { - let Some((ssid, network_type)) = saved_wifi_identity(saved) else { - continue; - }; - if active_infos.iter().any(|active| active.name() == ssid) { - continue; - } - if let Some(visible) = wireless_access_points - .iter() - .find(|ap| ap.ssid.as_ref() == ssid) - .cloned() - { - known_access_points.push(visible); - continue; - } - - known_access_points.push(available_wifi::AccessPoint { - ssid: Arc::from(ssid), - strength: 0, - state: devices::DeviceState::Unknown, - working: false, - path: slash_path(), - hw_address: hw_address::HwAddress::default(), - secured: !matches!(network_type, available_wifi::NetworkType::Open), - wps_push: false, - network_type, - interface: saved.interface_name.clone(), - bssid: None, - }); - } - - known_access_points.sort_by(|a, b| a.ssid.cmp(&b.ssid)); - known_access_points.dedup_by(|a, b| a.ssid == b.ssid); - - Ok(Self { - wireless_access_points, - active_conns: active_infos, - known_access_points, - wifi_enabled: wifi_state.map(|state| state.enabled).unwrap_or(false), - airplane_mode: airplane_mode - .map(|state| state.is_airplane_mode()) - .unwrap_or(false), - }) - } - - #[allow(dead_code)] - pub fn clear(&mut self) { - self.active_conns = Vec::new(); - self.known_access_points = Vec::new(); - self.wireless_access_points = Vec::new(); - } -} - -#[derive(Debug, Clone)] -pub enum Request { - Activate(OwnedObjectPath, OwnedObjectPath), - ActivateVpn(UUID), - Deactivate(UUID), - Disconnect(SSID), - Forget(SSID), - Authenticate { - ssid: String, - identity: Option, - password: SecureString, - network_type: available_wifi::NetworkType, - secret_tx: Option>, - interface: Option, - }, - GetWiFiCredentials( - SSID, - UUID, - available_wifi::NetworkType, - Option>, - ), - Reload, - Remove(UUID), - SelectAccessPoint( - SSID, - available_wifi::NetworkType, - Option>, - Option, - ), - SetAirplaneMode(bool), - SetVpnUsername { - uuid: UUID, - username: String, - }, - SetWiFi(bool), -} - -#[derive(Debug, Clone)] -pub enum Event { - RequestResponse { - req: Request, - state: NetworkManagerState, - success: bool, - }, - Init { - conn: NetworkManager, - sender: UnboundedSender, - state: NetworkManagerState, - }, - Devices, - WiFiEnabled(bool), - WirelessAccessPoints, - ActiveConns, - WiFiCredentials { - ssid: SSID, - password: Option, - security_type: available_wifi::NetworkType, - }, -} - -pub async fn watch(nm: NetworkManager, mut output: futures::channel::mpsc::Sender) { - let (request_tx, mut request_rx): (UnboundedSender, UnboundedReceiver) = - unbounded(); - - let state = NetworkManagerState::new(&nm).await.unwrap_or_default(); - if output - .send(Event::Init { - conn: nm.clone(), - sender: request_tx, - state, - }) - .await - .is_err() - { - return; - } - - let Ok(events) = nm.network_events().await else { - while let Some(req) = request_rx.next().await { - let event = request_response(&nm, req, false).await; - _ = output.send(event).await; - } - return; - }; - - let mut events = events.fuse(); - loop { - futures::select! { - req = request_rx.next().fuse() => { - let Some(req) = req else { - break; - }; - let event = handle_request(&nm, req).await; - if output.send(event).await.is_err() { - break; - } - } - event = events.next() => { - let Some(event) = event else { - break; - }; - let message = match event { - Ok(NetworkEvent::AccessPointsChanged) => Some(Event::WirelessAccessPoints), - Ok(NetworkEvent::DeviceChanged { .. } | NetworkEvent::SettingsChanged(_)) => Some(Event::Devices), - Ok(NetworkEvent::ActiveConnectionsChanged) => Some(Event::ActiveConns), - Ok(NetworkEvent::WirelessEnabledChanged) => Some(Event::WiFiEnabled( - nm.wifi_state().await.map(|state| state.enabled).unwrap_or(false), - )), - Ok(NetworkEvent::ConnectivityChanged | NetworkEvent::NetworkManagerRestarted) => Some(Event::ActiveConns), - Ok(_) => None, - Err(err) => { - tracing::error!(%err, "network event stream error"); - None - } - }; - - if let Some(message) = message - && output.send(message).await.is_err() - { - break; - } - } - } - } -} - -async fn handle_request(nm: &NetworkManager, req: Request) -> Event { - let success = match &req { - Request::Activate(device_path, connection_path) => activate_connection( - nm, - connection_path.clone(), - device_path.clone(), - slash_path(), - ) - .await - .is_ok(), - Request::ActivateVpn(uuid) => nm.connect_vpn_by_uuid(uuid).await.is_ok(), - Request::Deactivate(uuid) => deactivate_by_uuid(nm, uuid).await.is_ok(), - Request::Disconnect(ssid) => disconnect_wifi_by_ssid(nm, ssid).await.is_ok(), - Request::Forget(ssid) => nm.forget(ssid).await.is_ok(), - Request::Authenticate { - ssid, - identity, - password, - network_type, - secret_tx, - interface, - } => { - let result = authenticate_wifi( - nm, - ssid, - identity.as_deref(), - password, - *network_type, - interface.as_deref(), - ) - .await; - if let Err(err) = &result { - tracing::error!( - %err, - %ssid, - ?network_type, - ?interface, - "wifi authentication failed" - ); - } - let success = result.is_ok(); - - if success - && let Some(secret_tx) = secret_tx - && let Ok(Some(uuid)) = nm.get_saved_connection_uuid(ssid).await - { - let (applied_tx, applied_rx) = oneshot::channel(); - let (setting_name, key) = if identity.is_some() { - ("802-1x", "password") - } else { - ("802-11-wireless-security", "psk") - }; - _ = secret_tx - .send(nm_secret_agent::Request::SetSecrets { - setting_name: setting_name.to_string(), - uuid, - secrets: HashMap::from([(key.to_string(), password.clone())]), - applied_tx, - }) - .await; - _ = tokio::time::timeout(Duration::from_secs(1), applied_rx).await; - } - - success - } - Request::GetWiFiCredentials(ssid, uuid, security_type, secret_tx) => { - let password = if matches!(security_type, available_wifi::NetworkType::Open) { - None - } else if let Some(secret_tx) = secret_tx { - let (resp_tx, resp_rx) = oneshot::channel(); - let (setting_name, key) = - if matches!(security_type, available_wifi::NetworkType::EAP) { - ("802-1x", "password") - } else { - ("802-11-wireless-security", "psk") - }; - _ = secret_tx - .send(nm_secret_agent::Request::GetSecrets { - setting_name: setting_name.to_string(), - uuid: uuid.to_string(), - resp_tx, - }) - .await; - tokio::time::timeout(Duration::from_secs(10), resp_rx) - .await - .ok() - .and_then(Result::ok) - .and_then(|mut secrets| secrets.remove(key)) - } else { - None - }; - - return Event::WiFiCredentials { - ssid: ssid.clone(), - password, - security_type: *security_type, - }; - } - Request::Reload => true, - Request::Remove(uuid) => nm.delete_saved_connection(uuid).await.is_ok(), - Request::SelectAccessPoint(ssid, network_type, _secret_tx, interface) => { - let result = select_access_point(nm, ssid, *network_type, interface.as_deref()).await; - if let Err(err) = &result { - tracing::error!( - %err, - %ssid, - ?network_type, - ?interface, - "wifi access point selection failed" - ); - } - result.is_ok() - } - Request::SetAirplaneMode(enabled) => nm.set_airplane_mode(*enabled).await.is_ok(), - Request::SetVpnUsername { uuid, username } => { - let result = set_vpn_username(nm, uuid, username).await; - if let Err(err) = &result { - tracing::error!(%err, %uuid, "failed to store VPN username"); - } - result.is_ok() - } - Request::SetWiFi(enabled) => nm.set_wireless_enabled(*enabled).await.is_ok(), - }; - - request_response(nm, req, success).await -} - -/// Stores a VPN username in `vpn.data`, which is where NetworkManager and the VPN -/// plugins read it from. -/// -/// The username must not be sent through the secret agent: openvpn fails to -/// reconnect when it receives a `username` key in the VPN secrets dictionary. -async fn set_vpn_username( - nm: &NetworkManager, - uuid: &str, - username: &str, -) -> Result<(), nmrs::ConnectionError> { - let settings = nm.get_saved_connection_raw(uuid).await?; - - // The whole dict is rewritten, so the keys already in it have to be carried over. - let mut data = HashMap::::new(); - if let Some(stored) = settings.get("vpn").and_then(|vpn| vpn.get("data")) - && let Ok(dict) = Dict::try_from(stored.clone()) - { - for (key, value) in dict.iter() { - if let (Ok(key), Ok(value)) = (Str::try_from(key.clone()), Str::try_from(value.clone())) - { - data.insert(key.to_string(), value.to_string()); - } - } - } - - if data - .get("username") - .is_some_and(|stored| stored == username) - { - return Ok(()); - } - - data.insert("username".to_string(), username.to_string()); - let data = OwnedValue::try_from(Value::from(data)) - .map_err(|err| nmrs::ConnectionError::VpnFailed(err.to_string()))?; - - let mut patch = nmrs::SettingsPatch::default(); - patch.raw_overlay = Some(HashMap::from([( - "vpn".to_string(), - HashMap::from([("data".to_string(), data)]), - )])); - - nm.update_saved_connection(uuid, patch).await -} - -async fn request_response(nm: &NetworkManager, req: Request, success: bool) -> Event { - Event::RequestResponse { - req, - success, - state: NetworkManagerState::new(nm).await.unwrap_or_default(), - } -} - -async fn select_access_point( - nm: &NetworkManager, - ssid: &str, - network_type: available_wifi::NetworkType, - interface: Option<&str>, -) -> Result<(), Error> { - match network_type { - available_wifi::NetworkType::Open => { - nm.connect(ssid, interface, WifiSecurity::Open).await?; - } - available_wifi::NetworkType::PskOrSae => { - nm.connect(ssid, interface, WifiSecurity::WpaPsk { psk: String::new() }) - .await?; - } - available_wifi::NetworkType::Sae | available_wifi::NetworkType::EAP => { - let Some(saved) = find_saved_wifi(nm, ssid, interface).await? else { - return Err(Error::Message("no saved Wi-Fi connection".to_string())); - }; - let device = saved - .interface_name - .as_deref() - .or(interface) - .map(|interface| nm.get_device_by_interface(interface)) - .ok_or_else(|| { - Error::Message("no Wi-Fi interface for saved connection".to_string()) - })? - .await?; - let ap = find_access_point_path(nm, ssid, interface) - .await - .unwrap_or_else(slash_path); - activate_connection(nm, saved.path, device, ap).await?; - } - } - - Ok(()) -} - -async fn authenticate_wifi( - nm: &NetworkManager, - ssid: &str, - identity: Option<&str>, - password: &SecureString, - network_type: available_wifi::NetworkType, - interface: Option<&str>, -) -> Result<(), Error> { - match network_type { - available_wifi::NetworkType::Open => { - nm.connect(ssid, interface, WifiSecurity::Open).await? - } - available_wifi::NetworkType::PskOrSae => { - nm.connect( - ssid, - interface, - WifiSecurity::WpaPsk { - psk: password.unsecure().to_string(), - }, - ) - .await?; - } - available_wifi::NetworkType::Sae => { - connect_sae(nm, ssid, password.unsecure(), interface).await?; - } - available_wifi::NetworkType::EAP => { - nm.connect( - ssid, - interface, - WifiSecurity::WpaEap { - opts: EapOptions::new(identity.unwrap_or_default(), password.unsecure()), - }, - ) - .await?; - } - } - - Ok(()) -} - -async fn connect_sae( - nm: &NetworkManager, - ssid: &str, - password: &str, - interface: Option<&str>, -) -> Result<(), Error> { - let mut settings = nmrs::builders::WifiConnectionBuilder::new(ssid) - .wpa_psk(password) - .autoconnect(true) - .ipv4_auto() - .ipv6_auto() - .build(); - - if let Some(security) = settings.get_mut("802-11-wireless-security") { - security.insert("key-mgmt", Value::from("sae")); - security.remove("auth-alg"); - } - - let ap_path = find_access_point_path(nm, ssid, interface) - .await - .ok_or_else(|| Error::Message(format!("access point {ssid} not found")))?; - nm.add_and_activate_connection(settings, interface, Some(ap_path.as_str())) - .await?; - - Ok(()) -} - -async fn disconnect_wifi_by_ssid(nm: &NetworkManager, ssid: &str) -> Result<(), Error> { - for active in nm.list_active_connections().await? { - if let ActiveConnection::Wifi(wifi) = active - && wifi.ssid == ssid - { - return deactivate_by_uuid(nm, &wifi.uuid).await; - } - } - - Ok(()) -} - -async fn deactivate_by_uuid(nm: &NetworkManager, uuid: &str) -> Result<(), Error> { - if nm.disconnect_vpn_by_uuid(uuid).await.is_ok() { - return Ok(()); - } - - let active_path = find_active_connection_path(nm, uuid).await?; - let proxy = zbus::Proxy::new(nm.dbus_connection(), NM_DEST, NM_PATH, NM_IFACE).await?; - proxy - .call_method("DeactivateConnection", &(active_path,)) - .await?; - - Ok(()) -} - -async fn activate_connection( - nm: &NetworkManager, - connection_path: OwnedObjectPath, - device_path: OwnedObjectPath, - specific_path: OwnedObjectPath, -) -> Result<(), Error> { - let proxy = zbus::Proxy::new(nm.dbus_connection(), NM_DEST, NM_PATH, NM_IFACE).await?; - proxy - .call_method( - "ActivateConnection", - &(connection_path, device_path, specific_path), - ) - .await?; - Ok(()) -} - -async fn find_active_connection_path( - nm: &NetworkManager, - uuid: &str, -) -> Result { - let proxy = zbus::Proxy::new(nm.dbus_connection(), NM_DEST, NM_PATH, NM_IFACE).await?; - let paths: Vec = proxy.get_property("ActiveConnections").await?; - - for path in paths { - let active = zbus::Proxy::new( - nm.dbus_connection(), - NM_DEST, - path.clone(), - "org.freedesktop.NetworkManager.Connection.Active", - ) - .await?; - let active_uuid: String = active.get_property("Uuid").await?; - if active_uuid == uuid { - return Ok(path); - } - } - - Err(Error::Message(format!( - "active connection {uuid} not found" - ))) -} - -async fn find_access_point_path( - nm: &NetworkManager, - ssid: &str, - interface: Option<&str>, -) -> Option { - nm.list_access_points(interface) - .await - .ok()? - .into_iter() - .filter(|ap| ap.ssid == ssid) - .max_by_key(|ap| ap.strength) - .map(|ap| ap.path) -} - -async fn find_saved_wifi( - nm: &NetworkManager, - ssid: &str, - interface: Option<&str>, -) -> Result, Error> { - Ok(nm - .list_saved_connections() - .await? - .into_iter() - .find(|connection| { - if let Some(interface) = interface - && connection - .interface_name - .as_deref() - .is_some_and(|i| i != interface) - { - return false; - } - saved_wifi_identity(connection).is_some_and(|(saved_ssid, _)| saved_ssid == ssid) - })) -} - -pub async fn wifi_connection_settings( - nm: NetworkManager, -) -> Result, Box>, Error> { - Ok(nm - .list_saved_connections() - .await? - .into_iter() - .filter_map(|connection| { - saved_wifi_identity(&connection) - .map(|(ssid, _)| (ssid.into_boxed_str(), connection.uuid.into_boxed_str())) - }) - .collect()) -} - -pub async fn import_openvpn(path: impl AsRef) -> Result<(), Error> { - use nmrs::builders::{OpenVpnBuilder, build_openvpn_connection}; - - let nm = NetworkManager::new().await?; - let config = OpenVpnBuilder::from_ovpn_file(path)?.build()?; - let settings = build_openvpn_connection(&config, &ConnectionOptions::new(false))?; - nm.add_connection(settings).await?; - Ok(()) -} - -pub async fn import_wireguard(path: impl AsRef, name: &str) -> Result<(), Error> { - use nmrs::builders::WireGuardBuilder; - - let nm = NetworkManager::new().await?; - let config = parse_wireguard_config(path.as_ref(), name)?; - let mut builder = WireGuardBuilder::new(&config.name) - .private_key(config.private_key) - .address(config.address) - .add_peers(config.peers) - .autoconnect(false); - - if !config.dns.is_empty() { - builder = builder.dns(config.dns); - } - if let Some(mtu) = config.mtu { - builder = builder.mtu(mtu); - } - - nm.add_connection(builder.build()?).await?; - Ok(()) -} - -struct ParsedWireGuard { - name: String, - private_key: String, - address: String, - dns: Vec, - mtu: Option, - peers: Vec, -} - -fn parse_wireguard_config(path: &Path, name: &str) -> Result { - let contents = std::fs::read_to_string(path) - .map_err(|err| Error::Message(format!("failed to read {}: {err}", path.display())))?; - let mut section = ""; - let mut private_key = None; - let mut address = None; - let mut dns = Vec::new(); - let mut mtu = None; - let mut peers = Vec::new(); - let mut peer_public_key: Option = None; - let mut peer_endpoint: Option = None; - let mut peer_allowed_ips: Vec = Vec::new(); - let mut peer_preshared_key: Option = None; - let mut peer_keepalive: Option = None; - - let flush_peer = |peers: &mut Vec, - public_key: &mut Option, - endpoint: &mut Option, - allowed_ips: &mut Vec, - preshared_key: &mut Option, - keepalive: &mut Option| - -> Result<(), Error> { - if public_key.is_none() - && endpoint.is_none() - && allowed_ips.is_empty() - && preshared_key.is_none() - && keepalive.is_none() - { - return Ok(()); - } - - let public_key = public_key - .take() - .ok_or_else(|| Error::Message("WireGuard peer is missing PublicKey".to_string()))?; - let endpoint = endpoint - .take() - .ok_or_else(|| Error::Message("WireGuard peer is missing Endpoint".to_string()))?; - if allowed_ips.is_empty() { - return Err(Error::Message( - "WireGuard peer is missing AllowedIPs".to_string(), - )); - } - - let mut peer = nmrs::WireGuardPeer::new(public_key, endpoint, std::mem::take(allowed_ips)); - if let Some(psk) = preshared_key.take() { - peer = peer.with_preshared_key(psk); - } - if let Some(interval) = keepalive.take() { - peer = peer.with_persistent_keepalive(interval); - } - peers.push(peer); - Ok(()) - }; - - for raw_line in contents.lines() { - let line = raw_line - .split_once('#') - .map_or(raw_line, |(line, _)| line) - .trim(); - if line.is_empty() { - continue; - } - - if line.starts_with('[') && line.ends_with(']') { - if section.eq_ignore_ascii_case("Peer") { - flush_peer( - &mut peers, - &mut peer_public_key, - &mut peer_endpoint, - &mut peer_allowed_ips, - &mut peer_preshared_key, - &mut peer_keepalive, - )?; - } - section = &line[1..line.len() - 1]; - continue; - } - - let Some((key, value)) = line.split_once('=') else { - continue; - }; - let key = key.trim(); - let value = value.trim(); - - if section.eq_ignore_ascii_case("Interface") { - match key.to_ascii_lowercase().as_str() { - "privatekey" => private_key = Some(value.to_string()), - "address" => { - address = value - .split(',') - .map(str::trim) - .find(|value| value.contains('.')) - .or_else(|| value.split(',').map(str::trim).next()) - .map(ToOwned::to_owned); - } - "dns" => dns.extend( - value - .split(',') - .map(str::trim) - .filter(|value| !value.is_empty()) - .map(ToOwned::to_owned), - ), - "mtu" => mtu = value.parse().ok(), - _ => {} - } - } else if section.eq_ignore_ascii_case("Peer") { - match key.to_ascii_lowercase().as_str() { - "publickey" => peer_public_key = Some(value.to_string()), - "endpoint" => peer_endpoint = Some(value.to_string()), - "allowedips" => { - peer_allowed_ips.extend( - value - .split(',') - .map(str::trim) - .filter(|value| !value.is_empty()) - .map(ToOwned::to_owned), - ); - } - "presharedkey" => peer_preshared_key = Some(value.to_string()), - "persistentkeepalive" => peer_keepalive = value.parse().ok(), - _ => {} - } - } - } - - if section.eq_ignore_ascii_case("Peer") { - flush_peer( - &mut peers, - &mut peer_public_key, - &mut peer_endpoint, - &mut peer_allowed_ips, - &mut peer_preshared_key, - &mut peer_keepalive, - )?; - } - - Ok(ParsedWireGuard { - name: name.to_string(), - private_key: private_key - .ok_or_else(|| Error::Message("WireGuard config is missing PrivateKey".to_string()))?, - address: address - .ok_or_else(|| Error::Message("WireGuard config is missing Address".to_string()))?, - dns, - mtu, - peers, - }) -} - -fn active_connection_infos( - active: Vec, -) -> Vec { - let mut infos = active - .into_iter() - .filter_map(|connection| match connection { - ActiveConnection::Wired(wired) => Some(current_networks::ActiveConnectionInfo::Wired { - name: wired.id, - hw_address: wired.hw_address.unwrap_or_default(), - speed: wired.speed_mbps.unwrap_or_default(), - ip_addresses: parse_ipv4_list([wired.ip4_address]), - }), - ActiveConnection::Wifi(wifi) => Some(current_networks::ActiveConnectionInfo::WiFi { - name: wifi.ssid, - ip_addresses: parse_ipv4_list([wifi.ip4_address]), - hw_address: wifi.bssid.unwrap_or_default(), - state: devices::ActiveConnectionState::from(wifi.state), - strength: wifi.strength.unwrap_or_default(), - }), - ActiveConnection::Vpn(vpn) => Some(current_networks::ActiveConnectionInfo::Vpn { - name: vpn.id, - ip_addresses: parse_ipv4_list([vpn.ip4_address]), - }), - ActiveConnection::Other(_) => None, - _ => None, - }) - .collect::>(); - - infos.sort_by(|a, b| { - let helper = |conn: ¤t_networks::ActiveConnectionInfo| match conn { - current_networks::ActiveConnectionInfo::Vpn { name, .. } => format!("0{name}"), - current_networks::ActiveConnectionInfo::Wired { name, .. } => format!("1{name}"), - current_networks::ActiveConnectionInfo::WiFi { name, .. } => format!("2{name}"), - }; - helper(a).cmp(&helper(b)) - }); - - infos -} - -fn access_point_from_nmrs(ap: nmrs::AccessPoint) -> available_wifi::AccessPoint { - let network_type = match ap.security.preferred_connect_type() { - ConnectType::Open | ConnectType::Owe => available_wifi::NetworkType::Open, - ConnectType::Eap => available_wifi::NetworkType::EAP, - ConnectType::Psk => available_wifi::NetworkType::PskOrSae, - ConnectType::Sae => available_wifi::NetworkType::Sae, - _ => available_wifi::NetworkType::PskOrSae, - }; - - available_wifi::AccessPoint { - ssid: Arc::from(ap.ssid.as_str()), - strength: ap.strength, - state: devices::DeviceState::from(ap.device_state), - working: false, - path: ap.path, - hw_address: hw_address::HwAddress::from_str(&ap.bssid).unwrap_or_default(), - secured: !ap.security.is_open(), - wps_push: ap.security.wps, - network_type, - interface: Some(ap.interface), - bssid: Some(ap.bssid), - } -} - -fn saved_wifi_profiles(saved: &[SavedConnection]) -> impl Iterator { - saved.iter().filter(|connection| { - connection.connection_type == "802-11-wireless" - && matches!(connection.summary, SettingsSummary::Wifi { .. }) - }) -} - -fn saved_wifi_identity(saved: &SavedConnection) -> Option<(String, available_wifi::NetworkType)> { - let SettingsSummary::Wifi { ssid, security, .. } = &saved.summary else { - return None; - }; - if ssid.is_empty() { - return None; - } - - let network_type = match security.as_ref().map(|s| s.key_mgmt) { - None | Some(WifiKeyMgmt::None | WifiKeyMgmt::Owe | WifiKeyMgmt::OweTransitionMode) => { - available_wifi::NetworkType::Open - } - Some(WifiKeyMgmt::WpaEap) => available_wifi::NetworkType::EAP, - Some(WifiKeyMgmt::Wep | WifiKeyMgmt::WpaPsk) => available_wifi::NetworkType::PskOrSae, - Some(WifiKeyMgmt::Sae) => available_wifi::NetworkType::Sae, - Some(_) => available_wifi::NetworkType::PskOrSae, - }; - - Some((ssid.clone(), network_type)) -} - -fn saved_matches_device( - connection: &SavedConnection, - device_type: devices::DeviceType, - interface: &str, -) -> bool { - let type_matches = match device_type { - devices::DeviceType::Ethernet => connection.connection_type == "802-3-ethernet", - devices::DeviceType::Wifi => connection.connection_type == "802-11-wireless", - devices::DeviceType::WireGuard => connection.connection_type == "wireguard", - _ => false, - }; - - type_matches - && connection - .interface_name - .as_deref() - .is_none_or(|name| name == interface) -} - -fn active_connection_by_interface( - active: &[ActiveConnection], - interface: &str, -) -> Option { - for connection in active { - match connection { - ActiveConnection::Wired(wired) if wired.interface.as_deref() == Some(interface) => { - return Some(ActiveConnectionRecord { - path: slash_path(), - id: wired.id.clone(), - uuid: wired.uuid.clone(), - state: devices::ActiveConnectionState::from(wired.state), - }); - } - ActiveConnection::Wifi(wifi) if wifi.interface.as_deref() == Some(interface) => { - return Some(ActiveConnectionRecord { - path: slash_path(), - id: wifi.id.clone(), - uuid: wifi.uuid.clone(), - state: devices::ActiveConnectionState::from(wifi.state), - }); - } - ActiveConnection::Vpn(vpn) if vpn.interface.as_deref() == Some(interface) => { - return Some(ActiveConnectionRecord { - path: slash_path(), - id: vpn.id.clone(), - uuid: vpn.uuid.clone(), - state: devices::ActiveConnectionState::from(vpn.state), - }); - } - _ => {} - } - } - - None -} - -fn parse_ipv4_list(addresses: impl IntoIterator>) -> Vec { - addresses - .into_iter() - .flatten() - .filter_map(|address| { - address - .split_once('/') - .map_or(address.as_str(), |(address, _)| address) - .parse() - .ok() - }) - .collect() -} - -fn slash_path() -> OwnedObjectPath { - OwnedObjectPath::try_from("/").expect("slash is a valid object path") -} - -fn owned_path(path: &str) -> Result { - OwnedObjectPath::try_from(path) - .map_err(|err| Error::Message(format!("invalid object path {path}: {err}"))) -} - -pub mod nm_secret_agent { - use super::*; - - pub type SecretSender = - Arc>>>; - - #[derive(Debug, Clone, Copy, Eq, PartialEq)] - pub enum PasswordFlag { - None = 0, - AgentOwned = 1, - NotSaved = 2, - NotRequired = 4, - } - - #[derive(Clone, Debug)] - pub struct Error(pub String); - - impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(&self.0) - } - } - - impl std::error::Error for Error {} - - #[derive(Debug, Clone)] - pub enum Event { - RequestSecret { - uuid: String, - name: String, - description: Option, - previous: SecureString, - tx: SecretSender, - }, - CancelGetSecrets { - uuid: String, - name: String, - }, - Failed(Error), - } - - #[derive(Debug)] - pub enum Request { - SetSecrets { - setting_name: String, - uuid: String, - secrets: HashMap, - applied_tx: oneshot::Sender<()>, - }, - GetSecrets { - setting_name: String, - uuid: String, - resp_tx: oneshot::Sender>, - }, - } - - pub fn secret_agent_stream( - identifier: impl AsRef, - rx: tokio::sync::mpsc::Receiver, - ) -> impl futures::Stream { - let identifier = identifier.as_ref().to_string(); - cosmic::iced::stream::channel( - 4, - move |mut msg_tx: futures::channel::mpsc::Sender| async move { - if let Err(error) = secret_agent_stream_impl(&identifier, msg_tx.clone(), rx).await - { - _ = msg_tx.send(Event::Failed(error)).await; - } - }, - ) - } - - async fn secret_agent_stream_impl( - identifier: &str, - mut msg_tx: futures::channel::mpsc::Sender, - mut rx: tokio::sync::mpsc::Receiver, - ) -> Result<(), Error> { - unlock_collection().await?; - - let (_handle, mut requests) = SecretAgent::builder() - .with_identifier(identifier) - .register() - .await - .map_err(|err| Error(err.to_string()))?; - - loop { - futures::select! { - request = rx.recv().fuse() => { - let Some(request) = request else { - break; - }; - handle_control_request(request).await?; - } - request = requests.next().fuse() => { - let Some(request) = request else { - break; - }; - handle_secret_request(&mut msg_tx, request).await?; - } - } - } - - Ok(()) - } - - async fn handle_control_request(request: Request) -> Result<(), Error> { - match request { - Request::SetSecrets { - setting_name, - uuid, - secrets, - applied_tx, - } => { - if secrets.is_empty() { - delete_secrets(&uuid).await?; - } else { - store_secrets(&uuid, &setting_name, &secrets).await?; - } - _ = applied_tx.send(()); - } - Request::GetSecrets { - setting_name, - uuid, - resp_tx, - } => { - let secrets = get_secrets(&uuid, &setting_name).await?; - _ = resp_tx.send(secrets); - } - } - - Ok(()) - } - - async fn handle_secret_request( - msg_tx: &mut futures::channel::mpsc::Sender, - request: SecretRequest, - ) -> Result<(), Error> { - let setting_name = setting_name(&request.setting); - if !request.flags.contains(SecretAgentFlags::REQUEST_NEW) { - let stored = get_secrets(&request.connection_uuid, setting_name).await?; - if !stored.is_empty() { - return respond_with_stored(request, stored).await; - } - } - - if !request - .flags - .intersects(SecretAgentFlags::ALLOW_INTERACTION | SecretAgentFlags::REQUEST_NEW) - { - request - .responder - .no_secrets() - .await - .map_err(|err| Error(err.to_string()))?; - return Ok(()); - } - - let (tx, rx) = oneshot::channel(); - let tx = Arc::new(tokio::sync::Mutex::new(Some(tx))); - let description = match &request.setting { - SecretSetting::WifiPsk { ssid } => Some(ssid.clone()), - SecretSetting::WifiEap { identity, method } => Some( - format!( - "{} {}", - identity.clone().unwrap_or_default(), - method.clone().unwrap_or_default() - ) - .trim() - .to_string(), - ), - SecretSetting::Vpn { - service_type, - user_name, - } => Some(user_name.clone().unwrap_or_else(|| service_type.clone())), - SecretSetting::Other(setting) => Some(setting.clone()), - _ => None, - } - .filter(|value| !value.is_empty()); - - let event_name = match &request.setting { - SecretSetting::WifiPsk { .. } | SecretSetting::WifiEap { .. } => { - request.connection_uuid.clone() - } - _ => request.connection_id.clone(), - }; - - let response_kind = ResponseKind::from(&request); - let uuid = request.connection_uuid.clone(); - msg_tx - .send(Event::RequestSecret { - uuid: uuid.clone(), - name: event_name, - description, - previous: SecureString::from(""), - tx, - }) - .await - .map_err(|err| Error(err.to_string()))?; - - match rx.await { - Ok(secret) => { - let mut stored = HashMap::new(); - let key = response_kind.key(); - stored.insert(key.to_string(), secret.clone()); - store_secrets(&uuid, setting_name, &stored).await?; - response_kind.respond(request.responder, secret).await?; - } - Err(_) => { - request - .responder - .cancel() - .await - .map_err(|err| Error(err.to_string()))?; - } - } - - Ok(()) - } - - enum ResponseKind { - WifiPsk, - WifiEap { identity: Option }, - Vpn { key: String }, - Raw { setting_name: String, key: String }, - } - - impl ResponseKind { - fn from(request: &SecretRequest) -> Self { - match &request.setting { - SecretSetting::WifiPsk { .. } => Self::WifiPsk, - SecretSetting::WifiEap { identity, .. } => Self::WifiEap { - identity: identity.clone(), - }, - SecretSetting::Vpn { .. } => Self::Vpn { - key: request - .hints - .iter() - .find(|hint| !hint.contains(':')) - .cloned() - .unwrap_or_else(|| "password".to_string()), - }, - SecretSetting::Other(setting_name) => Self::Raw { - setting_name: setting_name.clone(), - key: request - .hints - .first() - .cloned() - .unwrap_or_else(|| "password".to_string()), - }, - _ => Self::Raw { - setting_name: setting_name(&request.setting).to_string(), - key: "password".to_string(), - }, - } - } - - fn key(&self) -> &str { - match self { - Self::WifiPsk => "psk", - Self::WifiEap { .. } => "password", - Self::Vpn { key } | Self::Raw { key, .. } => key.as_str(), - } - } - - async fn respond( - self, - responder: SecretResponder, - secret: SecureString, - ) -> Result<(), Error> { - match self { - Self::WifiPsk => responder - .wifi_psk(secret.unsecure().to_string()) - .await - .map_err(|err| Error(err.to_string())), - Self::WifiEap { identity } => responder - .wifi_eap(identity, secret.unsecure().to_string()) - .await - .map_err(|err| Error(err.to_string())), - Self::Vpn { key } => responder - .vpn_secrets(HashMap::from([(key, secret.unsecure().to_string())])) - .await - .map_err(|err| Error(err.to_string())), - Self::Raw { setting_name, key } => { - let mut inner = HashMap::new(); - inner.insert( - key, - OwnedValue::from(Str::from(secret.unsecure().to_string())), - ); - responder - .raw(setting_name, inner) - .await - .map_err(|err| Error(err.to_string())) - } - } - } - } - - async fn respond_with_stored( - request: SecretRequest, - stored: HashMap, - ) -> Result<(), Error> { - match &request.setting { - SecretSetting::WifiPsk { .. } => { - if let Some(psk) = stored.get("psk") { - request - .responder - .wifi_psk(psk.unsecure().to_string()) - .await - .map_err(|err| Error(err.to_string()))?; - } else { - request - .responder - .no_secrets() - .await - .map_err(|err| Error(err.to_string()))?; - } - } - SecretSetting::WifiEap { identity, .. } => { - if let Some(password) = stored.get("password") { - request - .responder - .wifi_eap(identity.clone(), password.unsecure().to_string()) - .await - .map_err(|err| Error(err.to_string()))?; - } else { - request - .responder - .no_secrets() - .await - .map_err(|err| Error(err.to_string()))?; - } - } - SecretSetting::Vpn { .. } => { - // Earlier versions stored the username next to the password. openvpn - // fails to reconnect when one is present in the secrets dictionary, so - // profiles saved by those versions have to be filtered on read too. - let secrets: HashMap = stored - .into_iter() - .filter(|(key, _)| key != "username") - .map(|(key, value)| (key, value.unsecure().to_string())) - .collect(); - - if secrets.is_empty() { - request - .responder - .no_secrets() - .await - .map_err(|err| Error(err.to_string()))?; - } else { - request - .responder - .vpn_secrets(secrets) - .await - .map_err(|err| Error(err.to_string()))?; - } - } - _ => { - let setting_name = setting_name(&request.setting).to_string(); - let inner = stored - .into_iter() - .map(|(key, value)| { - ( - key, - OwnedValue::from(Str::from(value.unsecure().to_string())), - ) - }) - .collect(); - request - .responder - .raw(setting_name, inner) - .await - .map_err(|err| Error(err.to_string()))?; - } - } - - Ok(()) - } - - fn setting_name(setting: &SecretSetting) -> &'static str { - match setting { - SecretSetting::WifiPsk { .. } => "802-11-wireless-security", - SecretSetting::WifiEap { .. } => "802-1x", - SecretSetting::Vpn { .. } => "vpn", - SecretSetting::Gsm => "gsm", - SecretSetting::Cdma => "cdma", - SecretSetting::Pppoe => "pppoe", - SecretSetting::Other(_) => "connection", - _ => "connection", - } - } - - async fn unlock_collection() -> Result<(), Error> { - let ss = secret_service::SecretService::connect(secret_service::EncryptionType::Dh) - .await - .map_err(|err| Error(err.to_string()))?; - let collection = ss - .get_default_collection() - .await - .map_err(|err| Error(err.to_string()))?; - if collection - .is_locked() - .await - .map_err(|err| Error(err.to_string()))? - { - collection - .unlock() - .await - .map_err(|err| Error(err.to_string()))?; - } - Ok(()) - } - - async fn store_secrets( - uuid: &str, - setting_name: &str, - secrets: &HashMap, - ) -> Result<(), Error> { - let ss = secret_service::SecretService::connect(secret_service::EncryptionType::Dh) - .await - .map_err(|err| Error(err.to_string()))?; - let collection = ss - .get_default_collection() - .await - .map_err(|err| Error(err.to_string()))?; - - for (name, secret) in secrets { - let mut attributes = HashMap::new(); - attributes.insert("application", SECRET_ID); - attributes.insert("uuid", uuid); - attributes.insert("setting_name", setting_name); - attributes.insert("name", name.as_str()); - collection - .create_item( - "NetworkManager Secret", - attributes, - secret.unsecure().as_bytes(), - true, - "text/plain", - ) - .await - .map_err(|err| Error(err.to_string()))?; - } - - Ok(()) - } - - async fn get_secrets( - uuid: &str, - setting_name: &str, - ) -> Result, Error> { - let ss = secret_service::SecretService::connect(secret_service::EncryptionType::Dh) - .await - .map_err(|err| Error(err.to_string()))?; - let collection = ss - .get_default_collection() - .await - .map_err(|err| Error(err.to_string()))?; - let mut attributes = HashMap::new(); - attributes.insert("application", SECRET_ID); - attributes.insert("uuid", uuid); - attributes.insert("setting_name", setting_name); - - let search_items = collection - .search_items(attributes) - .await - .map_err(|err| Error(err.to_string()))?; - let mut secrets = HashMap::new(); - for item in &search_items { - let name = item - .get_attributes() - .await - .map_err(|err| Error(err.to_string()))? - .get("name") - .cloned() - .unwrap_or_else(|| "unknown".to_string()); - let secret = item - .get_secret() - .await - .map_err(|err| Error(err.to_string()))?; - let secret = String::from_utf8(secret).map_err(|err| Error(err.to_string()))?; - secrets.insert(name, SecureString::from(secret)); - } - Ok(secrets) - } - - async fn delete_secrets(uuid: &str) -> Result<(), Error> { - let ss = secret_service::SecretService::connect(secret_service::EncryptionType::Dh) - .await - .map_err(|err| Error(err.to_string()))?; - let collection = ss - .get_default_collection() - .await - .map_err(|err| Error(err.to_string()))?; - let mut attributes = HashMap::new(); - attributes.insert("application", SECRET_ID); - attributes.insert("uuid", uuid); - - let search_items = collection - .search_items(attributes) - .await - .map_err(|err| Error(err.to_string()))?; - for item in &search_items { - item.delete().await.map_err(|err| Error(err.to_string()))?; - } - Ok(()) - } -} diff --git a/cosmic-settings/src/pages/networking/mod.rs b/cosmic-settings/src/pages/networking/mod.rs index 84748ce..8382e38 100644 --- a/cosmic-settings/src/pages/networking/mod.rs +++ b/cosmic-settings/src/pages/networking/mod.rs @@ -1,24 +1,24 @@ // Copyright 2024 System76 // SPDX-License-Identifier: GPL-3.0-only -pub mod backend; pub mod vpn; pub mod wifi; pub mod wired; -use std::process::Stdio; -use std::sync::Arc; +use std::{ffi::OsStr, process::Stdio, sync::Arc}; use anyhow::Context; use cosmic::{Apply, Element, Task, widget}; +use cosmic_dbus_networkmanager::{ + interface::enums::{DeviceState, DeviceType}, + nm::NetworkManager, +}; +use cosmic_settings_network_manager_subscription as network_manager; use cosmic_settings_page::{self as page, Section, section}; use futures::{SinkExt, StreamExt}; use secure_string::SecureString; use slotmap::SlotMap; -use self::backend as network_manager; -use self::backend::devices::{DeviceState, DeviceType}; - pub type SecretSender = Arc>>>; static NM_CONNECTION_EDITOR: &str = "nm-connection-editor"; @@ -37,8 +37,8 @@ pub struct Page { pub enum Message { /// An error occurred. Error(String), - /// Successfully connected to NetworkManager. - NetworkManagerConnect(nmrs::NetworkManager), + /// Successfully connected to the system dbus. + NetworkManagerConnect(zbus::Connection), /// Open the wifi settings page with the selected device. OpenPage { page: page::Entity, @@ -143,7 +143,6 @@ impl page::Page for Page { fl!("network-device-state", "unavailable") } DeviceState::Unknown => fl!("network-device-state", "unknown"), - DeviceState::Other(_) => fl!("network-device-state", "unknown"), DeviceState::Unmanaged => fl!("network-device-state", "unmanaged"), }, "preferences-wireless-symbolic", @@ -191,7 +190,6 @@ impl page::Page for Page { fl!("network-device-state", "unplugged") } DeviceState::Unknown => fl!("network-device-state", "unknown"), - DeviceState::Other(_) => fl!("network-device-state", "unknown"), DeviceState::Unmanaged => fl!("network-device-state", "unmanaged"), }, "preferences-wired-symbolic", @@ -227,9 +225,9 @@ impl page::Page for Page { fn on_enter(&mut self) -> cosmic::Task { if self.nm_task.is_none() { return cosmic::Task::future(async move { - nmrs::NetworkManager::new() + zbus::Connection::system() .await - .context("failed to connect to NetworkManager") + .context("failed to create system dbus connection") .map_or_else( |why| Message::Error(why.to_string()), Message::NetworkManagerConnect, @@ -312,47 +310,33 @@ impl Page { Task::none() } - fn connect(&mut self, nm: nmrs::NetworkManager) -> Task { + fn connect(&mut self, conn: zbus::Connection) -> Task { if self.nm_task.is_none() { let (canceller, task) = crate::utils::forward_event_loop(move |mut sender| async move { - match network_manager::devices::list(&nm, |_| true).await { - Ok(devices) => { - _ = sender - .send(crate::pages::Message::Networking(Message::UpdateDevices( - devices.into_iter().map(Arc::new).collect(), - ))) - .await; - } + let network_manager = match NetworkManager::new(&conn).await { + Ok(n) => n, Err(why) => { - _ = sender - .send(crate::pages::Message::Networking(Message::Error( - why.to_string(), - ))) - .await; - } - } + tracing::error!( + why = why.to_string(), + "failed to connect to network_manager" + ); - let Ok(events) = nm.network_events().await else { - return futures::future::pending().await; + return futures::future::pending().await; + } }; - let devices_changed = events.filter_map(|event| async { - match event { - Ok(nmrs::NetworkEvent::DeviceChanged { .. }) - | Ok(nmrs::NetworkEvent::SettingsChanged(_)) - | Ok(nmrs::NetworkEvent::NetworkManagerRestarted) => { - match network_manager::devices::list(&nm, |_| true).await { - Ok(devices) => Some(Message::UpdateDevices( + + let mut devices_changed = + std::pin::pin!(network_manager.receive_devices_changed().await.then( + |_| async { + match network_manager::devices::list(&conn, |_| true).await { + Ok(devices) => Message::UpdateDevices( devices.into_iter().map(Arc::new).collect(), - )), - Err(why) => Some(Message::Error(why.to_string())), + ), + Err(why) => Message::Error(why.to_string()), } } - Ok(_) => None, - Err(why) => Some(Message::Error(why.to_string())), - } - }); - futures::pin_mut!(devices_changed); + )); while let Some(message) = devices_changed.next().await { _ = sender @@ -369,6 +353,16 @@ impl Page { } } +async fn nm_add_vpn_file>(type_: &str, path: P) -> Result<(), String> { + tokio::process::Command::new("nmcli") + .args(["connection", "import", "type", type_, "file"]) + .arg(path) + .stderr(Stdio::piped()) + .output() + .await + .apply(crate::utils::map_stderr_output) +} + async fn nm_add_wired() -> Result<(), String> { nm_connection_editor(&["--type=802-3-ethernet", "-c"]).await } diff --git a/cosmic-settings/src/pages/networking/vpn/mod.rs b/cosmic-settings/src/pages/networking/vpn/mod.rs index 7323d84..651022e 100644 --- a/cosmic-settings/src/pages/networking/vpn/mod.rs +++ b/cosmic-settings/src/pages/networking/vpn/mod.rs @@ -1,27 +1,30 @@ // Copyright 2024 System76 // SPDX-License-Identifier: GPL-3.0-only +pub mod nmcli; + use std::collections::HashMap; use std::sync::{Arc, LazyLock}; use anyhow::Context; use cosmic::dialog::file_chooser::FileFilter; -use cosmic::iced::core::text::Wrapping; -use cosmic::iced::{Alignment, Length}; -use cosmic::widget::space::horizontal as horizontal_space; -use cosmic::widget::text_input::focus; -use cosmic::widget::{self, icon}; -use cosmic::{Apply, Element, Task, task}; +use cosmic::task; +use cosmic::{ + Apply, Element, Task, + iced::core::text::Wrapping, + iced::{Alignment, Length}, + widget::{self, icon, space::horizontal as horizontal_space, text_input::focus}, +}; +use cosmic_settings_network_manager_subscription::nm_secret_agent::{self, PasswordFlag}; +use cosmic_settings_network_manager_subscription::{ + self as network_manager, NetworkManagerState, UUID, current_networks::ActiveConnectionInfo, +}; use cosmic_settings_page::{self as page, Section, section}; use futures::{FutureExt, SinkExt, StreamExt}; use indexmap::IndexMap; use secure_string::SecureString; use tokio::sync::Mutex; -use super::backend as network_manager; -use super::backend::current_networks::ActiveConnectionInfo; -use super::backend::nm_secret_agent::{self, PasswordFlag}; -use super::backend::{NetworkManagerState, UUID}; use crate::pages::networking::SecretSender; pub static SECURE_INPUT_VPN: LazyLock = LazyLock::new(widget::Id::unique); @@ -57,8 +60,8 @@ pub enum Message { NetworkManager(network_manager::Event), /// An update from the secret agent SecretAgent(network_manager::nm_secret_agent::Event), - /// Successfully connected to NetworkManager. - NetworkManagerConnect(nmrs::NetworkManager), + /// Successfully connected to the system dbus. + NetworkManagerConnect(zbus::Connection), /// Updates the password text input PasswordUpdate(SecureString), /// Refresh devices and their connection profiles @@ -92,7 +95,6 @@ pub enum ErrorKind { ConnectionEditor, ConnectionSettings, DbusConnection, - OpenVpnConfigPath, UpdatingState, WireGuardConfigPath, WireGuardDevice, @@ -107,7 +109,6 @@ impl ErrorKind { ErrorKind::ConnectionEditor => fl!("vpn-error", "connection-editor"), ErrorKind::ConnectionSettings => fl!("vpn-error", "connection-settings"), ErrorKind::DbusConnection => fl!("dbus-connection-error"), - ErrorKind::OpenVpnConfigPath => fl!("vpn-error", "openvpn-config-path"), ErrorKind::UpdatingState => fl!("vpn-error", "updating-state"), ErrorKind::WireGuardConfigPath => fl!("vpn-error", "wireguard-config-path"), ErrorKind::WireGuardDevice => fl!("vpn-error", "wireguard-device"), @@ -178,7 +179,7 @@ pub enum VpnDialog { #[derive(Debug)] pub struct NmState { - conn: nmrs::NetworkManager, + conn: zbus::Connection, sender: futures::channel::mpsc::UnboundedSender, active_conns: Vec, devices: Vec, @@ -368,22 +369,20 @@ impl page::Page for Page { let (tx, rx) = tokio::sync::mpsc::channel(4); self.secret_tx = Some(tx); if self.nm_task.is_none() { - return cosmic::Task::batch([ - cosmic::task::future(async move { - nmrs::NetworkManager::new() - .await - .context("failed to connect to NetworkManager") - .map_or_else( - |why| Message::Error(ErrorKind::DbusConnection, why.to_string()), - Message::NetworkManagerConnect, - ) - }), - cosmic::Task::stream(nm_secret_agent::secret_agent_stream( - "com.system76.CosmicSettings.VPN.NetworkManager.SecretAgent", - rx, - )) - .map(|m| crate::pages::Message::Vpn(Message::SecretAgent(m))), - ]); + return cosmic::Task::batch([cosmic::task::future(async move { + zbus::Connection::system() + .await + .context("failed to create system dbus connection") + .map_or_else( + |why| Message::Error(ErrorKind::DbusConnection, why.to_string()), + Message::NetworkManagerConnect, + ) + }), + cosmic::Task::stream( + cosmic_settings_network_manager_subscription::nm_secret_agent::secret_agent_stream("com.system76.CosmicSettings.VPN.NetworkManager.SecretAgent", rx), + ) + .map(|m| crate::pages::Message::Vpn(Message::SecretAgent(m))), + ]); } cosmic::Task::none() @@ -429,19 +428,7 @@ impl Page { } } Message::KnownConnections(connections) => { - let mut connections: Vec<_> = connections.into_iter().collect(); - connections.sort_by(|a, b| { - let name_a = match &a.1 { - ConnectionSettings::Vpn(s) => s.id.as_str(), - ConnectionSettings::Wireguard { id } => id.as_str(), - }; - let name_b = match &b.1 { - ConnectionSettings::Vpn(s) => s.id.as_str(), - ConnectionSettings::Wireguard { id } => id.as_str(), - }; - name_a.to_lowercase().cmp(&name_b.to_lowercase()) - }); - self.known_connections = connections.into_iter().collect(); + self.known_connections = connections; } Message::UpdateDevices(devices) => { self.update_devices(devices); @@ -494,8 +481,9 @@ impl Page { Message::WireGuardConfig => { if let Some(VpnDialog::WireGuardName(device, filename, path)) = self.dialog.take() { return cosmic::task::future(async move { - let _ = filename; - match network_manager::import_wireguard(path, &device).await { + let new_path = path.replace(&filename, &device); + _ = std::fs::rename(&path, &new_path); + match super::nm_add_vpn_file("wireguard", new_path).await { Ok(_) => Message::Refresh, Err(why) => Message::Error(ErrorKind::Config, why.to_string()), } @@ -508,12 +496,18 @@ impl Page { if let Some(settings) = self.known_connections.get(&uuid) { let settings = match settings { ConnectionSettings::Vpn(settings) => settings, - ConnectionSettings::Wireguard { .. } => { - if let Some(NmState { ref sender, .. }) = self.nm_state { - _ = sender - .unbounded_send(network_manager::Request::ActivateVpn(uuid)); - } - return Task::none(); + ConnectionSettings::Wireguard { id } => { + let connection_name = id.clone(); + return cosmic::task::future(async move { + if let Err(why) = nmcli::connect(&connection_name).await { + return Message::Error( + ErrorKind::Connect, + format!("failed to connect to WireGuard VPN: {why}"), + ); + } + + Message::Refresh + }); } }; @@ -533,10 +527,28 @@ impl Page { return task::message(Message::FocusSecureInput); } _ => { - if let Some(NmState { ref sender, .. }) = self.nm_state { - _ = sender - .unbounded_send(network_manager::Request::ActivateVpn(uuid)); - } + let connection_name = settings.id.clone(); + let username = settings.username.clone(); + return cosmic::task::future(async move { + if let Err(why) = nmcli::connect(&connection_name).await { + return Message::VpnDialogError(VpnDialog::Password { + error: Some(( + ErrorKind::Connect, + format!("failed to connect to VPN: {why}"), + )), + id: connection_name.clone(), + uuid, + username: username.clone(), + description: None, + password: SecureString::from(""), + password_hidden: true, + // TODO grab from the current dialog + tx: Arc::new(Mutex::new(None)), + }); + } + + Message::Refresh + }); } } } @@ -603,65 +615,89 @@ impl Page { }; if let VpnDialog::Password { - id: _, + id, uuid, username, password, tx, .. } = dialog - && let Some(NmState { ref sender, .. }) = self.nm_state { - let username = username.clone().unwrap_or_default(); + let username_unwrapped = username.clone().unwrap_or_default(); + let task = self.activate_with_password( + id.clone(), + uuid.clone(), + username_unwrapped.clone(), + password.clone(), + ); let sec_tx = self.secret_tx.clone(); - let nm_sender = sender.clone(); - return Task::future(async move { - let mut guard = tx.lock().await; - if let Some(sender) = guard.take() { - let _ = sender.send(password); - } else { - if let Some(sec_tx) = sec_tx { - let (applied_tx, applied_rx) = tokio::sync::oneshot::channel(); - if let Err(err) = sec_tx - .send(nm_secret_agent::Request::SetSecrets { - setting_name: "vpn".to_string(), - uuid: uuid.to_string(), - secrets: HashMap::from_iter([( - "password".to_string(), + return task + .then(move |_| { + let sec_tx = sec_tx.clone(); + let uuid = uuid.clone(); + let username = username.clone(); + let password = password.clone(); + let tx = tx.clone(); + let id = id.clone(); + Task::future(async move { + let mut guard = tx.lock().await; + if let Some(sender) = guard.take() { + let _ = sender.send(password); + } else { + // apply password and username then + if let Some(sec_tx) = sec_tx { + let (applied_tx, applied_rx) = + tokio::sync::oneshot::channel(); + if let Err(err) = sec_tx + .send(nm_secret_agent::Request::SetSecrets { + setting_name: "vpn".to_string(), + uuid: uuid.to_string(), + secrets: HashMap::from_iter([ + // username and password + ( + "username".to_string(), + username.clone().unwrap_or_default().into(), + ), + ("password".to_string(), password.clone()), + ]), + applied_tx, + }) + .await + { + tracing::error!(%err, "failed to apply secret"); + } + // wait max 1s for the applied signal + if let Err(err) = tokio::time::timeout( + std::time::Duration::from_secs(1), + applied_rx, + ) + .await + { + tracing::error!(%err, "failed to apply secret"); + } + } + // activate + if let Err(why) = nmcli::connect(&id).await { + return Message::VpnDialogError(VpnDialog::Password { + error: Some(( + ErrorKind::Connect, + format!("failed to connect to VPN: {why}"), + )), + id: id.clone(), + uuid, + username: username.clone(), + description: None, password, - )]), - applied_tx, - }) - .await - { - tracing::error!(%err, "failed to apply secret"); + password_hidden: true, + tx: Arc::new(Mutex::new(None)), + }); + } } - if let Err(err) = tokio::time::timeout( - std::time::Duration::from_secs(1), - applied_rx, - ) - .await - { - tracing::error!(%err, "failed to apply secret"); - } - } - if !username.is_empty() { - _ = nm_sender.unbounded_send( - network_manager::Request::SetVpnUsername { - uuid: uuid.clone(), - username, - }, - ); - } - - _ = nm_sender - .unbounded_send(network_manager::Request::ActivateVpn(uuid)); - } - - Message::Refresh - }) - .map(crate::app::Message::from); + Message::Refresh + }) + }) + .map(crate::app::Message::from); } } Message::RetryWithPassword => { @@ -670,49 +706,53 @@ impl Page { }; if let VpnDialog::Password { - id: _, + id, uuid, username, password, .. } = dialog - && let Some(NmState { ref sender, .. }) = self.nm_state { - let username = username.unwrap_or_default(); + let username_unwrapped = username.unwrap_or_default(); let sec_tx = self.secret_tx.clone(); - let nm_sender = sender.clone(); - return Task::future(async move { - if let Some(sec_tx) = sec_tx { - let (applied_tx, applied_rx) = tokio::sync::oneshot::channel(); - let _ = sec_tx - .send(nm_secret_agent::Request::SetSecrets { - setting_name: "vpn".to_string(), - uuid: uuid.to_string(), - secrets: HashMap::from_iter([( - "password".to_string(), - password, - )]), - applied_tx, - }) - .await; - let _ = - tokio::time::timeout(std::time::Duration::from_secs(1), applied_rx) + let task = self.activate_with_password( + id.clone(), + uuid.clone(), + username_unwrapped.clone(), + password.clone(), + ); + return task + .then(move |_| { + let sec_tx = sec_tx.clone(); + let uuid = uuid.clone(); + let username = username_unwrapped.clone(); + let password = password.clone(); + Task::future(async move { + if let Some(sec_tx) = sec_tx { + let (applied_tx, applied_rx) = tokio::sync::oneshot::channel(); + let _ = sec_tx + .send(nm_secret_agent::Request::SetSecrets { + setting_name: "vpn".to_string(), + uuid: uuid.to_string(), + secrets: HashMap::from_iter([ + // username and password + ("username".to_string(), username.clone().into()), + ("password".to_string(), password.clone()), + ]), + applied_tx, + }) + .await; + // wait max 1s for the applied signal + let _ = tokio::time::timeout( + std::time::Duration::from_secs(1), + applied_rx, + ) .await; - } - - if !username.is_empty() { - _ = nm_sender.unbounded_send( - network_manager::Request::SetVpnUsername { - uuid: uuid.clone(), - username, - }, - ); - } - - _ = nm_sender.unbounded_send(network_manager::Request::ActivateVpn(uuid)); - Message::Refresh - }) - .map(crate::app::Message::from); + } + Message::Activate(uuid) + }) + }) + .map(crate::app::Message::from); } } Message::UsernameUpdate(user) => { @@ -819,14 +859,56 @@ impl Page { Task::none() } - fn connect(&mut self, conn: nmrs::NetworkManager) -> Task { + fn activate_with_password( + &mut self, + connection_name: String, + uuid: Arc, + username: String, + password: SecureString, + ) -> Task { + cosmic::task::future(async move { + if let Err(why) = nmcli::set_username(&connection_name, &username).await { + return Message::VpnDialogError(VpnDialog::Password { + error: Some((ErrorKind::WithPassword("username"), why.to_string())), + id: connection_name.clone(), + uuid, + username: Some(username), + description: None, + password, + password_hidden: true, + tx: Arc::new(Mutex::new(None)), + }); + } + + if let Err(why) = nmcli::add_fallback(&connection_name).await { + return Message::VpnDialogError(VpnDialog::Password { + error: Some((ErrorKind::Config, why.to_string())), + id: connection_name.clone(), + uuid, + username: Some(username), + password, + description: None, + password_hidden: true, + tx: Arc::new(Mutex::new(None)), + }); + } + + Message::Refresh + }) + } + + fn connect(&mut self, conn: zbus::Connection) -> Task { if self.nm_task.is_none() { let (canceller, task) = crate::utils::forward_event_loop(move |mut sender| async move { let (tx, mut rx) = futures::channel::mpsc::channel(1); let watchers = std::pin::pin!(async move { - network_manager::watch(conn, tx).await; + futures::join!( + network_manager::watch(conn.clone(), tx.clone()), + network_manager::active_conns::watch(conn.clone(), tx.clone()), + network_manager::devices::watch(conn, true, tx) + ) }); let forwarder = std::pin::pin!(async move { @@ -923,20 +1005,7 @@ fn devices_view() -> Section { widget::text::body(fl!("no-vpn")).into(), ]))); } else { - let mut known_connections: Vec<_> = page.known_connections.iter().collect(); - known_connections.sort_by(|a, b| { - let name_a = match a.1 { - ConnectionSettings::Vpn(s) => s.id.as_str(), - ConnectionSettings::Wireguard { id } => id.as_str(), - }; - let name_b = match b.1 { - ConnectionSettings::Vpn(s) => s.id.as_str(), - ConnectionSettings::Wireguard { id } => id.as_str(), - }; - name_a.to_lowercase().cmp(&name_b.to_lowercase()) - }); - - let known_networks = known_connections.into_iter().fold( + let known_networks = page.known_connections.iter().fold( vpn_connections, |networks, (uuid, connection)| { let id = match connection { @@ -1045,7 +1114,7 @@ fn popup_button(message: Message, text: &str) -> Element<'_, Message> { .into() } -fn update_state(conn: nmrs::NetworkManager) -> Task { +fn update_state(conn: zbus::Connection) -> Task { cosmic::task::future(async move { match NetworkManagerState::new(&conn).await { Ok(state) => Message::UpdateState(state), @@ -1054,7 +1123,7 @@ fn update_state(conn: nmrs::NetworkManager) -> Task { }) } -fn update_devices(conn: nmrs::NetworkManager) -> Task { +fn update_devices(conn: zbus::Connection) -> Task { cosmic::task::future(async move { let filter = |device_type| matches!(device_type, network_manager::devices::DeviceType::WireGuard); @@ -1105,16 +1174,8 @@ fn add_network() -> Task { return Message::AddWireGuardDevice(device, filename.to_owned(), path); } else { - let Ok(path) = response.url().to_file_path() else { - return Message::Error( - ErrorKind::OpenVpnConfigPath, - fl!("vpn-error", "openvpn-config-path-desc"), - ); - }; - - network_manager::import_openvpn(path) + super::nm_add_vpn_file("openvpn", response.url().to_file_path().unwrap()) .await - .map_err(|why| why.to_string()) }; match result { @@ -1129,96 +1190,108 @@ fn add_network() -> Task { .apply(cosmic::task::future) } -fn connection_settings(conn: nmrs::NetworkManager) -> Task { - cosmic::task::future(async move { - let settings = async move { - let vpns = conn.list_vpn_connections().await?; - let mut settings = IndexMap::new(); +fn connection_settings(conn: zbus::Connection) -> Task { + let settings = async move { + let settings = network_manager::dbus::settings::NetworkManagerSettings::new(&conn).await?; - for vpn in vpns { - let uuid = Arc::from(vpn.uuid.as_str()); - let data = match vpn.vpn_type { - nmrs::VpnType::WireGuard { .. } => ConnectionSettings::Wireguard { id: vpn.id }, - nmrs::VpnType::OpenVpn { + _ = settings.load_connections(&[]).await; + + let settings = settings + // Get a list of known connections. + .list_connections() + .await? + // Prepare for wrapping in a concurrent stream. + .into_iter() + .map(|conn| async move { conn }) + // Create a concurrent stream for each connection. + .apply(futures::stream::FuturesOrdered::from_iter) + // Concurrently fetch settings for each connection, and filter for VPN. + .filter_map(|conn| async move { + let settings = conn.get_settings().await.ok()?; + + let connection = settings.get("connection")?; + + match connection + .get("type")? + .downcast_ref::() + .ok()? + .as_str() + { + "vpn" => (), + + "wireguard" => { + let id = connection.get("id")?.downcast_ref::().ok()?; + let uuid = connection.get("uuid")?.downcast_ref::().ok()?; + return Some((Arc::from(uuid), ConnectionSettings::Wireguard { id })); + } + + _ => return None, + } + + let vpn = settings.get("vpn")?; + let id = connection.get("id")?.downcast_ref::().ok()?; + let uuid = connection.get("uuid")?.downcast_ref::().ok()?; + + let (connection_type, username, password_flag) = vpn + .get("data") + .and_then(|data| data.downcast_ref::().ok()) + .map(|dict| { + let (mut connection_type, mut password_flag) = (None, None); + let mut username = vpn + .get("user-name") + .and_then(|u| u.downcast_ref::().ok()); + if dict + .get::(&String::from("connection-type")) + .ok() + .flatten() + .as_deref() + // may be "password" or "password-tls" + .is_some_and(|p| p.starts_with("password")) + { + connection_type = Some(ConnectionType::Password); + username = Some(username.unwrap_or_default()); + + password_flag = dict + .get::(&String::from("password-flags")) + .ok() + .flatten() + .and_then(|value| match value.as_str() { + "0" => Some(PasswordFlag::None), + "1" => Some(PasswordFlag::AgentOwned), + "2" => Some(PasswordFlag::NotSaved), + "4" => Some(PasswordFlag::NotRequired), + _ => None, + }); + } + + (connection_type, username, password_flag) + }) + .unwrap_or_default(); + + Some(( + Arc::from(uuid), + ConnectionSettings::Vpn(VpnConnectionSettings { + id, connection_type, - user_name, - password_flags, - .. - } => ConnectionSettings::Vpn(VpnConnectionSettings { - id: vpn.id, - username: user_name, - connection_type: connection_type - .filter(|ct| { - matches!( - ct, - nmrs::OpenVpnConnectionType::Password - | nmrs::OpenVpnConnectionType::PasswordTls - ) - }) - .map(|_| ConnectionType::Password), - password_flag: Some(password_flag(password_flags.0)), + password_flag, + username, }), - nmrs::VpnType::OpenConnect { - user_name, - password_flags, - .. - } - | nmrs::VpnType::StrongSwan { - user_name, - password_flags, - .. - } - | nmrs::VpnType::Pptp { - user_name, - password_flags, - .. - } - | nmrs::VpnType::L2tp { - user_name, - password_flags, - .. - } => ConnectionSettings::Vpn(VpnConnectionSettings { - id: vpn.id, - username: user_name, - connection_type: Some(ConnectionType::Password), - password_flag: Some(password_flag(password_flags.0)), - }), - nmrs::VpnType::Generic { - user_name, - password_flags, - .. - } => ConnectionSettings::Vpn(VpnConnectionSettings { - id: vpn.id, - username: user_name, - connection_type: Some(ConnectionType::Password), - password_flag: Some(password_flag(password_flags.0)), - }), - _ => ConnectionSettings::Vpn(VpnConnectionSettings { - id: vpn.id, - username: None, - connection_type: None, - password_flag: None, - }), - }; - settings.insert(uuid, data); - } + )) + }) + // Reduce the settings list into + .fold(IndexMap::new(), |mut set, (uuid, data)| async move { + set.insert(uuid, data); + set + }) + .await; - Ok::<_, nmrs::ConnectionError>(settings) - }; + Ok::<_, zbus::Error>(settings) + }; + cosmic::task::future(async move { settings.await.map_or_else( |why| Message::Error(ErrorKind::ConnectionSettings, why.to_string()), Message::KnownConnections, ) }) } - -fn password_flag(value: u32) -> PasswordFlag { - match value { - 0 => PasswordFlag::None, - 1 => PasswordFlag::AgentOwned, - 2 => PasswordFlag::NotSaved, - 4 => PasswordFlag::NotRequired, - _ => PasswordFlag::AgentOwned, - } -} diff --git a/cosmic-settings/src/pages/networking/vpn/nmcli.rs b/cosmic-settings/src/pages/networking/vpn/nmcli.rs new file mode 100644 index 0000000..c759c14 --- /dev/null +++ b/cosmic-settings/src/pages/networking/vpn/nmcli.rs @@ -0,0 +1,38 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use cosmic::Apply; +use std::process::Stdio; + +pub async fn set_username(connection_name: &str, username: &str) -> Result<(), String> { + tokio::process::Command::new("nmcli") + .args(["con", "mod", connection_name, "vpn.user-name", username]) + .stderr(Stdio::piped()) + .output() + .await + .apply(crate::utils::map_stderr_output) +} + +pub async fn add_fallback(connection_name: &str) -> Result<(), String> { + tokio::process::Command::new("nmcli") + .args([ + "con", + "mod", + connection_name, + "+vpn.data", + "data-ciphers=AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305:AES-256-CBC:AES-128-CBC", + ]) + .stderr(Stdio::piped()) + .output() + .await + .apply(crate::utils::map_stderr_output) +} + +pub async fn connect(connection_name: &str) -> Result<(), String> { + tokio::process::Command::new("nmcli") + .args(["con", "up", connection_name]) + .stderr(Stdio::piped()) + .output() + .await + .apply(crate::utils::map_stderr_output) +} diff --git a/cosmic-settings/src/pages/networking/wifi.rs b/cosmic-settings/src/pages/networking/wifi.rs index a715fda..cc1f43b 100644 --- a/cosmic-settings/src/pages/networking/wifi.rs +++ b/cosmic-settings/src/pages/networking/wifi.rs @@ -1,27 +1,31 @@ // Copyright 2024 System76 // SPDX-License-Identifier: GPL-3.0-only -use std::collections::{BTreeMap, BTreeSet}; -use std::sync::{Arc, LazyLock}; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::{Arc, LazyLock}, +}; use anyhow::Context; -use cosmic::app::ContextDrawer; -use cosmic::iced::core::text::Wrapping; -use cosmic::iced::widget::operation::focus_next; -use cosmic::iced::{Alignment, Length}; -use cosmic::widget::space::horizontal; -use cosmic::widget::text_input::focus; -use cosmic::widget::{self, column, icon}; -use cosmic::{Apply, Element, Task, task}; +use cosmic::{ + Apply, Element, Task, + app::ContextDrawer, + iced::core::text::Wrapping, + iced::{Alignment, Length, widget::operation::focus_next}, + task, + widget::{self, column, icon, space::horizontal, text_input::focus}, +}; +use cosmic_settings_network_manager_subscription::{ + self as network_manager, NetworkManagerState, + available_wifi::{AccessPoint, NetworkType}, + current_networks::ActiveConnectionInfo, + nm_secret_agent, +}; use cosmic_settings_page::{self as page, Section, section}; use futures::{SinkExt, StreamExt}; use secure_string::SecureString; use tokio::sync::Mutex; -use super::backend as network_manager; -use super::backend::available_wifi::{AccessPoint, NetworkType}; -use super::backend::current_networks::ActiveConnectionInfo; -use super::backend::{NetworkManagerState, nm_secret_agent}; use crate::pages::networking::SecretSender; pub static SECURE_INPUT_WIFI: LazyLock = LazyLock::new(widget::Id::unique); @@ -54,8 +58,8 @@ pub enum Message { NetworkManager(network_manager::Event), /// An update from the secret agent SecretAgent(network_manager::nm_secret_agent::Event), - /// Successfully connected to NetworkManager. - NetworkManagerConnect(nmrs::NetworkManager), + /// Successfully connected to the system dbus. + NetworkManagerConnect(zbus::Connection), /// Request an auth dialog PasswordRequest(network_manager::SSID), /// Update the password from the dialog @@ -101,7 +105,6 @@ enum WiFiDialog { ssid: network_manager::SSID, identity: Option, password: SecureString, - network_type: NetworkType, password_hidden: bool, tx: SecretSender, }, @@ -141,7 +144,7 @@ pub struct Page { #[derive(Debug)] pub struct NmState { - conn: nmrs::NetworkManager, + conn: zbus::Connection, sender: futures::channel::mpsc::UnboundedSender, state: network_manager::NetworkManagerState, devices: Vec, @@ -294,23 +297,19 @@ impl page::Page for Page { let (tx, rx) = tokio::sync::mpsc::channel(4); self.secret_tx = Some(tx); if self.nm_task.is_none() { - return Task::batch(vec![ - cosmic::Task::future(async move { - nmrs::NetworkManager::new() - .await - .context("failed to connect to NetworkManager") - .map_or_else( - |why| Message::Error(why.to_string()), - Message::NetworkManagerConnect, - ) - .apply(crate::pages::Message::WiFi) - }), - cosmic::Task::stream(nm_secret_agent::secret_agent_stream( - "com.system76.CosmicSettings.WiFi.NetworkManager.SecretAgent", - rx, - )) - .map(|m| crate::pages::Message::WiFi(Message::SecretAgent(m))), - ]); + return Task::batch(vec![cosmic::Task::future(async move { + zbus::Connection::system() + .await + .context("failed to create system dbus connection") + .map_or_else( + |why| Message::Error(why.to_string()), + Message::NetworkManagerConnect, + ) + .apply(crate::pages::Message::WiFi) + }), cosmic::Task::stream( + cosmic_settings_network_manager_subscription::nm_secret_agent::secret_agent_stream("com.system76.CosmicSettings.WiFi.NetworkManager.SecretAgent", rx), + ) + .map(|m| crate::pages::Message::WiFi(Message::SecretAgent(m)))]); } Task::none() @@ -356,22 +355,15 @@ impl Page { } match req { - network_manager::Request::Authenticate { - ssid, - identity, - network_type, - .. - } => { + network_manager::Request::Authenticate { ssid, identity, .. } => { if success { self.connecting.remove(ssid.as_str()); } else { - self.connecting.remove(ssid.as_str()); // Request to retry self.dialog = Some(WiFiDialog::Password { ssid: ssid.into(), identity, password: SecureString::from(""), - network_type, password_hidden: true, tx: Arc::new(Mutex::new(None)), }); @@ -388,13 +380,11 @@ impl Page { if success || matches!(network_type, NetworkType::Open) { self.connecting.remove(ssid.as_ref()); } else { - self.connecting.remove(ssid.as_ref()); self.dialog = Some(WiFiDialog::Password { ssid, identity: matches!(network_type, NetworkType::EAP) .then(String::new), password: SecureString::from(""), - network_type, password_hidden: true, tx: Arc::new(Mutex::new(None)), }); @@ -462,7 +452,6 @@ impl Page { let qr_string = if let Some(ref pass) = password { let security = match security_type { NetworkType::PskOrSae => "WPA", - NetworkType::Sae => "WPA", NetworkType::EAP => "WPA", NetworkType::Open => "", }; @@ -535,7 +524,6 @@ impl Page { ssid, identity: matches!(ap.network_type, NetworkType::EAP).then(String::new), password: SecureString::from(""), - network_type: ap.network_type, password_hidden: true, tx: Arc::new(Mutex::new(None)), }); @@ -559,7 +547,6 @@ impl Page { ssid, identity, password, - network_type, tx, .. } = dialog @@ -578,7 +565,6 @@ impl Page { ssid: ssid.to_string(), identity, password, - network_type, secret_tx, interface, }); @@ -631,7 +617,6 @@ impl Page { } Message::Disconnect(ssid) => { self.close_popup_and_apply_updates(); - self.connecting.remove(ssid.as_ref()); if let Some(nm) = self.nm_state.as_mut() { _ = nm .sender @@ -645,7 +630,6 @@ impl Page { Message::Forget(ssid) => { self.dialog = None; self.close_popup_and_apply_updates(); - self.connecting.remove(ssid.as_ref()); if let Some(nm) = self.nm_state.as_mut() { _ = nm .sender @@ -667,9 +651,6 @@ impl Page { } } Message::WiFiEnable(enable) => { - if !enable { - self.connecting.clear(); - } if let Some(nm) = self.nm_state.as_mut() { _ = nm .sender @@ -678,9 +659,7 @@ impl Page { } } Message::CancelDialog => { - if let Some(WiFiDialog::Password { ssid, .. }) = self.dialog.take() { - self.connecting.remove(ssid.as_ref()); - } + self.dialog = None; } Message::Error(why) => { tracing::error!(why); @@ -739,20 +718,15 @@ impl Page { password: previous, password_hidden: true, identity: matches!(ap.network_type, NetworkType::EAP).then(String::new), - network_type: ap.network_type, tx, }); return task::message(Message::FocusSecureInput); } nm_secret_agent::Event::CancelGetSecrets { uuid: _, name: _ } => { - match self.dialog.take() { - Some(WiFiDialog::Password { ssid, .. }) => { - self.connecting.remove(ssid.as_ref()); - } - other => { - self.dialog = other; - } - } + self.dialog = self + .dialog + .take() + .filter(|d| !matches!(d, &WiFiDialog::Password { .. })); } nm_secret_agent::Event::Failed(error) => { tracing::error!(%error, "secret agent failure"); @@ -760,18 +734,15 @@ impl Page { ssid, password, identity, - network_type, .. }) = self.dialog.take() { - self.connecting.remove(ssid.as_ref()); self.dialog = Some(WiFiDialog::Password { password, password_hidden: true, tx: Arc::new(Mutex::new(None)), ssid, identity, - network_type, }); return task::message(Message::FocusSecureInput); } @@ -802,14 +773,19 @@ impl Page { Task::none() } - fn connect(&mut self, conn: nmrs::NetworkManager) -> Task { + fn connect(&mut self, conn: zbus::Connection) -> Task { if self.nm_task.is_none() { let (canceller, task) = crate::utils::forward_event_loop(move |mut sender| async move { let (tx, mut rx) = futures::channel::mpsc::channel(1); let watchers = std::pin::pin!(async move { - network_manager::watch(conn, tx).await; + futures::join!( + network_manager::watch(conn.clone(), tx.clone()), + network_manager::active_conns::watch(conn.clone(), tx.clone()), + network_manager::wireless_enabled::watch(conn.clone(), tx.clone()), + network_manager::watch_connections_changed(conn, tx) + ); }); let forwarder = std::pin::pin!(async move { @@ -859,12 +835,6 @@ impl Page { /// Withholds updates if the view more popup is displayed. fn update_state(&mut self, state: NetworkManagerState) { - for active in &state.active_conns { - if let ActiveConnectionInfo::WiFi { name, .. } = active { - self.connecting.remove(name.as_str()); - } - } - if let Some(ref mut nm_state) = self.nm_state { if self.view_more_popup.is_some() { self.withheld_state = Some(state); @@ -1206,9 +1176,10 @@ fn devices_view() -> Section { // Search input (only shown when 15+ networks) if show_search { - let search_input = widget::search_input("", &page.search_query) - .on_input(Message::SearchQuery) - .on_clear(Message::SearchQuery(String::new())); + let search_input = + widget::search_input(fl!("type-to-search"), &page.search_query) + .on_input(Message::SearchQuery) + .on_clear(Message::SearchQuery(String::new())); visible_section = visible_section.push(search_input); } @@ -1304,9 +1275,51 @@ fn popup_button(message: Message, text: &str) -> Element<'_, Message> { .into() } -fn connection_settings(conn: nmrs::NetworkManager) -> Task { +fn connection_settings(conn: zbus::Connection) -> Task { + let settings = async move { + let settings = network_manager::dbus::settings::NetworkManagerSettings::new(&conn).await?; + + _ = settings.load_connections(&[]).await; + + let settings = settings + // Get a list of known connections. + .list_connections() + .await? + // Prepare for wrapping in a concurrent stream. + .into_iter() + .map(|conn| async move { conn }) + // Create a concurrent stream for each connection. + .apply(futures::stream::FuturesOrdered::from_iter) + // Concurrently fetch settings for each connection. + .filter_map(|conn| async move { + conn.get_settings() + .await + .map(network_manager::Settings::new) + .ok() + }) + // Reduce the settings list into a SSID->UUID map. + .fold(BTreeMap::new(), |mut set, settings| async move { + if let Some(ref wifi) = settings.wifi + && let Some(ssid) = wifi + .ssid + .clone() + .and_then(|ssid| String::from_utf8(ssid).ok()) + && let Some(ref connection) = settings.connection + && let Some(uuid) = connection.uuid.clone() + { + set.insert(ssid.into(), uuid.into()); + return set; + } + + set + }) + .await; + + Ok::<_, zbus::Error>(settings) + }; + cosmic::task::future(async move { - network_manager::wifi_connection_settings(conn) + settings .await .context("failed to get connection settings") .map_or_else( @@ -1317,7 +1330,7 @@ fn connection_settings(conn: nmrs::NetworkManager) -> Task }) } -pub fn update_state(conn: nmrs::NetworkManager) -> Task { +pub fn update_state(conn: zbus::Connection) -> Task { cosmic::task::future(async move { match NetworkManagerState::new(&conn).await { Ok(state) => Message::UpdateState(state), @@ -1326,7 +1339,7 @@ pub fn update_state(conn: nmrs::NetworkManager) -> Task { }) } -pub fn update_devices(conn: nmrs::NetworkManager) -> Task { +pub fn update_devices(conn: zbus::Connection) -> Task { cosmic::task::future(async move { let filter = |device_type| matches!(device_type, network_manager::devices::DeviceType::Wifi); diff --git a/cosmic-settings/src/pages/networking/wired.rs b/cosmic-settings/src/pages/networking/wired.rs index 3a1bf86..18bb8af 100644 --- a/cosmic-settings/src/pages/networking/wired.rs +++ b/cosmic-settings/src/pages/networking/wired.rs @@ -1,23 +1,22 @@ // Copyright 2024 System76 // SPDX-License-Identifier: GPL-3.0-only -use std::collections::BTreeSet; -use std::sync::Arc; +use std::{collections::BTreeSet, sync::Arc}; use anyhow::Context; -use cosmic::iced::core::text::Wrapping; -use cosmic::iced::{Alignment, Length}; -use cosmic::widget::space::horizontal as horizontal_space; -use cosmic::widget::{self, icon}; -use cosmic::{Apply, Element, Task}; +use cosmic::{ + Apply, Element, Task, + iced::core::text::Wrapping, + iced::{Alignment, Length}, + widget::{self, icon, space::horizontal as horizontal_space}, +}; +use cosmic_dbus_networkmanager::interface::enums::DeviceState; +use cosmic_settings_network_manager_subscription::{ + self as network_manager, NetworkManagerState, current_networks::ActiveConnectionInfo, +}; use cosmic_settings_page::{self as page, Section, section}; use futures::{SinkExt, StreamExt}; -use super::backend as network_manager; -use super::backend::NetworkManagerState; -use super::backend::current_networks::ActiveConnectionInfo; -use super::backend::devices::DeviceState; - pub type ConnectionId = Arc; #[derive(Clone, Debug)] @@ -34,8 +33,8 @@ pub enum Message { Error(String), /// An update from the network manager daemon NetworkManager(network_manager::Event), - /// Successfully connected to NetworkManager. - NetworkManagerConnect(nmrs::NetworkManager), + /// Successfully connected to the system dbus. + NetworkManagerConnect(zbus::Connection), /// Refresh devices and their connection profiles Refresh, /// Create a dialog to ask for confirmation of removal. @@ -93,7 +92,7 @@ pub struct Page { #[derive(Debug)] pub struct NmState { - conn: nmrs::NetworkManager, + conn: zbus::Connection, sender: futures::channel::mpsc::UnboundedSender, active_conns: Vec, devices: Vec>, @@ -156,9 +155,9 @@ impl page::Page for Page { fn on_enter(&mut self) -> cosmic::Task { if self.nm_task.is_none() { return cosmic::task::future(async move { - nmrs::NetworkManager::new() + zbus::Connection::system() .await - .context("failed to connect to NetworkManager") + .context("failed to create system dbus connection") .map_or_else( |why| Message::Error(why.to_string()), Message::NetworkManagerConnect, @@ -358,14 +357,18 @@ impl Page { Task::none() } - fn connect(&mut self, conn: nmrs::NetworkManager) -> Task { + fn connect(&mut self, conn: zbus::Connection) -> Task { if self.nm_task.is_none() { let (canceller, task) = crate::utils::forward_event_loop(move |mut sender| async move { let (tx, mut rx) = futures::channel::mpsc::channel(1); let watchers = std::pin::pin!(async move { - network_manager::watch(conn, tx).await; + futures::join!( + network_manager::watch(conn.clone(), tx.clone()), + network_manager::active_conns::watch(conn.clone(), tx.clone()), + network_manager::devices::watch(conn, true, tx) + ) }); let forwarder = std::pin::pin!(async move { @@ -620,7 +623,7 @@ fn popup_button(message: Message, text: &str) -> Element<'_, Message> { .into() } -fn update_state(conn: nmrs::NetworkManager) -> Task { +fn update_state(conn: zbus::Connection) -> Task { cosmic::task::future(async move { match NetworkManagerState::new(&conn).await { Ok(state) => Message::UpdateState(state), @@ -629,7 +632,7 @@ fn update_state(conn: nmrs::NetworkManager) -> Task { }) } -fn update_devices(conn: nmrs::NetworkManager) -> Task { +fn update_devices(conn: zbus::Connection) -> Task { cosmic::task::future(async move { let filter = |device_type| matches!(device_type, network_manager::devices::DeviceType::Ethernet); diff --git a/cosmic-settings/src/pages/power/backend/mod.rs b/cosmic-settings/src/pages/power/backend/mod.rs index afff003..fd9ca73 100644 --- a/cosmic-settings/src/pages/power/backend/mod.rs +++ b/cosmic-settings/src/pages/power/backend/mod.rs @@ -1,9 +1,7 @@ -use futures::future::join_all; -use futures::{FutureExt, Stream, StreamExt}; +use futures::{FutureExt, Stream, StreamExt, future::join_all}; use jiff::{Span, SpanRelativeTo, SpanRound, ToSpan, Unit}; use upower_dbus::{BatteryState, BatteryType, DeviceProxy}; -use zbus::Connection; -use zbus::zvariant::ObjectPath; +use zbus::{Connection, zvariant::ObjectPath}; mod ppdaemon; mod s76powerdaemon; diff --git a/cosmic-settings/src/pages/power/mod.rs b/cosmic-settings/src/pages/power/mod.rs index 33e75d6..b68b135 100644 --- a/cosmic-settings/src/pages/power/mod.rs +++ b/cosmic-settings/src/pages/power/mod.rs @@ -3,11 +3,12 @@ mod backend; use self::backend::{GetCurrentPowerProfile, SetPowerProfile}; use backend::{Battery, ConnectedDevice, PowerProfile}; +use cosmic::Task; use cosmic::iced::core::text::{Ellipsize, EllipsizeHeightLimit}; use cosmic::iced::widget::{column, row}; use cosmic::iced::{self, Alignment, Length, stream}; use cosmic::widget::{self, settings, space, text}; -use cosmic::{Apply, Task, surface}; +use cosmic::{Apply, surface}; use cosmic_config::{Config, CosmicConfigEntry}; use cosmic_idle_config::CosmicIdleConfig; use cosmic_settings_page::{self as page, Section, section}; diff --git a/cosmic-settings/src/pages/printers/backend.rs b/cosmic-settings/src/pages/printers/backend.rs deleted file mode 100644 index 0bc3bfc..0000000 --- a/cosmic-settings/src/pages/printers/backend.rs +++ /dev/null @@ -1,536 +0,0 @@ -// Copyright 2026 Lionel DARNIS -// SPDX-License-Identifier: GPL-3.0-only - -//! CUPS backend for the printers page. -//! -//! Read-only operations (destinations, jobs) use the `cups_rs` bindings to -//! libcups. Mutating operations (add, remove, default, pause) go through the -//! CUPS command line tools, which authenticate transparently against the -//! local scheduler for users in the CUPS system group. - -use tokio::process::Command; - -pub use cups_rs::{JobStatus, PrinterState}; - -const TEST_PAGE: &str = "/usr/share/cups/data/testprint"; - -/// `printer-type` bit marking destinations that CUPS merely discovered on the -/// network (dnssd browsing). Those are not real queues: they cannot be removed -/// or configured and vanish on their own, so the page must not list them. -const CUPS_PRINTER_DISCOVERED: u32 = 0x1000000; - -/// libcups keeps process-wide global state; serialize every FFI call. -static CUPS_LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(()); - -fn cups_lock() -> std::sync::MutexGuard<'static, ()> { - CUPS_LOCK.lock().unwrap_or_else(std::sync::PoisonError::into_inner) -} - -/// A printer queue known to the CUPS scheduler. -#[derive(Clone, Debug)] -pub struct Printer { - pub name: String, - pub info: String, - pub make_and_model: Option, - pub location: Option, - pub device_uri: Option, - pub state: PrinterState, - pub state_reasons: Vec, - pub accepting_jobs: bool, - pub is_default: bool, -} - -/// An active print job. -#[derive(Clone, Debug)] -pub struct Job { - pub id: i32, - pub title: String, - pub dest: String, - pub status: JobStatus, -} - -/// A device that a printer queue can be created for. -#[derive(Clone, Debug)] -pub struct Device { - pub uri: String, - pub info: String, -} - -/// A printer driver (PPD or driverless profile). -#[derive(Clone, Debug)] -pub struct Driver { - pub id: String, - pub description: String, -} - -/// Read operations (blocking FFI; call from a blocking task). - -pub fn printers_sync() -> Result, String> { - let _guard = cups_lock(); - let destinations = cups_rs::get_all_destinations().map_err(|err| err.to_string())?; - - Ok(destinations - .iter() - .filter(|dest| { - !dest - .get_option("printer-type") - .and_then(|value| value.parse::().ok()) - .is_some_and(|printer_type| printer_type & CUPS_PRINTER_DISCOVERED != 0) - }) - .map(|dest| Printer { - name: dest.name.clone(), - info: dest - .info() - .filter(|info| !info.is_empty()) - .cloned() - .unwrap_or_else(|| dest.name.clone()), - make_and_model: dest.make_and_model().cloned(), - location: dest.location().cloned(), - device_uri: dest.device_uri().cloned(), - state: dest.state(), - state_reasons: dest - .state_reasons() - .into_iter() - .filter(|reason| reason != "none") - .collect(), - accepting_jobs: dest.is_accepting_jobs(), - is_default: dest.is_default, - }) - .collect()) -} - -pub fn jobs_sync() -> Result, String> { - let _guard = cups_lock(); - let jobs = cups_rs::get_active_jobs(None).map_err(|err| err.to_string())?; - - Ok(jobs - .into_iter() - .map(|job| Job { - id: job.id, - title: job.title, - dest: job.dest, - status: job.status, - }) - .collect()) -} - -pub fn cancel_job_sync(job_id: i32) -> Result<(), String> { - let _guard = cups_lock(); - cups_rs::job::cancel_job(job_id).map_err(|err| err.to_string()) -} - -pub async fn print_test_page(printer: &str) -> Result<(), String> { - // Submit through `lp` so CUPS sniffs the format itself: the test page is - // a cups-filters PDF banner template (#PDF-BANNER), not PostScript, and - // cups_rs only allows a hardcoded list of document formats. - run_cli("lp", &["-d", printer, TEST_PAGE]).await -} - -/// Discovery and administration (CUPS command line tools). - -pub async fn devices() -> Result, String> { - let output = run_cli_capture("lpinfo", &["-v"]).await?; - - let mut devices: Vec = Vec::new(); - - for line in output.lines() { - let Some((_, uri)) = line.split_once(char::is_whitespace) else { - continue; - }; - let uri = uri.trim(); - if !uri.contains("://") { - continue; - } - - let info = device_info(uri); - - // One entry per physical device: the same printer is advertised over - // several schemes (dnssd, ipp, ipps…). Prefer the dnssd URI, which - // keeps working across IP changes. - if let Some(existing) = devices.iter_mut().find(|device| device.info == info) { - if uri.starts_with("dnssd://") && !existing.uri.starts_with("dnssd://") { - existing.uri = uri.to_string(); - } - continue; - } - - devices.push(Device { - info, - uri: uri.to_string(), - }); - } - - Ok(devices) -} - -pub async fn drivers() -> Result, String> { - let output = run_cli_capture("lpinfo", &["-m"]).await?; - - let mut drivers: Vec = output - .lines() - .filter_map(|line| { - let (id, description) = line.split_once(char::is_whitespace)?; - Some(Driver { - id: id.trim().to_string(), - description: description.trim().to_string(), - }) - }) - .collect(); - - // Offer the driverless IPP Everywhere profile first. - drivers.sort_by_key(|driver| driver.id != "everywhere"); - Ok(drivers) -} - -pub async fn add_printer(name: &str, uri: &str, driver: &str) -> Result<(), String> { - run_cli("lpadmin", &["-p", name, "-E", "-v", uri, "-m", driver]).await -} - -pub async fn remove_printer(name: &str) -> Result<(), String> { - match run_cli("lpadmin", &["-x", name]).await { - Ok(()) => Ok(()), - // A queue that vanished between listing and removal is already gone; - // treat it as a successful removal instead of an error. - Err(err) - if err.contains("n'existe pas") || err.to_lowercase().contains("not exist") => - { - Ok(()) - } - Err(err) => Err(err), - } -} - -/// Default job options supported by a queue, with their current values. -/// -/// Values are taken from the queue's PPD view (`lpoptions -l`): `PageSize`, -/// `MediaType`, `ColorModel`, `cupsPrintQuality` and `Duplex`, which -/// `lpadmin -o` can persist. -#[derive(Clone, Debug, Default)] -pub struct PrinterOptions { - pub media: Vec, - pub media_default: Option, - pub media_types: Vec, - pub media_type_default: Option, - pub color_models: Vec, - pub color_model_default: Option, - pub qualities: Vec, - pub quality_default: Option, - pub sides: Vec, - pub sides_default: Option, -} - -pub async fn printer_options(name: &str) -> Result { - let output = run_cli_capture("lpoptions", &["-p", name, "-l"]).await?; - - let mut options = PrinterOptions::default(); - - for line in output.lines() { - let Some((key, values)) = line.split_once(':') else { - continue; - }; - let key = key.split('/').next().unwrap_or(key).trim(); - - let parsed: Vec<(String, bool)> = values - .split_whitespace() - .map(|value| { - ( - value.trim_start_matches('*').to_string(), - value.starts_with('*'), - ) - }) - .collect(); - - let (list, default) = match key { - "PageSize" => (&mut options.media, &mut options.media_default), - "MediaType" => (&mut options.media_types, &mut options.media_type_default), - "ColorModel" => (&mut options.color_models, &mut options.color_model_default), - "cupsPrintQuality" => (&mut options.qualities, &mut options.quality_default), - "Duplex" => (&mut options.sides, &mut options.sides_default), - _ => continue, - }; - - for (value, selected) in parsed { - // Custom.WIDTHxHEIGHT placeholders are not selectable values. - if value.starts_with("Custom.") { - continue; - } - if selected { - *default = Some(value.clone()); - } - list.push(value); - } - } - - Ok(options) -} - -/// Set a queue-wide default job option (PageSize, cupsPrintQuality, Duplex…). -pub async fn set_default_option(printer: &str, option: &str, value: &str) -> Result<(), String> { - run_cli( - "lpadmin", - &["-p", printer, "-o", &format!("{option}={value}")], - ) - .await -} - -/// A consumable reported by the printer through the IPP marker attributes. -#[derive(Clone, Debug)] -pub struct Marker { - pub name: String, - /// 0-100; negative values mean unknown. - pub level: i32, - /// "#RRGGBB" when the printer advertises a color. - pub color: Option, -} - -/// Query ink levels directly from the printer. -/// -/// The scheduler does not relay marker levels for driverless queues, so the -/// printer's IPP endpoint is resolved (dnssd -> ippfind) and queried with -/// ipptool. Returns an empty list when the printer does not report markers. -pub async fn markers(device_uri: &str) -> Vec { - let Some(endpoint) = resolve_endpoint(device_uri).await else { - return Vec::new(); - }; - - let names = query_marker_attribute(&endpoint, "marker-names").await; - let raw_levels = query_marker_attribute(&endpoint, "marker-levels").await; - let colors = query_marker_attribute(&endpoint, "marker-colors").await; - - let levels: Vec = raw_levels - .iter() - .filter_map(|value| value.trim().parse::().ok()) - .collect(); - - if levels.is_empty() { - return Vec::new(); - } - - (0..levels.len()) - .map(|index| Marker { - name: names - .get(index) - .cloned() - .unwrap_or_else(|| format!("marker {}", index + 1)), - level: levels[index], - color: colors.get(index).cloned().filter(|value| value.starts_with('#')), - }) - .collect() -} - -/// Resolve a device URI into a queryable IPP endpoint. -async fn resolve_endpoint(device_uri: &str) -> Option { - if device_uri.starts_with("ipp://") || device_uri.starts_with("ipps://") { - return Some(device_uri.to_string()); - } - - let rest = device_uri.strip_prefix("dnssd://")?; - let name = rest.split(['/', '?']).next()?; - let name = percent_decode(name.split("._").next()?); - - let output = run_cli_capture( - "timeout", - &["8", "ippfind", "_ipp._tcp", "_ipps._tcp", "-N", &name, "-p"], - ) - .await - .ok()?; - - let mut fallback = None; - for line in output.lines() { - let line = line.trim(); - if line.starts_with("ipps://") { - return Some(line.to_string()); - } - if fallback.is_none() && line.starts_with("ipp://") { - fallback = Some(line.to_string()); - } - } - fallback -} - -/// Run one ipptool Get-Printer-Attributes query and return the displayed -/// values of a single marker attribute. -async fn query_marker_attribute(endpoint: &str, attribute: &str) -> Vec { - let test_file = std::env::temp_dir().join(format!("cosmic-settings-printers-{attribute}.test")); - - let content = format!( - "{{\n\ - \x20 NAME \"{attribute}\"\n\ - \x20 OPERATION Get-Printer-Attributes\n\ - \x20 GROUP operation-attributes-tag\n\ - \x20 ATTR charset attributes-charset utf-8\n\ - \x20 ATTR naturalLanguage attributes-natural-language en\n\ - \x20 ATTR uri printer-uri $uri\n\ - \x20 ATTR keyword requested-attributes {attribute}\n\ - \x20 STATUS successful-ok\n\ - \x20 DISPLAY {attribute}\n\ - }}\n" - ); - - if tokio::fs::write(&test_file, content).await.is_err() { - return Vec::new(); - } - - let Some(file_path) = test_file.to_str() else { - return Vec::new(); - }; - - let Ok(output) = - run_cli_capture("timeout", &["8", "ipptool", endpoint, file_path]).await - else { - return Vec::new(); - }; - - parse_display_values(&output).unwrap_or_default() -} - -/// Extract the value cell of a single-DISPLAY ipptool table: the line -/// following the dashes separator, split on commas. -fn parse_display_values(output: &str) -> Option> { - let mut lines = output.lines(); - while let Some(line) = lines.next() { - if !line.trim().is_empty() && line.trim().chars().all(|c| c == '-') { - let values = lines.next()?.trim(); - return Some(values.split(',').map(|value| value.trim().to_string()).collect()); - } - } - None -} - -pub async fn set_default(name: &str) -> Result<(), String> { - run_cli("lpadmin", &["-d", name]).await -} - -pub async fn set_enabled(name: &str, enabled: bool) -> Result<(), String> { - if enabled { - run_cli("cupsenable", &[name]).await - } else { - run_cli("cupsdisable", &[name]).await - } -} - -/// Sanitize a display name into a valid CUPS queue name. -/// -/// No deduplication: `lpadmin` modifies the queue when the name already -/// exists, which also promotes the temporary queues CUPS auto-creates for -/// discovered devices into permanent ones. -pub fn queue_name(raw: &str) -> String { - let mut sanitized = String::with_capacity(raw.len()); - for c in raw.chars() { - if c.is_alphanumeric() { - sanitized.push(c); - } else if matches!(c, '[' | ']' | '(' | ')') { - // Brackets usually wrap a model identifier; drop them so - // "series [32C998]" becomes "series_32C998", not "series__32C998_". - continue; - } else { - sanitized.push('_'); - } - } - - let base = sanitized - .split('_') - .filter(|part| !part.is_empty()) - .collect::>() - .join("_"); - - if base.is_empty() { - "Printer".to_string() - } else { - base - } -} - -async fn run_cli(program: &str, args: &[&str]) -> Result<(), String> { - let output = run_cli_capture(program, args).await?; - drop(output); - Ok(()) -} - -async fn run_cli_capture(program: &str, args: &[&str]) -> Result { - let output = Command::new(program) - .args(args) - .stdin(std::process::Stdio::null()) - .output() - .await - .map_err(|err| format!("{program}: {err}"))?; - - let stdout = String::from_utf8_lossy(&output.stdout).into_owned(); - let stderr = String::from_utf8_lossy(&output.stderr); - - if output.status.success() { - return Ok(stdout); - } - - // Ignore deprecation notices lpadmin prints on stderr for PPD drivers. - let message = stderr - .lines() - .filter(|line| !line.contains("deprecated")) - .collect::>() - .join(" "); - - Err(if message.trim().is_empty() { - format!("{program} {}", args.join(" ")) - } else { - message - }) -} - -fn device_info(uri: &str) -> String { - if let Some(rest) = uri.strip_prefix("dnssd://") { - let name = rest.split(['/', '?']).next().unwrap_or(rest); - let name = name.split("._").next().unwrap_or(name); - let decoded = percent_decode(name); - if !decoded.is_empty() { - return decoded; - } - } - - if let Some(rest) = uri.strip_prefix("usb://") { - let path = rest.split('?').next().unwrap_or(rest); - let decoded = percent_decode(path).replace('/', " "); - if !decoded.trim().is_empty() { - return decoded; - } - } - - if uri.starts_with("cups-pdf") { - return "PDF".to_string(); - } - - // ipp/ipps/socket/lpd/http(s) URIs: keep the host label and drop the - // dnssd-style service suffix ("Name._ipp._tcp.local" -> "Name"). - if let Some((_, rest)) = uri.split_once("://") - && let Some(host) = rest.split(['/', '?']).next() - { - let decoded = percent_decode(host); - let label = decoded.split("._").next().unwrap_or(&decoded); - let label = label.trim_end_matches(".local"); - if !label.is_empty() && !label.chars().all(|c| c.is_ascii_digit() || c == '.' || c == ':') { - return label.to_string(); - } - } - - percent_decode(uri) -} - -fn percent_decode(input: &str) -> String { - let bytes = input.as_bytes(); - let mut decoded = Vec::with_capacity(bytes.len()); - let mut index = 0; - - while index < bytes.len() { - if bytes[index] == b'%' && index + 2 < bytes.len() { - let hex = &input[index + 1..index + 3]; - if let Ok(value) = u8::from_str_radix(hex, 16) { - decoded.push(value); - index += 3; - continue; - } - } - decoded.push(bytes[index]); - index += 1; - } - - String::from_utf8_lossy(&decoded).into_owned() -} diff --git a/cosmic-settings/src/pages/printers/mod.rs b/cosmic-settings/src/pages/printers/mod.rs deleted file mode 100644 index c15dc58..0000000 --- a/cosmic-settings/src/pages/printers/mod.rs +++ /dev/null @@ -1,1101 +0,0 @@ -// Copyright 2026 Lionel DARNIS -// SPDX-License-Identifier: GPL-3.0-only - -//! Printers page: manage CUPS queues, the default printer, and print jobs. -//! -//! The main view is a single list of printers with an empty state. Printer -//! details, actions, and jobs live in a context drawer, mirroring the way -//! other COSMIC settings pages present device details. - -mod backend; - -use cosmic::iced::{Alignment, Background, Border, Color, Length, Shadow, Subscription}; -use cosmic::widget::{self, text}; -use cosmic::{Apply, Element, Task, theme}; -use cosmic_settings_page::{self as page, Section, section}; -use slotmap::SlotMap; -use std::time::Duration; - -use backend::{JobStatus, PrinterState}; - -const DRIVERLESS: &str = "everywhere"; -const DRIVER_LIST_LIMIT: usize = 200; -const REFRESH_EVERY: Duration = Duration::from_secs(8); - -#[derive(Default)] -struct AddFlow { - active: bool, - loading: bool, - submitting: bool, - devices: Vec, - selected_device: Option, - name: String, - drivers: Vec, - driver_filter: String, - selected_driver: String, - error: Option, -} - -pub enum Dialog { - RemovePrinter { name: String }, -} - -#[derive(Default)] -pub struct Page { - entity: page::Entity, - printers: Vec, - jobs: Vec, - selected: Option, - options: Option<(String, backend::PrinterOptions)>, - markers: Vec, - notice: Option, - dialog: Option, - add: AddFlow, -} - -#[derive(Clone, Debug)] -pub enum Message { - Reload, - Printers(Result, String>), - Jobs(Result, String>), - Select(String), - SetDefault(String), - ToggleEnabled(String, bool), - PrintTestPage(String), - Remove(String), - ConfirmRemove, - CancelDialog, - CancelJob(i32), - OperationDone(Result<(), String>), - OptionsLoaded(String, Result), - MarkersLoaded(Vec), - SetOption { - printer: String, - option: String, - value: String, - }, - Surface(cosmic::surface::Action), - OpenAdd, - Devices(Result, String>), - Drivers(Result, String>), - SelectDevice(usize), - NameInput(String), - DriverFilter(String), - SelectDriver(String), - SubmitAdd, - AddDone(Result), -} - -impl From for crate::pages::Message { - fn from(message: Message) -> Self { - crate::pages::Message::Printers(message) - } -} - -fn state_text(state: PrinterState) -> String { - match state { - PrinterState::Idle => fl!("printers-state-idle"), - PrinterState::Processing => fl!("printers-state-processing"), - PrinterState::Stopped => fl!("printers-state-stopped"), - PrinterState::Unknown => fl!("printers-state-unknown"), - } -} - -fn job_status_text(status: JobStatus) -> String { - match status { - JobStatus::Pending => fl!("printers-job-pending"), - JobStatus::Processing => fl!("printers-job-processing"), - JobStatus::Held => fl!("printers-job-held"), - JobStatus::Stopped => fl!("printers-job-stopped"), - JobStatus::Completed => fl!("printers-job-completed"), - JobStatus::Canceled => fl!("printers-job-canceled"), - JobStatus::Aborted => fl!("printers-job-aborted"), - JobStatus::Unknown => fl!("printers-job-unknown"), - } -} - -fn printer_icon(printer: &backend::Printer) -> &'static str { - match printer.state { - PrinterState::Processing => "printer-printing-symbolic", - PrinterState::Stopped => "printer-error-symbolic", - _ => "printer-symbolic", - } -} - -fn quality_label(value: &str) -> String { - match value.to_lowercase().as_str() { - "draft" => fl!("printers-quality-draft"), - "normal" => fl!("printers-quality-normal"), - "high" => fl!("printers-quality-high"), - _ => value.to_string(), - } -} - -fn media_type_label(value: &str) -> String { - match value { - "Stationery" => fl!("printers-media-type-stationery"), - "Photographic" => fl!("printers-media-type-photographic"), - "PhotographicGlossy" => fl!("printers-media-type-photographic-glossy"), - "PhotographicMatte" => fl!("printers-media-type-photographic-matte"), - "PhotographicSatin" => fl!("printers-media-type-photographic-satin"), - "StationeryCoated" => fl!("printers-media-type-stationery-coated"), - "StationeryFine" => fl!("printers-media-type-stationery-fine"), - "StationeryInkjet" => fl!("printers-media-type-stationery-inkjet"), - "StationeryLetterhead" => fl!("printers-media-type-stationery-letterhead"), - "StationeryPreprint" => fl!("printers-media-type-stationery-preprint"), - "StationeryRecycled" => fl!("printers-media-type-stationery-recycled"), - "Envelope" => fl!("printers-media-type-envelope"), - "Transparency" => fl!("printers-media-type-transparency"), - "Labels" => fl!("printers-media-type-labels"), - "Cardstock" => fl!("printers-media-type-cardstock"), - _ => value.to_string(), - } -} - -fn color_model_label(value: &str) -> String { - match value { - "RGB" => fl!("printers-color-rgb"), - "RGB16" => fl!("printers-color-rgb-16"), - "RGB24" => fl!("printers-color-rgb-24"), - "RGB48" => fl!("printers-color-rgb-48"), - "Gray" | "KGray" => fl!("printers-color-gray"), - "CMYK" => fl!("printers-color-cmyk"), - "CMY" => fl!("printers-color-cmy"), - "Black" => fl!("printers-color-black"), - _ => value.to_string(), - } -} - -fn sides_label(value: &str) -> String { - match value { - "None" => fl!("printers-sides-one-sided"), - "DuplexNoTumble" => fl!("printers-sides-long-edge"), - "DuplexTumble" => fl!("printers-sides-short-edge"), - _ => value.to_string(), - } -} - -fn ink_label(name: &str) -> String { - match name.to_lowercase().as_str() { - "black cartridge" | "black" => fl!("printers-ink-black"), - "cyan cartridge" | "cyan" => fl!("printers-ink-cyan"), - "magenta cartridge" | "magenta" => fl!("printers-ink-magenta"), - "yellow cartridge" | "yellow" => fl!("printers-ink-yellow"), - _ => name.to_string(), - } -} - -fn parse_hex_color(value: &str) -> Option { - let hex = value.trim().trim_start_matches('#'); - if hex.len() != 6 { - return None; - } - let red = u8::from_str_radix(&hex[0..2], 16).ok()?; - let green = u8::from_str_radix(&hex[2..4], 16).ok()?; - let blue = u8::from_str_radix(&hex[4..6], 16).ok()?; - Some(Color::from_rgb( - red as f32 / 255.0, - green as f32 / 255.0, - blue as f32 / 255.0, - )) -} - -fn ink_swatch(color: Color) -> Element<'static, Message> { - widget::container(widget::space::horizontal()) - .width(Length::Fixed(14.0)) - .height(Length::Fixed(14.0)) - .class(theme::Container::custom(move |_theme| { - widget::container::Style { - icon_color: None, - text_color: None, - background: Some(Background::Color(color)), - border: Border { - color: Color::from_rgba(0.0, 0.0, 0.0, 0.25), - width: 1.0, - radius: 7.0.into(), - }, - shadow: Shadow { - color: Color::TRANSPARENT, - offset: cosmic::iced::Vector::new(0.0, 0.0), - blur_radius: 0.0, - }, - snap: true, - } - })) - .apply(Element::from) -} - -impl page::Page for Page { - fn info(&self) -> page::Info { - page::Info::new("printers", "printer-symbolic") - .title(fl!("printers")) - .description(fl!("xdg-entry-printers-comment")) - } - - fn content( - &self, - sections: &mut SlotMap>, - ) -> Option { - Some(vec![sections.insert(printers_section())]) - } - - fn set_id(&mut self, entity: page::Entity) { - self.entity = entity; - } - - fn on_enter(&mut self) -> Task { - self.reload() - } - - fn on_context_drawer_close(&mut self) -> Task { - self.add = AddFlow::default(); - self.selected = None; - self.options = None; - self.markers = Vec::new(); - Task::none() - } - - fn dialog(&self) -> Option> { - let Dialog::RemovePrinter { name } = self.dialog.as_ref()?; - - let confirm = widget::button::destructive(fl!("printers-remove-confirm-button")) - .on_press(crate::pages::Message::from(Message::ConfirmRemove)); - - let cancel = widget::button::standard(fl!("cancel")) - .on_press(crate::pages::Message::from(Message::CancelDialog)); - - Some( - widget::dialog() - .title(fl!("printers-remove-confirm")) - .body(fl!( - "printers-remove-confirm-description", - name = name.to_string() - )) - .primary_action(confirm) - .secondary_action(cancel) - .apply(Element::from), - ) - } - - fn context_drawer(&self) -> Option> { - if self.add.active { - return Some( - cosmic::app::context_drawer( - self.add_view().map(crate::pages::Message::Printers), - crate::pages::Message::CloseContextDrawer, - ) - .title(fl!("printers-add")), - ); - } - - let printer = self - .selected - .as_deref() - .and_then(|name| self.printers.iter().find(|p| p.name == name))?; - - Some( - cosmic::app::context_drawer( - self.printer_view(printer) - .map(crate::pages::Message::Printers), - crate::pages::Message::CloseContextDrawer, - ) - .title(fl!("printers-details")), - ) - } - - fn subscription(&self, _core: &cosmic::Core) -> Subscription { - cosmic::iced::time::every(REFRESH_EVERY) - .map(|_| crate::pages::Message::Printers(Message::Reload)) - } -} - -impl Page { - pub fn update(&mut self, message: Message) -> cosmic::Task { - match message { - Message::Reload => return self.reload().map(Into::into), - - Message::Printers(Ok(printers)) => { - if let Some(selected) = self.selected.as_deref() - && !printers.iter().any(|printer| printer.name == selected) - { - self.selected = None; - } - self.printers = printers; - } - - Message::Printers(Err(err)) | Message::Jobs(Err(err)) => { - self.notice = Some(fl!("printers-error", error = err)); - } - - Message::Jobs(Ok(jobs)) => { - self.jobs = jobs; - } - - Message::Select(name) => { - self.selected = Some(name.clone()); - self.options = None; - self.markers = Vec::new(); - let open_drawer: cosmic::Task = cosmic::task::message( - crate::app::Message::OpenContextDrawer(self.entity), - ); - let mut tasks: Vec> = vec![ - open_drawer, - Self::fetch_options(name.clone()).map(Into::into), - ]; - if let Some(device_uri) = self - .printers - .iter() - .find(|printer| printer.name == name) - .and_then(|printer| printer.device_uri.clone()) - { - tasks.push(Self::fetch_markers(device_uri).map(Into::into)); - } - return Task::batch(tasks); - } - - Message::SetDefault(name) => { - self.notice = None; - return Self::admin(async move { backend::set_default(&name).await }); - } - - Message::ToggleEnabled(name, enabled) => { - self.notice = None; - return Self::admin(async move { backend::set_enabled(&name, enabled).await }); - } - - Message::PrintTestPage(name) => { - self.notice = None; - return Self::admin(async move { backend::print_test_page(&name).await }); - } - - Message::Remove(name) => { - self.dialog = Some(Dialog::RemovePrinter { name }); - } - - Message::CancelDialog => { - self.dialog = None; - } - - Message::ConfirmRemove => { - let Some(Dialog::RemovePrinter { name }) = self.dialog.take() else { - return Task::none(); - }; - self.selected = None; - self.options = None; - self.markers = Vec::new(); - return Self::admin(async move { backend::remove_printer(&name).await }); - } - - Message::CancelJob(id) => { - return cosmic::task::future(async move { - Message::OperationDone(tokio::task::spawn_blocking(move || { - backend::cancel_job_sync(id) - }) - .await - .unwrap_or_else(|err| Err(err.to_string()))) - }) - .map(crate::pages::Message::Printers) - .map(Into::into); - } - - Message::OperationDone(result) => { - if let Err(err) = result { - self.notice = Some(fl!("printers-error", error = err)); - } - let mut tasks: Vec> = - vec![self.reload().map(Into::into)]; - if let Some(selected) = self.selected.clone() { - tasks.push(Self::fetch_options(selected).map(Into::into)); - } - return Task::batch(tasks); - } - - Message::OptionsLoaded(name, result) => { - self.options = result.ok().map(|options| (name, options)); - } - - Message::MarkersLoaded(markers) => { - self.markers = markers; - } - - Message::SetOption { - printer, - option, - value, - } => { - self.notice = None; - return Self::admin(async move { - backend::set_default_option(&printer, &option, &value).await - }); - } - - Message::Surface(action) => { - return cosmic::task::message(crate::app::Message::Surface(action)); - } - - Message::OpenAdd => { - self.selected = None; - self.add = AddFlow { - active: true, - loading: true, - selected_driver: DRIVERLESS.to_string(), - ..Default::default() - }; - - let open_drawer: cosmic::Task = cosmic::task::message( - crate::app::Message::OpenContextDrawer(self.entity), - ); - - return Task::batch([ - cosmic::task::future(async { Message::Devices(backend::devices().await) }) - .map(crate::pages::Message::Printers) - .map(Into::into), - cosmic::task::future(async { Message::Drivers(backend::drivers().await) }) - .map(crate::pages::Message::Printers) - .map(Into::into), - open_drawer, - ]); - } - - Message::Devices(Ok(devices)) => { - self.add.devices = devices; - self.add.loading = false; - } - - Message::Devices(Err(err)) => { - self.add.loading = false; - self.add.error = Some(err); - } - - Message::Drivers(Ok(drivers)) => { - self.add.drivers = drivers; - } - - Message::Drivers(Err(err)) => { - self.add.error = Some(err); - } - - Message::SelectDevice(index) => { - if let Some(device) = self.add.devices.get(index) { - self.add.name = backend::queue_name(&device.info); - self.add.selected_device = Some(index); - } - } - - Message::NameInput(value) => { - self.add.name = value; - } - - Message::DriverFilter(value) => { - self.add.driver_filter = value; - } - - Message::SelectDriver(id) => { - self.add.selected_driver = id; - } - - Message::SubmitAdd => { - let Some(device) = self - .add - .selected_device - .and_then(|index| self.add.devices.get(index)) - else { - return Task::none(); - }; - - let name = backend::queue_name(self.add.name.trim()); - let uri = device.uri.clone(); - let driver = self.add.selected_driver.clone(); - self.add.submitting = true; - self.add.error = None; - - return cosmic::task::future(async move { - Message::AddDone(backend::add_printer(&name, &uri, &driver).await.map(|_| name)) - }) - .map(crate::pages::Message::Printers) - .map(Into::into); - } - - Message::AddDone(result) => match result { - Ok(name) => { - self.add = AddFlow::default(); - self.options = None; - self.markers = Vec::new(); - self.notice = Some(fl!("printers-added", name = name)); - - let close_drawer: cosmic::Task = cosmic::task::message( - crate::Message::from(crate::pages::Message::CloseContextDrawer), - ); - - return Task::batch([self.reload().map(Into::into), close_drawer]); - } - Err(err) => { - self.add.submitting = false; - self.add.error = Some(err); - } - }, - } - - Task::none() - } - - fn fetch_options(name: String) -> Task { - cosmic::task::future(async move { - Message::OptionsLoaded(name.clone(), backend::printer_options(&name).await) - }) - .map(crate::pages::Message::Printers) - } - - fn fetch_markers(device_uri: String) -> Task { - cosmic::task::future(async move { - Message::MarkersLoaded(backend::markers(&device_uri).await) - }) - .map(crate::pages::Message::Printers) - } - - fn reload(&self) -> Task { - Task::batch([ - cosmic::task::future(async { - Message::Printers( - tokio::task::spawn_blocking(backend::printers_sync) - .await - .unwrap_or_else(|err| Err(err.to_string())), - ) - }) - .map(crate::pages::Message::Printers), - cosmic::task::future(async { - Message::Jobs( - tokio::task::spawn_blocking(backend::jobs_sync) - .await - .unwrap_or_else(|err| Err(err.to_string())), - ) - }) - .map(crate::pages::Message::Printers), - ]) - } - - fn admin( - operation: impl std::future::Future> + Send + 'static, - ) -> cosmic::Task { - cosmic::task::future(async move { Message::OperationDone(operation.await) }) - .map(crate::pages::Message::Printers) - .map(Into::into) - } - - /// Details, actions, and jobs of a printer, shown in the context drawer. - fn printer_view(&self, printer: &backend::Printer) -> Element<'_, Message> { - let spacing = theme::spacing(); - let mut content = - widget::column::with_children(Vec::>::new()) - .spacing(spacing.space_s); - - content = content.push( - text::title4(printer.info.to_string()) - .wrapping(cosmic::iced::core::text::Wrapping::Word), - ); - - let mut state = state_text(printer.state); - if !printer.accepting_jobs { - state.push_str(&format!(" · {}", fl!("printers-not-accepting"))); - } - - content = content.push( - widget::settings::flex_item(fl!("printers-state"), text::body(state)) - .align_items(Alignment::Center), - ); - - if let Some(location) = printer.location.as_deref() - && !location.is_empty() - { - content = content.push( - widget::settings::flex_item(fl!("printers-location"), text::body(location.to_string())) - .align_items(Alignment::Center), - ); - } - - if let Some(uri) = printer.device_uri.as_deref() { - content = content.push( - widget::settings::flex_item(fl!("printers-device-uri"), text::body(uri.to_string())) - .align_items(Alignment::Center), - ); - } - - if !printer.state_reasons.is_empty() { - content = content.push(text::caption(printer.state_reasons.join(", "))); - } - - let name = printer.name.clone(); - let mut actions = - widget::column::with_children(Vec::>::new()) - .spacing(spacing.space_xs); - - if !printer.is_default { - actions = actions.push( - widget::button::standard(fl!("printers-make-default")) - .width(Length::Fill) - .on_press(Message::SetDefault(name.clone()).into()), - ); - } - - let paused = printer.state == PrinterState::Stopped; - actions = actions.push(if paused { - widget::button::standard(fl!("printers-resume")) - .width(Length::Fill) - .on_press(Message::ToggleEnabled(name.clone(), true).into()) - } else { - widget::button::standard(fl!("printers-pause")) - .width(Length::Fill) - .on_press(Message::ToggleEnabled(name.clone(), false).into()) - }); - - actions = actions.push( - widget::button::standard(fl!("printers-test-page")) - .width(Length::Fill) - .on_press(Message::PrintTestPage(name.clone()).into()), - ); - - actions = actions.push( - widget::button::destructive(fl!("printers-remove")) - .width(Length::Fill) - .on_press(Message::Remove(name.clone()).into()), - ); - - content = content.push(actions); - - if let Some((options_name, options)) = self.options.as_ref() - && options_name == &printer.name - && (!options.media.is_empty() - || !options.media_types.is_empty() - || !options.color_models.is_empty() - || !options.qualities.is_empty() - || !options.sides.is_empty()) - { - content = content.push(text::body(fl!("printers-options"))); - - let mut list = widget::list_column(); - - if !options.media.is_empty() { - let values = options.media.clone(); - let selected = options - .media_default - .as_ref() - .and_then(|default| values.iter().position(|value| value == default)); - let labels = values.clone(); - let name = printer.name.clone(); - - list = list.add( - widget::settings::item::builder(fl!("printers-option-media")).control( - widget::dropdown::popup_dropdown( - labels, - selected, - move |index| Message::SetOption { - printer: name.clone(), - option: "PageSize".to_string(), - value: values.get(index).cloned().unwrap_or_default(), - }, - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |action| { - crate::app::Message::PageMessage(crate::pages::Message::Printers( - action, - )) - }, - ), - ), - ); - } - - if !options.media_types.is_empty() { - let values = options.media_types.clone(); - let selected = options - .media_type_default - .as_ref() - .and_then(|default| values.iter().position(|value| value == default)); - let labels: Vec = values.iter().map(|v| media_type_label(v)).collect(); - let name = printer.name.clone(); - - list = list.add( - widget::settings::item::builder(fl!("printers-option-media-type")).control( - widget::dropdown::popup_dropdown( - labels, - selected, - move |index| Message::SetOption { - printer: name.clone(), - option: "MediaType".to_string(), - value: values.get(index).cloned().unwrap_or_default(), - }, - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |action| { - crate::app::Message::PageMessage( - crate::pages::Message::Printers(action), - ) - }, - ), - ), - ); - } - - if !options.color_models.is_empty() { - let values = options.color_models.clone(); - let selected = options - .color_model_default - .as_ref() - .and_then(|default| values.iter().position(|value| value == default)); - let labels: Vec = values.iter().map(|v| color_model_label(v)).collect(); - let name = printer.name.clone(); - - list = list.add( - widget::settings::item::builder(fl!("printers-option-color")).control( - widget::dropdown::popup_dropdown( - labels, - selected, - move |index| Message::SetOption { - printer: name.clone(), - option: "ColorModel".to_string(), - value: values.get(index).cloned().unwrap_or_default(), - }, - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |action| { - crate::app::Message::PageMessage( - crate::pages::Message::Printers(action), - ) - }, - ), - ), - ); - } - - if !options.qualities.is_empty() { - let values = options.qualities.clone(); - let selected = options - .quality_default - .as_ref() - .and_then(|default| values.iter().position(|value| value == default)); - let labels: Vec = values.iter().map(|v| quality_label(v)).collect(); - let name = printer.name.clone(); - - list = list.add( - widget::settings::item::builder(fl!("printers-option-quality")).control( - widget::dropdown::popup_dropdown( - labels, - selected, - move |index| Message::SetOption { - printer: name.clone(), - option: "cupsPrintQuality".to_string(), - value: values.get(index).cloned().unwrap_or_default(), - }, - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |action| { - crate::app::Message::PageMessage(crate::pages::Message::Printers( - action, - )) - }, - ), - ), - ); - } - - if !options.sides.is_empty() { - let values = options.sides.clone(); - let selected = options - .sides_default - .as_ref() - .and_then(|default| values.iter().position(|value| value == default)); - let labels: Vec = values.iter().map(|v| sides_label(v)).collect(); - let name = printer.name.clone(); - - list = list.add( - widget::settings::item::builder(fl!("printers-option-sides")).control( - widget::dropdown::popup_dropdown( - labels, - selected, - move |index| Message::SetOption { - printer: name.clone(), - option: "Duplex".to_string(), - value: values.get(index).cloned().unwrap_or_default(), - }, - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |action| { - crate::app::Message::PageMessage(crate::pages::Message::Printers( - action, - )) - }, - ), - ), - ); - } - - content = content.push(list); - } - - if !self.markers.is_empty() { - content = content.push(text::body(fl!("printers-ink-levels"))); - - let mut rows = - widget::column::with_children(Vec::>::new()) - .spacing(spacing.space_xs); - - for marker in &self.markers { - let mut children: Vec> = Vec::new(); - - if let Some(color) = marker.color.as_deref().and_then(parse_hex_color) { - children.push(ink_swatch(color)); - } - - children.push( - text::body(ink_label(&marker.name)) - .width(Length::FillPortion(2)) - .apply(Element::from), - ); - - if marker.level >= 0 { - children.push( - widget::progress_bar::determinate_linear(marker.level as f32 / 100.0) - .width(Length::FillPortion(3)) - .apply(Element::from), - ); - children.push( - text::caption(format!("{} %", marker.level)).apply(Element::from), - ); - } else { - children.push(text::caption("—").apply(Element::from)); - } - - rows = rows.push( - widget::row::with_children(children) - .spacing(spacing.space_s) - .align_y(Alignment::Center), - ); - } - - content = content.push(rows); - } - - let jobs: Vec<&backend::Job> = self - .jobs - .iter() - .filter(|job| job.dest == printer.name) - .collect(); - - if !jobs.is_empty() { - content = content.push(text::body(fl!("printers-jobs"))); - - let mut list = widget::list_column(); - for job in jobs { - let cancel = widget::icon::from_name("window-close-symbolic") - .apply(widget::button::icon) - .on_press(Message::CancelJob(job.id).into()); - - let title = if job.title.is_empty() { - format!("#{}", job.id) - } else { - job.title.clone() - }; - - list = list.add( - widget::settings::item::builder(title) - .description(job_status_text(job.status)) - .control(widget::tooltip::tooltip( - cancel, - text::caption(fl!("printers-cancel-job")), - widget::tooltip::Position::Top, - )), - ); - } - - content = content.push(list); - } - - content.into() - } - - /// Add-printer flow, shown in the context drawer. - fn add_view(&self) -> Element<'_, Message> { - let spacing = theme::spacing(); - let mut content = - widget::column::with_children(Vec::>::new()) - .spacing(spacing.space_s); - - content = content.push(text::body(fl!("printers-device"))); - - let mut devices = widget::list_column(); - if self.add.loading { - devices = devices.add(text::caption(fl!("printers-loading"))); - } else if self.add.devices.is_empty() { - devices = devices.add(text::caption(fl!("printers-no-devices"))); - } else { - for (index, device) in self.add.devices.iter().enumerate() { - devices = devices.add( - widget::settings::item::builder(device.info.to_string()) - .description(device.uri.to_string()) - .radio(index, self.add.selected_device, Message::SelectDevice), - ); - } - } - - content = content.push(widget::scrollable(devices).height(Length::Fixed(200.0))); - - content = content.push( - widget::text_input("", &self.add.name) - .label(fl!("printers-name")) - .on_input(Message::NameInput), - ); - - content = content.push(text::body(fl!("printers-driver"))); - - content = content.push( - widget::search_input("", &self.add.driver_filter) - .on_input(Message::DriverFilter) - .on_clear(Message::DriverFilter(String::new())), - ); - - let filter = self.add.driver_filter.to_lowercase(); - let mut drivers = widget::list_column(); - let mut shown = 0usize; - for (index, driver) in self.add.drivers.iter().enumerate().filter(|(_, driver)| { - filter.is_empty() - || driver.description.to_lowercase().contains(&filter) - || driver.id.to_lowercase().contains(&filter) - }) { - let selected = self.add.selected_driver == driver.id; - let id = driver.id.clone(); - drivers = drivers.add( - widget::settings::item::builder(driver.description.to_string()) - .description(driver.id.to_string()) - .radio(index, selected.then_some(index), move |_| { - Message::SelectDriver(id.clone()) - }), - ); - - shown += 1; - if shown == DRIVER_LIST_LIMIT { - break; - } - } - - if shown == 0 { - drivers = drivers.add(text::caption(fl!("printers-no-matching-drivers"))); - } - - content = content.push(widget::scrollable(drivers).height(Length::Fixed(240.0))); - - if let Some(error) = self.add.error.as_deref() { - content = content.push(text::caption(error.to_string())); - } - - let can_submit = self.add.selected_device.is_some() - && !self.add.name.trim().is_empty() - && !self.add.selected_driver.is_empty() - && !self.add.submitting; - - let label = if self.add.submitting { - fl!("printers-add-in-progress") - } else { - fl!("printers-submit") - }; - - content = content.push( - widget::row::with_children(vec![ - widget::space::horizontal().apply(Element::from), - widget::button::suggested(label) - .on_press_maybe(can_submit.then_some(Message::SubmitAdd)) - .apply(Element::from), - ]) - .spacing(spacing.space_s), - ); - - content.into() - } -} - -fn printers_section() -> Section { - crate::slab!(descriptions { - add = fl!("printers-add"); - default = fl!("printers-default"); - make_default = fl!("printers-make-default"); - no_printers = fl!("printers-no-printers"); - no_printers_desc = fl!("printers-no-printers-desc"); - not_accepting = fl!("printers-not-accepting"); - }); - - Section::default() - .title(fl!("printers")) - .descriptions(descriptions) - .view::(move |_binder, page, section| { - let descriptions = §ion.descriptions; - - if page.printers.is_empty() { - return widget::column::with_children(vec![ - widget::icon::from_name("printer-symbolic") - .size(64) - .apply(Element::from), - text::title3(descriptions[no_printers].clone()).apply(Element::from), - text::caption(descriptions[no_printers_desc].clone()).apply(Element::from), - widget::button::suggested(descriptions[add].clone()) - .on_press(Message::OpenAdd.into()) - .apply(Element::from), - ]) - .spacing(theme::spacing().space_s) - .align_x(Alignment::Center) - .apply(widget::container) - .padding(theme::spacing().space_l) - .width(Length::Fill) - .apply(Element::from); - } - - let mut list = widget::list_column(); - - if let Some(notice) = page.notice.as_deref() { - list = list.add(text::caption(notice.to_string())); - } - - for printer in &page.printers { - let mut parts: Vec = Vec::new(); - if let Some(model) = printer.make_and_model.as_deref() - && !model.is_empty() - { - parts.push(model.to_string()); - } - parts.push(state_text(printer.state)); - if !printer.accepting_jobs { - parts.push(descriptions[not_accepting].clone()); - } - - let control: Element<'_, crate::pages::Message> = if printer.is_default { - widget::button::suggested(descriptions[default].clone()).apply(Element::from) - } else { - widget::button::link(descriptions[make_default].clone()) - .on_press(Message::SetDefault(printer.name.clone()).into()) - .apply(Element::from) - }; - - list = list.add( - widget::list::button( - widget::settings::item::builder(printer.info.to_string()) - .description(parts.join(" · ")) - .icon(widget::icon::from_name(printer_icon(printer)).size(24)) - .control(control), - ) - .on_press(Message::Select(printer.name.clone()).into()), - ); - } - - list = list.add( - widget::row::with_children(vec![ - widget::space::horizontal().apply(Element::from), - widget::button::suggested(descriptions[add].clone()) - .on_press(Message::OpenAdd.into()) - .apply(Element::from), - ]) - .spacing(theme::spacing().space_s), - ); - - list.apply(Element::from) - }) -} - -impl page::AutoBind for Page {} diff --git a/cosmic-settings/src/pages/sound/applications.rs b/cosmic-settings/src/pages/sound/applications.rs deleted file mode 100644 index dbe69da..0000000 --- a/cosmic-settings/src/pages/sound/applications.rs +++ /dev/null @@ -1,465 +0,0 @@ -// Copyright 2026 System76 -// SPDX-License-Identifier: GPL-3.0-only - -use super::model; -use cosmic::desktop::{ - DesktopEntryCache, DesktopLookupContext, DesktopResolveOptions, resolve_desktop_entry, -}; -use cosmic::iced::futures; -use cosmic::iced::{self, Alignment, Length, window}; -use cosmic::widget::space::horizontal as horizontal_space; -use cosmic::{Apply, Element, surface, widget}; -use cosmic_config::{Config, ConfigGet}; -use cosmic_settings_audio_client::{self as audio_client, CosmicAudioProxy}; -use cosmic_settings_page::{self as page, Section, section}; -use futures::executor::block_on; -use intmap::IntMap; -use slotmap::SlotMap; -use std::cell::RefCell; -use std::rc::Rc; -use std::sync::Arc; - -const AUDIO_CONFIG: &str = "com.system76.CosmicAudio"; -const AMPLIFICATION_SINK: &str = "amplification_sink"; - -#[derive(Clone, Debug)] -pub enum Message { - Model(cosmic_settings_sound::Message), - SetBalance(u32, f32), - SetMute(u32, bool), - SetSink(u32, usize), - SetVolume(u32, u32), - Surface(surface::Action), - ToggleExpanded(u32), -} - -impl From for crate::pages::Message { - fn from(message: Message) -> Self { - crate::pages::Message::SoundApplications(message) - } -} - -impl From for crate::Message { - fn from(message: Message) -> Self { - crate::Message::PageMessage(message.into()) - } -} - -#[derive(Default)] -pub struct Page { - entity: page::Entity, - model: model::Model, - client: Option>>, - desktop_entries: DesktopEntryCache, - playback_icons: IntMap, - amplification_sink: bool, - expanded: Option, -} - -impl page::AutoBind for Page {} - -impl page::Page for Page { - fn on_enter(&mut self) -> cosmic::Task { - self.amplification_sink = Config::new(AUDIO_CONFIG, 1) - .ok() - .and_then(|config| config.get::(AMPLIFICATION_SINK).ok()) - .unwrap_or(true); - cosmic::Task::none() - } - - fn info(&self) -> page::Info { - page::Info::new("sound-applications", "preferences-sound-symbolic") - .title(fl!("sound-applications")) - } - - fn content( - &self, - sections: &mut SlotMap>, - ) -> Option { - Some(vec![sections.insert(view())]) - } - - fn set_id(&mut self, entity: page::Entity) { - self.entity = entity; - } - - fn on_leave(&mut self) -> cosmic::Task { - *self = Page { - entity: self.entity, - ..Page::default() - }; - cosmic::Task::none() - } - - fn subscription(&self, _core: &cosmic::Core) -> iced::Subscription { - iced::Subscription::run(|| { - iced::stream::channel( - 1, - move |emitter: futures::channel::mpsc::Sender| async move { - cosmic_settings_sound::subscribe(emitter, |m| Message::Model(m).into()).await - }, - ) - }) - } -} - -impl Page { - fn resolve_playback_icon(&mut self, node_id: u32, info: &audio_client::PlaybackInfo) { - let Some(candidate) = [ - info.application_id.as_deref(), - info.icon_name.as_deref(), - info.application_name.as_deref(), - ] - .into_iter() - .flatten() - .find(|value| !value.is_empty()) else { - return; - }; - - let mut context = DesktopLookupContext::new(candidate); - if let Some(icon_name) = info.icon_name.as_deref().filter(|value| !value.is_empty()) { - context = context.with_identifier(icon_name); - } - if let Some(application_name) = info - .application_name - .as_deref() - .filter(|value| !value.is_empty()) - { - context = context.with_title(application_name); - } - - let entry = resolve_desktop_entry( - &mut self.desktop_entries, - &context, - &DesktopResolveOptions::default(), - ); - let entry_icon = entry.icon(); - let icon_name = entry_icon - .filter(|value| !value.is_empty()) - .or(info.icon_name.as_deref()) - .or(info.application_id.as_deref()) - .unwrap_or("application-default"); - - self.playback_icons.insert(node_id, icon_name.to_owned()); - } - - pub fn update(&mut self, message: Message) -> cosmic::Task { - match message { - Message::Model(cosmic_settings_sound::Message::Subscription(message)) => { - match &message { - audio_client::Event::Playback(node_id, info) => { - self.resolve_playback_icon(*node_id, info); - } - audio_client::Event::RemoveNode(node_id) => { - self.playback_icons.remove(*node_id); - } - _ => {} - } - self.model.update(message); - } - - Message::Model(cosmic_settings_sound::Message::Client(client)) => { - if let Some(client) = Arc::into_inner(client) { - self.client = Some(Rc::new(RefCell::new(client))); - self.model = model::Model::default(); - self.playback_icons = IntMap::new(); - } - } - - Message::SetMute(node_id, mute) => { - self.model - .update(audio_client::Event::NodeMute(node_id, mute)); - if let Some(client) = &self.client { - match block_on(client.borrow_mut().conn.set_node_mute(node_id, mute)) { - Ok(Ok(_)) => {} - Ok(Err(why)) => { - tracing::error!(?why, node_id, mute, "daemon rejected playback mute"); - } - Err(why) => { - tracing::error!(?why, node_id, mute, "failed to set playback mute"); - } - } - } else { - tracing::warn!(node_id, mute, "audio client is not connected"); - } - } - - Message::SetBalance(playback_id, balance) => { - if let Some(playback) = self - .model - .playback - .iter_mut() - .find(|playback| playback.id == playback_id) - { - playback.balance = Some(balance); - } - - if let Some(client) = &self.client { - match block_on( - client - .borrow_mut() - .conn - .set_node_volume_balance(playback_id, Some(balance)), - ) { - Ok(Ok(volume)) => { - self.model.update(audio_client::Event::NodeVolume( - playback_id, - volume.volume, - volume.balance, - )); - } - Ok(Err(why)) => { - tracing::error!( - ?why, - playback_id, - balance, - "daemon rejected playback balance" - ); - } - Err(why) => { - tracing::error!( - ?why, - playback_id, - balance, - "failed to set playback balance" - ); - } - } - } else { - tracing::warn!(playback_id, balance, "audio client is not connected"); - } - } - - Message::SetSink(playback_id, sorted_pos) => { - let Some(&sink_pos) = self.model.sinks.sorted_index.get(sorted_pos) else { - return cosmic::Task::none(); - }; - let Some(&sink_id) = self.model.sinks.id.get(sink_pos as usize) else { - return cosmic::Task::none(); - }; - - if let Some(client) = &self.client { - match block_on( - client - .borrow_mut() - .conn - .set_playback_sink(playback_id, sink_id), - ) { - Ok(Ok(())) => { - if let Some(playback) = self - .model - .playback - .iter_mut() - .find(|playback| playback.id == playback_id) - { - playback.sink_id = Some(sink_id); - } - } - Ok(Err(why)) => { - tracing::error!( - ?why, - playback_id, - sink_id, - "daemon rejected playback output" - ); - } - Err(why) => { - tracing::error!( - ?why, - playback_id, - sink_id, - "failed to set playback output" - ); - } - } - } else { - tracing::warn!(playback_id, sink_id, "audio client is not connected"); - } - } - - Message::SetVolume(node_id, volume) => { - if let Some(playback) = self - .model - .playback - .iter_mut() - .find(|playback| playback.id == node_id) - { - playback.volume = volume; - } - if let Some(client) = &self.client { - match block_on(client.borrow_mut().conn.set_node_volume(node_id, volume)) { - Ok(Ok(_)) => {} - Ok(Err(why)) => { - tracing::error!( - ?why, - node_id, - volume, - "daemon rejected playback volume" - ); - } - Err(why) => { - tracing::error!(?why, node_id, volume, "failed to set playback volume"); - } - } - } else { - tracing::warn!(node_id, volume, "audio client is not connected"); - } - } - - Message::Surface(action) => { - return cosmic::task::message(crate::app::Message::Surface(action)); - } - - Message::ToggleExpanded(node_id) => { - self.expanded = if self.expanded == Some(node_id) { - None - } else { - Some(node_id) - }; - } - } - - cosmic::Task::none() - } -} - -pub fn view() -> Section { - Section::default().view::(move |_, page, _section| { - if page.model.playback.is_empty() { - return widget::settings::section() - .add( - widget::text::body(fl!("sound-applications", "none")) - .width(Length::Fill) - .align_x(Alignment::Center), - ) - .into(); - } - - let mut applications = widget::settings::section(); - - for playback in page.model.playback.iter().cloned() { - let node_id = playback.id; - let mute = playback.mute; - let volume = playback.volume; - let expanded = page.expanded == Some(node_id); - let icon_name = page - .playback_icons - .get(node_id) - .map(String::as_str) - .unwrap_or("application-default"); - - let slider = if page.amplification_sink { - widget::slider(0..=150, volume, move |volume| { - Message::SetVolume(node_id, volume) - }) - .breakpoints(&[100]) - } else { - widget::slider(0..=100, volume, move |volume| { - Message::SetVolume(node_id, volume) - }) - } - .width(Length::Fill) - .apply(widget::container) - .max_width(250.); - - let volume_controls = widget::row::with_capacity(5) - .align_y(Alignment::Center) - .push( - widget::button::icon(widget::icon::from_name(if mute { - "audio-volume-muted-symbolic" - } else { - "audio-volume-high-symbolic" - })) - .on_press(Message::SetMute(node_id, !mute)), - ) - .push( - widget::text::body(volume.to_string()) - .width(Length::Fixed(22.)) - .align_x(Alignment::Center), - ) - .push(horizontal_space().width(8.)) - .push(slider) - .push( - widget::button::icon(widget::icon::from_name(if expanded { - "go-up-symbolic" - } else { - "go-down-symbolic" - })) - .on_press(Message::ToggleExpanded(node_id)), - ) - .apply(Element::from) - .map(crate::pages::Message::from); - - applications = applications.add( - widget::settings::item::builder(playback.name().to_owned()) - .icon(widget::icon::from_name(icon_name).size(16)) - .flex_control(volume_controls) - .align_items(Alignment::Center), - ); - - if !expanded { - continue; - } - - let selected_sink = - playback - .selected_sink(page.model.default_sink) - .and_then(|sink_id| { - let sink_pos = page.model.sinks.id.iter().position(|id| *id == sink_id)?; - page.model - .sinks - .sorted_index - .iter() - .position(|pos| usize::from(*pos) == sink_pos) - }); - let output = widget::dropdown::popup_dropdown( - &page.model.sinks.sorted_display, - selected_sink, - move |pos| Message::SetSink(node_id, pos), - window::Id::RESERVED, - Message::Surface, - crate::Message::from, - ) - .apply(Element::from) - .map(crate::pages::Message::from); - - let balance = widget::row::with_capacity(5) - .align_y(Alignment::Center) - .push( - widget::column::with_capacity(2) - .align_x(Alignment::Center) - .push(widget::text::body(fl!("sound-output", "left"))) - .push(horizontal_space().width(22.)), - ) - .push(horizontal_space().width(8.)) - .push( - widget::slider(0.0..=2.0, playback.balance.unwrap_or(1.0), move |balance| { - Message::SetBalance(node_id, balance) - }) - .step(0.01) - .breakpoints(&[1.0]), - ) - .push(horizontal_space().width(8.)) - .push( - widget::column::with_capacity(2) - .align_x(Alignment::Center) - .push(widget::text::body(fl!("sound-output", "right"))) - .push(horizontal_space().width(22.)), - ) - .apply(Element::from) - .map(crate::pages::Message::from); - - applications = applications - .add(widget::settings::item( - fl!("sound-output", "device"), - output, - )) - .add(widget::settings::item( - fl!("sound-output", "balance"), - balance, - )); - } - - applications.into() - }) -} diff --git a/cosmic-settings/src/pages/sound/device_profiles.rs b/cosmic-settings/src/pages/sound/device_profiles.rs index 66c1045..4e4e627 100644 --- a/cosmic-settings/src/pages/sound/device_profiles.rs +++ b/cosmic-settings/src/pages/sound/device_profiles.rs @@ -1,26 +1,13 @@ // Copyright 2025 System76 // SPDX-License-Identifier: GPL-3.0-only -use super::model; -use cosmic::iced::futures; -use cosmic::{Apply, iced, widget}; -use cosmic_settings_audio_client::{self as audio_client, CosmicAudioProxy}; +use cosmic::{Apply, widget}; use cosmic_settings_page::{self as page, Section, section}; -use futures::executor::block_on; +use cosmic_settings_sound_subscription::{self as subscription}; use slotmap::SlotMap; -use std::cell::RefCell; -use std::rc::Rc; -use std::sync::Arc; #[derive(Clone, Debug)] -pub enum Message { - /// Update for the model. - Model(cosmic_settings_sound::Message), - /// Set the profile of a sound device. - SetProfile(u32, u32), - /// Surface Action - Surface(cosmic::surface::Action), -} +pub enum Message {} impl From for crate::pages::Message { fn from(message: Message) -> Self { @@ -37,8 +24,6 @@ impl From for crate::Message { #[derive(Default)] pub struct Page { entity: page::Entity, - model: model::Model, - client: Option>>, } impl page::AutoBind for Page {} @@ -56,83 +41,55 @@ impl page::Page for Page { Some(vec![sections.insert(view())]) } + fn on_leave(&mut self) -> cosmic::Task { + cosmic::Task::done(crate::pages::Message::Sound(super::Message::Reload)) + } + fn set_id(&mut self, entity: cosmic_settings_page::Entity) { self.entity = entity; } - fn on_leave(&mut self) -> cosmic::Task { - *self = Page { - entity: self.entity, - ..Page::default() - }; - cosmic::Task::none() - } - - fn subscription(&self, _core: &cosmic::Core) -> iced::Subscription { - iced::Subscription::run(|| { - iced::stream::channel( - 1, - move |emitter: futures::channel::mpsc::Sender| async move { - cosmic_settings_sound::subscribe(emitter, |m| Message::Model(m).into()).await - }, - ) - }) + fn subscription( + &self, + _core: &cosmic::Core, + ) -> cosmic::iced::Subscription { + cosmic::iced::Subscription::run(subscription::watch) + .map(|message| super::Message::Subscription(message).into()) } } impl Page { - pub fn update(&mut self, message: Message) -> cosmic::Task { - match message { - Message::Model(cosmic_settings_sound::Message::Subscription(message)) => { - self.model.update(message); - } - - Message::Model(cosmic_settings_sound::Message::Client(client)) => { - if let Some(client) = Arc::into_inner(client) { - self.client = Some(Rc::new(RefCell::new(client))); - self.model = model::Model { - text: model::Text { - hd_audio: fl!("sound-hd-audio"), - usb_audio: fl!("sound-usb-audio"), - }, - ..model::Model::default() - }; - } - } - - Message::Surface(a) => return cosmic::task::message(crate::app::Message::Surface(a)), - - Message::SetProfile(id, index) => { - if let Some(client) = self.client.clone() { - block_on(async move { - _ = client.borrow_mut().conn.set_profile(id, index, true).await; - }); - } - } - } - + pub fn update(&mut self, _message: Message) -> cosmic::Task { cosmic::Task::none() } } pub fn view() -> Section { - Section::default().view::(move |_, page, _section| { - let devices = page.model.device_profile_dropdowns.iter().cloned().map( - |(device_id, name, active_profile, indexes, descriptions)| { + Section::default().view::(move |binder, _page, _section| { + let sound_page_id = binder.find_page_by_id("sound").unwrap().0; + let sound_page = binder.page[sound_page_id] + .downcast_ref::() + .unwrap(); + + let devices = sound_page + .model + .device_profile_dropdowns + .iter() + .cloned() + .map(|(device_id, name, active_profile, indexes, descriptions)| { let dropdown = widget::dropdown::popup_dropdown( descriptions, active_profile, - move |id| Message::SetProfile(device_id, indexes[id]), + move |id| super::Message::SetProfile(device_id, indexes[id]), cosmic::iced::window::Id::RESERVED, - Message::Surface, + super::Message::Surface, crate::Message::from, ) .apply(cosmic::Element::from) .map(crate::pages::Message::from); widget::settings::item::builder(name).control(dropdown) - }, - ); + }); widget::settings::section().extend(devices).into() }) diff --git a/cosmic-settings/src/pages/sound/mod.rs b/cosmic-settings/src/pages/sound/mod.rs index 8537c93..a2a7699 100644 --- a/cosmic-settings/src/pages/sound/mod.rs +++ b/cosmic-settings/src/pages/sound/mod.rs @@ -1,22 +1,18 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only -pub mod applications; pub mod device_profiles; -use cosmic::iced::{self, Alignment, Length, window}; -use cosmic::widget::space::horizontal as horizontal_space; -use cosmic::widget::{self, settings}; -use cosmic::{Apply, Element, Task, surface}; +use cosmic::{ + Apply, Element, Task, + iced::{Alignment, Length, window}, + surface, + widget::{self, settings, space::horizontal as horizontal_space}, +}; use cosmic_config::{Config, ConfigGet, ConfigSet}; -use cosmic_settings_audio_client::{self as audio_client, Client, CosmicAudioProxy}; use cosmic_settings_page::{self as page, Section, section}; -use cosmic_settings_sound::model; -use futures::executor::block_on; +use cosmic_settings_sound_subscription as subscription; use slotmap::SlotMap; -use std::sync::atomic::AtomicU32; -use std::sync::{Arc, atomic}; -use std::time::Duration; const AUDIO_CONFIG: &str = "com.system76.CosmicAudio"; const AMPLIFICATION_SINK: &str = "amplification_sink"; @@ -24,20 +20,22 @@ const AMPLIFICATION_SOURCE: &str = "amplification_source"; #[derive(Clone, Debug)] pub enum Message { - /// Updates for the model. - Model(cosmic_settings_sound::Message), - /// Reattach the client - ReattachClient(Arc), + /// Reload the model + Reload, /// Change the default output. SetDefaultSink(usize), /// Change the default input output. SetDefaultSource(usize), + /// Set the profile of a sound device. + SetProfile(u32, u32), /// Change the balance of the active sink. - SetSinkBalance(f32), + SetSinkBalance(u32), /// Request to change the default output volume. SetSinkVolume(u32), /// Request to change the input volume. SetSourceVolume(u32), + /// Messages handled by the sound module in cosmic-settings-subscriptions + Subscription(subscription::Message), /// Surface Action Surface(surface::Action), /// Toggle the mute status of the output. @@ -62,38 +60,32 @@ impl From for crate::Message { } } +impl From for Message { + fn from(val: subscription::Message) -> Self { + Message::Subscription(val) + } +} + pub struct Page { entity: page::Entity, - applications: page::Entity, device_profiles: page::Entity, - client: Option, - model: model::Model, + pub(self) model: subscription::Model, sound_config: Option, - applied_sink_volume: Arc, - applied_sink_volume_balance: Arc, - applied_source_volume: Arc, amplification_sink: bool, amplification_source: bool, } impl Default for Page { fn default() -> Self { + let mut model = subscription::Model::default(); + model.unplugged_text = fl!("sound-device-port-unplugged"); + model.hd_audio_text = fl!("sound-hd-audio"); + model.usb_audio_text = fl!("sound-usb-audio"); Self { entity: page::Entity::default(), - applications: page::Entity::default(), device_profiles: page::Entity::default(), - client: None, - model: model::Model { - text: model::Text { - hd_audio: fl!("sound-hd-audio"), - usb_audio: fl!("sound-usb-audio"), - }, - ..model::Model::default() - }, + model, sound_config: None, - applied_sink_volume: Arc::new(AtomicU32::new(0)), - applied_sink_volume_balance: Arc::new(AtomicU32::new(0)), - applied_source_volume: Arc::new(AtomicU32::new(0)), amplification_sink: false, amplification_source: false, } @@ -125,7 +117,6 @@ impl page::Page for Page { Some(vec![ sections.insert(output()), sections.insert(input()), - sections.insert(applications()), sections.insert(device_profiles()), ]) } @@ -140,21 +131,17 @@ impl page::Page for Page { self.entity = entity; } - fn subscription(&self, _core: &cosmic::Core) -> iced::Subscription { - iced::Subscription::run(|| { - iced::stream::channel( - 1, - move |emitter: futures::channel::mpsc::Sender| async move { - cosmic_settings_sound::subscribe(emitter, |m| Message::Model(m).into()).await - }, - ) - }) + fn subscription( + &self, + _core: &cosmic::Core, + ) -> cosmic::iced::Subscription { + cosmic::iced::Subscription::run(subscription::watch) + .map(|message| Message::Subscription(message).into()) } fn on_leave(&mut self) -> Task { *self = Page { entity: self.entity, - applications: self.applications, device_profiles: self.device_profiles, ..Page::default() }; @@ -168,136 +155,61 @@ impl page::AutoBind for Page { mut page: page::Insert, ) -> page::Insert { let id = page.sub_page_with_id::(); - let applications_id = page.sub_page_with_id::(); let model = page.model.page_mut::().unwrap(); model.device_profiles = id; - model.applications = applications_id; page } } impl Page { pub fn update(&mut self, message: Message) -> Task { - tracing::debug!(target: "sound", ?message, "update"); match message { Message::Surface(a) => return cosmic::task::message(crate::app::Message::Surface(a)), - Message::Model(cosmic_settings_sound::Message::Subscription(message)) => { - self.model.update(message); - } - - Message::Model(cosmic_settings_sound::Message::Client(client)) => { - if let Some(client) = Arc::into_inner(client) { - self.client = Some(client); - self.model = model::Model { - text: model::Text { - hd_audio: fl!("sound-hd-audio"), - usb_audio: fl!("sound-usb-audio"), - }, - ..model::Model::default() - }; - } - } - - Message::ReattachClient(client) => { - if let Some(client) = Arc::into_inner(client) { - self.client = Some(client); - } - } - - Message::SetDefaultSink(pos) => { - if let Some(&pos) = self.model.sinks.sorted_index.get(pos) - && let Some(&node_id) = self.model.sinks.id.get(pos as usize) - && let Some(client) = self.client.as_mut() - { - block_on(async { - _ = client.conn.set_default(node_id, true).await; - }); - } - } - - Message::SetDefaultSource(pos) => { - if let Some(&pos) = self.model.sources.sorted_index.get(pos) - && let Some(&node_id) = self.model.sources.id.get(pos as usize) - && let Some(client) = self.client.as_mut() - { - block_on(async { - _ = client.conn.set_default(node_id, true).await; - }); - } - } - - Message::ToggleSinkMute => { - if let Some(ref mut client) = self.client { - block_on(async { - _ = client.conn.sink_mute_toggle().await; - }); - } - } - - Message::ToggleSourceMute => { - if let Some(ref mut client) = self.client { - block_on(async { - _ = client.conn.source_mute_toggle().await; - }); - } - } - - Message::SetSinkVolume(volume) => { - self.applied_sink_volume - .store(volume, atomic::Ordering::Relaxed); - self.model.active_sink.volume = volume; - self.model.active_sink.volume_text = volume.to_string(); - if let Some(mut client) = self.client.take() { - let volume = Arc::clone(&self.applied_sink_volume); - return cosmic::Task::future(async move { - tokio::time::sleep(Duration::from_millis(128)).await; - _ = client - .conn - .set_sink_volume(volume.load(atomic::Ordering::Relaxed)) - .await; - Message::ReattachClient(Arc::new(client)).into() - }); - } - } - - Message::SetSourceVolume(volume) => { - self.applied_source_volume - .store(volume, atomic::Ordering::Relaxed); - self.model.active_source.volume = volume; - self.model.active_source.volume_text = volume.to_string(); - if let Some(mut client) = self.client.take() { - let volume = Arc::clone(&self.applied_source_volume); - return cosmic::Task::future(async move { - tokio::time::sleep(Duration::from_millis(128)).await; - _ = client - .conn - .set_source_volume(volume.load(atomic::Ordering::Relaxed)) - .await; - Message::ReattachClient(Arc::new(client)).into() - }); - } + Message::Subscription(message) => { + return self + .model + .update(message) + .map(|message| Message::Subscription(message).into()); } Message::SetSinkBalance(balance) => { - self.applied_sink_volume_balance - .store((balance * 1000.0) as u32, atomic::Ordering::Relaxed); - self.model.active_sink.balance = Some(balance); - if let Some((mut client, sink_id)) = self.client.take().zip(self.model.default_sink) - { - let balance = Arc::clone(&self.applied_sink_volume_balance); - return cosmic::Task::future(async move { - tokio::time::sleep(Duration::from_millis(128)).await; - _ = client - .conn - .set_node_volume_balance( - sink_id, - Some(balance.load(atomic::Ordering::Relaxed) as f32 / 1000.0), - ) - .await; - Message::ReattachClient(Arc::new(client)).into() - }); - } + return self + .model + .set_sink_balance(balance) + .map(|message| Message::Subscription(message).into()); + } + + Message::SetDefaultSink(pos) => { + return self + .model + .set_default_sink(pos) + .map(|message| Message::Subscription(message).into()); + } + + Message::SetDefaultSource(pos) => { + return self + .model + .set_default_source(pos) + .map(|message| Message::Subscription(message).into()); + } + + Message::ToggleSinkMute => self.model.toggle_sink_mute(), + + Message::ToggleSourceMute => self.model.toggle_source_mute(), + + Message::SetSinkVolume(volume) => { + return self + .model + .set_sink_volume(volume) + .map(|message| Message::Subscription(message).into()); + } + + Message::SetSourceVolume(volume) => { + return self + .model + .set_source_volume(volume) + .map(|message| Message::Subscription(message).into()); } Message::ToggleOverAmplificationSink(enabled) => { @@ -319,6 +231,18 @@ impl Page { tracing::error!(?why, "Failed to save over amplification setting"); } } + + Message::SetProfile(object_id, index) => { + self.model.set_profile(object_id, index, true); + } + + Message::Reload => { + let mut model = subscription::Model::default(); + model.hd_audio_text = std::mem::take(&mut self.model.hd_audio_text); + model.unplugged_text = std::mem::take(&mut self.model.unplugged_text); + model.usb_audio_text = std::mem::take(&mut self.model.usb_audio_text); + self.model = model; + } } Task::none() @@ -338,17 +262,17 @@ fn input() -> Section { .title(fl!("sound-input")) .descriptions(descriptions) .view::(move |_binder, page, section| { - if page.model.sources.id.is_empty() { + if page.model.sources().is_empty() { return widget::space().into(); } let slider = if page.amplification_source { - widget::slider(0..=150, page.model.active_source.volume, |change| { + widget::slider(0..=150, page.model.source_volume, |change| { Message::SetSourceVolume(change).into() }) .breakpoints(&[100]) } else { - widget::slider(0..=100, page.model.active_source.volume, |change| { + widget::slider(0..=100, page.model.source_volume, |change| { Message::SetSourceVolume(change).into() }) } @@ -359,25 +283,23 @@ fn input() -> Section { let volume_control = widget::row::with_capacity(4) .align_y(Alignment::Center) .push( - widget::button::icon(widget::icon::from_name( - if page.model.active_source.mute { - "microphone-sensitivity-muted-symbolic" - } else { - "audio-input-microphone-symbolic" - }, - )) + widget::button::icon(widget::icon::from_name(if page.model.source_mute { + "microphone-sensitivity-muted-symbolic" + } else { + "audio-input-microphone-symbolic" + })) .on_press(Message::ToggleSourceMute.into()), ) .push( - widget::text::body(&page.model.active_source.volume_text) + widget::text::body(&page.model.source_volume_text) .width(Length::Fixed(22.0)) .align_x(Alignment::Center), ) .push(horizontal_space().width(8.)) .push(slider); let devices = widget::dropdown::popup_dropdown( - &page.model.sources.sorted_display, - page.model.sources.active(), + page.model.sources(), + Some(page.model.active_source().unwrap_or(0)), Message::SetDefaultSource, window::Id::RESERVED, Message::Surface, @@ -424,12 +346,12 @@ fn output() -> Section { .descriptions(descriptions) .view::(move |_binder, page, section| { let slider = if page.amplification_sink { - widget::slider(0..=150, page.model.active_sink.volume, |change| { + widget::slider(0..=150, page.model.sink_volume, |change| { Message::SetSinkVolume(change).into() }) .breakpoints(&[100]) } else { - widget::slider(0..=100, page.model.active_sink.volume, |change| { + widget::slider(0..=100, page.model.sink_volume, |change| { Message::SetSinkVolume(change).into() }) } @@ -440,7 +362,7 @@ fn output() -> Section { let volume_control = widget::row::with_capacity(4) .align_y(Alignment::Center) .push( - widget::button::icon(if page.model.active_sink.mute { + widget::button::icon(if page.model.sink_mute { widget::icon::from_name("audio-volume-muted-symbolic") } else { widget::icon::from_name("audio-volume-high-symbolic") @@ -448,7 +370,7 @@ fn output() -> Section { .on_press(Message::ToggleSinkMute.into()), ) .push( - widget::text::body(&page.model.active_sink.volume_text) + widget::text::body(&page.model.sink_volume_text) .width(Length::Fixed(22.0)) .align_x(Alignment::Center), ) @@ -456,8 +378,8 @@ fn output() -> Section { .push(slider); let devices = widget::dropdown::popup_dropdown( - &page.model.sinks.sorted_display, - page.model.sinks.active(), + page.model.sinks(), + Some(page.model.active_sink().unwrap_or(0)), Message::SetDefaultSink, window::Id::RESERVED, Message::Surface, @@ -490,12 +412,12 @@ fn output() -> Section { .push(horizontal_space().width(8.)) .push( widget::slider( - 0.0..=2.0, - page.model.active_sink.balance.unwrap_or(1.0), + 0..=200, + (page.model.sink_balance.unwrap_or(1.0).max(0.) * 100.).round() + as u32, |change| Message::SetSinkBalance(change).into(), ) - .step(0.01) - .breakpoints(&[1.0]), + .breakpoints(&[100]), ) .push(horizontal_space().width(8.)) .push( @@ -531,31 +453,24 @@ fn device_profiles() -> Section { .descriptions(descriptions) .view::(move |_binder, page, section| { let descriptions = §ion.descriptions; + let button = widget::row::with_children(vec![ + horizontal_space().into(), + widget::icon::from_name("go-next-symbolic").size(16).into(), + ]); - settings::section() - .add(crate::widget::go_next_item( - &descriptions[button_txt], - crate::pages::Message::Page(page.device_profiles), - )) - .into() - }) -} + let device_profiles = settings::item::builder(&*descriptions[button_txt]) + .control(button) + .spacing(16) + .apply(widget::container) + .width(Length::Fill) + .class(cosmic::theme::Container::List) + .apply(widget::button::custom) + .width(Length::Fill) + .class(cosmic::theme::Button::Transparent) + .on_press(crate::pages::Message::Page(page.device_profiles)) + .width(Length::Fill); -/// A section for opening the application volume controls sub-page. -fn applications() -> Section { - crate::slab!(descriptions { - button_txt = fl!("sound-applications"); - }); - - Section::default() - .descriptions(descriptions) - .view::(move |_binder, page, section| { - settings::section() - .add(crate::widget::go_next_item( - §ion.descriptions[button_txt], - crate::pages::Message::Page(page.applications), - )) - .into() + settings::section().add(device_profiles).into() }) } @@ -574,3 +489,21 @@ fn applications() -> Section { // .into() // }) // } + +// fn applications() -> Section { +// let mut descriptions = Slab::new(); + +// let applications = descriptions.insert(fl!("sound-applications", "desc")); + +// Section::default() +// .title(fl!("sound-applications")) +// .descriptions(descriptions) +// .view::(move |_binder, _page, section| { +// settings::section().title(§ion.title) +// .add(settings::item( +// &*section.descriptions[applications], +// text::body("TODO"), +// )) +// .into() +// }) +// } diff --git a/cosmic-settings/src/pages/system/about.rs b/cosmic-settings/src/pages/system/about.rs index d169ddb..0ee99d0 100644 --- a/cosmic-settings/src/pages/system/about.rs +++ b/cosmic-settings/src/pages/system/about.rs @@ -66,8 +66,7 @@ impl page::Page for Page { fn on_enter(&mut self) -> Task { let (task, handle) = Task::future(async move { - let info = Info::load().await; - crate::pages::Message::About(Message::Info(Box::new(info))) + crate::pages::Message::About(Message::Info(Box::new(Info::load()))) }) .abortable(); diff --git a/cosmic-settings/src/pages/system/info.rs b/cosmic-settings/src/pages/system/info.rs index a227fb2..2ea3ac5 100644 --- a/cosmic-settings/src/pages/system/info.rs +++ b/cosmic-settings/src/pages/system/info.rs @@ -3,9 +3,7 @@ #[cfg(feature = "wgpu")] use cosmic::iced::wgpu; -use std::collections::{HashMap, HashSet}; -use std::ffi::OsStr; -use std::process::Command; +use std::{collections::HashMap, collections::HashSet, ffi::OsStr, process::Command}; #[must_use] #[derive(Clone, Debug, Default)] @@ -31,7 +29,7 @@ impl Info { } #[cfg(feature = "wgpu")] - async fn wgpu_graphics() -> Vec { + fn wgpu_graphics() -> Vec { let mut graphics = Vec::new(); // Use wgpu to enumerate GPUs. Works cross-platform and doesn't require external tools @@ -45,7 +43,7 @@ impl Info { let mut seen_devices = HashSet::new(); let mut seen_names = HashSet::new(); - for adapter in adapters.await { + for adapter in adapters { let adapter_info = adapter.get_info(); if adapter_info.device_type == wgpu::DeviceType::Cpu { @@ -142,7 +140,7 @@ impl Info { graphics } - pub async fn load() -> Info { + pub fn load() -> Info { let mut info = Info { os_architecture: architecture(), kernel_version: kernel_version(), @@ -194,7 +192,7 @@ impl Info { #[cfg(feature = "wgpu")] { - info.graphics = Self::wgpu_graphics().await; + info.graphics = Self::wgpu_graphics(); } info diff --git a/cosmic-settings/src/pages/system/users/mod.rs b/cosmic-settings/src/pages/system/users/mod.rs index 2e48195..5d23597 100644 --- a/cosmic-settings/src/pages/system/users/mod.rs +++ b/cosmic-settings/src/pages/system/users/mod.rs @@ -4,22 +4,25 @@ mod getent; use crate::pages; -use cosmic::dialog::file_chooser; -use cosmic::iced::{Alignment, Length}; -use cosmic::widget::space::horizontal; -use cosmic::widget::{self, column, icon, list, row, settings, text}; -use cosmic::{Apply, Element}; +use cosmic::{ + Apply, Element, + dialog::file_chooser, + iced::{Alignment, Length}, + widget::{self, column, icon, list, row, settings, space::horizontal, text}, +}; use cosmic_settings_page::{self as page, Section, section}; use image::GenericImageView; use pwhash::{bcrypt, md5_crypt, sha256_crypt, sha512_crypt}; use regex::Regex; use slotmap::SlotMap; -use std::collections::HashMap; -use std::fs::File; -use std::future::Future; -use std::io::{BufRead, BufReader}; -use std::path::{Path, PathBuf}; -use std::sync::Arc; +use std::{ + collections::HashMap, + fs::File, + future::Future, + io::{BufRead, BufReader}, + path::{Path, PathBuf}, + sync::Arc, +}; use url::Url; use zbus_polkit::policykit1::CheckAuthorizationFlags; diff --git a/cosmic-settings/src/pages/time/date.rs b/cosmic-settings/src/pages/time/date.rs index 8127127..16cc382 100644 --- a/cosmic-settings/src/pages/time/date.rs +++ b/cosmic-settings/src/pages/time/date.rs @@ -2,19 +2,24 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::widget::selection_context_item; -use cosmic::app::ContextDrawer; -use cosmic::cosmic_config::{self, ConfigGet, ConfigSet}; -use cosmic::iced::core::text::Wrapping; -use cosmic::widget::{self, dropdown, settings}; -use cosmic::{Apply, Element, Task, surface}; +use cosmic::{ + Apply, Element, Task, + app::ContextDrawer, + cosmic_config::{self, ConfigGet, ConfigSet}, + iced::core::text::Wrapping, + surface, + widget::{self, dropdown, list, settings}, +}; use cosmic_settings_page::{self as page, Section, section}; -use icu::calendar::types::Weekday; -use icu::calendar::{Gregorian, week}; -use icu::datetime::input::{Date, DateTime, Time}; -use icu::datetime::options::TimePrecision; -use icu::datetime::{DateTimeFormatter, DateTimeFormatterPreferences, fieldsets}; -use icu::locale::Locale; -use icu::locale::preferences::extensions::unicode::keywords::HourCycle; +use icu::{ + calendar::{Gregorian, types::Weekday, week}, + datetime::{ + DateTimeFormatter, DateTimeFormatterPreferences, fieldsets, + input::{Date, DateTime, Time}, + options::TimePrecision, + }, + locale::{Locale, preferences::extensions::unicode::keywords::HourCycle}, +}; use slotmap::{Key, SlotMap}; pub use timedate_zbus::TimeDateProxy; use tracing::error; diff --git a/cosmic-settings/src/pages/time/region.rs b/cosmic-settings/src/pages/time/region.rs index 7da958a..36128f7 100644 --- a/cosmic-settings/src/pages/time/region.rs +++ b/cosmic-settings/src/pages/time/region.rs @@ -7,20 +7,22 @@ use std::sync::Arc; use crate::widget::selection_context_item; use cosmic::app::{ContextDrawer, context_drawer}; use cosmic::iced::{Alignment, Length}; -use cosmic::widget::{self, button}; +use cosmic::widget::{self, button, list}; use cosmic::{Apply, Element}; use cosmic_config::{ConfigGet, ConfigSet}; -use cosmic_settings_page::{self as page, Section, section}; +use cosmic_settings_page::Section; +use cosmic_settings_page::{self as page, section}; use eyre::Context; -use icu::calendar::types::Weekday; -use icu::calendar::week; -use icu::datetime::input::{Date, DateTime, Time}; -use icu::datetime::{DateTimeFormatter, DateTimeFormatterPreferences, fieldsets}; -use icu::decimal::DecimalFormatter; -use icu::decimal::input::Decimal; -use icu::locale::Locale; +use icu::{ + calendar::{types::Weekday, week}, + datetime::{ + DateTimeFormatter, DateTimeFormatterPreferences, fieldsets, + input::{Date, DateTime, Time}, + }, + decimal::{DecimalFormatter, input::Decimal}, + locale::Locale, +}; use locales_rs as locale; -use regex::Regex; use slotmap::{DefaultKey, SlotMap}; static GNOME_LANGUAGE_SELECTOR: &str = "gnome-language-selector"; @@ -240,7 +242,9 @@ impl Page { let region = region.lang_code.clone(); return cosmic::task::future(async move { - if set_locale(lang, region.clone()).await.is_ok() { + if let Ok(exit_status) = set_locale(lang, region.clone()).await + && exit_status.success() + { update_time_settings_after_region_change(region); } @@ -494,8 +498,11 @@ mod preferred_languages { use crate::pages::time::region::localized_iso_codes; use super::Message; - use cosmic::iced::{Alignment, Length}; - use cosmic::{Apply, widget}; + use cosmic::{ + Apply, + iced::{Alignment, Length}, + widget, + }; use cosmic_settings_page::Section; pub fn section() -> Section { @@ -703,26 +710,20 @@ pub async fn page_reload() -> eyre::Result { let mut available_languages_set = BTreeSet::new(); - // Use 'locale -a' instead of 'localectl list-locales' for OpenRC compatibility - let output_result = tokio::process::Command::new("locale") - .arg("-a") + let output = tokio::process::Command::new("localectl") + .arg("list-locales") .output() - .await; + .await + .expect("Failed to run localectl"); - let locale_list = match output_result { - Ok(output) => { - let output_str = String::from_utf8(output.stdout).unwrap_or_default(); - parse_locale_output(&output_str) + let output = String::from_utf8(output.stdout).unwrap_or_default(); + for line in output.lines() { + if line == "C.UTF-8" { + continue; } - Err(why) => { - tracing::error!(?why, "failed to list available locales using 'locale -a'"); - Vec::new() - } - }; - for line in locale_list { - if let Some(locale) = registry.locale(&line) { - available_languages_set.insert(localized_locale(&locale, line)); + if let Some(locale) = registry.locale(line) { + available_languages_set.insert(localized_locale(&locale, line.to_owned())); } } @@ -840,28 +841,27 @@ fn popover_menu_row( .apply(Element::from) } -/// Sets the system locale using D-Bus instead of localectl for OpenRC compatibility. -pub async fn set_locale(lang: String, region: String) -> eyre::Result<()> { - tracing::debug!("setting locale lang={lang}, region={region}"); - - let conn = zbus::Connection::system() +pub async fn set_locale( + lang: String, + region: String, +) -> Result { + eprintln!("setting locale lang={lang}, region={region}"); + tokio::process::Command::new("localectl") + .arg("set-locale") + .args(&[ + ["LANG=", &lang].concat(), + ["LC_ADDRESS=", ®ion].concat(), + ["LC_IDENTIFICATION=", ®ion].concat(), + ["LC_MEASUREMENT=", ®ion].concat(), + ["LC_MONETARY=", ®ion].concat(), + ["LC_NAME=", ®ion].concat(), + ["LC_NUMERIC=", ®ion].concat(), + ["LC_PAPER=", ®ion].concat(), + ["LC_TELEPHONE=", ®ion].concat(), + ["LC_TIME=", ®ion].concat(), + ]) + .status() .await - .wrap_err("failed to connect to system D-Bus")?; - - let proxy = locale1::locale1Proxy::new(&conn) - .await - .wrap_err("failed to create locale1 D-Bus proxy")?; - - let locale_settings = build_locale_settings(&lang, ®ion); - let locale_strs: Vec<&str> = locale_settings.iter().map(|s| s.as_str()).collect(); - - proxy - .set_locale(&locale_strs, true) - .await - .wrap_err("failed to set locale via D-Bus")?; - - tracing::debug!("successfully set locale via D-Bus"); - Ok(()) } /// Sets the user's preferred language list via AccountsService D-Bus. @@ -883,7 +883,7 @@ pub async fn set_user_language(language_list: String) -> eyre::Result<()> { .await .wrap_err("failed to set language via AccountsService")?; - tracing::debug!("set user language via AccountsService: {language_list}"); + eprintln!("set user language via AccountsService: {language_list}"); Ok(()) } @@ -1016,206 +1016,3 @@ fn strip_locale_suffix(locale: &str) -> String { .unwrap_or(without_codeset) .to_string() } - -/// Parses the output from `locale -a` command and returns a vector of locale strings. -/// Filters out pseudo-locales (C, POSIX) and accepts only allowed character encodings. -fn parse_locale_output(output: &str) -> Vec { - // Regex to match pseudo-locales: C or POSIX, optionally followed by .anything - let pseudo_locale_re = Regex::new(r"^(C|POSIX)(\.|$)").unwrap(); - - // Regex to match UTF-8 encoded locales (case-insensitive) - // Supports optional modifiers after encoding (e.g., @euro, @valencia) - let utf8_encoding_re = Regex::new(r"(?i)\.(utf-?8)(@.*)?$").unwrap(); - - output - .lines() - .map(|line| line.trim()) - .filter(|line| !pseudo_locale_re.is_match(line)) - .filter(|line| utf8_encoding_re.is_match(line)) - .map(|line| line.to_string()) - .collect() -} - -/// Builds the locale settings array for D-Bus SetLocale call. -/// Sets LANG to the language parameter and all LC_* variables to the region parameter. -fn build_locale_settings(lang: &str, region: &str) -> Vec { - vec![ - format!("LANG={}", lang), - format!("LC_ADDRESS={}", region), - format!("LC_IDENTIFICATION={}", region), - format!("LC_MEASUREMENT={}", region), - format!("LC_MONETARY={}", region), - format!("LC_NAME={}", region), - format!("LC_NUMERIC={}", region), - format!("LC_PAPER={}", region), - format!("LC_TELEPHONE={}", region), - format!("LC_TIME={}", region), - ] -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_parse_locale_output_handles_empty_input() { - let output = ""; - let result = parse_locale_output(output); - assert_eq!(result.len(), 0); - } - - #[test] - fn test_parse_locale_output_preserves_locale_strings() { - let output = "en_US.utf8\nde_DE.utf8\nfr_FR.utf8\n"; - let result = parse_locale_output(output); - assert_eq!(result.len(), 3); - assert!(result.contains(&"en_US.utf8".to_string())); - } - - #[test] - fn test_build_locale_settings_includes_all_lc_variables() { - let lang = "en_US.UTF-8"; - let region = "de_DE.UTF-8"; - let settings = build_locale_settings(lang, region); - - assert_eq!(settings.len(), 10); - assert!(settings.contains(&format!("LANG={}", lang))); - assert!(settings.contains(&format!("LC_ADDRESS={}", region))); - assert!(settings.contains(&format!("LC_IDENTIFICATION={}", region))); - assert!(settings.contains(&format!("LC_MEASUREMENT={}", region))); - assert!(settings.contains(&format!("LC_MONETARY={}", region))); - assert!(settings.contains(&format!("LC_NAME={}", region))); - assert!(settings.contains(&format!("LC_NUMERIC={}", region))); - assert!(settings.contains(&format!("LC_PAPER={}", region))); - assert!(settings.contains(&format!("LC_TELEPHONE={}", region))); - assert!(settings.contains(&format!("LC_TIME={}", region))); - } - - #[test] - fn test_build_locale_settings_uses_correct_values() { - let lang = "fr_FR.UTF-8"; - let region = "en_GB.UTF-8"; - let settings = build_locale_settings(lang, region); - - // LANG should use the lang parameter - assert!(settings.iter().any(|s| s == "LANG=fr_FR.UTF-8")); - // LC_* variables should use the region parameter - assert!(settings.iter().any(|s| s == "LC_TIME=en_GB.UTF-8")); - } - - #[test] - fn test_parse_locale_output_filters_pseudo_locales() { - let output = "C\nC.utf8\nC.UTF-8\nPOSIX\nen_US.utf8\nde_DE.UTF-8\n"; - let result = parse_locale_output(output); - - // Should filter out all C and POSIX variants - assert!(!result.contains(&"C".to_string())); - assert!(!result.contains(&"C.utf8".to_string())); - assert!(!result.contains(&"C.UTF-8".to_string())); - assert!(!result.contains(&"POSIX".to_string())); - - // Should keep actual locales - assert!(result.contains(&"en_US.utf8".to_string())); - assert!(result.contains(&"de_DE.UTF-8".to_string())); - assert_eq!(result.len(), 2); - } - - #[test] - fn test_parse_locale_output_accepts_only_utf8_locales() { - let output = - "en_US\nen_US.utf8\nen_US.UTF-8\nar_IN\nar_IN.utf8\nde_DE.iso88591\nfr_FR.UTF-8\n"; - let result = parse_locale_output(output); - - // Should accept UTF-8 variants - assert!(result.contains(&"en_US.utf8".to_string())); - assert!(result.contains(&"en_US.UTF-8".to_string())); - assert!(result.contains(&"ar_IN.utf8".to_string())); - assert!(result.contains(&"fr_FR.UTF-8".to_string())); - - // Should filter out non-UTF-8 encoded locales - assert!(!result.contains(&"en_US".to_string())); - assert!(!result.contains(&"ar_IN".to_string())); - assert!(!result.contains(&"de_DE.iso88591".to_string())); - - assert_eq!(result.len(), 4); - } - - #[test] - fn test_parse_locale_output_filters_any_c_posix_variant() { - let output = "C\nC.iso88591\nC.anything\nPOSIX\nPOSIX.utf8\nen_US.utf8\n"; - let result = parse_locale_output(output); - - // Should filter out any C or POSIX variant regardless of encoding - assert!(!result.contains(&"C".to_string())); - assert!(!result.contains(&"C.iso88591".to_string())); - assert!(!result.contains(&"C.anything".to_string())); - assert!(!result.contains(&"POSIX".to_string())); - assert!(!result.contains(&"POSIX.utf8".to_string())); - - // Should keep actual locales - assert!(result.contains(&"en_US.utf8".to_string())); - assert_eq!(result.len(), 1); - } - - #[test] - fn test_parse_locale_output_handles_whitespace() { - let output = " en_US.utf8 \n\t de_DE.UTF-8\t\n fr_FR.utf8 \n"; - let result = parse_locale_output(output); - - // Should handle leading/trailing whitespace - assert!(result.contains(&"en_US.utf8".to_string())); - assert!(result.contains(&"de_DE.UTF-8".to_string())); - assert!(result.contains(&"fr_FR.utf8".to_string())); - assert_eq!(result.len(), 3); - } - - #[test] - fn test_parse_locale_output_handles_empty_lines() { - let output = "en_US.utf8\n\n\nde_DE.UTF-8\n\n"; - let result = parse_locale_output(output); - - // Should skip empty lines - assert!(result.contains(&"en_US.utf8".to_string())); - assert!(result.contains(&"de_DE.UTF-8".to_string())); - assert_eq!(result.len(), 2); - } - - #[test] - fn test_parse_locale_output_catalan_not_filtered_as_pseudo() { - let output = "C\nca_ES.UTF-8\nca_ES.utf8\ncs_CZ.UTF-8\nen_US.utf8\n"; - let result = parse_locale_output(output); - - // Should filter out C but not Catalan (ca_*) or Czech (cs_*) - assert!(!result.contains(&"C".to_string())); - assert!(result.contains(&"ca_ES.UTF-8".to_string())); - assert!(result.contains(&"ca_ES.utf8".to_string())); - assert!(result.contains(&"cs_CZ.UTF-8".to_string())); - assert_eq!(result.len(), 4); - } - - #[test] - fn test_parse_locale_output_handles_locale_modifiers() { - let output = "en_US.UTF-8@euro\nca_ES.UTF-8@valencia\nde_DE.utf8\n"; - let result = parse_locale_output(output); - - // Locales with modifiers should be accepted - assert!(result.contains(&"en_US.UTF-8@euro".to_string())); - assert!(result.contains(&"ca_ES.UTF-8@valencia".to_string())); - assert!(result.contains(&"de_DE.utf8".to_string())); - assert_eq!(result.len(), 3); - } - - #[test] - fn test_parse_locale_output_case_variations() { - let output = "en_US.UTF-8\nen_US.utf-8\nen_US.utf8\nen_US.UTF8\nde_DE.Utf8\n"; - let result = parse_locale_output(output); - - // All case variations should be accepted (case-insensitive regex) - assert!(result.contains(&"en_US.UTF-8".to_string())); - assert!(result.contains(&"en_US.utf-8".to_string())); - assert!(result.contains(&"en_US.utf8".to_string())); - assert!(result.contains(&"en_US.UTF8".to_string())); - assert!(result.contains(&"de_DE.Utf8".to_string())); - assert_eq!(result.len(), 5); - } -} diff --git a/cosmic-settings/src/service_manager.rs b/cosmic-settings/src/service_manager.rs deleted file mode 100644 index 2090fe8..0000000 --- a/cosmic-settings/src/service_manager.rs +++ /dev/null @@ -1,631 +0,0 @@ -// Copyright 2023 System76 -// SPDX-License-Identifier: GPL-3.0-only - -//! Service manager abstraction for managing system services. -//! -//! This module provides a trait-based interface for interacting with system -//! service managers (like systemd, OpenRC, etc.), allowing for testability -//! and flexibility across different init systems. - -use std::future::Future; -use std::pin::Pin; - -/// Trait for managing system services. -/// -/// Implementations are bound to a specific service name and provide -/// methods to query service state and perform lifecycle operations. -pub trait ServiceManager { - /// Whether the service is configured to start on boot. - fn is_enabled(&self) -> bool; - - /// Whether the service is currently running. - fn is_active(&self) -> bool; - - /// Start the service. - fn activate(&self) -> Pin + Send>>; - - /// Enable the service to start on boot and start it now. - fn enable(&self) -> Pin + Send>>; - - /// Whether the service is installed on this system. - fn is_installed(&self) -> bool; -} - -/// A newtype around `Box` that enables `#[derive(Default)]` -/// on containing structs. Methods on `ServiceManager` are accessible via `Deref`. -/// -/// The `Default` impl creates a manager for the `"bluetooth"` service, which is -/// currently the only consumer. If other services need this in the future the -/// default can be made configurable. -pub struct ServiceManagerHandle(Box); - -impl ServiceManagerHandle { - pub fn new(manager: Box) -> Self { - Self(manager) - } -} - -impl std::ops::Deref for ServiceManagerHandle { - type Target = dyn ServiceManager; - fn deref(&self) -> &Self::Target { - &*self.0 - } -} - -impl Default for ServiceManagerHandle { - fn default() -> Self { - Self(create_default_service_manager("bluetooth")) - } -} - -/// Log a warning or error after a privileged command completes. -fn log_command_result( - result: &Result, - description: &str, - service: &str, -) { - match result { - Ok(status) if status.success() => {} - Ok(status) => tracing::warn!( - "{} for '{}' failed with exit code: {:?}", - description, - service, - status.code(), - ), - Err(e) => tracing::error!("Failed to execute {} for '{}': {}", description, service, e,), - } -} - -/// Run a privileged command via `pkexec`. -/// -/// This is the common async entry point for service management actions -/// that require elevated privileges. -async fn run_pkexec_command(args: &[&str], description: &str, service: &str) { - let result = tokio::process::Command::new("pkexec") - .args(args) - .status() - .await; - log_command_result(&result, description, service); -} - -/// Mock ServiceManager that returns configurable boolean values. -#[cfg(test)] -pub struct MockServiceManager { - enabled: bool, - active: bool, - installed: bool, -} - -#[cfg(test)] -impl MockServiceManager { - pub fn new(enabled: bool, active: bool) -> Self { - Self { - enabled, - active, - installed: true, - } - } - - pub fn with_installed(mut self, installed: bool) -> Self { - self.installed = installed; - self - } -} - -#[cfg(test)] -impl ServiceManager for MockServiceManager { - fn is_enabled(&self) -> bool { - self.enabled - } - - fn is_active(&self) -> bool { - self.active - } - - fn activate(&self) -> Pin + Send>> { - Box::pin(async {}) - } - - fn enable(&self) -> Pin + Send>> { - Box::pin(async {}) - } - - fn is_installed(&self) -> bool { - self.installed - } -} - -/// SystemD implementation of ServiceManager. -#[cfg(feature = "systemd")] -pub struct SystemDServiceManager { - service_name: String, -} - -#[cfg(feature = "systemd")] -impl SystemDServiceManager { - pub fn new(service_name: impl Into) -> Self { - Self { - service_name: service_name.into(), - } - } -} - -#[cfg(feature = "systemd")] -impl ServiceManager for SystemDServiceManager { - fn is_enabled(&self) -> bool { - std::process::Command::new("systemctl") - .args(["is-enabled", &self.service_name]) - .status() - .map(|status| status.success()) - .unwrap_or(true) - } - - fn is_active(&self) -> bool { - std::process::Command::new("systemctl") - .args(["is-active", &self.service_name]) - .status() - .map(|status| status.success()) - .unwrap_or(true) - } - - fn activate(&self) -> Pin + Send>> { - let service = self.service_name.clone(); - Box::pin(async move { - run_pkexec_command( - &["systemctl", "start", &service], - "systemctl start", - &service, - ) - .await; - }) - } - - fn enable(&self) -> Pin + Send>> { - let service = self.service_name.clone(); - Box::pin(async move { - run_pkexec_command( - &["systemctl", "enable", "--now", &service], - "systemctl enable --now", - &service, - ) - .await; - }) - } - - fn is_installed(&self) -> bool { - std::process::Command::new("systemctl") - .args(["cat", &self.service_name]) - .status() - .map(|status| status.success()) - .unwrap_or(false) - } -} - -/// OpenRC implementation of ServiceManager. -#[cfg(feature = "openrc")] -pub struct OpenRcServiceManager { - service_name: String, -} - -#[cfg(feature = "openrc")] -impl OpenRcServiceManager { - pub fn new(service_name: impl Into) -> Self { - Self { - service_name: service_name.into(), - } - } -} - -/// Parses `rc-update show` output to check if a service is in any runlevel. -/// -/// Uses exact service name matching to avoid false positives from prefix matches -/// (e.g., "bluetoothd" should not match a lookup for "bluetooth"). -#[cfg(any(feature = "openrc", test))] -fn is_service_in_runlevel_output(output: &str, service_name: &str) -> bool { - output.lines().any(|line| { - line.split('|') - .next() - .map(|name| name.trim() == service_name) - .unwrap_or(false) - }) -} - -#[cfg(feature = "openrc")] -impl ServiceManager for OpenRcServiceManager { - fn is_enabled(&self) -> bool { - std::process::Command::new("rc-update") - .args(["show"]) - .output() - .map(|output| { - is_service_in_runlevel_output( - &String::from_utf8_lossy(&output.stdout), - &self.service_name, - ) - }) - .unwrap_or(true) - } - - fn is_active(&self) -> bool { - std::process::Command::new("rc-service") - .args([&self.service_name, "status"]) - .status() - .map(|status| status.success()) - .unwrap_or(true) - } - - fn activate(&self) -> Pin + Send>> { - let service = self.service_name.clone(); - Box::pin(async move { - run_pkexec_command( - &["rc-service", &service, "start"], - "rc-service start", - &service, - ) - .await; - }) - } - - fn enable(&self) -> Pin + Send>> { - let service = self.service_name.clone(); - Box::pin(async move { - run_pkexec_command( - &["rc-update", "add", &service, "default"], - "rc-update add", - &service, - ) - .await; - run_pkexec_command( - &["rc-service", &service, "start"], - "rc-service start", - &service, - ) - .await; - }) - } - - fn is_installed(&self) -> bool { - std::path::Path::new("/etc/init.d") - .join(&self.service_name) - .exists() - } -} - -/// Detect the running service manager and create a manager for the named service. -/// -/// Checks runtime directories (`/run/systemd/system`, `/run/openrc`) to determine -/// which service manager is actively running, rather than relying on which binaries -/// are installed. This avoids false detections when multiple service managers are -/// installed but only one is actively managing services. -pub fn detect_service_manager( - service_name: impl Into, -) -> Result, String> { - let service_name = service_name.into(); - - #[cfg(feature = "systemd")] - { - if std::path::Path::new("/run/systemd/system").exists() { - tracing::debug!("Detected systemd service manager via /run/systemd/system"); - return Ok(Box::new(SystemDServiceManager::new(service_name))); - } - } - - #[cfg(feature = "openrc")] - { - if std::path::Path::new("/run/openrc").exists() { - tracing::debug!("Detected OpenRC service manager via /run/openrc"); - return Ok(Box::new(OpenRcServiceManager::new(service_name))); - } - } - - { - let mut checked = Vec::new(); - #[cfg(feature = "systemd")] - checked.push("systemd (/run/systemd/system)"); - #[cfg(feature = "openrc")] - checked.push("openrc (/run/openrc)"); - - Err(format!( - "Could not detect a running service manager. Checked for: {}. \ - None of these service managers appear to be running on this system.", - checked.join(", ") - )) - } -} - -/// Factory: returns `MockServiceManager` in tests, detects the running service manager in production. -#[cfg(test)] -pub fn create_default_service_manager(_service_name: impl Into) -> Box { - Box::new(MockServiceManager::new(false, false)) -} - -#[cfg(not(test))] -pub fn create_default_service_manager(service_name: impl Into) -> Box { - let service_name = service_name.into(); - detect_service_manager(&service_name).unwrap_or_else(|e| { - tracing::warn!( - "Failed to detect service manager: {}. Service management features will not be available.", - e - ); - tracing::warn!( - "Using no-op service manager for '{}'. Service status will always report as enabled/active, but operations will not actually execute.", - service_name - ); - // Graceful degradation — app continues but service management won't work - Box::new(NoOpServiceManager) - }) -} - -/// Fallback when no service manager is detected — reports everything as active but does nothing. -struct NoOpServiceManager; - -impl ServiceManager for NoOpServiceManager { - fn is_enabled(&self) -> bool { - true - } - - fn is_active(&self) -> bool { - true - } - - fn activate(&self) -> Pin + Send>> { - Box::pin(async {}) - } - - fn enable(&self) -> Pin + Send>> { - Box::pin(async {}) - } - - fn is_installed(&self) -> bool { - false - } -} - -#[cfg(test)] -mod tests { - use super::*; - use tracing_subscriber::util::SubscriberInitExt; - - #[test] - fn test_service_manager_trait_is_enabled() { - struct TestServiceManager { - enabled: bool, - installed: bool, - } - - impl ServiceManager for TestServiceManager { - fn is_enabled(&self) -> bool { - self.enabled - } - - fn is_active(&self) -> bool { - true - } - - fn activate(&self) -> Pin + Send>> { - Box::pin(async {}) - } - - fn enable(&self) -> Pin + Send>> { - Box::pin(async {}) - } - - fn is_installed(&self) -> bool { - self.installed - } - } - - let test_service = TestServiceManager { - enabled: true, - installed: true, - }; - - assert!(test_service.is_enabled()); - - let disabled_service = TestServiceManager { - enabled: false, - installed: true, - }; - assert!(!disabled_service.is_enabled()); - } - - #[test] - fn test_service_manager_trait_is_active() { - struct TestServiceManager { - active: bool, - installed: bool, - } - - impl ServiceManager for TestServiceManager { - fn is_enabled(&self) -> bool { - true - } - - fn is_active(&self) -> bool { - self.active - } - - fn activate(&self) -> Pin + Send>> { - Box::pin(async {}) - } - - fn enable(&self) -> Pin + Send>> { - Box::pin(async {}) - } - - fn is_installed(&self) -> bool { - self.installed - } - } - - let test_service = TestServiceManager { - active: true, - installed: true, - }; - - assert!(test_service.is_active()); - - let inactive_service = TestServiceManager { - active: false, - installed: true, - }; - assert!(!inactive_service.is_active()); - } - - #[test] - fn test_mock_service_manager_returns_configured_values() { - let bluetooth = MockServiceManager::new(true, true); - assert!(bluetooth.is_enabled()); - assert!(bluetooth.is_active()); - - let disabled_bluetooth = MockServiceManager::new(false, false); - assert!(!disabled_bluetooth.is_enabled()); - assert!(!disabled_bluetooth.is_active()); - } - - #[test] - #[cfg(feature = "systemd")] - fn test_systemd_service_manager_implements_trait() { - let bluetooth = SystemDServiceManager::new("bluetooth"); - - // Can't test actual systemd calls in unit tests, but verify the struct exists - let _enabled: bool = bluetooth.is_enabled(); - let _active: bool = bluetooth.is_active(); - } - - #[tokio::test] - async fn test_service_manager_trait_has_activate_method() { - let bluetooth = MockServiceManager::new(false, false); - bluetooth.activate().await; - } - - #[tokio::test] - async fn test_service_manager_trait_has_enable_method() { - let bluetooth = MockServiceManager::new(false, false); - bluetooth.enable().await; - } - - #[tokio::test] - async fn test_service_manager_activate_returns_future() { - let bluetooth = MockServiceManager::new(false, false); - let future = bluetooth.activate(); - future.await; - } - - #[tokio::test] - async fn test_service_manager_enable_returns_future() { - let bluetooth = MockServiceManager::new(false, false); - let future = bluetooth.enable(); - future.await; - } - - #[test] - fn test_default_service_manager_uses_mock_in_tests() { - let bluetooth = create_default_service_manager("bluetooth"); - - assert!(!bluetooth.is_enabled()); - assert!(!bluetooth.is_active()); - } - - #[test] - #[cfg(feature = "openrc")] - fn test_openrc_service_manager_implements_trait() { - let bluetooth = OpenRcServiceManager::new("bluetooth"); - - // Can't test actual OpenRC calls in unit tests, but verify the struct exists - let _enabled: bool = bluetooth.is_enabled(); - let _active: bool = bluetooth.is_active(); - } - - #[test] - fn test_detect_service_manager_returns_result() { - let result = detect_service_manager("test-service"); - - match result { - Ok(_) => {} - Err(e) => { - assert!(!e.is_empty()); - assert!( - e.contains("service manager"), - "Error message should mention service manager: {}", - e - ); - } - } - } - - #[test] - fn test_mock_service_manager_accepts_service_name() { - let bluetooth = MockServiceManager::new(true, true); - assert!(bluetooth.is_enabled()); - } - - #[test] - fn test_mock_service_manager_is_installed_defaults_to_true() { - let bluetooth = MockServiceManager::new(true, true); - assert!(bluetooth.is_installed()); - } - - #[test] - fn test_mock_service_manager_with_installed_configures_state() { - let not_installed = MockServiceManager::new(true, true).with_installed(false); - assert!(!not_installed.is_installed()); - - let installed = MockServiceManager::new(true, true).with_installed(true); - assert!(installed.is_installed()); - } - - #[test] - fn test_no_op_service_manager_reports_not_installed() { - let no_op = NoOpServiceManager; - - // When no service manager is detected at runtime, the fallback must report - // not-installed so DBusServiceUnknown falls through to the unknown-service path - // instead of showing a non-functional toggle. - assert!(!no_op.is_installed()); - } - - #[test] - fn test_parse_rc_update_output_exact_service_name() { - // Must use exact matching, not prefix matching — "bluetoothd" must not match "bluetooth". - let output = " bluetoothd | default\n"; - let found = is_service_in_runlevel_output(output, "bluetooth"); - assert!(!found); - } - - #[test] - fn test_parse_rc_update_output_matches_exact_name() { - let output = " bluetooth | default\n"; - let found = is_service_in_runlevel_output(output, "bluetooth"); - assert!(found); - } - - #[test] - fn test_parse_rc_update_output_not_found() { - let output = " dbus | default\n network | sysinit\n"; - let found = is_service_in_runlevel_output(output, "bluetooth"); - assert!(!found); - } - - #[test] - fn test_log_command_result_logs_all_branches() { - let _guard = tracing_subscriber::fmt().with_test_writer().set_default(); - - let err_result: Result = Err( - std::io::Error::new(std::io::ErrorKind::NotFound, "command not found"), - ); - log_command_result(&err_result, "test command", "test-service"); - - let fail_result = std::process::Command::new("false").status(); - log_command_result(&fail_result, "test false", "test-service"); - - let ok_result = std::process::Command::new("true").status(); - log_command_result(&ok_result, "test true", "test-service"); - } - - #[test] - fn test_parse_rc_update_output_multi_line() { - let output = " dbus | default\n bluetooth | default\n network | sysinit\n"; - let found = is_service_in_runlevel_output(output, "bluetooth"); - assert!(found); - } -} diff --git a/cosmic-settings/src/subscription/daytime.rs b/cosmic-settings/src/subscription/daytime.rs index 06915d3..00b8159 100644 --- a/cosmic-settings/src/subscription/daytime.rs +++ b/cosmic-settings/src/subscription/daytime.rs @@ -2,9 +2,11 @@ use std::any::TypeId; use ashpd::desktop::location::{Location, LocationProxy}; use chrono::NaiveDate; -use cosmic::iced::futures::channel::mpsc::Sender; -use cosmic::iced::futures::{SinkExt, StreamExt, future}; -use cosmic::iced::{Subscription, stream}; +use cosmic::iced::{ + Subscription, + futures::{SinkExt, StreamExt, channel::mpsc::Sender, future}, + stream, +}; use sunrise::{Coordinates, SolarDay, SolarEvent}; use tokio::select; diff --git a/cosmic-settings/src/subscription/desktop_files.rs b/cosmic-settings/src/subscription/desktop_files.rs index 2f04488..61b439d 100644 --- a/cosmic-settings/src/subscription/desktop_files.rs +++ b/cosmic-settings/src/subscription/desktop_files.rs @@ -1,5 +1,8 @@ -use cosmic::iced::futures::{self, SinkExt}; -use cosmic::iced::{Subscription, stream}; +use cosmic::iced::{ + Subscription, + futures::{self, SinkExt}, + stream, +}; use notify::{Config, EventKind, RecommendedWatcher, RecursiveMode, Watcher}; use std::fmt::Debug; use std::hash::Hash; diff --git a/cosmic-settings/src/subscription/wallpapers.rs b/cosmic-settings/src/subscription/wallpapers.rs index b424219..5e062b1 100644 --- a/cosmic-settings/src/subscription/wallpapers.rs +++ b/cosmic-settings/src/subscription/wallpapers.rs @@ -1,8 +1,10 @@ use std::path::PathBuf; -use cosmic::iced::futures::channel::mpsc::Sender; -use cosmic::iced::futures::{SinkExt, StreamExt, future}; -use cosmic::iced::{Subscription, stream}; +use cosmic::iced::{ + Subscription, + futures::{SinkExt, StreamExt, channel::mpsc::Sender, future}, + stream, +}; use image::{ImageBuffer, Rgba}; #[derive(Clone, Debug)] diff --git a/cosmic-settings/src/theme.rs b/cosmic-settings/src/theme.rs index ab21f41..df074d1 100644 --- a/cosmic-settings/src/theme.rs +++ b/cosmic-settings/src/theme.rs @@ -1,8 +1,7 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only -use cosmic::iced::Border; -use cosmic::theme; +use cosmic::{iced::Border, theme}; #[must_use] pub fn display_container_frame() -> cosmic::theme::Container<'static> { diff --git a/cosmic-settings/src/utils.rs b/cosmic-settings/src/utils.rs index ac1e413..6286b8b 100644 --- a/cosmic-settings/src/utils.rs +++ b/cosmic-settings/src/utils.rs @@ -1,5 +1,4 @@ -use std::future::Future; -use std::{io, process}; +use std::{future::Future, io, process}; use futures::future::select; diff --git a/cosmic-settings/src/widget/mod.rs b/cosmic-settings/src/widget/mod.rs index e53b151..a5b8322 100644 --- a/cosmic-settings/src/widget/mod.rs +++ b/cosmic-settings/src/widget/mod.rs @@ -8,9 +8,10 @@ use cosmic::cosmic_theme::Spacing; use cosmic::iced::core::text::Wrapping; use cosmic::iced::{Alignment, Length}; use cosmic::widget::color_picker::ColorPickerUpdate; -use cosmic::widget::space::{horizontal, vertical}; use cosmic::widget::{ - self, ColorPickerModel, button, column, container, divider, icon, list, row, settings, text, + self, ColorPickerModel, button, column, container, divider, icon, list, row, settings, + space::{horizontal, vertical}, + text, }; use cosmic::{Apply, Element, theme}; use cosmic_settings_page as page; @@ -205,10 +206,8 @@ pub fn go_next_with_item<'a, Msg: 'static>( msg_opt: impl Into>, ) -> list::ListButton<'a, Msg> { settings::item_row(vec![ - text::body(description) - .width(Length::Fill) - .wrapping(Wrapping::Word) - .into(), + text::body(description).wrapping(Wrapping::Word).into(), + horizontal().into(), row::with_capacity(2) .push(item) .push(icon::from_name("go-next-symbolic").size(16).icon()) diff --git a/crates/cosmic-pipewire/Cargo.toml b/crates/cosmic-pipewire/Cargo.toml new file mode 100644 index 0000000..bcea9fb --- /dev/null +++ b/crates/cosmic-pipewire/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "cosmic-pipewire" +version = "1.0.7" +edition = "2024" +repository = "https://github.com/pop-os/cosmic-settings" +rust-version.workspace = true +license = "MPL-2.0" +publish = true + +[dependencies] +intmap = "3.1.3" +libspa = "0.9.2" +libspa-sys = "0.9.2" +pipewire = "0.9" +serde = { version = "1.0.228", features = ["derive"]} +serde_json = "1.0.149" +tracing = "0.1.44" + +[features] +# Cache route port types +route-port-type = [] diff --git a/crates/cosmic-pipewire/LICENSE.md b/crates/cosmic-pipewire/LICENSE.md new file mode 100644 index 0000000..d141fe4 --- /dev/null +++ b/crates/cosmic-pipewire/LICENSE.md @@ -0,0 +1,358 @@ +Mozilla Public License Version 2.0 +================================== + +## 1. Definitions + +### 1.1. "Contributor" +means each individual or legal entity that creates, contributes to +the creation of, or owns Covered Software. + +### 1.2. "Contributor Version" +means the combination of the Contributions of others (if any) used +by a Contributor and that particular Contributor's Contribution. + +### 1.3. "Contribution" +means Covered Software of a particular Contributor. + +### 1.4. "Covered Software" +means Source Code Form to which the initial Contributor has attached +the notice in Exhibit A, the Executable Form of such Source Code +Form, and Modifications of such Source Code Form, in each case +including portions thereof. + +### 1.5. "Incompatible With Secondary Licenses" +means + ++ (a) that the initial Contributor has attached the notice described +in Exhibit B to the Covered Software; or + ++ (b) that the Covered Software was made available under the terms of +version 1.1 or earlier of the License, but not also under the +terms of a Secondary License. + +### 1.6. "Executable Form" +means any form of the work other than Source Code Form. + +### 1.7. "Larger Work" +means a work that combines Covered Software with other material, in +a separate file or files, that is not Covered Software. + +### 1.8. "License" +means this document. + +### 1.9. "Licensable" +means having the right to grant, to the maximum extent possible, +whether at the time of the initial grant or subsequently, any and +all of the rights conveyed by this License. + +### 1.10. "Modifications" +means any of the following: + ++ (a) any file in Source Code Form that results from an addition to, +deletion from, or modification of the contents of Covered +Software; or + ++ (b) any new file in Source Code Form that contains any Covered +Software. + +### 1.11. "Patent Claims" of a Contributor +means any patent claim(s), including without limitation, method, +process, and apparatus claims, in any patent Licensable by such +Contributor that would be infringed, but for the grant of the +License, by the making, using, selling, offering for sale, having +made, import, or transfer of either its Contributions or its +Contributor Version. + +### 1.12. "Secondary License" +means either the GNU General Public License, Version 2.0, the GNU +Lesser General Public License, Version 2.1, the GNU Affero General +Public License, Version 3.0, or any later versions of those +licenses. + +### 1.13. "Source Code Form" +means the form of the work preferred for making modifications. + +### 1.14. "You" (or "Your") +means an individual or a legal entity exercising rights under this +License. For legal entities, "You" includes any entity that +controls, is controlled by, or is under common control with You. For +purposes of this definition, "control" means (a) the power, direct +or indirect, to cause the direction or management of such entity, +whether by contract or otherwise, or (b) ownership of more than +fifty percent (50%) of the outstanding shares or beneficial +ownership of such entity. + +## 2. License Grants and Conditions + +### 2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + ++ (a) under intellectual property rights (other than patent or trademark) +Licensable by such Contributor to use, reproduce, make available, +modify, display, perform, distribute, and otherwise exploit its +Contributions, either on an unmodified basis, with Modifications, or +as part of a Larger Work; and + ++ (b) under Patent Claims of such Contributor to make, use, sell, offer +for sale, have made, import, and otherwise transfer either its +Contributions or its Contributor Version. + +### 2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +### 2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + ++ (a) for any code that a Contributor has removed from Covered Software; +or + ++ (b) for infringements caused by: (i) Your and any other third party's +modifications of Covered Software, or (ii) the combination of its +Contributions with other software (except as part of its Contributor +Version); or + ++ (c) under Patent Claims infringed by Covered Software in the absence of +its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +### 2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +### 2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +### 2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +### 2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +## 3. Responsibilities + +### 3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +### 3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + ++ (a) such Covered Software must also be made available in Source Code +Form, as described in Section 3.1, and You must inform recipients of +the Executable Form how they can obtain a copy of such Source Code +Form by reasonable means in a timely manner, at a charge no more +than the cost of distribution to the recipient; and + ++ (b) You may distribute such Executable Form under the terms of this +License, or sublicense it under different terms, provided that the +license for the Executable Form does not attempt to limit or alter +the recipients' rights in the Source Code Form under this License. + +### 3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +### 3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +### 3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +## 4. Inability to Comply Due to Statute or Regulation + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +## 5. Termination + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + + +## 6. Disclaimer of Warranty + +**Covered Software is provided under this License on an "as is" +basis, without warranty of any kind, either expressed, implied, or +statutory, including, without limitation, warranties that the +Covered Software is free of defects, merchantable, fit for a +particular purpose or non-infringing. The entire risk as to the +quality and performance of the Covered Software is with You. +Should any Covered Software prove defective in any respect, You +(not any Contributor) assume the cost of any necessary servicing, +repair, or correction. This disclaimer of warranty constitutes an +essential part of this License. No use of any Covered Software is +authorized under this License except under this disclaimer.** + + +#7. Limitation of Liability + +**Under no circumstances and under no legal theory, whether tort +(including negligence), contract, or otherwise, shall any +Contributor, or anyone who distributes Covered Software as +permitted above, be liable to You for any direct, indirect, +special, incidental, or consequential damages of any character +including, without limitation, damages for lost profits, loss of +goodwill, work stoppage, computer failure or malfunction, or any +and all other commercial damages or losses, even if such party +shall have been informed of the possibility of such damages. This +limitation of liability shall not apply to liability for death or +personal injury resulting from such party's negligence to the +extent applicable law prohibits such limitation. Some +jurisdictions do not allow the exclusion or limitation of +incidental or consequential damages, so this exclusion and +limitation may not apply to You.** + + +## 8. Litigation + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +## 9. Miscellaneous + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +## 10. Versions of the License + +### 10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +### 10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +### 10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +### 10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +## Exhibit A - Source Code Form License Notice + + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +## Exhibit B - "Incompatible With Secondary Licenses" Notice + + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/crates/cosmic-pipewire/src/device.rs b/crates/cosmic-pipewire/src/device.rs new file mode 100644 index 0000000..a456fd5 --- /dev/null +++ b/crates/cosmic-pipewire/src/device.rs @@ -0,0 +1,27 @@ +// Copyright 2025 System76 +// SPDX-License-Identifier: MPL-2.0 + +use pipewire::device::DeviceInfoRef; + +/// Device information +#[must_use] +#[derive(Clone, Debug)] +pub struct Device { + pub id: u32, + pub name: String, +} + +impl Device { + /// Attains process info from a pipewire info node. + #[must_use] + pub fn from_device(info: &DeviceInfoRef) -> Option { + let props = info.props()?; + + let device = Device { + id: props.get("object.id")?.parse::().ok()?, + name: props.get("device.description")?.to_owned(), + }; + + Some(device) + } +} diff --git a/crates/cosmic-pipewire/src/lib.rs b/crates/cosmic-pipewire/src/lib.rs index 9cf2538..3aefd1e 100644 --- a/crates/cosmic-pipewire/src/lib.rs +++ b/crates/cosmic-pipewire/src/lib.rs @@ -21,19 +21,20 @@ pub use route::{Route, RouteProps}; mod spa_utils; pub use spa_utils::Channel; -use libspa::param::ParamType; -use libspa::param::format::FormatProperties; -use libspa::pod::serialize::PodSerializer; -use libspa::pod::{self, Pod}; -use libspa::utils::SpaTypes; -use pipewire::device::{DeviceChangeMask, DeviceListener}; -use pipewire::main_loop::MainLoopWeak; -use pipewire::metadata::MetadataListener; -use pipewire::node::NodeListener; -use pipewire::proxy::{ProxyListener, ProxyT}; -use pipewire::types::ObjectType; -use std::cell::RefCell; -use std::rc::Rc; +use libspa::{ + param::{ParamType, format::FormatProperties}, + pod::{self, Pod, serialize::PodSerializer}, + utils::SpaTypes, +}; +use pipewire::{ + device::{DeviceChangeMask, DeviceListener}, + main_loop::MainLoopWeak, + metadata::MetadataListener, + node::NodeListener, + proxy::{ProxyListener, ProxyT}, + types::ObjectType, +}; +use std::{cell::RefCell, rc::Rc}; pub type NodeId = u32; pub type RouteId = u32; diff --git a/crates/cosmic-pipewire/src/node.rs b/crates/cosmic-pipewire/src/node.rs index 5bf7ff0..5536f30 100644 --- a/crates/cosmic-pipewire/src/node.rs +++ b/crates/cosmic-pipewire/src/node.rs @@ -1,10 +1,8 @@ // Copyright 2025 System76 // SPDX-License-Identifier: MPL-2.0 -use crate::Channel; -use crate::spa_utils::array_from_pod; -use libspa::pod::Pod; -use libspa::utils::Id; +use crate::{Channel, spa_utils::array_from_pod}; +use libspa::{pod::Pod, utils::Id}; use pipewire::node::{NodeInfoRef, NodeState}; use std::ffi::c_float; diff --git a/crates/cosmic-pipewire/src/port.rs b/crates/cosmic-pipewire/src/port.rs new file mode 100644 index 0000000..e2fc957 --- /dev/null +++ b/crates/cosmic-pipewire/src/port.rs @@ -0,0 +1,98 @@ +// Copyright 2025 System76 +// SPDX-License-Identifier: MPL-2.0 + +//! Currently unusued + +use crate::pipewire::Direction; +use pipewire::port::PortInfoRef; + +#[must_use] +#[derive(Clone, Debug)] +pub struct Port { + pub node_id: u32, + pub object_id: u32, + pub port_id: u32, + pub audio_channel: String, + pub format_dsp: String, + pub object_path: String, + pub port_direction: Direction, + pub port_group: String, + pub port_name: String, + pub port_alias: String, + pub port_physical: bool, + pub port_terminal: bool, + pub port_monitor: bool, +} + +impl Port { + /// Attains process info from a pipewire info port. + #[must_use] + pub fn from_port(info: &PortInfoRef) -> Option { + let props = info.props()?; + let object_id = info.id(); + let port_direction = match info.direction() { + libspa::utils::Direction::Input => Direction::Input, + libspa::utils::Direction::Output => Direction::Output, + _ => return None, + }; + + let mut node_id = 0; + let mut port_id = 0; + let mut port_monitor = false; + let mut port_physical = false; + let mut port_terminal = false; + + let mut audio_channel = String::new(); + let mut format_dsp = String::new(); + let mut object_path = String::new(); + let mut port_alias = String::new(); + let mut port_group = String::new(); + let mut port_name = String::new(); + + for (entry, value) in props.iter() { + match entry { + // 32 bit float mono audio + "format.dsp" => format_dsp = value.to_owned(), + // FR + "audio.channel" => audio_channel = value.to_owned(), + // playback + "port.group" => port_group = value.to_owned(), + // 1 + "port.id" => port_id = value.parse::().ok()?, + // false + "port.monitor" => port_monitor = value == "true", + // true + "port.physical" => port_physical = value == "true", + // true + "port.terminal" => port_terminal = value == "true", + // alsa:acp:Device:3:playback:playback_1 + "object.path" => object_path = value.to_owned(), + // playback_FR + "port.name" => port_name = value.to_owned(), + // MosArt USB Audio Device:playback_FR + "port.alias" => port_alias = value.to_owned(), + // 59 + "node.id" => node_id = value.parse::().ok()?, + _ => (), + } + } + + let port = Port { + format_dsp, + audio_channel, + port_id, + port_direction, + object_path, + port_name, + port_alias, + port_group, + port_monitor, + port_physical, + port_terminal, + node_id, + object_id, + }; + + Some(port) + } +} diff --git a/crates/cosmic-pipewire/src/profile.rs b/crates/cosmic-pipewire/src/profile.rs index c6bf75d..aabad61 100644 --- a/crates/cosmic-pipewire/src/profile.rs +++ b/crates/cosmic-pipewire/src/profile.rs @@ -1,8 +1,7 @@ // Copyright 2025 System76 // SPDX-License-Identifier: MPL-2.0 -use crate::Availability; -use crate::spa_utils::string_from_pod; +use crate::{Availability, spa_utils::string_from_pod}; use libspa::pod::Pod; #[derive(Clone, Debug, Default)] diff --git a/crates/cosmic-pipewire/src/route.rs b/crates/cosmic-pipewire/src/route.rs index cf370c6..961a7eb 100644 --- a/crates/cosmic-pipewire/src/route.rs +++ b/crates/cosmic-pipewire/src/route.rs @@ -3,10 +3,11 @@ use std::ffi::{c_float, c_int}; -use crate::spa_utils::{array_from_pod, string_from_pod}; -use crate::{Availability, Channel, Direction}; -use libspa::pod::Pod; -use libspa::utils::Id; +use crate::{ + Availability, Channel, Direction, + spa_utils::{array_from_pod, string_from_pod}, +}; +use libspa::{pod::Pod, utils::Id}; #[derive(Clone, Debug, Default)] pub struct Route { diff --git a/crates/cosmic-pipewire/src/spa_utils.rs b/crates/cosmic-pipewire/src/spa_utils.rs new file mode 100644 index 0000000..0593dfe --- /dev/null +++ b/crates/cosmic-pipewire/src/spa_utils.rs @@ -0,0 +1,150 @@ +// Copyright 2025 System76 +// SPDX-License-Identifier: MPL-2.0 + +use libspa::pod::Pod; +use std::ffi::CStr; + +/// Read a `Pod`'s string if it contains a string. +pub fn string_from_pod(pod: &Pod) -> Option { + if !pod.is_string() { + return None; + } + + let mut cstr = std::ptr::null(); + + unsafe { + // SAFETY: Pod is checked to be a string beforehand + if libspa_sys::spa_pod_get_string(pod.as_raw_ptr(), &mut cstr) == 0 && !cstr.is_null() { + return Some(String::from_utf8_lossy(CStr::from_ptr(cstr).to_bytes()).into_owned()); + } + } + + None +} + +/// SAFETY: Must be absolutely certain that the array is a compatible array. +pub unsafe fn array_from_pod(pod: &Pod) -> Option> { + if !pod.is_array() { + return None; + } + + let mut len = 0; + + unsafe { + let array: *mut CType = libspa_sys::spa_pod_get_array(pod.as_raw_ptr(), &mut len).cast(); + + if array.is_null() { + return None; + } + + Some(std::slice::from_raw_parts(array, len as usize).to_vec()) + } +} + +#[repr(u32)] +#[derive(Copy, Clone, Debug, Default, Hash, Eq, PartialEq)] +pub enum Channel { + #[default] + UNKNOWN = 0, // unspecified + NA, // N/A, silent + MONO, // mono stream + FL, // front left + FR, // front right + FC, // front center + LFE, // LFE + SL, // side left + SR, // side right + FLC, // front left center + FRC, // front right center + RC, // rear center + RL, // rear left + RR, // rear right + TC, // top center + TFL, // top front left + TFC, // top front center + TFR, // top front right + TRL, // top rear left + TRC, // top rear center + TRR, // top rear right + RLC, // rear left center + RRC, // rear right center + FLW, // front left wide + FRW, // front right wide + LFE2, // LFE 2 + FLH, // front left high + FCH, // front center high + FRH, // front right high + TFLC, // top front left center + TFRC, // top front right center + TSL, // top side left + TSR, // top side right + LLFE, // left LFE + RLFE, // right LFE + BC, // bottom center + BLC, // bottom left center + BRC = 37, // bottom right center + AUX0 = 4096, // aux channels + AUX1, + AUX2, + AUX3, + AUX4, + AUX5, + AUX6, + AUX7, + AUX8, + AUX9, + AUX10, + AUX11, + AUX12, + AUX13, + AUX14, + AUX15, + AUX16, + AUX17, + AUX18, + AUX19, + AUX20, + AUX21, + AUX22, + AUX23, + AUX24, + AUX25, + AUX26, + AUX27, + AUX28, + AUX29, + AUX30, + AUX31, + AUX32, + AUX33, + AUX34, + AUX35, + AUX36, + AUX37, + AUX38, + AUX39, + AUX40, + AUX41, + AUX42, + AUX43, + AUX44, + AUX45, + AUX46, + AUX47, + AUX48, + AUX49, + AUX50, + AUX51, + AUX52, + AUX53, + AUX54, + AUX55, + AUX56, + AUX57, + AUX58, + AUX59, + AUX60, + AUX61, + AUX62, + AUX63 = 4159, +} diff --git a/debian/changelog b/debian/changelog index 02e319d..1e3759c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,3 @@ -cosmic-settings (1.0.12) noble; urgency=medium - - * release: 1.0.12 - - -- Michael Murphy Mon, 27 Apr 2026 15:24:27 +0200 - cosmic-settings (1.0.7) noble; urgency=medium * release: 1.0.7 diff --git a/debian/control b/debian/control index 703a847..c04ab78 100644 --- a/debian/control +++ b/debian/control @@ -8,14 +8,15 @@ Build-Depends: fonts-open-sans, just, libclang-dev, - libdav1d-dev, libexpat1-dev, libfontconfig-dev, libfreetype-dev, libinput-dev, + libpipewire-0.3-dev, libudev-dev, libwayland-dev, libxkbcommon-dev, + mold, pkg-config, rust-all, Standards-Version: 4.6.2 @@ -28,7 +29,6 @@ Depends: ${shlibs:Depends}, accountsservice, cosmic-randr, - cosmic-settings-daemon, gettext, iso-codes, network-manager-gnome, diff --git a/debian/rules b/debian/rules index c7e848f..6f3ef8c 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,6 @@ #!/usr/bin/make -f export DESTDIR = debian/tmp -OS_VERSION = $(shell rg VERSION_ID /etc/os-release | awk -F\" '{print $2}') %: dh $@ @@ -10,11 +9,7 @@ override_dh_auto_clean: ischroot || just vendor override_dh_auto_build: -ifeq ($(OS_VERSION),22.04) - test -e vendor.tar && just build-vendored || just build-release --no-default-features -else - test -e vendor.tar && just build-vendored || just build-release -endif + test -e vendor.tar && just build-vendored || just override_dh_auto_install: just rootdir=$(DESTDIR) install diff --git a/flake.lock b/flake.lock index 92635eb..d2e188a 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1785747939, - "narHash": "sha256-D740uKsMbgsfK2oaDenJLLPIZfq7W0/g4KN/Fls8eKs=", + "lastModified": 1760533177, + "narHash": "sha256-OwM1sFustLHx+xmTymhucZuNhtq98fHIbfO8Swm5L8A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "104240a772428cc2e20d8fd86c9ddbb886bbaff2", + "rev": "35f590344ff791e6b1d6d6b8f3523467c9217caf", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 28a0dfd..b286fc3 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,6 @@ libinput libpulseaudio.dev pipewire.dev - dav1d ]; RUST_SRC_PATH = rustPlatform.rustLibSrc; diff --git a/i18n/ar/cosmic_settings.ftl b/i18n/ar/cosmic_settings.ftl index 0954508..88be08f 100644 --- a/i18n/ar/cosmic_settings.ftl +++ b/i18n/ar/cosmic_settings.ftl @@ -16,7 +16,7 @@ xdg-entry-date-time-comment = المنطقة الزمنية وإعدادات ا xdg-entry-default-apps = التطبيقات المبدئية xdg-entry-default-apps-comment = متصفح الويب المبدئي، عميل البريد، متصفح الملفات، والتطبيقات الأخرى xdg-entry-desktop = سطح المكتب -xdg-entry-desktop-comment = إعدادات خلفية الشاشة والمظهر واللوحة والإرساء وإدارة النوافذ ومساحة العمل +xdg-entry-desktop-comment = إعدادات خلفية الشاشة والمظهر واللوحة والمنصة وإدارة النوافذ ومساحة العمل xdg-entry-displays = شاشات العرض xdg-entry-displays-comment = أدِر إعدادات تضبيط العرض xdg-entry-dock = الإرساء @@ -107,8 +107,6 @@ vpn-error = خطأ في VPN .connect = فشل الاتصال بـ VPN .connection-editor = فشل محرر الاتصال .connection-settings = فشل الحصول على إعدادات الاتصالات النشطة - .openvpn-config-path = مسار ملف غير صالح لإعدادات OpenVPN - .openvpn-config-path-desc = يجب أن يكون الملف المختار موجودًا على نظام الملفات المحلي. .updating-state = فشل تحديث حالة مدير الشبكة .wireguard-config-path = مسار ملف غير صالح لتكوين WireGuard .wireguard-config-path-desc = يجب أن يكون الملف المختار موجودًا على نظام ملفات محلي. @@ -275,26 +273,13 @@ frosted = تأثير الزجاج البلوري على واجهة النظام enable-export = قم بتطبيق هذا المظهر على تطبيقات GNOME. .desc = لا تدعم جميع مجموعات الأدوات التبديل التلقائي. قد تحتاج التطبيقات غير التابعة لـ COSMIC إلى إعادة التشغيل بعد تغيير المظهر. icon-theme = نسق الأيقونات - .desc = يطبِّق مجموعة مختلفة من الأيقونات على التطبيقات + .desc = يطبق مجموعة مختلفة من الأيقونات على التطبيقات text-tint = لون نص الواجهة .desc = اللون المستخدم لاشتقاق ألوان نص الواجهة التي تتمتع بتباين كافٍ على الأسطح المختلفة -style = الأسلوب +style = المظهر .round = دائري .slightly-round = دائري قليلاً .square = مربع - .frosted-glass = زجاج بلوري - .frosted-system-interface = واجهة النظام - .frosted-system-interface-desc = يُطبِّق مظهر الزجاج البلوري على المشغّل، ومكتبة التطبيقات، ونظرة عامة على مساحة العمل، وعناصر التحكم التي تظهر على الشاشة - .frosted-windows = النوافذ - .frosted-windows-desc = يطبِّق مظهر الزجاج البلوري على النوافذ ومربعات الحوار - .frosted-panels = اللوحات - .frosted-panels-desc = يطبِّق الزجاج البلوري على اللوحة وقاعدة الإرساء - .frosted-applets = البريمجات - .frosted-applets-desc = يطبِّق الزجاج البلوري على قوائم البريمجات الموجودة على اللوحة والإرساء - .frosted-thickness = السماكة البلورية - .less = أقل - .more = أكثر - .glass-opacity = عتامة الزجاج interface-density = كثافة الواجهة .comfortable = مريحة .compact = صغير ة @@ -367,7 +352,7 @@ super-key = إجراءات مفتاح Super .launcher = فتح مشغل التطبيقات .workspaces = فتح مساحات العمل .applications = فتح التطبيقات - .none = لا شيء + .disable = تعطيل edge-gravity = تنجذب النوافذ العائمة إلى الحواف القريبة window-controls = تحكمات النوافذ .maximize = أظهر زر التكبير @@ -548,27 +533,11 @@ keyboard-sources = مصادر الإدخال .view-layout = اعرض تخطيط لوحة المفاتيح .remove = أزِل .add = أضِف مصدر إدخال -keyboard-special-char = إدخال الأحرف الخاصة +keyboard-special-char = إدخال أحرف خاصة .alternate = مفتاح الأحرف البديلة - .compose = مفتاح التكوين - .compose-desc = يتيح مفتاح التكوين إدخال مجموعة متنوعة من الأحرف. لاستخدامه، اضغط على مفتاح التكوين ثم سلسلة من الأحرف. على سبيل المثال، سيؤدي الضغط على مفتاح التكوين متبوعًا بالحرفين C و o إلى إدخال الرمز ©، بينما سيؤدي الضغط على مفتاح «التكوين» متبوعًا بالحرفين a و ‘ إلى إدخال الحرف á. - .caps = مفتاح قفل الحروف - .ctrl = مفتاح التحكم - .ctrl-right = مفتاح Ctrl الأيمن - .swap-with-ctrl = تبديل مع مفتاح التحكم - .alt = مفتاح Alt - .alt-left = مفتاح Alt الأيسر - .alt-right = Alt الأيمن - .super = Super - .super-left = Super الأيسر - .super-right = Super الأيمن - .menu = مفتاح القائمة - .backspace = مسافة للخلف - .escape = هروب (ESC) - .swap-with-escape = التبديل مع مفتاح الهروب - .print-screen = اطبع الشاشة - .scroll-lock = قفل التمرير - .none = لا شيء + .compose = مفتاح التركيب + .compose-desc = مفتاح التركيب يسمح بإدخال مجموعة واسعة من الأحرف. لاستخدامه، اضغط على مفتاح التركيب ثم اكتب تسلسلًا من الأحرف. على سبيل المثال، الضغط على مفتاح التركيب متبوعًا بـ C و o سيدخل الرمز ©، بينما الضغط على مفتاح التركيب متبوعًا بـ a و ‘ سيدخل الحرف á. + .caps = مفتاح Caps Lock keyboard-typing-assist = الكتابة .repeat-rate = معدل التكرار .repeat-delay = تأخير التكرار @@ -942,9 +911,3 @@ xdg-entry-displays-keywords = COSMIC;عرض; xdg-entry-workspaces = مساحات العمل xdg-entry-wired-comment = الاتصالات السلكية وملفات تعريف الاتصال no-search-results = لا توجد شبكات تطابق بحثك. -workspaces-navigation = التنقل - .wraparound = تنقل بين مساحة العمل الأولى والأخيرة باستخدام اختصارات لوحة المفاتيح والإيماءات -bluetooth-display-passkey = إقران البلوتوث - .description = يُرجى إدخال مفتاح المرور التالي على { $device }، ثم الضغط على مفتاح Enter -bluetooth-display-pin = إقتران البلوتوث - .description = يُرجى إدخال رمز PIN التالي على { $device }، ثم الضغط على Enter diff --git a/i18n/ca/cosmic_settings.ftl b/i18n/ca/cosmic_settings.ftl index c47f1a1..e69de29 100644 --- a/i18n/ca/cosmic_settings.ftl +++ b/i18n/ca/cosmic_settings.ftl @@ -1,11 +0,0 @@ -cancel = Cancel·lar -confirm = Confirmar -password = Contrasenya -identity = Identitat -password-confirm = Confirmeu la contrasenya -connected = Connectat -settings = Configuració -save = Desa -forget-dialog = Oblidar aquesta xarxa Wi-Fi? - .description = Caldrà tornar a introduir la contrasenya per utilitzar aquesta xarxa en el futur. -close = Tancar diff --git a/i18n/cs/cosmic_settings.ftl b/i18n/cs/cosmic_settings.ftl index 915e59e..bc33e86 100644 --- a/i18n/cs/cosmic_settings.ftl +++ b/i18n/cs/cosmic_settings.ftl @@ -32,7 +32,7 @@ xdg-entry-network = Síť a Wi-Fi xdg-entry-network-comment = Správa síťových připojení xdg-entry-notifications = Oznámení xdg-entry-notifications-comment = Režim Nerušit, oznámení na zamykací obrazovce a nastavení jednotlivých aplikací -xdg-entry-panel-comment = Hlavní systémová lišta pro nabídky a applety +xdg-entry-panel-comment = Hlavní systémová lišta pro menu a applety xdg-entry-power = Napájení a baterie xdg-entry-power-comment = Režimy napájení a možnosti úspory energie xdg-entry-region-language = Region a jazyk @@ -116,9 +116,9 @@ panel-missing = Nastavení panelu chybí .desc = Soubor nastavení panelu chybí kvůli poškození nebo použití vlastního nastavení. .fix = Obnovit výchozí applets = Applety -start-segment = Počáteční segment +start-segment = Začínající segment center-segment = Prostřední segment -end-segment = Koncový segment +end-segment = Konečný segment add = Přidat add-applet = Přidat applet search-applets = Vyhledat applety... @@ -280,24 +280,8 @@ keyboard-sources = Vstupní zdroje keyboard-special-char = Zadávání speciálních znaků .alternate = Klávesa pro náhradní znaky .compose = Klávesa Compose - .compose-desc = Klávesa Compose umožňuje zadávat širokou škálu znaků. Pro její použití stiskněte Compose a poté zadejte sekvenci znaků. Například Compose, C, O vloží znak „©“, zatímco Compose, A, ‘ vloží znak „á“. + .compose-desc = Klávesa Compose umožňuje zadávat širokou škálu znaků. Pro její použití stiskněte Compose a poté zadejte sekvenci znaků. Například [Compose, C, O] vloží znak „©“, zatímco [Compose, A, ‘] znak „á“. .caps = Klávesa Caps Lock - .ctrl = Control - .ctrl-right = Pravý Ctrl - .swap-with-ctrl = Zaměnit s klávesou Control - .alt = Alt - .alt-left = Levý Alt - .alt-right = Pravý Alt - .super = Super - .super-left = Levý Super - .super-right = Pravý Super - .menu = Klávesa Menu - .backspace = Backspace - .escape = Escape - .swap-with-escape = Zaměnit s klávesou Escape - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = Žádná ## Input: Keyboard: Shortcuts @@ -434,8 +418,6 @@ vpn-error = Chyba VPN .connect = Nepodařilo se připojit k VPN .connection-editor = Editor připojení selhal .connection-settings = Nepodařilo se získat nastavení aktivních připojení - .openvpn-config-path = Chybně zadaná cesta souboru nastavení OpenVPN - .openvpn-config-path-desc = Vybraný soubor musí být na lokálním souborovém systému .updating-state = Nepodařilo se aktualizovat stav správce sítě .wireguard-config-path = Chybně zadaná cesta souboru nastavení WireGuard .wireguard-config-path-desc = Vybraný soubor musí být na lokálním souborovém systému @@ -461,7 +443,7 @@ container-background = Pozadí kontejneru .desc = Používá se pro navigační postranní panel, výsuvný panel, dialogy a podobné prvky control-tint = Odstín ovládacích prvků .desc = Používá se pro pozadí standardních tlačítek, vyhledávacích polí, textových vstupů a podobných komponent -frosted = Efekt ledového skla na systémovém rozhraní +frosted = Efekt zmrazeného okna na systémovém rozhraní .desc = Použije rozmazané pozadí pro panel, dok, applety, spouštěč a knihovnu aplikací enable-export = Použít aktuální motiv v aplikacích GNOME .desc = Ne všechny toolkity podporují automatické přepínání. Aplikace, které nejsou postaveny na COSMIC toolkitu mohou vyžadovat restart po změně motivu. @@ -485,7 +467,7 @@ super-key = Akce klávesy Super .launcher = Otevřít spouštěč .workspaces = Otevřít pracovní plochy .applications = Otevřít aplikace - .none = Žádná + .disable = Zakázat edge-gravity = Plovoucí okna se přichytávají k blízkým okrajům focus-navigation = Navigace zaměření .focus-follows-cursor = Zaměření následuje kurzor @@ -548,21 +530,8 @@ display = Obrazovky .additional-scale-options = Další možnosti měřítka style = Styl .round = Kulatý - .slightly-round = Mírně zaoblený + .slightly-round = Lehce kulatý .square = Hranatý - .frosted-glass = Efekt ledového skla - .frosted-system-interface = Rozhraní systému - .frosted-system-interface-desc = Použije efekt ledového skla na spouštěč, knihovnu aplikací, přehled pracovních ploch a ovládací prvky na obrazovce - .frosted-windows = Okna - .frosted-windows-desc = Použije efekt ledového skla na okna a dialogy - .frosted-panels = Panely - .frosted-panels-desc = Použije efekt ledového skla na dok a panel - .frosted-applets = Applety - .frosted-applets-desc = Použije efekt ledového skla na nabídky appletů v doku a na panelu - .frosted-thickness = Tloušťka ledu - .less = menší - .more = větší - .glass-opacity = Krytí skla interface-density = Hustota rozhraní .comfortable = Pohodlné .compact = Kompaktní @@ -658,13 +627,13 @@ power-saving = Možnosti úspory energie disable-while-typing = Zakázat při psaní input-devices = Vstupní zařízení modified = { $count } změněných -slow = Pomalu -fast = Rychle -short = Krátká -long = Dlouhá +slow = Pomalá +fast = Rychlá +short = Krátké +long = Dlouhé keyboard-typing-assist = Psaní - .repeat-rate = Rychlost opakování - .repeat-delay = Prodleva před opakováním + .repeat-rate = Frekvence opakování + .repeat-delay = Zpoždění opakování keyboard-numlock-boot = Num Lock .boot-state = Stav klávesy při spuštění systému .last-boot = Poslední spuštění systému @@ -924,9 +893,3 @@ xdg-entry-displays-keywords = COSMIC;Obrazovka;Obrazovky;Displeje;Monitory;Zobra xdg-entry-workspaces-keywords = COSMIC;Pracovní;Plocha;Plochy;Orientace;Přehled;Sledování; xdg-entry-x11-applications-keywords = COSMIC;X11;Aplikace;Hra;Hry;Kompatibilita; no-search-results = Žádné sítě neodpovídají vašemu vyhledávání. -workspaces-navigation = Navigace - .wraparound = Přecházet mezi první a poslední pracovní plochou pomocí klávesových zkratek a gest -bluetooth-display-passkey = Párování Bluetooth - .description = Zadejte prosím následující párovací kód na zařízení { $device } a poté stiskněte Enter -bluetooth-display-pin = Párování Bluetooth - .description = Zadejte prosím následující PIN na zařízení { $device } a poté stiskněte Enter diff --git a/i18n/da/cosmic_settings.ftl b/i18n/da/cosmic_settings.ftl index 94296f7..43cc54c 100644 --- a/i18n/da/cosmic_settings.ftl +++ b/i18n/da/cosmic_settings.ftl @@ -11,8 +11,8 @@ add-network = Tilføj Netværk add-vpn = Tilføj VPN airplane-on = Airplane mode is on. Flytilstand er slået til cable-unplugged = Kabel frakoblet -connect = Opret forbindelse -connected = Forbundet +connect = Tilslut +connected = Tilsluttet connecting = Tilslutter… disconnect = Afbryd forget = Glem @@ -21,14 +21,14 @@ network-and-wireless = Netværk & trådløst no-networks = Der blev ikke fundet nogen netværk. no-vpn = Ingen VPN-forbindelser tilgængelige. password = Adgangskode -password-confirm = Bekræft adgangskode +password-confirm = Godkend Adgangskode remove = Fjern settings = Indstillinger username = Brugernavn visible-networks = Synlige Netværk identity = Identitet forget-dialog = Glem dette Wi-Fi-netværk? - .description = Du skal indtaste adgangskoden igen for at bruge dette Wi-Fi-netværk i fremtiden. + .description = Du skal indtaste en adgangskode igen for at bruge dette Wi-Fi-netværk i fremtiden. network-device-state = .activated = Tilsluttet .config = Opretter forbindelse @@ -192,6 +192,7 @@ never = Aldrig ## Desktop: Udseende appearance = Udseende + .desc = Accentfarver og tema. accent-color = Accentfarve app-background = Applikation eller vinduesbaggrund auto = Auto @@ -199,11 +200,11 @@ close = Luk color-picker = Farvevælger copied-to-clipboard = Kopieret til udklipsholder copy-to-clipboard = Kopiér til udklipsholder -dark = Mørkt +dark = Mørk export = Eksporter hex = Hex import = Importer -light = Lyst +light = Lys mode-and-colors = Tilstand og farver recent-colors = Seneste farver reset-to-default = Nulstil til standard @@ -713,7 +714,7 @@ region = Region ## Applications -applications = Programmer +applications = Applikationer ## Applications: Default Applications diff --git a/i18n/de/cosmic_settings.ftl b/i18n/de/cosmic_settings.ftl index 35864e3..6c0dfdf 100644 --- a/i18n/de/cosmic_settings.ftl +++ b/i18n/de/cosmic_settings.ftl @@ -9,7 +9,7 @@ number = { $number } add-network = Netzwerk hinzufügen .profile = Profil hinzufügen add-vpn = VPN hinzufügen -airplane-on = Flugmodus ist eingeschaltet. +airplane-on = Flugzeugmodus ist eingeschaltet. cable-unplugged = Kabel ausgesteckt connect = Verbinden connected = Verbunden @@ -60,8 +60,6 @@ vpn-error = VPN-Fehler .connect = Verbinden mit dem VPN ist fehlgeschlagen .connection-editor = Verbindungseditor ist fehlgeschlagen .connection-settings = Abrufen der Einstellungen für aktive Verbindungen ist fehlgeschlagen - .openvpn-config-path = Ungültiger Dateipfad für OpenVPN-Konfiguration - .openvpn-config-path-desc = Die ausgewählte Datei muss sich im lokalen Dateisystem befinden. .updating-state = Aktualisieren des Netzwerkmanager-Status ist fehlgeschlagen .wireguard-config-path = Ungültiger Dateipfad für WireGuard-Konfiguration .wireguard-config-path-desc = Die ausgewählte Datei muss sich im lokalen Dateisystem befinden. @@ -236,19 +234,6 @@ style = Stil .round = Rund .slightly-round = Leicht rund .square = Quadratisch - .frosted-glass = Milchglas - .frosted-system-interface = Systemschnittstelle - .frosted-system-interface-desc = Wendet einen Milchglaseffekt auf den Starter, die Anwendungsbibliothek, die Arbeitsflächenübersicht und die Bildschirmsteuerelemente an - .frosted-windows = Fenster - .frosted-windows-desc = Wendet einen Milchglaseffekt auf Fenster und Dialoge an - .frosted-panels = Panels - .frosted-panels-desc = Wendet einen Milchglaseffekt auf das Panel und das Dock an - .frosted-applets = Applets - .frosted-applets-desc = Wendet einen Milchglaseffekt auf die Applet-Menüs im Panel und im Dock an - .frosted-thickness = Dicke der Mattierung - .less = weniger - .more = mehr - .glass-opacity = Glastrübung interface-density = Dichte der Benutzeroberfläche .comfortable = Komfortabel .compact = Kompakt @@ -278,12 +263,12 @@ applets = Applets center-segment = Mittelsegment end-segment = Endsegment large = Groß -no-applets-found = Keine Applets gefunden ... +no-applets-found = Keine Applets gefunden... panel-bottom = Unten panel-left = Links panel-right = Rechts panel-top = Oben -search-applets = Applets suchen ... +search-applets = Applets suchen... small = Klein start-segment = Anfangssegment panel-appearance = Aussehen @@ -321,7 +306,7 @@ super-key = Super-Tasten-Aktion .launcher = Starter öffnen .workspaces = Arbeitsflächen öffnen .applications = Anwendungen öffnen - .none = Keine + .disable = Deaktivieren edge-gravity = Schwebende Fenster werden von nahe gelegenen Kanten angezogen window-controls = Fenstersteuerung .minimize = Minimieren-Schaltfläche anzeigen @@ -510,22 +495,6 @@ keyboard-special-char = Eingabe von Sonderzeichen .compose = Compose-Taste .compose-desc = Mit der Compose-Taste kannst du viele verschiedene Zeichen eingeben. Drück einfach die Compose-Taste und dann die Zeichen, die du brauchst. Wenn du zum Beispiel die Compose-Taste und dann C und o drückst, kommt ©, und wenn du die Compose-Taste und dann a und ' drückst, kommt á. .caps = Feststelltaste - .ctrl = Steuerungstaste - .ctrl-right = Rechte Strg-Taste - .swap-with-ctrl = Mit der Steuerungstaste tauschen - .alt = Alt-Taste - .alt-left = Linke Alt-Taste - .alt-right = Rechte Alt-Taste - .super = Super-Taste - .super-left = Linke Super-Taste - .super-right = Rechte Super-Taste - .menu = Menü-Taste - .backspace = Rücktaste - .escape = Escape-Taste - .swap-with-escape = Mit der Escape-Taste tauschen - .print-screen = Druck-Taste - .scroll-lock = Rollen-Taste - .none = Keine keyboard-typing-assist = Tippen .repeat-rate = Wiederholungsrate .repeat-delay = Wiederholungsverzögerung @@ -536,7 +505,7 @@ keyboard-numlock-boot = Numlock .off = Deaktiviert .set = Numlock-Boot-Status setzen added = Hinzugefügt -type-to-search = Zum Suchen tippen ... +type-to-search = Zum Suchen tippen... show-extended-input-sources = Erweiterte Eingabequellen anzeigen ## Input: Keyboard: Shortcuts @@ -943,9 +912,3 @@ xdg-entry-desktop-keywords = COSMIC;Desktop; xdg-entry-desktop = Desktop xdg-entry-a11y-keywords = COSMIC;Barrierefreiheit;A11y;Bildschirm;Leser;Vergrößerungsglas;Kontrast;Farbe; xdg-entry-a11y-comment = Bildschirmleser, Vergrößerungsglas, hoher Kontrast und Farbfilter -workspaces-navigation = Navigation - .wraparound = Mit Tastenkombinationen und Gesten zwischen der ersten und letzten Arbeitsfläche wechseln -bluetooth-display-passkey = Bluetooth-Kopplung - .description = Bitte gib den folgenden Passkey auf { $device } ein und drücke dann die Eingabetaste -bluetooth-display-pin = Bluetooth-Kopplung - .description = Bitte gib die folgende PIN auf { $device } ein und drücke dann die Eingabetaste diff --git a/i18n/el/cosmic_settings.ftl b/i18n/el/cosmic_settings.ftl index bfa73c4..a167994 100644 --- a/i18n/el/cosmic_settings.ftl +++ b/i18n/el/cosmic_settings.ftl @@ -1,857 +1 @@ share = Κοινοποίηση δικτύου -connect = Σύνδεση -close = Κλείσιμο -save = Αποθήκευση -password = Κωδικός πρόσβασης -remove = Αφαίρεση -import = Εισαγωγή -username = Όνομα χρήστη -light = Ανοιχτόχρωμο -ok = OK -applets = Μικροεφαρμογές -dbus-connection-error = Αποτυχία σύνδεσης στο DBus -dark = Σκουρόχρωμο -cancel = Ακύρωση -settings = Ρυθμίσεις -replace = Αντικατάσταση -add = Προσθήκη -appearance = Εμφάνιση -panel-left = Αριστερά -panel-top = Πάνω -region = Περιοχή -forget-dialog = Διαγραφή αυτού του δικτύου Wi-Fi; - .description = Θα χρειαστεί να εισαγάγετε ξανά τον κωδικό πρόσβασης για να χρησιμοποιήσετε αυτό το δίκτυο Wi-Fi στο μέλλον. -default = Προεπιλογή -unknown = Άγνωστο -connecting = Σύνδεση… -export = Εξαγωγή -panel-right = Δεξιά -rgb = RGB -desktop = Επιφάνεια εργασίας -identity = Ταυτότητα -disconnect = Αποσύνδεση -app = Ρυθμίσεις COSMIC -debug = Εντοπισμός σφαλμάτων -number = { $number } -small = Μικρό -terminate = Τερματισμός -password-confirm = Επιβεβαίωση κωδικού πρόσβασης -applications = Εφαρμογές -connected = Συνδέθηκε -large = Μεγάλο -confirm = Επιβεβαίωση -enable = Ενεργοποίηση -never = Ποτέ -activate = Ενεργοποίηση -dialog-add = Προσθήκη -command = Εντολή -panel-bottom = Κάτω -navigate = Πλοήγηση -colors = Χρώματα -xdg-entry-touchpad = Επιφάνεια αφής -xdg-entry-bluetooth-comment = Διαχείριση συσκευών Bluetooth -xdg-entry-appearance-keywords = Έμφαση;Χρώμα;Εικονίδιο;Γραμματοσειρά;Θέμα;COSMIC;Accent;Color;Icon;Font;Theme -xdg-entry-mouse = Ποντίκι -firmware = Υλικολογισμικό -xdg-entry-a11y = Προσβασιμότητα -xdg-entry-desktop-keywords = Επιφάνεια;Εργασίας;COSMIC;Desktop; -xdg-entry-users = Χρήστες -xdg-entry-default-apps = Προεπιλεγμένες εφαρμογές -xdg-entry-applications-comment = Προεπιλεγμένες εφαρμογές, εφαρμογές εκκίνησης και ρυθμίσεις συμβατότητας εφαρμογών με το X11 -xdg-entry-about-keywords = Πληροφορίες;Σχετικά;Περί;COSMIC;About -xdg-entry-notifications = Ειδοποιήσεις -xdg-entry-a11y-keywords = Προσβασιμότητα;Προσιτότητα;Οθόνη;Ανάγνωση;Αναγνώστης;Μεγεθυντικός;Φακός;Αντίθεση;Χρώμα;COSMIC;Accessibility;A11y;Screen;Reader;Magnifier;Contrast;Color; -xdg-entry-desktop = Επιφάνεια εργασίας -xdg-entry-date-time-keywords = Ζώνη;Ώρα;COSMIC;Time;Zone; -xdg-entry-wallpaper = Ταπετσαρία -xdg-entry-keyboard = Πληκτρολόγιο -xdg-entry-a11y-comment = Ανάγνωση οθόνης, μεγεθυντικός φακός, υψηλή αντίθεση και χρωματικά φίλτρα -xdg-entry-displays = Οθόνες -sound = Ήχος -xdg-entry-date-time = Ημερομηνία και ώρα -notifications = Ειδοποιήσεις -xdg-entry-bluetooth-keywords = Σύνδεση;COSMIC;Bluetooth; -about = Πληροφορίες -workspaces = Χώροι εργασίας -xdg-entry-wireless = Wi-Fi -xdg-entry-about-comment = Όνομα συσκευής, πληροφορίες υλικού, προεπιλογές λειτουργικού συστήματος -xdg-entry-appearance-comment = Χρώματα έμφασης και θέματα -xdg-entry-comment = Εφαρμογή ρυθμίσεων για το περιβάλλον επιφάνειας εργασίας COSMIC -xdg-entry-applications = Εφαρμογές -xdg-entry-default-apps-keywords = Προεπιλογή;Προεπιλεγμένη;Εφαρμογή;COSMIC;Default;Application -xdg-entry-keywords = Προτιμήσεις;Ρυθμίσεις;COSMIC;Settings; -xdg-entry-about = Πληροφορίες -xdg-entry-input = Συσκευές εισόδου -keyboard = Πληκτρολόγιο -xdg-entry-appearance = Εμφάνιση -xdg-entry-sound = Ήχος -xdg-entry-displays-keywords = Οθόνη;COSMIC;Display; -xdg-entry-workspaces = Χώροι εργασίας -xdg-entry-date-time-comment = Ζώνη ώρας, αυτόματη ρύθμιση ρολογιού και μορφοποίηση ώρας -system-shortcut = Σύστημα - .app-library = Άνοιγμα βιβλιοθήκης εφαρμογών - .brightness-down = Μείωση φωτεινότητας οθόνης - .brightness-up = Αύξηση φωτεινότητας οθόνης - .display-toggle = Εναλλαγή εσωτερικής οθόνης - .home-folder = Άνοιγμα προσωπικού φακέλου - .keyboard-brightness-down = Μείωση φωτεινότητας πληκτρολογίου - .keyboard-brightness-up = Αύξηση φωτεινότητας πληκτρολογίου - .launcher = Άνοιγμα εκκινητή - .log-out = Αποσύνδεση - .lock-screen = Κλείδωμα οθόνης - .mute = Σίγαση εξόδου ήχου - .mute-mic = Σίγαση εισόδου μικροφώνου - .play-pause = Αναπαραγωγή/παύση - .play-next = Επόμενο κομμάτι - .play-prev = Προηγούμενο κομμάτι - .poweroff = Τερματισμός λειτουργίας - .screenshot = Λήψη στιγμιότυπου οθόνης - .suspend = Αναστολή λειτουργίας - .terminal = Άνοιγμα τερματικού - .touchpad-toggle = Εναλλαγή λειτουργίας επιφάνειας αφής - .volume-lower = Μείωση έντασης εξόδου ήχου - .volume-raise = Αύξηση έντασης εξόδου ήχου - .web-browser = Άνοιγμα προγράμματος περιήγησης ιστού - .window-switcher = Εναλλαγή μεταξύ των ανοικτών παραθύρων - .window-switcher-previous = Εναλλαγή μεταξύ των ανοικτών παραθύρων (αντίστροφα) - .workspace-overview = Άνοιγμα επισκόπησης χώρων εργασίας -super-key = Ενέργεια πλήκτρου Super - .launcher = Άνοιγμα μενού εκκίνησης - .workspaces = Άνοιγμα χώρων εργασίας - .applications = Άνοιγμα εφαρμογών - .none = Καμία -x-minutes = - { $number } { $number -> - [one] λεπτό - *[other] λεπτά - } -vrr = Μεταβλητός ρυθμός ανανέωσης - .enabled = Ενεργός - .force = Πάντα - .auto = Αυτόματα - .disabled = Ανενεργός -window-hint-accent = Χρώμα ένδειξης ενεργού παραθύρου -fit-to-screen = Προσαρμογή στην οθόνη -control-tint = Απόχρωση στοιχείων ελέγχου - .desc = Χρησιμοποιείται για το φόντο των τυπικών κουμπιών, εισόδων αναζήτησης, εισόδων κειμένου και παρόμοιων στοιχείων -vpn-error = Σφάλμα VPN - .config = Αποτυχία προσθήκης διαμόρφωσης VPN - .connect = Αποτυχία σύνδεσης στο VPN - .connection-editor = Αποτυχία επεξεργαστή συνδέσεων - .connection-settings = Αποτυχία λήψης ρυθμίσεων για ενεργές συνδέσεις - .openvpn-config-path = Μη έγκυρη διαδρομή αρχείου για τη διαμόρφωση του OpenVPN - .openvpn-config-path-desc = Το επιλεγμένο αρχείο πρέπει να βρίσκεται σε τοπικό σύστημα αρχείων. - .updating-state = Αποτυχία ενημέρωσης κατάστασης διαχειριστή δικτύου - .wireguard-config-path = Μη έγκυρη διαδρομή αρχείων για τη διαμόρφωση του WireGuard - .wireguard-config-path-desc = Το επιλεγμένο αρχείο πρέπει να βρίσκεται στο τοπικό σύστημα αρχείων. - .wireguard-device = Αποτυχία δημιουργίας συσκευής WireGuard - .with-password = - Αποτυχία ορισμού { $field -> - *[username] ονόματος χρήστη - [password] κωδικού πρόσβασης - [password-flags] σημαιών κωδικού πρόσβασης - } VPN με το nmcli -toggle-stacking = Εναλλαγή στοίβαξης παραθύρων -no-applets-found = Δεν βρέθηκαν μικροεφαρμογές... -zoom-in = Μεγέθυνση -place-here = Τοποθετήστε τις μικροεφαρμογές εδώ --requires-restart = Απαιτεί επανεκκίνηση -workspaces-orientation = Προσανατολισμός χώρων εργασίας - .vertical = Κάθετος - .horizontal = Οριζόντιος -acceleration-desc = Προσαρμόζει αυτόματα την ευαισθησία ιχνηλάτησης με βάση την ταχύτητα -all-displays = Όλες οι οθόνες -scheduling = Προγραμματισμός - .manual = Χειροκίνητο πρόγραμμα -frosted = Εφέ ημιδιαφανούς γυαλιού στο περιβάλλον συστήματος - .desc = Εφαρμόζει θόλωση του φόντου της γραμμής συστήματος, της μπάρας εφαρμογών, του μενού εκκίνησης και της βιβλιοθήκης εφαρμογών -about-hardware = Υλικό - .model = Μοντέλο υλικού - .memory = Μνήμη - .processor = Επεξεργαστής - .graphics = Γραφικά - .disk-capacity = Χωρητικότητα δίσκου -short = Σύντομη -vpn = VPN - .connections = Συνδέσεις VPN - .error = Αποτυχία προσθήκης διαμόρφωσης VPN - .remove = Αφαίρεση προφίλ σύνδεσης - .select-file = Επιλογή αρχείου διαμόρφωσης VPN -power-mode = Λειτουργία ενέργειας - .battery = Εκτεταμένη διάρκεια μπαταρίας - .battery-desc = Μειωμένη χρήση ενέργειας και χαμηλές επιδόσεις - .balanced = Ισορροπημένη - .balanced-desc = Μέτριες επιδόσεις και ήπια χρήση ενέργειας - .performance = Υψηλές επιδόσεις - .performance-desc = Κορυφαίες επιδόσεις και υψηλή χρήση ενέργειας - .no-backend = Δεν βρέθηκε υπηρεσία παρασκηνίου. Εγκαταστήστε το system76-power ή το power-profiles-daemon. -wired = Ενσύρματη δικτύωση - .adapter = Προσαρμογέας ενσύρματου δικτύου { $id } - .connections = Ενσύρματες συνδέσεις - .devices = Ενσύρματες συσκευές - .remove = Αφαίρεση προφίλ σύνδεσης -bluetooth-available = Κοντινές συσκευές -cable-unplugged = Αποσυνδεδεμένο καλώδιο -color-picker = Εργαλείο επιλογής χρωμάτων -interface-font = Γραμματοσειρά συστήματος -zoom-out = Σμίκρυνση -hot-corner = Γωνία συντόμευσης - .top-left-corner = Ενεργοποίηση της πάνω αριστερής γωνίας συντόμευσης για τους χώρους εργασίας -keyboard-typing-assist = Πληκτρολόγηση - .repeat-rate = Ρυθμός επανάληψης - .repeat-delay = Καθυστέρηση επανάληψης -edge-gravity = Έλξη αιωρούμενων παραθύρων στις κοντινές άκρες -amplification = Ενίσχυση ήχου - .desc = Επιτρέπει την αύξηση της έντασης στο 150% -recent-colors = Πρόσφατα χρώματα -about-os = Λειτουργικό σύστημα - .os = Λειτουργικό σύστημα - .os-architecture = Αρχιτεκτονική λειτουργικού συστήματος - .kernel = Έκδοση πυρήνα - .desktop-environment = Περιβάλλον επιφάνειας εργασίας - .windowing-system = Σύστημα διαχείρισης παραθύρων -panel-behavior-and-position = Συμπεριφορά και θέσεις - .autohide = Αυτόματη απόκρυψη γραμμής συστήματος - .dock-autohide = Αυτόματη απόκρυψη μπάρας εφαρμογών - .position = Θέση στην οθόνη - .display = Εμφάνιση στην οθόνη -add-language = Προσθήκη γλώσσας - .context = Προσθήκη γλώσσας -password-mismatch = Ο κωδικός πρόσβασης και το πεδίο επιβεβαίωσης θα πρέπει να είναι ίδια -accessibility = Προσβασιμότητα - .vision = Όραση - .on = Ενεργό - .off = Ανενεργό - .unavailable = Μη διαθέσιμο - .screen-reader = Ανάγνωση οθόνης - .high-contrast = Λειτουργία υψηλής αντίθεσης - .invert-colors = Αναστροφή χρωμάτων - .color-filters = Φίλτρα χρωμάτων -container-background = Φόντο πλαισίων - .desc-detail = Το χρώμα φόντου πλαισίων χρησιμοποιείται για την πλαϊνή στήλη πλοήγησης, το πλευρικό συρτάρι, τα παράθυρα διαλόγων και παρόμοια γραφικά στοιχεία. Από προεπιλογή, το χρώμα φόντου πλαισίων προκύπτει αυτόματα από το φόντο των παραθύρων. - .reset = Επαναφορά στο αυτόματο - .desc = Χρησιμοποιείται για την πλαϊνή στήλη πλοήγησης, το πλευρικό συρτάρι, τα παράθυρα διαλόγων και παρόμοια γραφικά στοιχεία -primary-button = Κύριο κουμπί - .desc = Ορίζει τη σειρά των φυσικών κουμπιών - .left = Αριστερό - .right = Δεξί -sound-alerts = Ειδοποιήσεις - .volume = Ένταση ήχου ειδοποιήσεων - .sound = Ήχος ειδοποιήσεων -icon-theme = Θέμα εικονιδίων - .desc = Εφαρμόζει ένα διαφορετικό σύνολο εικονιδίων για εφαρμογές -keyboard-shortcuts = Συντομεύσεις πληκτρολογίου - .desc = Προβολή και προσαρμογή συντομεύσεων -switch-between-windows = Εναλλαγή μεταξύ των παραθύρων -text-tint = Απόχρωση κειμένου περιβάλλοντος χρήστη - .desc = Χρησιμοποιείται για τον προσδιορισμό των χρωμάτων του κειμένου του περιβάλλοντος χρήστη ώστε να έχουν επαρκή αντίθεση σε διάφορες επιφάνειες -online-accounts = Διαδικτυακοί λογαριασμοί - .desc = Προσθήκη λογαριασμών, IMAP και SMTP, εταιρικών συνδέσεων -open-workspaces-view = Άνοιγμα επισκόπησης χώρων εργασίας -all = Όλα -remove-user = Αφαίρεση χρήστη -sound-input = Είσοδος ήχου - .volume = Ένταση εισόδου - .device = Συσκευή εισόδου - .level = Επίπεδο εισόδου -add-another-keybinding = Προσθήκη άλλου συνδυασμού πλήκτρων -copy-to-clipboard = Αντιγραφή στο πρόχειρο -monospace-font = Γραμματοσειρά σταθερού πλάτους -experimental-settings = Πειραματικές ρυθμίσεις -recent-folders = Πρόσφατοι φάκελοι -color-filter = Τύπος φίλτρου χρωμάτων - .unknown = Άγνωστο φίλτρο ενεργό - .greyscale = Κλίμακα του γκρι - .deuteranopia = Πράσινο/κόκκινο (αδυναμία στο πράσινο, Δευτερανοπία) - .protanopia = Κόκκινο/πράσινο (αδυναμία στο κόκκινο, Πρωτανοπία) - .tritanopia = Μπλε/κίτρινο (αδυναμία στο μπλε, Τριτανοπία) -migrate-workspace = - Μεταφορά χώρου εργασίας { $direction -> - *[down] στην κάτω έξοδο - [left] στην αριστερή έξοδο - [right] στη δεξιά έξοδο - [up] στην πάνω έξοδο - } -battery = Μπαταρία - .minute = - { $value } { $value -> - [one] λεπτό - *[other] λεπτά - } - .hour = - { $value } { $value -> - [one] ώρα - *[other] ώρες - } - .day = - { $value } { $value -> - [one] ημέρα - *[other] ημέρες - } - .less-than-minute = Λιγότερο από ένα λεπτό - .and = και - .remaining-time = - { $time } μέχρι την { $action -> - [full] πλήρη φόρτιση - *[other] αποφόρτιση - } -search-applets = Αναζήτηση μικροεφαρμογών... -pinch-to-zoom = Τσίμπημα για ζουμ - .desc = Χρησιμοποιήστε δύο δάχτυλα για να κάνετε ζουμ στο περιεχόμενο, σε εφαρμογές που το υποστηρίζουν -wifi = Wi-Fi - .adapter = Προσαρμογέας Wi-Fi { $id } - .forget = Διαγραφή αυτού του δικτύου -x-hours = - { $number } { $number -> - [one] ώρα - *[other] ώρες - } -added = Προστέθηκε -input-source-switch = Εναλλαγή πηγών εισόδου γλώσσας πληκτρολογίου -focus-navigation = Πλοήγηση εστίασης - .focus-follows-cursor = Η εστίαση ακολουθεί τον κέρσορα - .focus-follows-cursor-delay = Η εστίαση ακολουθεί την καθυστέρηση του κέρσορα σε ms - .cursor-follows-focus = Ο κέρσορας ακολουθεί την εστίαση -full-name = Ονοματεπώνυμο -app-background = Φόντο παραθύρων -keyboard-sources = Πηγές εισόδου - .desc = Μπορείτε να αλλάξετε τις πηγές εισόδου με τον συνδυασμό πλήκτρων Super+Space, τον οποίο μπορείτε να προσαρμόσετε στις ρυθμίσεις συντομεύσεων πληκτρολογίου. - .move-up = Μετακίνηση πάνω - .move-down = Μετακίνηση κάτω - .settings = Ρυθμίσεις - .view-layout = Προβολή διάταξης πληκτρολογίου - .remove = Αφαίρεση - .add = Προσθήκη πηγής εισόδου -nav-shortcuts = Πλοήγηση - .prev-output = Εστίαση στην προηγούμενη έξοδο - .next-output = Εστίαση στην επόμενη έξοδο - .last-workspace = Εστίαση στον τελευταίο χώρο εργασίας - .prev-workspace = Εστίαση στον προηγούμενο χώρο εργασίας - .next-workspace = Εστίαση στον επόμενο χώρο εργασίας - .focus = - Εστίαση κατά ένα παράθυρο { $direction -> - *[down] προς τα κάτω - [in] προς τα μέσα - [left] προς τα αριστερά - [out] προς τα έξω - [right] προς τα δεξιά - [up] προς τα πάνω - } - .output = - Εναλλαγή { $direction -> - *[down] στην κάτω έξοδο - [left] στην αριστερή έξοδο - [right] στη δεξιά έξοδο - [up] στην πάνω έξοδο - } - .workspace = Μετάβαση στον χώρο εργασίας { $num } -hearing = Ακοή - .mono = Αναπαραγωγή στερεοφωνικού ήχου ως μονοφωνικού -preferred-languages = Προτιμώμενες γλώσσες - .desc = Η σειρά των γλωσσών καθορίζει ποια γλώσσα θα χρησιμοποιείται για το περιβάλλον χρήστη. Οι αλλαγές θα εφαρμοστούν στην επόμενη σύνδεση. -panel-style = Στυλ - .anchor-gap = Κενό ανάμεσα στη γραμμή συστήματος και στις άκρες της οθόνης - .dock-anchor-gap = Κενό ανάμεσα στην μπάρα εφαρμογών και στις άκρες της οθόνης - .extend = Επέκταση της γραμμής συστήματος στις άκρες της οθόνης - .dock-extend = Επέκταση της μπάρας εφαρμογών στις άκρες της οθόνης - .appearance = Εμφάνιση - .size = Μέγεθος - .background-opacity = Αδιαφάνεια φόντου -panel-appearance = Εμφάνιση - .match = Συμφωνία με την επιφάνεια εργασίας - .light = Ανοιχτόχρωμη - .dark = Σκουρόχρωμη -workspaces-multi-behavior = Συμπεριφορά πολλαπλών οθονών - .span = Κοινοί χώροι εργασίας σε όλες τις οθόνες - .separate = Ξεχωριστοί χώροι εργασίας ανά οθόνη -replace-shortcut-dialog = Αντικατάσταση συντόμευσης; - .desc = Η συντόμευση { $shortcut } χρησιμοποιείται από το { $name }. Εάν την αντικαταστήσετε, το { $name } θα απενεργοποιηθεί. -about-device = Όνομα συσκευής - .desc = Αυτό το όνομα εμφανίζεται σε άλλα δίκτυα ή συσκευές Bluetooth -no-vpn = Δεν διατίθενται συνδέσεις VPN. -start-segment = Αρχικό τμήμα -reset-to-default = Επαναφορά προεπιλογών -enable-export = Εφαρμογή τρέχοντος θέματος σε εφαρμογές GNOME - .desc = Δεν υποστηρίζουν όλα τα σύνολα εργαλείων την αυτόματη εναλλαγή. Ενδέχεται να χρειαστεί επανεκκίνηση των μη-COSMIC εφαρμογών μετά από αλλαγή του θέματος. -shortcut-name = Όνομα συντόμευσης -style = Στυλ - .round = Στρογγυλό - .slightly-round = Ελαφρώς στρογγυλό - .square = Τετράγωνο - .frosted-glass = Ημιδιαφανές γυαλί - .frosted-system-interface = Περιβάλλον συστήματος - .frosted-system-interface-desc = Εφαρμόζει το εφέ ημιδιαφανούς γυαλιού στο μενού εκκίνησης, τη βιβλιοθήκη εφαρμογών, την επισκόπηση χώρων εργασίας και τα στοιχεία ελέγχου στην οθόνη - .frosted-windows = Παράθυρα - .frosted-windows-desc = Εφαρμόζει το εφέ ημιδιαφανούς γυαλιού στα παράθυρα και τους διαλόγους - .frosted-panels = Γραμμές συστήματος - .frosted-panels-desc = Εφαρμόζει το εφέ ημιδιαφανούς γυαλιού στη γραμμή συστήματος και την μπάρα εφαρμογών - .frosted-applets = Μικροεφαρμογές - .frosted-applets-desc = Εφαρμόζει το εφέ ημιδιαφανούς γυαλιού στα μενού των μικροεφαρμογών στη γραμμή συστήματος και την μπάρα εφαρμογών - .frosted-thickness = Βαθμός θολότητας - .less = λίγο - .more = πολύ - .glass-opacity = Διαφάνεια γυαλιού -panel-applets = Διαμόρφωση - .dock-desc = Διαμόρφωση των μικροεφαρμογών της μπάρας εφαρμογών - .desc = Διαμόρφωση των μικροεφαρμογών της γραμμής συστήματος -qr-code-unavailable = Δεν διατίθεται κωδικός QR -window-tiling = Παράθεση παραθύρων - .horizontal = Ορισμός οριζόντιου προσανατολισμού - .vertical = Ορισμός κάθετου προσανατολισμού - .swap-window = Εναλλαγή παραθύρου - .toggle-tiling = Εναλλαγή παράθεσης παραθύρων - .toggle-stacking = Εναλλαγή στοίβαξης παραθύρων - .toggle-floating = Εναλλαγή αιώρησης παραθύρων - .toggle-orientation = Εναλλαγή προσανατολισμού -change-password = Αλλαγή κωδικού πρόσβασης -disable-while-typing = Απενεργοποίηση κατά την πληκτρολόγηση -long = Μεγάλη -copied-to-clipboard = Αντιγράφηκε στο πρόχειρο -bluetooth-confirm-pin = Επιβεβαίωση PIN για σύνδεση Bluetooth - .description = Επιβεβαιώστε ότι το ακόλουθο PIN είναι ίδιο με αυτό που εμφανίζεται στο { $device } -legacy-app-scaling = Κλιμάκωση εφαρμογών στο σύστημα παραθύρων X11 - .scaled-gaming = Βελτιστοποίηση για παιχνίδια και εφαρμογές πλήρους οθόνης - .gaming-description = Οι εφαρμογές σε X11 ενδέχεται να εμφανίζονται ελαφρώς μεγαλύτερες/μικρότερες σε σύγκριση με τις εφαρμογές σε Wayland - .scaled-applications = Βελτιστοποίηση για εφαρμογές - .applications-description = Τα παιχνίδια και οι εφαρμογές πλήρους οθόνης σε X11 ενδέχεται να μην αντιστοιχούν στην ανάλυση της οθόνης σας - .scaled-compatibility = Λειτουργία μέγιστης συμβατότητας - .compatibility-description = Οι εφαρμογές σε X11 ενδέχεται να εμφανίζονται θολές σε οθόνες HiDPI - .preferred-display = Προτιμώμενη οθόνη για παιχνίδια και εφαρμογές πλήρους οθόνης σε X11 - .no-display = Καμία -night-light = Νυχτερινός φωτισμός - .auto = Αυτόματα (από τη δύση έως την ανατολή) - .desc = Μείωση του μπλε φωτός με θερμότερα χρώματα -custom-shortcuts = Προσαρμοσμένες συντομεύσεις - .add = Προσθήκη συντόμευσης - .context = Προσθήκη προσαρμοσμένης συντόμευσης - .none = Δεν υπάρχουν προσαρμοσμένες συντομεύσεις -visible-networks = Ορατά δίκτυα -window-hint-accent-toggle = Χρήση του χρώματος έμφασης για την ένδειξη ενεργού παραθύρου -type-to-search = Πληκτρολογήστε για αναζήτηση... -workspaces-behavior = Συμπεριφορά χώρων εργασίας - .dynamic = Δυναμικοί χώροι εργασίας - .dynamic-desc = Αυτόματη κατάργηση των κενών χώρων εργασίας. - .fixed = Σταθερός αριθμός χώρων εργασίας - .fixed-desc = Προσθήκη ή κατάργηση χώρων εργασίας στην επισκόπηση. -wireguard-dialog = Προσθήκη συσκευής WireGuard - .description = Επιλέξτε ένα όνομα συσκευής για τη διαμόρφωση του WireGuard. -remove-connection-dialog = Αφαίρεση προφίλ σύνδεσης; - .vpn-description = Θα χρειαστεί να εισαγάγετε ξανά τον κωδικό πρόσβασης για να χρησιμοποιήσετε αυτό το δίκτυο στο μέλλον. - .wired-description = Θα χρειαστεί να δημιουργήσετε εκ νέου αυτό το προφίλ για να το χρησιμοποιήσετε στο μέλλον. -click-behavior = Συμπεριφορά κλικ - .click-finger = Δευτερεύον κλικ με δύο δάχτυλα και μεσαίο κλικ με τρία δάχτυλα - .button-areas = Δευτερεύον κλικ στην κάτω δεξιά γωνία και μεσαίο κλικ στο κάτω κεντρικό μέρος -move-windows = Μετακίνηση παραθύρων - .direction = - Μετακίνηση παραθύρου { $direction -> - *[down] προς τα κάτω - [left] προς τα αριστερά - [right] προς τα δεξιά - [up] προς τα πάνω - } - .display = - Μετακίνηση παραθύρου κατά μία οθόνη { $direction -> - *[down] προς τα κάτω - [left] προς τα αριστερά - [right] προς τα δεξιά - [up] προς τα πάνω - } - .workspace = - Μετακίνηση παραθύρου κατά έναν χώρο εργασίας { $direction -> - *[below] προς τα κάτω - [left] προς τα αριστερά - [right] προς τα δεξιά - [above] προς τα πάνω - } - .workspace-num = Μετακίνηση παραθύρου στον χώρο εργασίας { $num } - .prev-workspace = Μετακίνηση παραθύρου στον προηγούμενο χώρο εργασίας - .next-workspace = Μετακίνηση παραθύρου στον επόμενο χώρο εργασίας - .last-workspace = Μετακίνηση παραθύρου στον τελευταίο χώρο εργασίας - .next-display = Μετακίνηση παραθύρου στην επόμενη οθόνη - .prev-display = Μετακίνηση παραθύρου στην προηγούμενη οθόνη - .send-to-prev-workspace = Μετακίνηση παραθύρου στον προηγούμενο χώρο εργασίας - .send-to-next-workspace = Μετακίνηση παραθύρου στον επόμενο χώρο εργασίας -switch-workspaces = Εναλλαγή χώρων εργασίας - .horizontal = Ολίσθηση με τέσσερα δάχτυλα προς τα αριστερά/δεξιά - .vertical = Ολίσθηση με τέσσερα δάχτυλα προς τα πάνω/κάτω -system-controls = Έλεγχος συστήματος -auto-switch = Αυτόματη εναλλαγή μεταξύ ανοιχτόχρωμης και σκουρόχρωμης λειτουργίας - .sunrise = Εναλλαγή στην ανοιχτόχρωμη λειτουργία την ανατολή - .sunset = Εναλλαγή στη σκουρόχρωμη λειτουργία τη δύση - .next-sunrise = Εναλλαγή στην ανοιχτόχρωμη λειτουργία στην επόμενη ανατολή - .next-sunset = Εναλλαγή στην ανοιχτόχρωμη λειτουργία στην επόμενη δύση -add-vpn = Προσθήκη VPN -keyboard-numlock-boot = Πλήκτρο Numlock - .boot-state = Κατάσταση κατά την εκκίνηση - .last-boot = Τελευταία εκκίνηση - .on = Ενεργό - .off = Ανενεργό - .set = Ορισμός κατάστασης Numlock κατά την εκκίνηση -about-related = Σχετικές ρυθμίσεις - .support = Λήψη υποστήριξης -tap-to-click = Πάτημα για κλικ - .desc = Ενεργοποιεί το πάτημα με ένα δάχτυλο για κύριο κλικ, με δύο δάχτυλα για δευτερεύον κλικ και με τρία δάχτυλα για μεσαίο κλικ -interface-density = Πυκνότητα περιβάλλοντος χρήστη - .comfortable = Άνετο - .compact = Πυκνό - .spacious = Ευρύχωρο -open-application-library = Άνοιγμα βιβλιοθήκης εφαρμογών -slow = Αργός -network-name = Όνομα δικτύου -scrolling = Κύλιση - .two-finger = Κύλιση με δύο δάχτυλα - .edge = Κύλιση κατά μήκος της άκρης με ένα δάχτυλο - .speed = Ταχύτητα κύλισης - .natural = Φυσική κατεύθυνση κύλισης - .natural-desc = Κύλιση του περιεχομένου, αντί της προβολής -auth-dialog = Απαιτείται πιστοποίηση - .vpn-description = Εισαγάγετε το όνομα χρήστη και τον κωδικό πρόσβασης που απαιτούνται από την υπηρεσία VPN. - .wifi-description = Εισαγάγετε τον κωδικό πρόσβασης ή το κλειδί κρυπτογράφησης. Μπορείτε επίσης να συνδεθείτε πατώντας το κουμπί «WPS» του δρομολογητή. -add-user = Προσθήκη χρήστη -add-image = Προσθήκη εικόνας -migrate-workspace-next = Μεταφορά χώρου εργασίας στην επόμενη έξοδο -airplane-on = Η λειτουργία πτήσης είναι ενεργή. -formatting = Μορφοποίηση - .dates = Ημερομηνίες - .time = Ώρα - .date-and-time = Ημερομηνία και ώρα - .numbers = Αριθμοί - .measurement = Μονάδα μέτρησης - .paper = Χαρτί -disabled = Ανενεργό -add-applet = Προσθήκη μικροεφαρμογής -show-extended-input-sources = Εμφάνιση εκτεταμένων πηγών εισόδου -mode-and-colors = Λειτουργία και χρώματα -forget = Διαγραφή -center-segment = Κεντρικό τμήμα -panel-missing = Απουσία διαμόρφωσης γραμμής συστήματος - .desc = Το αρχείο διαμόρφωσης της γραμμής συστήματος απουσιάζει λόγω της χρήσης μιας προσαρμοσμένης διαμόρφωσης ή είναι κατεστραμμένο. - .fix = Επαναφορά προεπιλογής -invalid-username = Μη έγκυρο όνομα χρήστη -mirroring = Κατοπτρισμός - .id = Κατοπτρισμός { $id } - .dont = Να μην γίνει κατοπτρισμός - .mirror = Κατοπτρισμός { $display } - .project = - Προβολή σε { $display -> - [all] όλες τις οθόνες - *[other] { $display } - } - .project-count = - Προβολή σε { $count } { $count -> - [1] άλλη οθόνη - *[other] άλλες οθόνες - } -orientation = Προσανατολισμός - .standard = Τυπικός - .rotate-90 = Περιστροφή 90° - .rotate-180 = Περιστροφή 180° - .rotate-270 = Περιστροφή 270° -auto = Αυτόματο -end-segment = Τελικό τμήμα -bluetooth-adapters = Προσαρμογείς Bluetooth -time-format = Μορφή ημερομηνίας και ώρας - .twenty-four = 24ωρη μορφή - .show-seconds = Εμφάνιση δευτερολέπτων - .first = Πρώτη ημέρα εβδομάδας - .show-date = Εμφάνιση ημερομηνίας στη μικροεφαρμογή ώρας - .friday = Παρασκευή - .saturday = Σάββατο - .sunday = Κυριακή - .monday = Δευτέρα -accent-color = Χρώμα έμφασης -type-key-combination = Εισαγάγετε τον συνδυασμό πλήκτρων -manage-windows = Διαχείριση παραθύρων - .close = Κλείσιμο παραθύρου - .maximize = Μεγιστοποίηση παραθύρου - .fullscreen = Παράθυρο σε πλήρη οθόνη - .minimize = Ελαχιστοποίηση παραθύρου - .resize-inwards = Αλλαγή μεγέθους παραθύρου προς τα μέσα - .resize-outwards = Αλλαγή μεγέθους παραθύρου προς τα έξω - .toggle-sticky = Εναλλαγή καρφιτσωμένου παραθύρου -install-additional-languages = Εγκατάσταση πρόσθετων γλωσσών -sound-output = Έξοδος ήχου - .volume = Ένταση εξόδου - .device = Συσκευή εξόδου - .level = Επίπεδο εξόδου - .config = Διαμόρφωση - .balance = Ισορροπία - .left = Αριστερό - .right = Δεξί -window-controls = Στοιχεία ελέγχου παραθύρων - .maximize = Εμφάνιση κουμπιού μεγιστοποίησης - .minimize = Εμφάνιση κουμπιού ελαχιστοποίησης - .active-window-hint = Εμφάνιση ένδειξης ενεργού παραθύρου -window-management-appearance = Διαχείριση παραθύρων - .active-hint = Μέγεθος ένδειξης ενεργού παραθύρου - .gaps = Κενά γύρω από τα παράθυρα σε παράθεση -migrate-workspace-prev = Μεταφορά χώρου εργασίας στην προηγούμενη έξοδο -legacy-app-global-shortcuts = Καθολικές συντομεύσεις σε εφαρμογές X11 - .desc = Οι καθολικές συντομεύσεις επιτρέπουν σε πατήματα πλήκτρων και συμβάντα κουμπιών ποντικιού που εκτελούνται στις εφαρμογές να αναγνωρίζονται από άλλες εφαρμογές για λειτουργίες, όπως πάτημα για ομιλία ή πάτημα για σίγαση. Από προεπιλογή, οι καθολικές συντομεύσεις είναι απενεργοποιημένες στις εφαρμογές X11 για να διασφαλιστεί ότι οι άλλες εφαρμογές δεν μπορούν να παρακολουθούν τα συμβάντα πληκτρολογίου και ποντικιού που περιέχουν ευαίσθητες πληροφορίες. - .none = Κανένα πλήκτρο - .modifiers = Πλήκτρα τροποποίησης (Super, Shift, Control, Alt) - .combination = Όλα τα πλήκτρα, ενώ είναι πατημένα τα Super, Control ή Alt - .all = Όλα τα πλήκτρα - .mouse = Συμβάντα κουμπιών ποντικιού σε εφαρμογές X11 -power-saving = Επιλογές εξοικονόμησης ενέργειας - .turn-off-screen-after = Απενεργοποίηση οθόνης μετά από - .auto-suspend = Αυτόματη αναστολή - .auto-suspend-ac = Αυτόματη αναστολή με τροφοδοσία ρεύματος - .auto-suspend-battery = Αυτόματη αναστολή με τροφοδοσία μπαταρίας -connected-devices = Συνδεδεμένες συσκευές - .unknown = Άγνωστη συσκευή -icons-and-toolkit = Εικονίδια και θέματα συνόλου εργαλείων -sound-applications = Εφαρμογές - .desc = Ένταση και ρυθμίσεις ήχου εφαρμογών -time-zone = Ζώνη ώρας - .auto = Αυτόματη ζώνη ώρας - .auto-info = Απαιτεί τη χρήση υπηρεσιών τοποθεσίας και πρόσβαση στο διαδίκτυο -fast = Γρήγορος -add-color = Προσθήκη χρώματος -add-network = Προσθήκη δικτύου - .profile = Προσθήκη προφίλ -network-device-state = - .activated = Συνδεδεμένο - .config = Σύνδεση - .deactivating = Αποσύνδεση - .disconnected = Αποσυνδεδεμένο - .failed = Αποτυχία σύνδεσης - .ip-check = Έλεγχος σύνδεσης - .ip-config = Αίτημα για διεύθυνση IP και πληροφορίες δρομολόγησης - .need-auth = Απαιτεί πιστοποίηση - .prepare = Προετοιμασία για σύνδεση - .secondaries = Αναμονή για δευτερεύουσα σύνδεση - .unavailable = Μη διαθέσιμο - .unknown = Άγνωστη κατάσταση - .unmanaged = Χωρίς διαχείριση - .unplugged = Αποσυνδεδεμένο καλώδιο -gestures = Χειρονομίες - .four-finger-down = Ολίσθηση με τέσσερα δάχτυλα προς τα κάτω - .four-finger-left = Ολίσθηση με τέσσερα δάχτυλα προς τα αριστερά - .four-finger-right = Ολίσθηση με τέσσερα δάχτυλα προς τα δεξιά - .four-finger-up = Ολίσθηση με τέσσερα δάχτυλα προς τα πάνω - .three-finger-any = Ολίσθηση με τρία δάχτυλα προς κάθε κατεύθυνση -system = Σύστημα και λογαριασμοί -no-networks = Δεν βρέθηκαν δίκτυα. -open-new-folder = Άνοιγμα νέου φακέλου -fill = Συμπλήρωση -custom = Προσαρμοσμένες -bluetooth-paired = Παλαιότερες συνδεδεμένες συσκευές - .connect = Σύνδεση - .battery = { $percentage }% μπαταρία -dialog = Παράθυρο διαλόγου - .title = Διατήρηση αυτών των ρυθμίσεων οθόνης; - .keep-changes = Διατήρηση αλλαγών - .change-prompt = Οι αλλαγές των ρυθμίσεων θα αναιρεθούν αυτόματα σε { $time } δευτερόλεπτα. - .revert-settings = Επαναφορά ρυθμίσεων -workspaces-overview-thumbnails = Μικρογραφίες επισκόπησης χώρων εργασίας - .show-number = Εμφάνιση αριθμού χώρων εργασίας - .show-name = Εμφάνιση ονόματος χώρων εργασίας -color = Χρώμα - .depth = Βάθος χρωμάτων - .profile = Προφίλ χρωμάτων - .sidebar = Προφίλ χρωμάτων - .temperature = Θερμοκρασία χρωμάτων -hex = Δεκαεξαδικό -magnifier = Μεγεθυντικός φακός - .controls = - Ή χρησιμοποιήστε αυτές τις συντομεύσεις: { $zoom_in -> - [zero] { "" } - *[other] - { "" } - { $zoom_in } για μεγέθυνση, - }{ $zoom_out -> - [zero] { "" } - *[other] - { "" } - { $zoom_out } για σμίκρυνση, - } - Super + κύλιση με το ποντίκι - .scroll_controls = Ενεργοποίηση ζουμ ποντικιού ή επιφάνειας αφής με Super + κύλιση - .show_overlay = Εμφάνιση της επικάλυψης μεγεθυντικού φακού - .increment = Αύξηση ζουμ - .signin = Έναρξη μεγεθυντικού φακού κατά τη σύνδεση - .applet = Εναλλαγή μεγεθυντικού φακού στη γραμμή συστήματος - .movement = Η ζουμαρισμένη προβολή μετακινείται - .continuous = Συνέχεια με τον κέρσορα - .onedge = Όταν ο κέρσορας φτάνει στην άκρη - .centered = Για να διατηρεί τον κέρσορα στο κέντρο -administrator = Διαχειριστής - .desc = Οι διαχειριστές μπορούν να αλλάζουν ρυθμίσεις για όλους τους χρήστες, να προσθέτουν και να καταργούν άλλους χρήστες -scan-to-connect-description = Σαρώστε τον κωδικό QR για να συνδεθείτε σε αυτό το δίκτυο. -modified = { $count } τροποποιήσεις -sound-usb-audio = Ήχος USB -sound-device-profiles = Προφίλ συσκευών -sound-hd-audio = Ήχος HD -shadow-and-corners = Σκίαση και γωνίες παραθύρων -shadows-tiling = Παράθεση παραθύρων - .clip = Συμφωνία με τις γωνίες συστήματος - .shadow = Εφαρμογή σκιών -shadows-floating = Αιωρούμενα παράθυρα - .clip = Συμφωνία με τις γωνίες συστήματος και εφαρμογή σκιών -sound-device-port-unplugged = Αποσυνδεδεμένο -workspaces-overview = Επισκόπηση χώρων εργασίας - .action-on-typing = Ενέργεια κατά την πληκτρολόγηση - .none = Καμία - .launcher = Άνοιγμα μενού εκκίνησης - .applications = Άνοιγμα εφαρμογών -time-region = Περιοχή και γλώσσα -power = Ενέργεια και μπαταρία -xdg-entry-wired = Ενσύρματη δικτύωση -xdg-entry-startup-apps-comment = Διαμόρφωση των εφαρμογών που εκτελούνται κατά τη σύνδεση -xdg-entry-region-language = Περιοχή και γλώσσα -time-date = Ημερομηνία και ώρα - .auto = Αυτόματη ρύθμιση - .auto-ntp = Η ημερομηνία και η ώρα θα ενημερώνονται αυτόματα όταν οριστεί ζώνη ώρας -xdg-entry-mouse-keywords = Ποντίκι;Επιτάχυνση;Κύλιση;COSMIC;Mouse;Acceleration;Scrolling; -xdg-entry-notifications-keywords = Ειδοποίηση;Κλείδωμα;COSMIC;Notification;Lock; -xdg-entry-startup-apps-keywords = Εφαρμογή;Εκκίνηση;COSMIC;Startup;Application; -xdg-entry-default-apps-comment = Προεπιλεγμένο πρόγραμμα περιήγησης ιστού, πρόγραμμα ηλεκτρονικού ταχυδρομείου, εφαρμογή περιήγησης αρχείων και άλλες εφαρμογές -xdg-entry-keyboard-comment = Πηγές εισόδου, εναλλαγή, εισαγωγή ειδικών χαρακτήρων, συντομεύσεις -xdg-entry-wired-keywords = Σύνδεση;Δίκτυο;Ενσύρματο;COSMIC;Wired;LAN;Network;Connection; -xdg-entry-power = Ενέργεια και μπαταρία -xdg-entry-dock-keywords = Μικροεφαρμογή;Μπάρα;Εφαρμογών;Γραμμή;Συστήματος;COSMIC;Dock;Panel;Applet -bluetooth = Bluetooth - .status = Αυτό το σύστημα είναι ορατό ως { $aliases } όσο είναι ανοικτές οι ρυθμίσεις του Bluetooth. - .connected = Συνδεδεμένο - .connecting = Σύνδεση - .disconnecting = Αποσύνδεση - .connect = Σύνδεση - .disconnect = Αποσύνδεση - .forget = Διαγραφή - .dbus-error = Προέκυψε σφάλμα κατά την αλληλεπίδραση με το DBus: { $why } - .disabled = Η υπηρεσία Bluetooth είναι απενεργοποιημένη - .inactive = Η υπηρεσία Bluetooth δεν είναι ενεργή - .unknown = Δεν ήταν δυνατή η ενεργοποίηση της υπηρεσίας Bluetooth. Είναι εγκατεστημένο το BlueZ; -xdg-entry-mouse-comment = Ταχύτητα ποντικιού, επιτάχυνση και φυσική κατεύθυνση κύλισης -xdg-entry-system = Σύστημα και λογαριασμοί -xdg-entry-panel-keywords = Μικροεφαρμογή;Γραμμή;Συστήματος;COSMIC;Panel;Applet -xdg-entry-window-management = Διαχείριση παραθύρων -xdg-entry-time-language-comment = Διαχείριση ημερομηνίας, ώρας, περιοχής και γλώσσας συστήματος -default-apps = Προεπιλεγμένες εφαρμογές - .web-browser = Περιήγηση ιστού - .file-manager = Διαχείριση αρχείων - .mail-client = Ηλεκτρονικό ταχυδρομείο - .music = Μουσική - .video = Βίντεο - .photos = Φωτογραφίες - .calendar = Ημερολόγιο - .terminal = Τερματικό - .other-associations = Άλλες συσχετίσεις - .text-editor = Επεξεργασία κειμένου - .not-installed = Δεν έχει εγκατασταθεί -xdg-entry-x11-applications-keywords = Εφαρμογή;Παιχνίδι;Συμβατότητα;COSMIC;X11;Application;Game;Compatibility; -xdg-entry-displays-comment = Διαχείριση ρυθμίσεων διαμόρφωσης οθονών -xdg-entry-touchpad-keywords = Επιφάνεια;Αφή;Χειρονομία;COSMIC;Touchpad;Gesture; -xdg-entry-time-language = Ώρα και γλώσσα -window-management = Διαχείριση παραθύρων -xdg-entry-system-keywords = Σύστημα;Πληροφορίες;Λογαριασμοί;Υλικολογισμικό;COSMIC;System;Info;Accounts;Firmware; -xdg-entry-wireless-keywords = Σύνδεση;Δίκτυο;COSMIC;WiFi;Wi-Fi;Network;Connection; -mouse = Ποντίκι - .speed = Ταχύτητα ποντικιού - .acceleration = Ενεργοποίηση επιτάχυνσης ποντικιού -dock = Μπάρα εφαρμογών -xdg-entry-panel = Γραμμή συστήματος -display = Οθόνες - .arrangement = Διάταξη οθονών - .arrangement-desc = Σύρετε τις οθόνες για να τις αναδιατάξετε - .enable = Ενεργοποίηση οθόνης - .external = Εξωτερική οθόνη { $size } { $output } - .laptop = Οθόνη φορητού υπολογιστή { $size } - .options = Επιλογές οθόνης - .refresh-rate = Ρυθμός ανανέωσης - .resolution = Ανάλυση - .scale = Κλίμακα - .additional-scale-options = Πρόσθετες επιλογές κλίμακας -xdg-entry-wireless-comment = Συνδέσεις Wi-Fi και προφίλ σύνδεσης -xdg-entry-desktop-comment = Ρυθμίσεις ταπετσαρίας, εμφάνισης, γραμμής συστήματος, μπάρας εφαρμογών, διαχείρισης παραθύρων και χώρων εργασίας -xdg-entry-network = Δίκτυα και ασύρματη σύνδεση -xdg-entry-users-comment = Πιστοποίηση και λογαριασμοί χρηστών -startup-apps = Εφαρμογές εκκίνησης - .add = Προσθήκη εφαρμογής - .user = Εφαρμογές που εκκινούνται όταν κάνετε σύνδεση - .none = Δεν έχουν προστεθεί εφαρμογές εκκίνησης - .remove-dialog-title = Αφαίρεση του «{ $name }»; - .remove-dialog-description = Αφαίρεση αυτής της εφαρμογής εκκίνησης; - .add-startup-app = Προσθήκη εφαρμογής εκκίνησης -xdg-entry-input-comment = Ρυθμίσεις πληκτρολογίου και ποντικιού -input-devices = Συσκευές εισόδου -xdg-entry-dock-comment = Μια προαιρετική μπάρα για εφαρμογές και μικροεφαρμογές -xdg-entry-network-keywords = Δίκτυο;Δικτύωση;Ασύρματο;COSMIC;Network;Wireless;WiFi;VPN; -xdg-entry-wallpaper-comment = Εικόνες ταπετσαρίας, χρώματα και επιλογές παρουσίασης διαφανειών -xdg-entry-dock = Μπάρα εφαρμογών -xdg-entry-startup-apps = Εφαρμογές εκκίνησης -xdg-entry-workspaces-keywords = Χώρος;Εργασίας;Προσανατολισμός;Επισκόπηση;Οθόνη;COSMIC;Workspace;Orientation;Overview;Monitor; -xdg-entry-system-comment = Πληροφορίες συστήματος, λογαριασμοί και ενημερώσεις υλικολογισμικού -xdg-entry-x11-applications-comment = Κλιμάκωση εφαρμογών συστήματος παραθύρων X11, κύρια οθόνη και καθολικές συντομεύσεις -xdg-entry-region-language-comment = Μορφοποίηση ημερομηνιών, ώρας και αριθμών με βάση την περιοχή σας -panel = Γραμμή συστήματος -xdg-entry-wallpaper-keywords = Ταπετσαρία;Φόντο;Παρουσίαση;Διαφανειών;COSMIC;Wallpaper;Background;Slideshow; -xdg-entry-users-keywords = Λογαριασμός;Χρήστης;COSMIC;User;Account; -xdg-entry-vpn-keywords = Δίκτυο;Σύνδεση;COSMIC;VPN;Network;Connection;OpenVPN;OpenConnect; -users = Χρήστες - .admin = Διαχειριστής - .standard = Τυπικός - .profile-add = Επιλογή εικόνας προφίλ -xdg-entry-time-language-keywords = Σύστημα;Ώρα;Ημερομηνία;Περιοχή;Γλώσσα;COSMIC;System;Time;Date;Region;Language; -xdg-entry-input-keywords = Εισαγωγή;Είσοδος;Πληκτρολόγιο;Ποντίκι;Ποντίκια;COSMIC;Input;Keyboard;Mouse;Mice; -xdg-entry-notifications-comment = Λειτουργία «Μην ενοχλείτε», ειδοποιήσεις οθόνης κλειδώματος και ρυθμίσεις ανά εφαρμογή -xdg-entry-sound-keywords = Ήχος;Ειδοποίηση;COSMIC;Sound;Audio;Alert;Pipewire; -xdg-entry-power-keywords = Μπαταρία;Ισχύς;Ενέργεια;COSMIC;Power;Battery -legacy-applications = Συμβατότητα εφαρμογών X11 -xdg-entry-region-language-keywords = Περιοχή;Γλώσσα;Ημερομηνία;Μορφή;Ώρα;Τοπικές;Τοπικοποίηση;COSMIC;Region;Language;Date;Format;Time;Locale;Localization; -xdg-entry-applications-keywords = Προεπιλογή;Προεπιλεγμένες;Εφαρμογές;Εφαρμογή;Εκκίνηση;Συμβατότητα;COSMIC;Default;Application;Startup;X11;Compatibility -xdg-entry-sound-comment = Ρυθμίσεις ήχου για συσκευές, ειδοποιήσεις και εφαρμογές -wallpaper = Ταπετσαρία - .change = Αλλαγή εικόνας κάθε - .fit = Προσαρμογή ταπετσαρίας - .folder-dialog = Επιλογή φακέλου ταπετσαριών - .image-dialog = Επιλογή εικόνας ταπετσαρίας - .plural = Ταπετσαρίες - .same = Κοινή ταπετσαρία για όλες τις οθόνες - .slide = Παρουσίαση διαφανειών -xdg-entry-touchpad-comment = Ταχύτητα επιφάνειας αφής, επιλογές κλικ και χειρονομίες -xdg-entry-keyboard-keywords = Πληκτρολόγιο;Είσοδος;Πηγή;Συντομεύσεις;COSMIC;Keyboard;Input;Source;Shortcuts; -xdg-entry-vpn-comment = Συνδέσεις VPN και προφίλ σύνδεσης -xdg-entry-window-management-keywords = Παράθυρο;Διαχείριση;Παράθεση;Πλήκτρο;COSMIC;Window;Management;Tiling;Super;Key; -xdg-entry-workspaces-comment = Προσανατολισμός χώρων εργασίας, επισκόπηση και συμπεριφορά πολλαπλών οθονών -xdg-entry-network-comment = Διαχείριση συνδέσεων δικτύου -xdg-entry-panel-comment = Η κύρια γραμμή του συστήματος για μενού και μικροεφαρμογές -touchpad = Επιφάνεια αφής - .acceleration = Ενεργοποίηση επιτάχυνσης επιφάνειας αφής - .speed = Ταχύτητα επιφάνειας αφής -xdg-entry-power-comment = Λειτουργίες ενέργειας και επιλογές εξοικονόμησης ενέργειας -time = Ώρα και γλώσσα -xdg-entry-x11-applications = Συμβατότητα εφαρμογών X11 -xdg-entry-window-management-comment = Ενέργεια πλήκτρου Super, επιλογές ελέγχου παραθύρων και πρόσθετες επιλογές παράθεσης παραθύρων -xdg-entry-wired-comment = Ενσύρματες συνδέσεις και προφίλ σύνδεσης -known-networks = Γνωστά δίκτυα -network-and-wireless = Δίκτυα και ασύρματη δικτύωση -keyboard-special-char = Εισαγωγή ειδικών χαρακτήρων - .alternate = Πλήκτρο εναλλακτικών χαρακτήρων - .compose = Πλήκτρο σύνθεσης - .compose-desc = Το πλήκτρο σύνθεσης επιτρέπει την εισαγωγή μιας ευρείας ποικιλίας χαρακτήρων. Για να το χρησιμοποιήσετε, πατήστε το πλήκτρο σύνθεσης και έπειτα, μια ακολουθία χαρακτήρων. Για παράδειγμα, μπορείτε να εισαγάγετε τον χαρακτήρα «©» πατώντας το πλήκτρο σύνθεσης, ακολουθούμενο από τα «C» και «o», ή τον χαρακτήρα «á» πατώντας το πλήκτρο σύνθεσης, ακολουθούμενο από τα «a» και «‘» . - .caps = Πλήκτρο Caps Lock - .ctrl = Control - .ctrl-right = Δεξί Ctrl - .swap-with-ctrl = Εναλλαγή με Control - .alt = Alt - .alt-left = Αριστερό Alt - .alt-right = Δεξί Alt - .super = Super - .super-left = Αριστερό Super - .super-right = Δεξί Super - .menu = Πλήκτρο μενού - .backspace = Backspace - .escape = Escape - .swap-with-escape = Εναλλαγή με Escape - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = Κανένα -no-search-results = Δεν αντιστοιχεί κανένα δίκτυο στην αναζήτησή σας. -workspaces-navigation = Πλοήγηση - .wraparound = Μετακίνηση μεταξύ του πρώτου και του τελευταίου χώρου εργασίας με συντομεύσεις πληκτρολογίου και χειρονομίες -bluetooth-display-passkey = Σύζευξη Bluetooth - .description = Πληκτρολογήστε το ακόλουθο κλειδί πρόσβασης στο { $device } και πατήστε Enter -bluetooth-display-pin = Σύζευξη Bluetooth - .description = Πληκτρολογήστε το ακόλουθο PIN στο { $device } και πατήστε Enter diff --git a/i18n/en-GB/cosmic_settings.ftl b/i18n/en-GB/cosmic_settings.ftl index 6f51f33..e69de29 100644 --- a/i18n/en-GB/cosmic_settings.ftl +++ b/i18n/en-GB/cosmic_settings.ftl @@ -1,9 +0,0 @@ -save = Save -cancel = Cancel -connected = Connected -confirm = Confirm -replace = Replace -settings = Settings -appearance = Appearance -dark = Dark -light = Light diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index d41f0a0..f5a614e 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -198,8 +198,6 @@ vpn-error = VPN Error .connect = Failed to connect to VPN .connection-editor = Connection editor failed .connection-settings = Failed to get settings for active connections - .openvpn-config-path = Invalid file path for OpenVPN config - .openvpn-config-path-desc = Chosen file must be on a local file system. .updating-state = Failed to update network manager state .wireguard-config-path = Invalid file path for WireGuard config .wireguard-config-path-desc = Chosen file must be on a local file system. @@ -254,12 +252,6 @@ bluetooth-paired = Previously connected devices bluetooth-confirm-pin = Confirm Bluetooth PIN .description = Please confirm that the following PIN matches the one displayed on { $device } -bluetooth-display-passkey = Bluetooth Pairing - .description = Please type the following passkey on { $device }, then press Enter - -bluetooth-display-pin = Bluetooth Pairing - .description = Please type the following PIN on { $device }, then press Enter - bluetooth-available = Nearby devices bluetooth-adapters = Bluetooth adapters @@ -401,20 +393,7 @@ style = Style .round = Round .slightly-round = Slightly round .square = Square - .frosted-glass = Frosted glass - .frosted-system-interface = System interface - .frosted-system-interface-desc = Applies frosted glass to Launcher, application library, workspace overview, on-screen controls - .frosted-windows = Windows - .frosted-windows-desc = Applies frosted glass to windows and dialogs - .frosted-panels = Panels - .frosted-panels-desc = Applies frosted glass to panel and dock - .frosted-applets = Applets - .frosted-applets-desc = Applies frosted glass to applet menus on panel and dock - .frosted-thickness = Frost thickness - .less = less - .more = more - .glass-opacity = Glass opacity - + interface-density = Interface density .comfortable = Comfortable .compact = Compact @@ -497,7 +476,7 @@ super-key = Super key action .launcher = Open Launcher .workspaces = Open Workspaces .applications = Open Applications - .none = None + .disable = Disable edge-gravity = Floating windows gravitate to nearby edges @@ -633,7 +612,6 @@ sound-alerts = Alerts sound-applications = Applications .desc = Application volumes and settings - .none = No applications are using sound # No speaker, headphones, or microphone plugged into sound card port sound-device-port-unplugged = Unplugged @@ -643,92 +621,6 @@ sound-usb-audio = USB Audio # Profiles for sound card devices sound-device-profiles = Device profiles -# Printers settings page -printers = Printers -xdg-entry-printers-comment = Manage printers and print jobs -printers-add = Add printer -printers-add-in-progress = Adding printer… -printers-added = Printer “{ $name }” added -printers-cancel-job = Cancel job -printers-color-black = Black -printers-color-cmy = CMY -printers-color-cmyk = CMYK -printers-color-gray = Grayscale -printers-color-rgb = Color -printers-color-rgb-16 = Color (16-bit) -printers-color-rgb-24 = Color (24-bit) -printers-color-rgb-48 = Color (48-bit) -printers-default = Default -printers-details = Printer details -printers-device = Device -printers-device-uri = Device URI -printers-driver = Driver -printers-error = Operation failed: { $error } -printers-ink-black = Black -printers-ink-cyan = Cyan -printers-ink-levels = Ink levels -printers-ink-magenta = Magenta -printers-ink-yellow = Yellow -printers-job-aborted = Aborted -printers-job-canceled = Canceled -printers-job-completed = Completed -printers-job-held = Held -printers-job-pending = Pending -printers-job-processing = Printing -printers-job-stopped = Stopped -printers-job-unknown = Unknown -printers-jobs = Print jobs -printers-loading = Searching for devices… -printers-location = Location -printers-make-default = Set as default -printers-media-type-cardstock = Cardstock -printers-media-type-envelope = Envelope -printers-media-type-labels = Labels -printers-media-type-photographic = Photo paper -printers-media-type-photographic-glossy = Glossy photo paper -printers-media-type-photographic-matte = Matte photo paper -printers-media-type-photographic-satin = Satin photo paper -printers-media-type-stationery = Plain paper -printers-media-type-stationery-coated = Coated paper -printers-media-type-stationery-fine = Fine paper -printers-media-type-stationery-inkjet = Inkjet paper -printers-media-type-stationery-letterhead = Letterhead paper -printers-media-type-stationery-preprint = Preprinted paper -printers-media-type-stationery-recycled = Recycled paper -printers-media-type-transparency = Transparency -printers-name = Name -printers-no-devices = No devices found -printers-no-matching-drivers = No matching drivers -printers-no-printers = No printers configured -printers-no-printers-desc = Printers connected to this computer or discovered on the network will appear here. -printers-not-accepting = Not accepting jobs -printers-option-color = Color mode -printers-option-media = Paper format -printers-option-media-type = Paper type -printers-option-quality = Print quality -printers-option-sides = Two-sided printing -printers-options = Print options -printers-pause = Pause -printers-quality-draft = Draft -printers-quality-high = High -printers-quality-normal = Normal -printers-remove = Remove printer -printers-remove-confirm = Remove this printer? -printers-remove-confirm-button = Remove -printers-remove-confirm-description = “{ $name }” will be removed from this system. Print jobs queued on it will be discarded. -printers-resume = Resume -printers-sides-long-edge = Long edge -printers-sides-one-sided = One-sided -printers-sides-short-edge = Short edge -printers-state = State -printers-state-idle = Idle -printers-state-processing = Printing -printers-state-reasons = State reasons -printers-state-stopped = Paused -printers-state-unknown = Unknown -printers-submit = Add -printers-test-page = Print test page - # Power & Battery settings page power = Power & battery @@ -813,22 +705,6 @@ keyboard-special-char = Special Character Entry .compose = Compose key .compose-desc = The compose key allows a wide variety of characters to be entered. To use it, press compose and then a sequence of characters. For example, compose key followed by C and o will enter ©, while compose key followed by a and ‘ will enter á. .caps = Caps Lock key - .ctrl = Control - .ctrl-right = Right Ctrl - .swap-with-ctrl = Swap with Control - .alt = Alt - .alt-left = Left Alt - .alt-right = Right Alt - .super = Super - .super-left = Left Super - .super-right = Right Super - .menu = Menu key - .backspace = Backspace - .escape = Escape - .swap-with-escape = Swap with Escape - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = None keyboard-typing-assist = Typing .repeat-rate = Repeat rate diff --git a/i18n/fa/cosmic_settings.ftl b/i18n/fa/cosmic_settings.ftl index 16bbbae..39caaa0 100644 --- a/i18n/fa/cosmic_settings.ftl +++ b/i18n/fa/cosmic_settings.ftl @@ -167,5 +167,3 @@ firmware = فریمور users = کاربران .desc = احراز هویت و ورود، قفل صفحه. -save = ذخیره -cancel = لغو diff --git a/i18n/fi/cosmic_settings.ftl b/i18n/fi/cosmic_settings.ftl index 1ea3cdd..58b2efb 100644 --- a/i18n/fi/cosmic_settings.ftl +++ b/i18n/fi/cosmic_settings.ftl @@ -516,19 +516,6 @@ style = Tyyli .round = Pyöristetty .slightly-round = Hieman pyöristetty .square = Nelikulmainen - .frosted-glass = Huurteinen lasi - .frosted-system-interface = Järjestelmän käyttöliittymä - .frosted-system-interface-desc = Toteuttaa huurteisen lasin käynnistimeen, sovelluskirjastoon, työtilan yleiskuvaan ja näytöllä näkyviin säätimiin - .frosted-windows = Ikkunat - .frosted-windows-desc = Toteuttaa huurteisen lasin ikkunoihin ja vahvistusikkunoihin - .frosted-panels = Paneelit - .frosted-panels-desc = Toteuttaa huurteisen lasin paneeliin ja telakkaan - .frosted-applets = Sovelmat - .frosted-applets-desc = Toteuttaa huurteisen lasin sovelmavalikkoihin paneelissa ja telakassa - .frosted-thickness = Huurteen tiheys - .less = vähemmän - .more = enemmän - .glass-opacity = Lasin peittävyys panel-applets = Asetukset .dock-desc = Telakkasovelmien asetukset .desc = Paneelisovelmien asetukset @@ -831,9 +818,3 @@ shadows-tiling = Asetellut ikkunat .clip = Sovita järjestelmän kulmiin .shadow = Käytä varjoja no-search-results = Hakuasi vastaavia verkkoja ei löytynyt. -workspaces-navigation = Liikkuminen - .wraparound = Siirry ensimmäisen ja viimeisen työtilan välillä käyttäen pikanäppäimiä ja eleitä -bluetooth-display-passkey = Bluetooth-parinmuodostus - .description = Syötä seuraava turva-avain laitteelle { $device }, ja paina sitten Enter -bluetooth-display-pin = Bluetooth-parinmuodostus - .description = Syötä seuraava PIN-koodi laitteelle { $device }, ja paina sitten Enter diff --git a/i18n/fr/cosmic_settings.ftl b/i18n/fr/cosmic_settings.ftl index 20c14c8..098a741 100644 --- a/i18n/fr/cosmic_settings.ftl +++ b/i18n/fr/cosmic_settings.ftl @@ -70,7 +70,7 @@ add-network = Ajouter un réseau add-vpn = Ajouter un VPN airplane-on = Mode avion activé. cable-unplugged = Câble débranché -connect = Se connecter +connect = Connecter connected = Connecté connecting = Connexion… disconnect = Se déconnecter @@ -117,8 +117,6 @@ vpn-error = Erreur VPN .connect = Échec de la connexion au VPN .connection-editor = Échec de l'éditeur de connexion .connection-settings = Échec de l'obtention des paramètres des connexions actives - .openvpn-config-path = Chemin du fichier de configuration OpenVPN invalide - .openvpn-config-path-desc = Le fichier sélectionné doit se trouver sur un système de fichiers local. .updating-state = Échec de la mise à jour de l'état du gestionnaire de réseau .wireguard-config-path = Chemin de fichier invalide pour la configuration WireGuard .wireguard-config-path-desc = Le fichier choisi doit se trouver sur un système de fichiers local. @@ -235,7 +233,7 @@ container-background = Arrière-plan .desc = La couleur principale de l'arrière-plan est utilisée pour la barre latérale de navigation, le panneau latéral, les boîtes de dialogue et les widgets similaires control-tint = Teinte des composants de contrôle .desc = Utilisé pour les arrière-plans des boutons standards, les entrées de recherche, les entrées de texte et les composants similaires -frosted = Effet de verre dépoli dans l'interface système +frosted = Effet de verre sur l'interface système .desc = Applique un effet de flou d'arrière-plan au panneau, au dock, aux applets, au lanceur et à la bibliothèque d'applications enable-export = Appliquer ce thème aux applications GNOME .desc = Certaines boîtes à outils ne supportent pas le changement automatique de thème. Les applications non-COSMIC peuvent nécessiter un redémarrage après un changement de thème. @@ -244,22 +242,9 @@ icon-theme = Thème d'icônes text-tint = Teinte du texte de l'interface .desc = Utilisée pour obtenir des couleurs de texte d'interface offrant un contraste suffisant sur différentes surfaces style = Style - .round = Arrondi - .slightly-round = Légèrement arrondi + .round = Rond + .slightly-round = Légèrement rond .square = Carré - .frosted-glass = Verre dépoli - .frosted-system-interface = Interface système - .frosted-system-interface-desc = Applique un effet de verre dépoli au lanceur, à la bibliothèque d’applications, à la vue d’ensemble de l’espace de travail et aux contrôles à l’écran - .frosted-windows = Fenêtres - .frosted-windows-desc = Applique un effet de verre dépoli aux fenêtres et aux boîtes de dialogue - .frosted-panels = Panneaux - .frosted-panels-desc = Applique un effet de verre dépoli au panneau et au dock - .frosted-applets = Applets - .frosted-applets-desc = Applique un effet de verre dépoli aux menus des applets du panneau et du dock - .frosted-thickness = Épaisseur du verre dépoli - .less = moins - .more = plus - .glass-opacity = Opacité du verre interface-density = Densité de l'interface .comfortable = Confortable .compact = Compact @@ -332,7 +317,7 @@ super-key = Action de la touche Super .launcher = Ouvrir le Lanceur .workspaces = Ouvrir les Espaces de travail .applications = Ouvrir les Applications - .none = Aucun + .disable = Désactiver window-controls = Contrôles des fenêtres .maximize = Afficher le bouton maximiser .minimize = Afficher le bouton minimiser @@ -442,93 +427,6 @@ sound-alerts = Alertes sound-applications = Applications .desc = Volumes et paramètres d'application -## Printers - -printers = Imprimantes -xdg-entry-printers-comment = Gérer les imprimantes et les travaux d'impression -printers-add = Ajouter une imprimante -printers-add-in-progress = Ajout de l'imprimante… -printers-added = Imprimante « { $name } » ajoutée -printers-cancel-job = Annuler le travail -printers-color-black = Noir -printers-color-cmy = CMJ -printers-color-cmyk = CMJN -printers-color-gray = Niveaux de gris -printers-color-rgb = Couleur -printers-color-rgb-16 = Couleur (16 bits) -printers-color-rgb-24 = Couleur (24 bits) -printers-color-rgb-48 = Couleur (48 bits) -printers-default = Par défaut -printers-details = Détails de l'imprimante -printers-device = Périphérique -printers-device-uri = URI du périphérique -printers-driver = Pilote -printers-error = Échec de l'opération : { $error } -printers-ink-black = Noir -printers-ink-cyan = Cyan -printers-ink-levels = Niveaux d'encre -printers-ink-magenta = Magenta -printers-ink-yellow = Jaune -printers-job-aborted = Interrompu -printers-job-canceled = Annulé -printers-job-completed = Terminé -printers-job-held = Retenu -printers-job-pending = En attente -printers-job-processing = Impression en cours -printers-job-stopped = Arrêté -printers-job-unknown = Inconnu -printers-jobs = Travaux d'impression -printers-loading = Recherche des périphériques… -printers-location = Emplacement -printers-make-default = Définir par défaut -printers-media-type-cardstock = Papier cartonné -printers-media-type-envelope = Enveloppe -printers-media-type-labels = Étiquettes -printers-media-type-photographic = Papier photo -printers-media-type-photographic-glossy = Papier photo brillant -printers-media-type-photographic-matte = Papier photo mat -printers-media-type-photographic-satin = Papier photo satiné -printers-media-type-stationery = Papier ordinaire -printers-media-type-stationery-coated = Papier couché -printers-media-type-stationery-fine = Papier fin -printers-media-type-stationery-inkjet = Papier jet d'encre -printers-media-type-stationery-letterhead = Papier à en-tête -printers-media-type-stationery-preprint = Papier pré-imprimé -printers-media-type-stationery-recycled = Papier recyclé -printers-media-type-transparency = Transparent -printers-name = Nom -printers-no-devices = Aucun périphérique trouvé -printers-no-matching-drivers = Aucun pilote ne correspond -printers-no-printers = Aucune imprimante configurée -printers-no-printers-desc = Les imprimantes connectées à cet ordinateur ou découvertes sur le réseau apparaîtront ici. -printers-not-accepting = N'accepte pas les travaux -printers-option-color = Mode de couleur -printers-option-media = Format du papier -printers-option-media-type = Type de papier -printers-option-quality = Qualité d'impression -printers-option-sides = Impression recto-verso -printers-options = Options d'impression -printers-pause = Suspendre -printers-quality-draft = Brouillon -printers-quality-high = Haute -printers-quality-normal = Normale -printers-remove = Supprimer l'imprimante -printers-remove-confirm = Supprimer cette imprimante ? -printers-remove-confirm-button = Supprimer -printers-remove-confirm-description = « { $name } » sera supprimée du système. Les travaux en attente sur cette imprimante seront abandonnés. -printers-resume = Reprendre -printers-sides-long-edge = Bords longs -printers-sides-one-sided = Recto seul -printers-sides-short-edge = Bords courts -printers-state = État -printers-state-idle = Disponible -printers-state-processing = Impression en cours -printers-state-reasons = Causes de l'état -printers-state-stopped = En pause -printers-state-unknown = Inconnu -printers-submit = Ajouter -printers-test-page = Imprimer une page de test - ## Power power = Alimentation @@ -606,23 +504,7 @@ keyboard-special-char = Saisie de caractères spéciaux .alternate = Touche de caractères alternatifs .compose = Touche de composition .compose-desc = La touche de composition permet d'entrer une grande variété de caractères. Pour l'utiliser, appuyez sur composition puis une séquence de caractères. Par exemple, la touche composition suivie de C et o entrera ©, tandis que la touche composition suivie de a et ‘ entrera á. - .caps = Touche de verrouillage des majuscules - .ctrl = Ctrl - .ctrl-right = Ctrl Droite - .swap-with-ctrl = Echanger avec Ctrl - .alt = Alt - .alt-left = Alt Gauche - .alt-right = Alt Droite - .super = Super - .super-left = Super Gauche - .super-right = Super Droite - .menu = Touche de menu - .backspace = Retour arrière - .escape = Echap - .swap-with-escape = Echanger avec Echap - .print-screen = Impression Ecran - .scroll-lock = Arrêt Défilement - .none = Aucune + .caps = Touche Verr Màj keyboard-typing-assist = Saisie .repeat-rate = Taux de répétition .repeat-delay = Délai de répétition @@ -1021,9 +903,3 @@ xdg-entry-keyboard-keywords = COSMIC;Clavier;Saisie;Source;Raccourcis; xdg-entry-window-management-keywords = COSMIC;Fenêtre;Gestion;Agencement;Super;Touche; xdg-entry-displays-keywords = COSMIC;Écran; no-search-results = Aucun réseau ne correspond à votre recherche. -workspaces-navigation = Navigation - .wraparound = Passez du premier au dernier espace de travail à l'aide des raccourcis clavier et des gestes -bluetooth-display-passkey = Appairage Bluetooth - .description = Veuillez saisir le code d’association sur { $device }, puis appuyer sur Entrée -bluetooth-display-pin = Appairage Bluetooth - .description = Veuillez saisir le code PIN suivant sur { $device }, puis appuyer sur Entrée diff --git a/i18n/ga/cosmic_settings.ftl b/i18n/ga/cosmic_settings.ftl index 3eb16fb..ace1bf1 100644 --- a/i18n/ga/cosmic_settings.ftl +++ b/i18n/ga/cosmic_settings.ftl @@ -60,11 +60,9 @@ vpn-error = Earráid VPN .connect = Theip ar nascadh le VPN .connection-editor = Theip ar an eagarthóir ceangail .connection-settings = Theip ar na socruithe a fháil le haghaidh naisc ghníomhacha - .openvpn-config-path = Cosán comhaid neamhbhailí do chumraíocht OpenVPN - .openvpn-config-path-desc = Ní mór an comhad roghnaithe a bheith ar chóras comhad áitiúil. .updating-state = Theip ar staid an bhainisteora líonra a nuashonrú .wireguard-config-path = Cosán comhaid neamhbhailí le haghaidh cumraíochta WireGuard - .wireguard-config-path-desc = Ní mór an comhad roghnaithe a bheith ar chóras comhad áitiúil. + .wireguard-config-path-desc = Caithfidh an comhad roghnaithe a bheith ar chóras comhad áitiúil. .wireguard-device = Theip ar chruthú gléas WireGuard .with-password = Theip ar VPN a shocrú { $field -> @@ -236,19 +234,6 @@ style = Stíl .round = Ciorclach .slightly-round = Ciorclach beagán .square = Cearnógach - .frosted-glass = Gloine sioctha - .frosted-system-interface = Comhéadan córais - .frosted-system-interface-desc = Cuireann sé gloine sioctha i bhfeidhm ar an Tosaitheoir, leabharlann feidhmchlár, forbhreathnú ar an spás oibre, rialuithe ar an scáileán - .frosted-windows = Fuinneoga - .frosted-windows-desc = Cuireann sé gloine sioctha i bhfeidhm ar fhuinneoga agus ar dhialóga - .frosted-panels = Painéil - .frosted-panels-desc = Cuireann sé gloine sioctha i bhfeidhm ar an bpainéal agus ar an duga - .frosted-applets = Feidhmchláiríní - .frosted-applets-desc = Cuireann sé gloine sioctha i bhfeidhm ar bhiachláir feidhmchláiríní ar an bpainéal agus ar an duga - .frosted-thickness = Tiús sioctha - .less = níos lú - .more = níos mó - .glass-opacity = Teimhneacht gloine interface-density = Dlús comhéadan .comfortable = Compordach .compact = Dlúth @@ -321,7 +306,7 @@ super-key = Gníomh na heochrach Super .launcher = Oscail lainseálaí .workspaces = Oscail spásanna oibre .applications = Oscail feidhmchláir - .none = Dada + .disable = Díchumasaigh edge-gravity = Imtharraingítear fuinneoga snámhacha chuig imill in aice láimhe window-controls = Rialuithe fuinneoige .maximize = Taispeáin an cnaipe uasmhéadaithe @@ -505,22 +490,6 @@ keyboard-special-char = Iontráil Carachtar Speisialta .compose = Eochair chumadóireachta .compose-desc = Ligeann an eochair chumadóireachta raon leathan carachtar a iontráil. Chun í a úsáid, brúigh an eochair chumadóireachta agus ansin sraith carachtar. Mar shampla, má bhrúnn tú an eochair chumadóireachta agus C agus o ina dhiaidh sin, cuirfear © isteach; agus má bhrúnn tú an eochair chumadóireachta agus a agus ‘ ina dhiaidh sin, cuirfear á isteach. .caps = Eochair Caps Lock - .ctrl = Ctrl - .ctrl-right = Ctrl ar Dheas - .swap-with-ctrl = Malartú le Ctrl - .alt = Alt - .alt-left = Alt ar Chlé - .alt-right = Alt ar Dheas - .super = Super - .super-left = Super ar Chlé - .super-right = Super ar Dheas - .menu = Eochair Roghchláir - .backspace = Spás Cúil - .escape = Éalú - .swap-with-escape = Malartú le hÉalú - .print-screen = Priontáil Scáileáin - .scroll-lock = Glas Scrollaithe - .none = Dada keyboard-typing-assist = Ag clóscríobh .repeat-rate = Ráta athuair .repeat-delay = Moill athrá @@ -942,9 +911,3 @@ xdg-entry-x11-applications = Comhoiriúnacht Feidhmchláir X11 xdg-entry-window-management-comment = Gníomh na sár-eochrach, roghanna rialaithe fuinneoige, agus roghanna breise tíleála fuinneoige xdg-entry-wired-comment = Naisc sreangaithe agus próifílí nasc no-search-results = Níl aon líonra ag teacht leis an gcuardach seo. -workspaces-navigation = Nascleanúint - .wraparound = Bog idir an chéad spás oibre agus an spás oibre deireanach ag baint úsáide as aicearraí méarchláir agus gothaí -bluetooth-display-passkey = Péireáil Bluetooth - .description = Clóscríobh an eochair phas seo a leanas ar { $device }, ansin brúigh Iontráil -bluetooth-display-pin = Péireáil Bluetooth - .description = Clóscríobh an PIN seo a leanas ar { $device }, ansin brúigh Iontráil diff --git a/i18n/gl/cosmic_settings.ftl b/i18n/gl/cosmic_settings.ftl deleted file mode 100644 index 3b1a851..0000000 --- a/i18n/gl/cosmic_settings.ftl +++ /dev/null @@ -1,857 +0,0 @@ -save = Gardar -cancel = Cancelar -connected = Conectado -confirm = Confirmar -settings = Axustes -appearance = Apariencia -dark = Escuro -light = Claro -replace = Remplazar -remove = Eliminar -connect = Conectar -password = Contrasinal -username = Nome de usuario -identity = Identidade -password-confirm = Confirmar o contrasinal -forget-dialog = Esquecer esta rede Wi-Fi? - .description = Terás que introducir o contrasinal de novo para usar esta rede Wi-Fi no futuro. -applications = Aplicacións -dbus-connection-error = Non foi posible conectarse a DBus -ok = Aceptar -unknown = Descoñecido -number = { $number } -app = Configuración COSMIC -xdg-entry-comment = Aplicación de configuracións para o escritorio COSMIC -xdg-entry-keywords = COSMIC;Configuracións; -xdg-entry-about = Sobre -xdg-entry-about-comment = Nome do dispositivo, información do hardware, valores predeterminados do sistema operativo -xdg-entry-about-keywords = COSMIC;Sobre -xdg-entry-a11y = Accesibilidade -xdg-entry-a11y-comment = Lector de pantalla, ampliador, alto contraste e filtros de cor -xdg-entry-a11y-keywords = COSMIC;Accesibilidade;A11y;Pantalla;Lector;Ampliador;Contraste;Cor; -xdg-entry-appearance = Apariencia -xdg-entry-appearance-comment = Cores de acento e temas -xdg-entry-appearance-keywords = COSMIC;Acento;Cor;Icona;Tipo de letra;Tema -xdg-entry-applications = Aplicacións -xdg-entry-applications-comment = Aplicacións predeterminadas, aplicacións de inicio e configuracións de compatibilidade con aplicacións X11 -xdg-entry-applications-keywords = COSMIC;Predeterminada;Aplicación;Inicio;X11;Compatibilidade -xdg-entry-bluetooth-comment = Xestionar dispositivos Bluetooth -xdg-entry-bluetooth-keywords = COSMIC;Bluetooth; -xdg-entry-date-time = Data e hora -xdg-entry-date-time-comment = Fuso horario, axustes automáticos do reloxo e formato da hora -xdg-entry-date-time-keywords = COSMIC;Fuso;Horario; -xdg-entry-default-apps = Aplicacións por defecto -xdg-entry-default-apps-comment = Navegador web predeterminado, cliente de correo, xestor de ficheiros e outras aplicacións -xdg-entry-default-apps-keywords = COSMIC;Aplicación;Predeterminada -xdg-entry-desktop = Escritorio -xdg-entry-desktop-comment = Fondo de pantalla, aparencia, panel, dock, xestión de xanelas e configuración dos espazos de traballo -xdg-entry-desktop-keywords = COSMIC;Escritorio; -xdg-entry-displays = Pantallas -xdg-entry-displays-comment = Xestionar a configuración da pantalla -xdg-entry-displays-keywords = COSMIC;Monitor; -xdg-entry-dock = Dock -xdg-entry-dock-comment = Unha barra opcional para aplicacións e miniaplicacións -xdg-entry-dock-keywords = COSMIC;Dock;Panel;Miniaplicativo -xdg-entry-input = Dispositivos de Entrada -xdg-entry-input-comment = Axustes de teclado e rato -xdg-entry-input-keywords = COSMIC;Entrada;Teclado;Rato;Ratos; -xdg-entry-keyboard = Teclado -xdg-entry-keyboard-comment = Fontes de entrada, cambio, introdución de caracteres especiais e atallos de teclado -xdg-entry-keyboard-keywords = COSMIC;Teclado;Entrada;Fonte;Atallos; -xdg-entry-mouse = Rato -xdg-entry-mouse-comment = Velocidade do rato, aceleración e desprazamento natural -xdg-entry-mouse-keywords = COSMIC;Rato;Aceleración;Desprazamento;Natural; -xdg-entry-network = Rede e conexións sen fíos -xdg-entry-network-comment = Xestionar as conexións de rede -xdg-entry-network-keywords = COSMIC;Rede;SenFíos;WiFi;VPN; -xdg-entry-notifications = Notificacións -xdg-entry-notifications-comment = Non molestar, notificacións da pantalla de bloqueo e configuración por aplicación -xdg-entry-notifications-keywords = COSMIC;Notificación;Bloqueo; -xdg-entry-panel = Panel -xdg-entry-panel-comment = Barra principal do sistema para menús e miniaplicativos -xdg-entry-panel-keywords = COSMIC;Panel;Miniaplicativo -xdg-entry-power = Enerxía e batería -xdg-entry-power-comment = Modos de enerxía e opcións de aforro de enerxía -xdg-entry-power-keywords = COSMIC;Enerxía;Batería -xdg-entry-region-language = Rexión e Linguaxe -xdg-entry-region-language-comment = Formatar datas, horas e números segundo a túa rexión -xdg-entry-region-language-keywords = COSMIC;Rexión;Lingua;Data;Formato;Hora;Configuración rexional;Localización; -xdg-entry-sound = Son -xdg-entry-sound-comment = Configuración de son para dispositivos, alertas e aplicacións -xdg-entry-sound-keywords = COSMIC;Son;Audio;Alerta;PipeWire; -xdg-entry-startup-apps = Aplicacións de Inicio -xdg-entry-startup-apps-comment = Configurar as aplicacións que se executan ao iniciar sesión -xdg-entry-startup-apps-keywords = COSMIC;Inicio;Aplicación; -xdg-entry-system = Sistema e contas -xdg-entry-system-comment = Información do sistema, contas e actualizacións de firmware -xdg-entry-system-keywords = COSMIC;Sistema;Información;Contas;Firmware; -xdg-entry-time-language = Hora e lingua -xdg-entry-time-language-comment = Xestionar a data, a hora, a rexión e a lingua do sistema -xdg-entry-time-language-keywords = COSMIC;Sistema;Hora;Data;Rexión;Lingua; -xdg-entry-touchpad = Panel táctil -xdg-entry-touchpad-comment = Velocidade do panel táctil, opcións de clic e xestos -xdg-entry-touchpad-keywords = COSMIC;PanelTáctil;Xesto; -xdg-entry-users = Usuarios -xdg-entry-users-comment = Autenticación e contas de usuario -xdg-entry-users-keywords = COSMIC;Usuario;Conta; -xdg-entry-vpn-comment = Conexións VPN e perfís de conexión -xdg-entry-vpn-keywords = COSMIC;VPN;Rede;Conexión;OpenVPN;OpenConnect; -xdg-entry-wallpaper = Fondo de pantalla -xdg-entry-wallpaper-comment = Imaxes de fondo de pantalla, cores e opcións da presentación de diapositivas -xdg-entry-wallpaper-keywords = COSMIC;FondoDePantalla;Fondo;PresentaciónDeDiapositivas; -xdg-entry-window-management = Xestión de xanelas -xdg-entry-window-management-comment = Acción da tecla Super, opcións de control das xanelas e opcións adicionais de mosaico de xanelas -xdg-entry-window-management-keywords = COSMIC;Xanela;Xestión;Mosaico;Super;Tecla; -xdg-entry-wired = Cableado -xdg-entry-wired-comment = Conexións con fíos e perfís de conexión -xdg-entry-wired-keywords = COSMIC;Con Fíos;LAN;Rede;Conexión; -xdg-entry-wireless = WiFi -xdg-entry-wireless-comment = Conexións Wi-Fi e perfís de conexión -xdg-entry-wireless-keywords = COSMIC;WiFi;Wi-Fi;Rede;Conexión; -xdg-entry-workspaces = Espazos de traballo -xdg-entry-workspaces-comment = Orientación dos espazos de traballo, vista xeral e comportamento con varias pantallas -xdg-entry-workspaces-keywords = COSMIC;EspazoDeTraballo;Orientación;VistaXeral;Monitor; -xdg-entry-x11-applications = Compatibilidade de aplicacións X11 -xdg-entry-x11-applications-comment = Escala das aplicacións do sistema de xanelas X11, pantalla principal e atallos globais -xdg-entry-x11-applications-keywords = COSMIC;X11;Aplicación;Xogo;Compatibilidade; -add-network = Engadir rede - .profile = Engadir perfil -add-vpn = Engadir VPN -airplane-on = O modo avión está activado. -cable-unplugged = Cable desconectado -connecting = Conectando… -disconnect = Desconectar -forget = Olvidar -known-networks = Redes coñecidas -network-and-wireless = Rede e conexións sen fíos -network-name = Nome da rede -no-networks = Non se atoparon redes. -no-vpn = Non hay conexións VPN dispoñibles. -qr-code-unavailable = O codigo QR non está dispoñible -scan-to-connect-description = Escanea o código QR para conectarte a esta rede. -share = Compartir rede -visible-networks = Redes visibles -auth-dialog = Autenticación necesaria - .vpn-description = Introduce o nome de usuario e o contrasinal requiridos polo servizo VPN. - .wifi-description = Introduce o contrasinal ou a chave de cifrado. Tamén podes conectarte premendo o botón «WPS» do router. -network-device-state = - .activated = Conectado - .config = Conectando - .deactivating = Desconectando - .disconnected = Desconectado - .failed = Fallou a conexión - .ip-check = Comprobando conexión - .ip-config = Solicitando IP e información de enrutamento - .need-auth = Precisa autenticación - .prepare = Preparando a conexión - .secondaries = Agardando pola conexión secundaria - .unavailable = Non dispoñible - .unknown = Estado descoñecido - .unmanaged = Non xestionado - .unplugged = Cable desconectado -remove-connection-dialog = Eliminar o perfil de conexión? - .vpn-description = Terás que introducir o contrasinal de novo para usar esta rede no futuro. - .wired-description = Terás que crear de novo este perfil para usalo no futuro. -vpn = VPN - .connections = Conexións VPN - .error = Fallou ao engadir a configuración VPN - .remove = Eliminar perfil de conexión - .select-file = Seleccionar un ficheiro de configuración VPN -vpn-error = Erro VPN - .config = Fallou ao engadir a configuración VPN - .connect = Fallou ao conectar coa VPN - .connection-editor = Fallou o editor de conexións - .connection-settings = Fallou ao obter a configuración das conexións activas - .openvpn-config-path = Ruta de ficheiro de configuración OpenVPN non válida - .openvpn-config-path-desc = O ficheiro seleccionado debe estar nun sistema de ficheiros local. - .updating-state = Fallou ao actualizar o estado do xestor de rede - .wireguard-config-path = Ruta de ficheiro de configuración WireGuard non válida - .wireguard-config-path-desc = O ficheiro seleccionado debe estar nun sistema de ficheiros local. - .wireguard-device = Fallou ao crear o dispositivo WireGuard - .with-password = - Fallou ao establecer { $field -> - *[username] o nome de usuario - [password] o contrasinal - [password-flags] as marcas do contrasinal - } da VPN con nmcli -wired = Wired - .adapter = Adaptador con fíos { $id } - .connections = Conexións con fíos - .devices = Dispositivos con fíos - .remove = Eliminar perfil de conexión -wifi = Wi-Fi - .adapter = Adaptador Wi-Fi { $id } - .forget = Esquecer esta rede -wireguard-dialog = Engadir dispositivo WireGuard - .description = Escolle un nome de dispositivo para a configuración de WireGuard. -online-accounts = Contas en liña - .desc = Engade contas, IMAP e SMTP, inicios de sesión empresariais -activate = Activar -enable = Activar -bluetooth = Bluetooth - .status = Este sistema é visible como { $aliases } mentres a configuración de Bluetooth está aberta. - .connected = Conectado - .connecting = Conectando - .disconnecting = Desconectando - .connect = Conectar - .disconnect = Desconectar - .forget = Esquecer - .dbus-error = Produciuse un erro ao interactuar con DBus: { $why } - .disabled = O servizo Bluetooth está desactivado - .inactive = O servizo Bluetooth non está activo - .unknown = Non se puido activar o servizo Bluetooth. Está instalado BlueZ? -bluetooth-paired = Dispositivos conectados anteriormente - .connect = Conectar - .battery = Batería ao { $percentage }% -bluetooth-confirm-pin = Confirmar PIN de Bluetooth - .description = Confirma que o seguinte PIN coincide co que se mostra en { $device } -bluetooth-display-passkey = Emparellamento Bluetooth - .description = Introduce a seguinte clave de acceso en { $device } e preme Intro -bluetooth-display-pin = Emparellamento Bluetooth - .description = Introduce o seguinte PIN en { $device } e preme Intro -bluetooth-available = Dispositivos próximos -bluetooth-adapters = Adaptadores Bluetooth -accessibility = Accessibility - .vision = Visión - .on = Activado - .off = Desactivado - .unavailable = Non dispoñible - .screen-reader = Lector de pantalla - .high-contrast = Modo de alto contraste - .invert-colors = Inverter cores - .color-filters = Filtros de cor -hearing = Audición - .mono = Reproducir o audio estéreo como mono -default = Por defecto -magnifier = Lupa - .controls = - Ou usa estes atallos: { $zoom_in -> - [zero] { "" } - *[other] - { "" } - { $zoom_in } para achegar, - }{ $zoom_out -> - [zero] { "" } - *[other] - { "" } - { $zoom_out } para afastar, - } - Super + desprazamento co rato - .scroll_controls = Activar o zoom co rato ou panel táctil mediante Super + desprazamento - .show_overlay = Mostrar a superposición da lupa - .increment = Incremento do zoom - .signin = Iniciar a lupa ao iniciar sesión - .applet = Activar ou desactivar a lupa no miniaplicativo do panel - .movement = O movemento da vista ampliada - .continuous = Continuamente co punteiro - .onedge = Cando o punteiro chega ao bordo - .centered = Para manter o punteiro centrado -color-filter = Tipo de filtro de cor - .unknown = Filtro activo descoñecido - .greyscale = Escala de grises - .deuteranopia = Verde/Vermello (debilidade do verde, Deuteranopia) - .protanopia = Vermello/Verde (debilidade do vermello, Protanopia) - .tritanopia = Azul/Amarelo (debilidade do azul, Tritanopia) -desktop = Escritorio -wallpaper = Wallpaper - .change = Cambiar imaxe cada - .fit = Axuste do fondo de pantalla - .folder-dialog = Escoller cartafol de fondos de pantalla - .image-dialog = Escoller imaxe de fondo de pantalla - .plural = Fondos de pantalla - .same = O mesmo fondo de pantalla en todas as pantallas - .slide = Presentación de diapositivas -add-color = Engadir color -add-image = Engadir imaxe -all-displays = Todas as pantallas -colors = Cores -dialog-add = Engadir -fill = Encher -fit-to-screen = Axustar a pantalla -open-new-folder = Abrir novo cartafol -recent-folders = Cartafoles recentes -x-minutes = - { $number } { $number -> - [one] minuto - *[other] minutos - } -x-hours = - { $number } { $number -> - [one] hora - *[other] horas - } -never = Nunca -accent-color = Cor de acento -app-background = Fondo da xanela -auto = Automatico -close = Pechar -color-picker = Selector de cor -copied-to-clipboard = Copiado ao portapapeis -copy-to-clipboard = Copiar ao portapapeis -export = Exportar -hex = Hexadecimal -import = Importar -mode-and-colors = Modo e cores -recent-colors = Cores recentes -reset-to-default = Restablecer aos valores predeterminados -rgb = RGB -window-hint-accent = Cor de indicación da xanela activa -window-hint-accent-toggle = Usar a cor de acento do tema como indicación da xanela activa -auto-switch = Cambiar automaticamente entre os modos claro e escuro - .sunrise = Cambia ao modo claro ao amencer - .sunset = Cambia ao modo escuro ao solpor - .next-sunrise = Cambia ao modo claro no seguinte amencer - .next-sunset = Cambia ao modo escuro no seguinte solpor -shadows-floating = Xanelas flotantes - .clip = Coincidir coas esquinas do sistema e aplicar sombras -shadows-tiling = Xanelas en mosaico - .clip = Coincidir coas esquinas do sistema - .shadow = Aplicar sombras -container-background = Fondo do contedor - .desc-detail = A cor do fondo do contedor úsase para a barra lateral de navegación, o caixón lateral, os diálogos e outros elementos similares. Por defecto, a cor do fondo do contedor derívase automaticamente do fondo da xanela. - .reset = Restablecer a automático - .desc = Úsase para a barra lateral de navegación, o caixón lateral, os diálogos e outros elementos similares -control-tint = Matiz dos compoñentes de control - .desc = Úsase para os fondos dos botóns estándar, campos de busca, campos de texto e compoñentes similares -frosted = Efecto de vidro esmerilado na interface do sistema - .desc = Aplica desenfoque de fondo ao panel, Dock, miniaplicativos, lanzador e biblioteca de aplicacións -enable-export = Aplicar o tema actual ás aplicacións de GNOME - .desc = Non todos os kits de ferramentas son compatibles co cambio automático. As aplicacións que non son COSMIC poden precisar reiniciarse despois dun cambio de tema. -icon-theme = Tema de iconas - .desc = Aplica un conxunto diferente de iconas ás aplicacións -text-tint = Matiz do texto da interface - .desc = Úsase para derivar as cores do texto da interface que teñen contraste suficiente en varias superficies -style = Style - .round = Redondeado - .slightly-round = Lixeiramente redondeado - .square = Cadrado - .frosted-glass = Vidro esmerilado - .frosted-system-interface = Interface do sistema - .frosted-system-interface-desc = Aplica vidro esmerilado ao Lanzador, biblioteca de aplicacións, vista xeral dos espazos de traballo e controis en pantalla - .frosted-windows = Xanelas - .frosted-windows-desc = Aplica vidro esmerilado ás xanelas e diálogos - .frosted-panels = Paneis - .frosted-panels-desc = Aplica vidro esmerilado ao panel e ao Dock - .frosted-applets = Miniaplicativos - .frosted-applets-desc = Aplica vidro esmerilado aos menús dos miniaplicativos do panel e do Dock - .frosted-thickness = Grosor do esmerilado - .less = menos - .more = máis - .glass-opacity = Opacidade do vidro -interface-density = Densidade da interface - .comfortable = Cómoda - .compact = Compacta - .spacious = Espazosa -window-management-appearance = Xestión de xanelas - .active-hint = Tamaño da indicación da xanela activa - .gaps = Separacións arredor das xanelas en mosaico -experimental-settings = Axustes experimentais -icons-and-toolkit = Tematización de iconas e kits de ferramentas -interface-font = Tipografía do sistema -monospace-font = Tipografia monoespaciada -shadow-and-corners = Sombra e esquinas das xanelas -notifications = Notificacións -panel = Panel -add = Engadir -add-applet = Engadir miniaplicativo -all = Todo -applets = Miniaplicativo -center-segment = Segmento central -place-here = Coloca os miniaplicativos aquí -end-segment = Segmento final -large = Grande -no-applets-found = Non se atoparon miniaplicativos... -panel-bottom = Abaixo -panel-left = Esquerda -panel-right = Dereita -panel-top = Arriba -search-applets = Buscar miniaplicativos... -small = Pequeno -start-segment = Segmento inicial -panel-appearance = Aparencia - .match = Coincidir co escritorio - .light = Claro - .dark = Escuro -panel-behavior-and-position = Comportamento e posicións - .autohide = Ocultar automaticamente o panel - .dock-autohide = Ocultar automaticamente o Dock - .position = Posición na pantalla - .display = Mostrar na pantalla -panel-style = Style - .anchor-gap = Separación entre o panel e os bordos da pantalla - .dock-anchor-gap = Separación entre o Dock e os bordos da pantalla - .extend = Estender o panel ata os bordos da pantalla - .dock-extend = Estender o Dock ata os bordos da pantalla - .appearance = Aparencia - .size = Tamaño - .background-opacity = Opacidade do fondo -panel-applets = Configuración - .dock-desc = Configura os miniaplicativos do Dock - .desc = Configura os miniaplicativos do panel -panel-missing = Falta a configuración do panel - .desc = O ficheiro de configuración do panel non está dispoñible debido ao uso dunha configuración personalizada ou está danado. - .fix = Restablecer aos valores predeterminados -dock = Dock -window-management = Xestión de xanelas -super-key = Acción da tecla Super - .launcher = Abrir o Lanzador - .workspaces = Abrir os Espazos de traballo - .applications = Abrir as Aplicacións - .none = Ningunha -edge-gravity = As xanelas flotantes axústanse aos bordos próximos -window-controls = Controis das xanelas - .maximize = Mostrar o botón de maximizar - .minimize = Mostrar o botón de minimizar - .active-window-hint = Mostrar indicación da xanela activa -focus-navigation = Navegación do foco - .focus-follows-cursor = O foco segue o cursor - .focus-follows-cursor-delay = Retardo do foco ao seguir o cursor en ms - .cursor-follows-focus = O cursor segue o foco -workspaces = Espazos de traballo -workspaces-overview = Vista xeral dos espazos de traballo - .action-on-typing = Acción ao escribir - .none = Ningunha - .launcher = Abrir o Lanzador - .applications = Abrir as Aplicacións -workspaces-behavior = Comportamento dos espazos de traballo - .dynamic = Espazos de traballo dinámicos - .dynamic-desc = Elimina automaticamente os espazos de traballo baleiros. - .fixed = Número fixo de espazos de traballo - .fixed-desc = Engade ou elimina espazos de traballo na vista xeral. -workspaces-multi-behavior = Comportamento con varios monitores - .span = Os espazos de traballo abranguen todas as pantallas - .separate = As pantallas teñen espazos de traballo separados -workspaces-overview-thumbnails = Miniaturas da vista xeral dos espazos de traballo - .show-number = Mostrar o número do espazo de traballo - .show-name = Mostrar o nome do espazo de traballo -workspaces-orientation = Orientación dos espazos de traballo - .vertical = Vertical - .horizontal = Horizontal -hot-corner = Esquina activa - .top-left-corner = Activar a esquina activa superior esquerda para os Espazos de traballo -workspaces-navigation = Navegación - .wraparound = Moverse entre o primeiro e o último espazo de traballo usando atallos de teclado e xestos --requires-restart = Require reinicio -color = Cor - .depth = Profundidade de cor - .profile = Perfil de cor - .sidebar = Perfís de cor - .temperature = Temperatura da cor -display = Pantallas - .arrangement = Disposición das pantallas - .arrangement-desc = Arrastra as pantallas para reorganizalas - .enable = Activar pantalla - .external = Pantalla externa { $size } { $output } - .laptop = Pantalla de portátil { $size } - .options = Opcións da pantalla - .refresh-rate = Frecuencia de actualización - .resolution = Resolución - .scale = Escala - .additional-scale-options = Opcións adicionais de escala -mirroring = Espello - .id = Espello { $id } - .dont = Non facer espello - .mirror = Facer espello de { $display } - .project = - Proxectar en { $display -> - [all] todas as pantallas - *[other] { $display } - } - .project-count = - Proxectando noutras { $count } { $count -> - [1] pantalla - *[other] pantallas - } -night-light = Luz nocturna - .auto = Automática (do solpor ao amencer) - .desc = Reduce a luz azul usando cores máis cálidas -orientation = Orientación - .standard = Estándar - .rotate-90 = Xirar 90° - .rotate-180 = Xirar 180° - .rotate-270 = Xirar 270° -vrr = Frecuencia de actualización variable - .enabled = Activada - .force = Sempre - .auto = Automática - .disabled = Desactivada -scheduling = Programación - .manual = Programación manual -dialog = Diálogo - .title = Manter esta configuración da pantalla? - .keep-changes = Manter os cambios - .change-prompt = Os cambios de configuración reverteranse automaticamente en { $time } segundos. - .revert-settings = Reverter a configuración -sound = Son -sound-output = Saída - .volume = Volume de saída - .device = Dispositivo de saída - .level = Nivel de saída - .config = Configuración - .balance = Balance - .left = Esquerda - .right = Dereita -sound-input = Entrada - .volume = Volume de entrada - .device = Dispositivo de entrada - .level = Nivel de entrada -amplification = Amplificación - .desc = Permite aumentar o volume ata o 150% -sound-alerts = Alertas - .volume = Volume das alertas - .sound = Son das alertas -sound-applications = Aplicacións - .desc = Volumes e configuracións das aplicacións -sound-device-port-unplugged = Desconectado -sound-hd-audio = Audio HD -sound-usb-audio = Audio USB -sound-device-profiles = Perfís dos dispositivos -power = Enerxía e batería -battery = Batería - .minute = - { $value } { $value -> - [one] minuto - *[other] minutos - } - .hour = - { $value } { $value -> - [one] hora - *[other] horas - } - .day = - { $value } { $value -> - [one] día - *[other] días - } - .less-than-minute = Menos dun minuto - .and = e - .remaining-time = - { $time } ata { $action -> - [full] completo - *[other] baleiro - } -connected-devices = Dispositivos conectados - .unknown = Dispositivo descoñecido -power-mode = Modo de enerxía - .battery = Maior duración da batería - .battery-desc = Menor consumo de enerxía e funcionamento silencioso - .balanced = Equilibrado - .balanced-desc = Funcionamento silencioso e consumo moderado de enerxía - .performance = Alto rendemento - .performance-desc = Máximo rendemento e consumo de enerxía - .no-backend = Non se atopou o backend. Instala system76-power ou power-profiles-daemon. -power-saving = Opcións de aforro de enerxía - .turn-off-screen-after = Apagar a pantalla despois de - .auto-suspend = Suspensión automática - .auto-suspend-ac = Suspensión automática ao estar conectado á corrente - .auto-suspend-battery = Suspensión automática usando a batería -acceleration-desc = Axuste automático da sensibilidade de seguimento segundo a velocidade -disable-while-typing = Desactivar ao escribir -input-devices = Dispositivos de entrada -primary-button = Botón principal - .desc = Establece a orde dos botóns físicos - .left = Esquerdo - .right = Dereito -scrolling = Desprazamento - .two-finger = Desprazamento con dous dedos - .edge = Desprazamento polo bordo cun dedo - .speed = Velocidade de desprazamento - .natural = Desprazamento natural - .natural-desc = Desprazar o contido en vez da vista -slow = Amodo -fast = Rápido -short = Curto -long = Longo -keyboard = Teclado -keyboard-sources = Fontes de entrada - .desc = As fontes de entrada pódense cambiar usando a combinación de teclas Super+Espazo. Isto pódese personalizar na configuración dos atallos de teclado. - .move-up = Mover arriba - .move-down = Mover abaixo - .settings = Configuracións - .view-layout = Ver a distribución do teclado - .remove = Eliminar - .add = Engadir fonte de entrada -keyboard-special-char = Entrada de caracteres especiais - .alternate = Tecla de caracteres alternativos - .compose = Tecla Compose - .compose-desc = A tecla Compose permite introducir unha gran variedade de caracteres. Para usala, preme Compose e despois unha secuencia de caracteres. Por exemplo, a tecla Compose seguida de C e o introduce ©, mentres que a tecla Compose seguida de a e ‘ introduce á. - .caps = Tecla Bloq Maiús - .ctrl = Control - .ctrl-right = Ctrl dereito - .swap-with-ctrl = Intercambiar con Control - .alt = Alt - .alt-left = Alt esquerda - .alt-right = Alt dereita - .super = Super - .super-left = Super esquerda - .super-right = Super dereita - .menu = Tecla Menú - .backspace = Retroceso - .escape = Escape - .swap-with-escape = Intercambiar con Escape - .print-screen = Imprimir pantalla - .scroll-lock = Bloq Desprazamento - .none = Ningunha -keyboard-typing-assist = Escritura - .repeat-rate = Velocidade de repetición - .repeat-delay = Retardo de repetición -keyboard-numlock-boot = Bloq Num - .boot-state = Estado no arranque - .last-boot = Último arranque - .on = Activado - .off = Desactivado - .set = Establecer o estado de Bloq Num no arranque -added = Engadido -type-to-search = Escribe para buscar... -no-search-results = Non hai redes que coincidan coa túa busca. -show-extended-input-sources = Mostrar fontes de entrada ampliadas -keyboard-shortcuts = Atallos de teclado - .desc = Ver e personalizar os atallos de teclado -add-another-keybinding = Engadir outro atallo de teclado -command = Comando -custom = Personalizado -debug = Depuración -disabled = Deshabilitado -input-source-switch = Cambiar fonte de entrada do idioma do teclado -migrate-workspace-prev = Migrar espazo de traballo á pantalla anterior -migrate-workspace-next = Migrar espazo de traballo á seguinte pantalla -migrate-workspace = - Migrar espazo de traballo á pantalla { $direction -> - *[down] abaixo - [left] esquerda - [right] dereita - [up] arriba - } -navigate = Navegar -shortcut-name = Nome do atallo -system-controls = Controles do sistema -terminate = Finalizar -toggle-stacking = Alternar pila de xanelas -type-key-combination = Escribir combinación de teclas -custom-shortcuts = Atallos personalizados - .add = Engadir atallo - .context = Engadir atallo personalizado - .none = Non hai atallos personalizados -modified = { $count } modificado -nav-shortcuts = Navegación - .prev-output = Enfocar a pantalla anterior - .next-output = Enfocar a seguinte pantalla - .last-workspace = Enfocar o último espazo de traballo - .prev-workspace = Enfocar o espazo de traballo anterior - .next-workspace = Enfocar o seguinte espazo de traballo - .focus = - Enfocar ventá { $direction -> - *[down] abaixo - [in] dentro - [left] esquerda - [out] fóra - [right] dereita - [up] arriba - } - .output = - Cambiar á pantalla { $direction -> - *[down] abaixo - [left] esquerda - [right] dereita - [up] arriba - } - .workspace = Cambiar ao espazo de traballo { $num } -manage-windows = Xestionar ventás - .close = Pechar ventá - .maximize = Maximizar ventá - .fullscreen = Ventá a pantalla completa - .minimize = Minimizar ventá - .resize-inwards = Reducir tamaño da ventá cara dentro - .resize-outwards = Aumentar tamaño da ventá cara fóra - .toggle-sticky = Alternar ventá persistente -move-windows = Mover ventás - .direction = - Mover ventá { $direction -> - *[down] abaixo - [left] esquerda - [right] dereita - [up] arriba - } - .display = - Mover ventá un monitor { $direction -> - *[down] abaixo - [left] esquerda - [right] dereita - [up] arriba - } - .workspace = - Mover ventá un espazo de traballo { $direction -> - *[below] abaixo - [left] esquerda - [right] dereita - [above] arriba - } - .workspace-num = Mover ventá ao espazo de traballo { $num } - .prev-workspace = Mover ventá ao espazo de traballo anterior - .next-workspace = Mover ventá ao seguinte espazo de traballo - .last-workspace = Mover ventá ao último espazo de traballo - .next-display = Mover ventá á seguinte pantalla - .prev-display = Mover ventá á pantalla anterior - .send-to-prev-workspace = Enviar ventá ao espazo de traballo anterior - .send-to-next-workspace = Enviar ventá ao seguinte espazo de traballo -system-shortcut = Sistema - .app-library = Abrir a biblioteca de aplicacións - .brightness-down = Reducir o brillo da pantalla - .brightness-up = Aumentar o brillo da pantalla - .display-toggle = Alternar a pantalla interna - .home-folder = Abrir o cartafol persoal - .keyboard-brightness-down = Reducir o brillo do teclado - .keyboard-brightness-up = Aumentar o brillo do teclado - .launcher = Abrir o Lanzador - .log-out = Pechar sesión - .lock-screen = Bloquear a pantalla - .mute = Silenciar a saída de audio - .mute-mic = Silenciar a entrada do micrófono - .play-pause = Reproducir/pausar - .play-next = Seguinte pista - .play-prev = Pista anterior - .poweroff = Apagar - .screenshot = Facer unha captura de pantalla - .suspend = Suspender - .terminal = Abrir un terminal - .touchpad-toggle = Alternar o panel táctil - .volume-lower = Reducir o volume de saída de audio - .volume-raise = Aumentar o volume de saída de audio - .web-browser = Abrir un navegador web - .window-switcher = Cambiar entre ventás abertas - .window-switcher-previous = Cambiar entre ventás abertas en orde inversa - .workspace-overview = Abrir a vista xeral dos espazos de traballo -window-tiling = Mosaico de xanelas - .horizontal = Establecer orientación horizontal - .vertical = Establecer orientación vertical - .swap-window = Intercambiar ventá - .toggle-tiling = Alternar mosaico de ventás - .toggle-stacking = Alternar empilhamento de ventás - .toggle-floating = Alternar ventá flotante - .toggle-orientation = Alternar orientación -replace-shortcut-dialog = Substituír atallo? - .desc = { $shortcut } está sendo usado por { $name }. Se o substitúes, { $name } será desactivado. -zoom-in = Ampliar Zoom -zoom-out = Reducir Zoom -mouse = Rato - .speed = Velocidade do rato - .acceleration = Activar aceleración do rato -click-behavior = Comportamento dos clics - .click-finger = Clic secundario con dous dedos e clic central con tres dedos - .button-areas = Clic secundario na esquina inferior dereita e clic central no centro inferior -pinch-to-zoom = Zoom con pinza - .desc = Usa dous dedos para ampliar o contido nas aplicacións que admitan zoom -tap-to-click = Tocar para facer clic - .desc = Activa o toque cun dedo para o clic principal, o toque con dous dedos para o clic secundario e o toque con tres dedos para o clic central -touchpad = Panel táctil - .acceleration = Activar aceleración do panel táctil - .speed = Velocidade do panel táctil -gestures = Xestos - .four-finger-down = Desprazamento cara abaixo con catro dedos - .four-finger-left = Desprazamento cara á esquerda con catro dedos - .four-finger-right = Desprazamento cara á dereita con catro dedos - .four-finger-up = Desprazamento cara arriba con catro dedos - .three-finger-any = Desprazamento en calquera dirección con tres dedos -switch-workspaces = Cambiar de espazos de traballo - .horizontal = Desprazamento horizontal con catro dedos (esquerda/dereita) - .vertical = Desprazamento vertical con catro dedos (arriba/abaixo) -switch-between-windows = Alternar entre xanelas -open-application-library = Abrir a biblioteca de aplicacións -open-workspaces-view = Abrir a vista xeral dos espazos de traballo -time = Hora e linguaxe -time-date = Data e hora - .auto = Establecer automaticamente - .auto-ntp = A data e hora actualizaranse automaticamente cando estea configurada a zona horaria -time-zone = Zona horaria - .auto = Zona horaria automática - .auto-info = Require servizos de localización e acceso a Internet -time-format = Formato de data e hora - .twenty-four = Formato de 24 horas - .show-seconds = Mostrar segundos - .first = Primeiro día da semana - .show-date = Mostrar a data no applet da hora - .friday = Venres - .saturday = Sábado - .sunday = Domingo - .monday = Luns -time-region = Rexión e linguaxe -formatting = Formato - .dates = Datas - .time = Hora - .date-and-time = Data e hora - .numbers = Números - .measurement = Medición - .paper = Papel -preferred-languages = Idiomas preferidos - .desc = A orde dos idiomas determina que idioma se usa para a interface de usuario. Os cambios aplicaranse no seguinte inicio de sesión. -add-language = Engadir linguaxe - .context = Engadir lingua -install-additional-languages = Instalar linguaxes adicionais -region = Rexión -default-apps = Aplicacións predeterminadas - .web-browser = Navegador web - .file-manager = Xestor de ficheiros - .mail-client = Cliente de correo - .music = Música - .video = Vídeo - .photos = Fotos - .calendar = Calendario - .terminal = Terminal - .other-associations = Outras asociacións - .text-editor = Editor de texto - .not-installed = Non instalado -startup-apps = Aplicacións de inicio - .add = Engadir aplicación - .user = Aplicacións iniciadas cando inicias sesión - .none = Non hai aplicacións de inicio engadidas - .remove-dialog-title = Eliminar { $name }? - .remove-dialog-description = Queres eliminar esta aplicación de inicio? - .add-startup-app = Engadir aplicación de inicio -legacy-applications = Compatibilidade de aplicacións X11 -legacy-app-global-shortcuts = Atallos globais en aplicacións X11 - .desc = Os atallos globais permiten que as pulsacións de teclas e os eventos dos botóns do rato realizados nas aplicacións sexan recoñecidos por outras aplicacións para funcións como premer para falar ou premer para silenciar. Por defecto, os atallos globais están desactivados nas aplicacións X11 para garantir que outras aplicacións non poidan supervisar eventos de teclado e rato que conteñan información sensible. - .none = Sen teclas - .modifiers = Modificadores (Super, Maiús, Control, Alt) - .combination = Todas as teclas mentres se manteñen premidos os modificadores Super, Control ou Alt - .all = Todas as teclas - .mouse = Eventos dos botóns do rato nas aplicacións X11 -legacy-app-scaling = Escalado de aplicacións do sistema de ventás X11 - .scaled-gaming = Optimizar para xogos e aplicacións a pantalla completa - .gaming-description = As aplicacións X11 poden aparecer lixeiramente máis grandes ou máis pequenas en comparación coas aplicacións Wayland - .scaled-applications = Optimizar para aplicacións - .applications-description = Os xogos e as aplicacións X11 a pantalla completa poden non coincidir coa resolución da túa pantalla - .scaled-compatibility = Modo de máxima compatibilidade - .compatibility-description = As aplicacións X11 poden aparecer borrosas en pantallas HiDPI - .preferred-display = Pantalla preferida para xogos e aplicacións X11 a pantalla completa - .no-display = Ningunha -system = Sistema e contas -about = Sobre -about-device = Nome do dispositivo - .desc = Este nome aparece para outros dispositivos da rede ou Bluetooth -about-hardware = Hardware - .model = Modelo de hardware - .memory = Memoria - .processor = Procesador - .graphics = Gráficos - .disk-capacity = Capacidade do disco -about-os = Sistema operativo - .os = Sistema operativo - .os-architecture = Arquitectura do sistema operativo - .kernel = Versión do kernel - .desktop-environment = Contorno de escritorio - .windowing-system = Sistema de xanelas (servidor gráfico) -about-related = Axustes relacionados - .support = Obter asistencia -firmware = Firmware -users = Usuarios - .admin = Administrador - .standard = Estándar - .profile-add = Escoller imaxe de perfil -administrator = Administrador - .desc = Os administradores poden cambiar os axustes de todos os usuarios, engadir e eliminar outros usuarios -add-user = Engadir usuario -change-password = Cambiar o contrasinal -remove-user = Eliminar o usuario -full-name = Nome completo -invalid-username = Nome de usuario non válido -password-mismatch = O contrasinal e a confirmación deben coincidir diff --git a/i18n/hi/cosmic_settings.ftl b/i18n/hi/cosmic_settings.ftl index 164ea8f..879d5c2 100644 --- a/i18n/hi/cosmic_settings.ftl +++ b/i18n/hi/cosmic_settings.ftl @@ -21,8 +21,8 @@ network-and-wireless = नेटवर्क और वायरलेस no-networks = कोई नेटवर्क नहीं मिला। no-vpn = कोई वी.पी.एन कनेक्शन नहीं है। password = पासवर्ड -remove = हटाएँ -settings = सेटिंग्स +remove = हटा दें +settings = सेटिंग username = उपयोगकर्ता नाम visible-networks = दृश्य नेटवर्क auth-dialog = प्रमाणीकरण आवश्यक है @@ -145,7 +145,8 @@ x-hours = ## Desktop: Appearance -appearance = रुप-रंग +appearance = रूपरेखा + .desc = प्राधिकरण रंग और थीम। accent-color = प्राधिकरण रंग app-background = एप्लिकेशन या विंडो का पृष्ठभूमि auto = स्वचालित @@ -153,11 +154,11 @@ close = बंद करें color-picker = रंग चयनकर्ता copied-to-clipboard = क्लिपबोर्ड में कॉपी किया गया copy-to-clipboard = क्लिपबोर्ड में कॉपी करें -dark = डार्क +dark = गहरा export = निर्यात hex = हेक्स import = आयात -light = लाइट +light = हल्का mode-and-colors = मोड और रंग recent-colors = हाल के रंग reset-to-default = डिफ़ॉल्ट पर पुनर्स्थापित करें diff --git a/i18n/hu/cosmic_settings.ftl b/i18n/hu/cosmic_settings.ftl index 38a9dcc..a3d2e76 100644 --- a/i18n/hu/cosmic_settings.ftl +++ b/i18n/hu/cosmic_settings.ftl @@ -1,5 +1,5 @@ app = COSMIC Beállítások -dbus-connection-error = Nem sikerült csatlakozni a D-Bushoz +dbus-connection-error = Nem sikerült csatlakozni a DBus-hoz ok = OK unknown = Ismeretlen number = { $number } @@ -23,7 +23,7 @@ xdg-entry-desktop = Asztal xdg-entry-displays = Kijelzők xdg-entry-displays-comment = Kijelzőbeállítások kezelése xdg-entry-dock = Dokk -xdg-entry-dock-comment = Választható sáv alkalmazásokhoz és kisalkalmazásokhoz +xdg-entry-dock-comment = Egy opcionális sáv alkalmazásokhoz és kisalkalmazásokhoz xdg-entry-input = Beviteli eszközök xdg-entry-input-comment = Billentyűzet- és egérbeállítások xdg-entry-keyboard = Billentyűzet @@ -33,7 +33,7 @@ xdg-entry-mouse-comment = Egérsebesség, gyorsítás és természetes görgeté xdg-entry-network = Hálózat és Wi-Fi xdg-entry-network-comment = Hálózati kapcsolatok kezelése xdg-entry-notifications = Értesítések -xdg-entry-notifications-comment = Ne zavarjanak mód, a zárolási képernyő értesítései és alkalmazásonkénti beállítások +xdg-entry-notifications-comment = Ne zavarjanak, zárolási képernyő értesítések és alkalmazásonkénti beállítások xdg-entry-panel-comment = Fő rendszersáv menükhöz és kisalkalmazásokhoz xdg-entry-power = Energia és akkumulátor xdg-entry-power-comment = Energiagazdálkodási módok és energiagazdálkodási beállítások @@ -56,10 +56,10 @@ xdg-entry-window-management = Ablakkezelés xdg-entry-window-management-comment = Super billentyű funkció, ablakkezelési és csempézési beállítások xdg-entry-wired = Vezetékes kapcsolatok xdg-entry-wired-comment = Vezetékes kapcsolatok és kapcsolódási profilok -xdg-entry-wireless-comment = Wi-Fi-kapcsolatok és kapcsolódási profilok +xdg-entry-wireless-comment = Wi-Fi kapcsolatok és kapcsolódási profilok xdg-entry-workspaces = Munkaterületek -xdg-entry-workspaces-comment = Munkaterület-tájolás, áttekintés és többmonitoros viselkedés -xdg-entry-x11-applications = X11-alkalmazások támogatása +xdg-entry-workspaces-comment = Munkaterület-tájolás, áttekintés és többképernyős viselkedés +xdg-entry-x11-applications = X11 alkalmazások támogatása xdg-entry-x11-applications-comment = X11 ablakrendszer alkalmazásméretezés, elsődleges kijelző és globális gyorsbillentyűk ## Network & Wireless @@ -67,17 +67,17 @@ xdg-entry-x11-applications-comment = X11 ablakrendszer alkalmazásméretezés, e add-network = Hálózat hozzáadása .profile = Profil hozzáadása add-vpn = VPN hozzáadása -airplane-on = A repülőgép üzemmód be van kapcsolva. +airplane-on = A repülőgép üzemmód be van kapcsolva cable-unplugged = Kábel kihúzva -connect = Kapcsolódás -connected = Kapcsolódva -connecting = Kapcsolódás… +connect = Csatlakozás +connected = Csatlakoztatva +connecting = Csatlakozás… disconnect = Bontás forget = Elfelejtés known-networks = Ismert hálózatok network-and-wireless = Hálózat és Wi-Fi no-networks = Nem található hálózat. -no-vpn = Nincs elérhető VPN-kapcsolat. +no-vpn = Nincs elérhető VPN-kapcsolat password = Jelszó password-confirm = Jelszó megerősítése remove = Eltávolítás @@ -88,20 +88,20 @@ identity = Azonosító auth-dialog = Azonosítás szükséges .vpn-description = Írd be a VPN szolgáltatáshoz szükséges felhasználónevet és jelszót. .wifi-description = Add meg a jelszót vagy a titkosítókulcsot. A router „WPS” gombjának megnyomásával is csatlakozhatsz. -forget-dialog = Elfelejted ezt a Wi-Fi-hálózatot? - .description = A jelszót ismét meg kell majd adnod a kapcsolódáshoz. +forget-dialog = El akarod felejteni ezt a Wi-Fi hálózatot? + .description = A jelszót ismét meg kell adnod, ha újra csatlakozni szeretnél. network-device-state = - .activated = Kapcsolódva - .config = Kapcsolódás… + .activated = Csatlakoztatva + .config = Csatlakozás… .deactivating = Bontás… .disconnected = Kapcsolat bontva - .failed = Nem sikerült kapcsolódni + .failed = Csatlakozás sikertelen .ip-check = Kapcsolat ellenőrzése .ip-config = IP és router információk lekérése .need-auth = Hitelesítés szükséges .prepare = Felkészülés a kapcsolódáshoz .secondaries = Várakozás másodlagos kapcsolatra - .unavailable = Nem érhető el + .unavailable = Nem elérhető .unknown = Ismeretlen állapot .unmanaged = Kezeletlen .unplugged = Kábel kihúzva @@ -113,13 +113,11 @@ vpn = VPN .error = Nem sikerült hozzáadni a VPN-konfigurációt .remove = Kapcsolati profil törlése .select-file = VPN-konfigurációs fájl kiválasztása -vpn-error = VPN-hiba +vpn-error = VPN hiba .config = Nem sikerült hozzáadni a VPN-konfigurációt - .connect = Nem sikerült kapcsolódni a VPN-hez - .connection-editor = A kapcsolatszerkesztő nem működik + .connect = Nem sikerült csatlakozni a VPN-hez + .connection-editor = A hálózati beállító nem működik .connection-settings = Nem sikerült lekérni az aktív kapcsolatok beállításait - .openvpn-config-path = Érvénytelen OpenVPN-konfiguráció-útvonal - .openvpn-config-path-desc = A kiválasztott fájlnak helyi fájlrendszeren kell lennie. .updating-state = Nem sikerült frissíteni a hálózatkezelő állapotát .wireguard-config-path = Érvénytelen fájlelérési út a WireGuard konfigurációhoz .wireguard-config-path-desc = A kiválasztott fájlnak helyi fájlrendszeren kell lennie. @@ -131,15 +129,15 @@ vpn-error = VPN-hiba [password-flags] jelszóbeállításait } az nmclivel wired = Vezetékes - .adapter = { $id }. vezetékes adapter + .adapter = Vezetékes adapter { $id } .connections = Vezetékes kapcsolatok .devices = Vezetékes eszközök .remove = Kapcsolati profil törlése wifi = Wi-Fi - .adapter = { $id }. Wi-Fi-adapter + .adapter = Wi-Fi adapter { $id } .forget = Hálózat elfelejtése wireguard-dialog = WireGuard eszköz hozzáadása - .description = Válassz egy eszköznevet a WireGuard konfigurációhoz. + .description = Válassz egy eszköznevet a WireGuard-konfigurációhoz. ## Networking: Online Accounts @@ -152,19 +150,19 @@ activate = Aktiválás confirm = Megerősítés enable = Engedélyezés bluetooth = Bluetooth - .status = Ez a rendszer { $aliases } néven látható, amíg a Bluetooth-beállítások meg vannak nyitva. - .connected = Kapcsolódva - .connecting = Kapcsolódás… + .status = Ez a rendszer { $aliases } néven látható, amíg a Bluetooth beállítások vannak megnyitva. + .connected = Csatlakoztatva + .connecting = Csatlakozás… .disconnecting = Bontás… - .connect = Kapcsolódás + .connect = Csatlakozás .disconnect = Bontás .forget = Elfelejtés - .dbus-error = Hiba történt a D-Busszal való kommunikáció során: { $why } + .dbus-error = Hiba történt a DBus-szal való kommunikáció során: { $why } .disabled = A Bluetooth szolgáltatás le van tiltva .inactive = A Bluetooth szolgáltatás nem aktív .unknown = A Bluetooth szolgáltatást nem sikerült aktiválni. A BlueZ telepítve van? -bluetooth-paired = Korábban csatlakoztatott eszközök - .connect = Kapcsolódás +bluetooth-paired = Korábban párosított eszközök + .connect = Csatlakozás .battery = { $percentage }% töltöttség bluetooth-confirm-pin = Bluetooth PIN megerősítése .description = Erősítsd meg, hogy a következő PIN megegyezik a(z) { $device } eszközön megjelenített PIN-kóddal @@ -177,7 +175,7 @@ accessibility = Akadálymentesség .vision = Látás .on = Bekapcsolva .off = Kikapcsolva - .unavailable = Nem érhető el + .unavailable = Nem elérhető .screen-reader = Képernyőolvasó .high-contrast = Magas kontraszt mód .invert-colors = Színek invertálása @@ -224,8 +222,8 @@ desktop = Asztal wallpaper = Háttérkép .change = Háttérkép váltásának gyakorisága .fit = Háttérkép illeszkedése - .folder-dialog = Háttérképmappa kiválasztása - .image-dialog = Háttérkép kiválasztása + .folder-dialog = Válassz mappát a háttérképekhez + .image-dialog = Válassz képet a háttérképnek .plural = Háttérképek .same = Ugyanaz a háttérkép legyen minden kijelzőn .slide = Diavetítés @@ -274,46 +272,33 @@ window-hint-accent-toggle = Kiemelőszín használata az aktív ablak kiemelés auto-switch = Automatikus váltás világos és sötét mód között .sunrise = Napkeltekor világos módra váltás .sunset = Napnyugtakor sötét módra váltás - .next-sunrise = Következő napkeltekor világos módra váltás + .next-sunrise = Következő napfelkeltekor világos módra váltás .next-sunset = Következő napnyugtakor sötét módra váltás container-background = Felületi elemek háttere - .desc-detail = A felületi elemek háttérszínét a navigációs oldalsáv, az oldalsó menü, a párbeszédablakok és hasonló modulok használják. Alapértelmezés szerint a felületi elemek háttérszíne automatikusan az ablak hátteréből származik. + .desc-detail = A felületi elemek háttérszínét a navigációs oldalsáv, az oldalsó menü, a párbeszédablakok és hasonló modulok használják. Alapértelmezés szerint a felületi elemek háttérszíne automatikusan az ablak hátteréből származnak. .reset = Visszaállítás automatikusra .desc = Navigációs oldalsávhoz, oldalsó menühöz, párbeszédablakhoz és hasonló modulokhoz használandó control-tint = Vezérlőelemek színezése .desc = Szabványos gombok hátterére, keresési bemenetekre, szövegbevitelre és hasonló összetevőkre használandó -frosted = Tejüveghatás a rendszerfelületen +frosted = Tejüveg hatás a rendszerfelületen .desc = A háttér elmosását alkalmazza a panelre, a dokkra, a kisalkalmazásokra, az indítóra és az alkalmazáskönyvtárra enable-export = Jelenlegi téma alkalmazása a GNOME-alkalmazásokra - .desc = Nem minden eszközkészlet támogatja az automatikus váltást. Előfordulhat, hogy a téma módosítása után újra kell indítani a nem COSMIC-alkalmazásokat. + .desc = Nem minden eszközkészlet támogatja az automatikus váltást. Előfordulhat, hogy a téma módosítása után újra kell indítani a nem COSMIC-alapú alkalmazásokat. icon-theme = Ikontéma .desc = Más ikonkészletet alkalmaz az alkalmazásokra text-tint = Felületi szöveg árnyalata .desc = A felület szövegszíneinek meghatározására szolgál, hogy azok megfelelő kontrasztot biztosítsanak különböző felületeken style = Stílus .round = Lekerekített - .slightly-round = Enyhén lekerekített - .square = Szögletes - .frosted-glass = Tejüveghatás - .frosted-system-interface = Rendszerfelület - .frosted-system-interface-desc = Tejüveghatás alkalmazása az Indítóra, az alkalmazáskönyvtárra, a munkaterület-áttekintőre és a képernyőn megjelenő vezérlőkre - .frosted-windows = Ablakok - .frosted-windows-desc = Tejüveghatás alkalmazása az ablakokra és a párbeszédablakokra - .frosted-panels = Panelek - .frosted-panels-desc = Tejüveghatás alkalmazása a panelre és a dokkra - .frosted-applets = Kisalkalmazások - .frosted-applets-desc = Tejüveghatás alkalmazása a panelen és a dokkon lévő kisalkalmazások menüire - .frosted-thickness = Homályosítás mértéke - .less = kevesebb - .more = több - .glass-opacity = Üveg átlátszatlansága + .slightly-round = Némileg lekerekített + .square = Négyzetes interface-density = Felületsűrűség .comfortable = Kényelmes .compact = Kompakt .spacious = Tágas window-management-appearance = Ablakkezelés .active-hint = Aktív ablak kiemelésének mérete - .gaps = Hézagok a csempézett ablakok körül + .gaps = Rések a csempézett ablakok körül ### Experimental @@ -379,14 +364,14 @@ super-key = Super billentyű funkciója .launcher = Indító megnyitása .workspaces = Munkaterületek megnyitása .applications = Alkalmazások megnyitása - .none = Nincs + .disable = Letiltás edge-gravity = A lebegő ablakok a közeli szélekhez igazodnak window-controls = Ablakvezérlés .maximize = Maximalizálás gomb megjelenítése .minimize = Minimalizálás gomb megjelenítése .active-window-hint = Aktív ablak kiemelése focus-navigation = Fókusznavigáció - .focus-follows-cursor = Fókusz követi a mutatót + .focus-follows-cursor = Fókusz követi az egeret .focus-follows-cursor-delay = Fókuszálás késleltetése (ms) .cursor-follows-focus = Mutató követi a fókuszt @@ -397,7 +382,7 @@ workspaces-behavior = Munkaterületek viselkedése .dynamic = Dinamikus munkaterületek .dynamic-desc = Üres munkaterületek automatikus eltávolítása .fixed = Megadott számú munkaterület - .fixed-desc = Munkaterületek hozzáadása vagy eltávolítása az áttekintésben. + .fixed-desc = Munkaterületek hozzáadása vagy eltávolítása az áttekintésben workspaces-multi-behavior = Többmonitoros viselkedés .span = A munkaterületek kiterjednek a kijelzőkre .separate = A kijelzők külön munkaterülettel rendelkeznek @@ -408,7 +393,7 @@ workspaces-orientation = Munkaterületek tájolása .vertical = Függőleges .horizontal = Vízszintes hot-corner = Aktív sarok - .top-left-corner = Bal felső aktív sarok engedélyezése a munkaterületekhez + .top-left-corner = A munkaterületek bal felső aktív sarkának engedélyezése ## Displays @@ -423,16 +408,16 @@ display = Kijelzők .arrangement-desc = Húzd a kijelzőket az átrendezésükhöz .enable = Kijelző engedélyezése .external = { $size } { $output } külső kijelző - .laptop = { $size } laptopkijelző - .options = Kijelzőbeállítások + .laptop = { $size } laptop kijelző + .options = Kijelző lehetőségek .refresh-rate = Frissítési gyakoriság .resolution = Felbontás .scale = Skálázás .additional-scale-options = További skálázás mirroring = Tükrözés .id = Tükrözés { $id } - .dont = Tükrözés kikapcsolása - .mirror = A(z) { $display } kijelző tükrözése + .dont = Ne tükrözzön + .mirror = Tükrözze a(z) { $display } kijelzőt .project = Kivetítés { $display -> [all] az összes kijelzőre @@ -441,16 +426,16 @@ mirroring = Tükrözés .project-count = Kivetítés { $count } további { $count -> [1] kijelzőre - *[other] kijelzőre + *[other] kijelzőkre } night-light = Éjszakai fény .auto = Automatikus (naplementétől napkeltéig) .desc = Kék fény csökkentése melegebb színekkel orientation = Tájolás .standard = Normál - .rotate-90 = Elforgatás 90°-kal - .rotate-180 = Elforgatás 180°-kal - .rotate-270 = Elforgatás 270°-kal + .rotate-90 = 90 fokos elforgatás + .rotate-180 = 180 fokos elforgatás + .rotate-270 = 270 fokos elforgatás vrr = Változó frissítési gyakoriság .enabled = Engedélyezve .force = Mindig @@ -504,11 +489,11 @@ battery = Akkumulátor [one] nap *[other] nap } - .less-than-minute = Kevesebb mint egy perc + .less-than-minute = Kevesebb, mint egy perc .and = és .remaining-time = { $time } { $action -> - [full] a teljes feltöltésig + [full] a teljes töltöttségig *[other] a lemerülésig } connected-devices = Csatlakoztatott eszközök @@ -561,24 +546,8 @@ keyboard-sources = Bemeneti források keyboard-special-char = Speciális karakter beírása .alternate = Alternatív karakterek billentyűje .compose = Kombináló billentyű - .compose-desc = A kombináló billentyű lehetővé teszi számos karakter bevitelét. Használatához nyomd meg a billentyűt, majd gépeld be a karakterek sorozatát. Például a kombináló billentyű, majd „C” és „o” lenyomásával a „©” jelet kapod, míg „a” és „‘” után „á” jelenik meg. + .compose-desc = A kombináló billentyű lehetővé teszi számos karakter bevitelét. Használatához nyomd meg a billentyűt, majd gépeld be a karakterek sorozatát. Például a kombináló billentyű, majd C és o lenyomásával a © jelet kapod, míg a és ‘ után á jelenik meg. .caps = Caps Lock billentyű - .ctrl = Ctrl - .ctrl-right = Jobb Ctrl - .swap-with-ctrl = Felcserélés a Ctrl billentyűvel - .alt = Alt - .alt-left = Bal Alt - .alt-right = Jobb Alt - .super = Super - .super-left = Bal Super - .super-right = Jobb Super - .menu = Menü billentyű - .backspace = Backspace - .escape = Esc - .swap-with-escape = Felcserélés az Esc billentyűvel - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = Nincs keyboard-typing-assist = Gépelés .repeat-rate = Ismétlési sebesség .repeat-delay = Ismétlési késleltetés @@ -617,7 +586,7 @@ replace = Csere shortcut-name = Gyorsbillentyű neve system-controls = Rendszervezérlés terminate = Befejezés -toggle-stacking = Ablakok egymásra helyezése be/ki +toggle-stacking = Az ablakok egymásra helyezésének be- és kikapcsolása type-key-combination = Billentyűkombináció custom-shortcuts = Egyéni gyorsbillentyűk .add = Gyorsbillentyű hozzáadása @@ -654,7 +623,7 @@ manage-windows = Ablakok kezelése .minimize = Ablak minimalizálása .resize-inwards = Ablak átméretezése befelé .resize-outwards = Ablak átméretezése kifelé - .toggle-sticky = Ragadós ablak be/ki + .toggle-sticky = Ragadós ablak be- és kikapcsolása move-windows = Ablakok mozgatása .direction = Ablakok mozgatása { $direction -> @@ -681,15 +650,15 @@ move-windows = Ablakok mozgatása .prev-workspace = Ablak áthelyezése az előző munkaterületre .next-workspace = Ablak áthelyezése a következő munkaterületre .last-workspace = Ablak áthelyezése az utolsó munkaterületre - .next-display = Ablak áthelyezése a következő kijelzőre - .prev-display = Ablak áthelyezése az előző kijelzőre + .next-display = Ablak áthelyezése a következő monitorra + .prev-display = Ablak áthelyezése az előző monitorra .send-to-prev-workspace = Ablak áthelyezése az előző munkaterületre .send-to-next-workspace = Ablak áthelyezése a következő munkaterületre system-shortcut = Rendszer .app-library = Alkalmazáskönyvtár megnyitása .brightness-down = Kijelző fényerejének csökkentése .brightness-up = Kijelző fényerejének növelése - .display-toggle = Belső kijelző be/ki + .display-toggle = Belső kijelző be- vagy kikapcsolása .home-folder = Saját mappa megnyitása .keyboard-brightness-down = Billentyűzet fényerejének csökkentése .keyboard-brightness-up = Billentyűzet fényerejének növelése @@ -705,20 +674,20 @@ system-shortcut = Rendszer .screenshot = Képernyőkép készítése .suspend = Felfüggesztés .terminal = Terminál megnyitása - .touchpad-toggle = Érintőpárna be/ki + .touchpad-toggle = Érintőpárna be- vagy kikapcsolása .volume-lower = Hangkimenet hangerejének csökkentése .volume-raise = Hangkimenet hangerejének növelése - .web-browser = Webböngésző megnyitása + .web-browser = Böngésző megnyitása .window-switcher = Váltás a nyitott ablakok között .window-switcher-previous = Váltás a nyitott ablakok között fordított sorrendben .workspace-overview = Munkaterület áttekintésének megnyitása window-tiling = Ablakcsempézés .horizontal = Vízszintes tájolás beállítása .vertical = Függőleges tájolás beállítása - .swap-window = Ablakok felcserélése - .toggle-tiling = Ablakcsempézés be/ki - .toggle-stacking = Ablakok egymásra helyezése be/ki - .toggle-floating = Ablakok lebegtetése be/ki + .swap-window = Ablak felcserélése + .toggle-tiling = Az ablakok csempézésének be- és kikapcsolása + .toggle-stacking = Az ablakok egymásra helyezésének be- és kikapcsolása + .toggle-floating = Az ablakok lebegtetésének be- és kikapcsolása .toggle-orientation = Tájolás váltása replace-shortcut-dialog = Lecseréled a billentyűt? .desc = A(z) { $shortcut } billentyűt a(z) { $name } használja. Ha lecseréled, a(z) { $name } le lesz tiltva. @@ -728,20 +697,20 @@ zoom-out = Kicsinyítés ## Input: Mouse mouse = Egér - .speed = Egérsebesség + .speed = Egér sebessége .acceleration = Egérgyorsítás engedélyezése ## Input: Touchpad click-behavior = Kattintási viselkedés .click-finger = Másodlagos kattintás két ujjal és középső kattintás három ujjal - .button-areas = Másodlagos kattintás a jobb alsó sarokban és középső kattintás alul középen + .button-areas = Másodlagos kattintás a jobb alsó sarokban, középső kattintás az alsó középső sarokban pinch-to-zoom = Csippentéses nagyítás - .desc = Két ujjal belenagyíthatsz a tartalomba azokban az alkalmazásokban, amelyek támogatják a nagyítást + .desc = Két ujjal belenagyíthatsz a tartalomba azokban az alkalmazásokban, amik támogatják a nagyítást tap-to-click = Koppintás a kattintáshoz - .desc = Engedélyezi az egyujjas koppintást az elsődleges kattintáshoz, a kétujjas koppintást a másodlagos kattintáshoz és a háromujjas koppintást a középső kattintáshoz + .desc = Engedélyezi az egyujjas koppintást az elsődleges kattintáshoz, a kétujjas koppintást a másodlagos kattintáshoz és a háromujjas érintést a középső kattintáshoz touchpad = Érintőpárna - .acceleration = Az érintőpárna gyorsításának engedélyezése + .acceleration = Az Érintőpárna gyorsításának engedélyezése .speed = Érintőpárna sebessége ## Input: Gestures @@ -799,7 +768,7 @@ applications = Alkalmazások ## Applications: Default Applications default-apps = Alapértelmezett alkalmazások - .web-browser = Webböngésző + .web-browser = Böngésző .file-manager = Fájlkezelő .mail-client = Levelezőprogram .music = Zene @@ -817,27 +786,27 @@ startup-apps = Indítási alkalmazások .add = Alkalmazás hozzáadása .user = Bejelentkezéskor indított alkalmazások .none = Nincs indítási alkalmazás hozzáadva - .remove-dialog-title = Eltávolítod a(z) { $name } alkalmazást? + .remove-dialog-title = { $name } eltávolítása? .remove-dialog-description = Eltávolítod ezt az indítási alkalmazást? .add-startup-app = Indítási alkalmazás hozzáadása ## Applications: Legacy Applications -legacy-applications = X11-alkalmazások támogatása -legacy-app-global-shortcuts = Globális gyorsbillentyűk X11-alkalmazásokban - .desc = A globális gyorsbillentyűk lehetővé teszik, hogy az alkalmazásokban a billentyűleütéseket és egérkattintásokat más alkalmazások is felismerjék, például a „push-to-talk” vagy a „push-to-mute” funkciókhoz. Alapértelmezés szerint a globális gyorsbillentyűk az X11-alkalmazásokban le van tiltva, hogy más alkalmazások ne figyelhessék a billentyű- és egéreseményeket, amelyek érzékeny információkat tartalmazhatnak. +legacy-applications = X11 alkalmazások támogatása +legacy-app-global-shortcuts = Globális gyorsbillentyűk X11 alkalmazásokban + .desc = A globális gyorsbillentyűk lehetővé teszik, hogy az alkalmazásokban a billentyűleütéseket és egérkattintásokat más alkalmazások is felismerjék, például a „push-to-talk” vagy a „push-to-mute” funkciókhoz. Alapértelmezés szerint a globális gyorsbillentyűk az X11 alkalmazásokban le van tiltva, hogy más alkalmazások ne figyelhessék a billentyű- és egéreseményeket, amelyek érzékeny információkat tartalmazhatnak. .none = Nincs billentyű .modifiers = Módosítók (Super, Shift, Control, Alt) .combination = Minden billentyű, miközben a Super, Control vagy Alt módosítók lenyomva vannak .all = Minden billentyű - .mouse = Egérgomb-események X11-alkalmazásokban -legacy-app-scaling = X11-alkalmazások méretezése + .mouse = Egérgomb-események X11 alkalmazásokban +legacy-app-scaling = X11-ablakrendszer alkalmazásméretezés .scaled-gaming = Optimalizálás játékokra és teljes képernyős alkalmazásokra - .gaming-description = Az X11-alkalmazások kicsit nagyobbnak/kisebbnek tűnhetnek a Wayland-alkalmazásokhoz képest + .gaming-description = Az X11 alkalmazások kicsit nagyobbnak/kisebbnek tűnhetnek a Wayland alkalmazásokhoz képest .scaled-applications = Optimalizálás alkalmazásokra - .applications-description = A játékok és a teljes képernyős X11-alkalmazások felbontása eltérhet a kijelző natív felbontásától + .applications-description = A játékok és a teljes képernyős X11 alkalmazások felbontása eltérhet a kijelző natív felbontásától .scaled-compatibility = Maximális kompatibilitási mód - .compatibility-description = Az X11-alkalmazások elmosódottan jelenhetnek meg HiDPI képernyőkön + .compatibility-description = Az X11 alkalmazások elmosódottan jelenhetnek meg HiDPI képernyőkön .preferred-display = Preferált kijelző játékokhoz és teljes képernyős X11-alkalmazásokhoz .no-display = Nincs @@ -848,7 +817,7 @@ system = Rendszer és fiókok ## System: About about = Rendszerinformáció -about-device = Eszköznév +about-device = Eszköz neve .desc = Ez a név más hálózati vagy Bluetooth-eszközök számára látható about-hardware = Hardver .model = Hardvermodell @@ -858,8 +827,8 @@ about-hardware = Hardver .disk-capacity = Tárhely about-os = Operációs rendszer .os = Operációs rendszer - .os-architecture = Operációs rendszer architektúrája - .kernel = Kernelverzió + .os-architecture = Operációs rendszer architektúra + .kernel = Kernel verzió .desktop-environment = Asztali környezet .windowing-system = Ablakrendszer about-related = Kapcsolódó beállítások @@ -889,7 +858,7 @@ amplification = Erősítés qr-code-unavailable = Nem érhető el a QR-kód network-name = Hálózat neve share = Hálózat megosztása -scan-to-connect-description = Olvasd be a QR-kódot a hálózathoz való kapcsolódáshoz. +scan-to-connect-description = Olvasd be a QR-kódot a hálózathoz való csatlakozáshoz. place-here = Helyezd ide a kisalkalmazásokat sound-device-port-unplugged = Nincs csatlakoztatva sound-hd-audio = HD-hang @@ -915,7 +884,7 @@ xdg-entry-panel-keywords = COSMIC;Panel;Kisalkalmazás; xdg-entry-time-language-comment = Rendszerdátum, idő, régió és a nyelv kezelése xdg-entry-desktop-keywords = COSMIC;Asztal; xdg-entry-system-keywords = COSMIC;Rendszer;Információk;Fiókok;Firmware; -xdg-entry-about-keywords = COSMIC;Névjegy; +xdg-entry-about-keywords = COSMIC;Névjegy xdg-entry-panel = Panel xdg-entry-a11y-keywords = COSMIC;Akadálymentesség;Képernyő;Olvasó;Nagyító;Kontraszt;Szín; xdg-entry-date-time-keywords = COSMIC;Idő;Zóna; @@ -938,16 +907,10 @@ xdg-entry-x11-applications-keywords = COSMIC;X11;Alkalmazás;Játék;Támogatás xdg-entry-touchpad-keywords = COSMIC;Érintőpárna;Mozdulat; xdg-entry-wireless-keywords = COSMIC;WiFi;Wi-Fi;Hálózat;Kapcsolat; xdg-entry-wireless = Wi-Fi -xdg-entry-workspaces-keywords = COSMIC;Munkaterület;Tájolás;Áttekintés;Monitor;Kijelző;Képernyő; +xdg-entry-workspaces-keywords = COSMIC;Munkaterület;Tájolás;Áttekintés;Monitor; xdg-entry-wallpaper-keywords = COSMIC;Háttérkép;Háttér;Diavetítés; xdg-entry-users-keywords = COSMIC;Felhasználó;Fiók; xdg-entry-vpn-keywords = COSMIC;VPN;Hálózat;Kapcsolat;OpenVPN;OpenConnect; xdg-entry-comment = Beállításalkalmazás a COSMIC asztalhoz -xdg-entry-window-management-keywords = COSMIC;Ablak;Kezelés;Csempézés;Super;Billentyű; +xdg-entry-window-management-keywords = COSMIC;Ablak;Kezelés;Csempézés;Super;BIllentyű; no-search-results = Nem található a keresésnek megfelelő hálózat. -workspaces-navigation = Navigáció - .wraparound = Váltás az első és az utolsó munkaterület között gyorsbillentyűkkel és gesztusokkal -bluetooth-display-passkey = Bluetooth-párosítás - .description = Írd be a következő párosítási kulcsot a(z) { $device } eszközön, majd nyomd meg az Enter billentyűt -bluetooth-display-pin = Bluetooth-párosítás - .description = Írd be a következő PIN-kódot a(z) { $device } eszközön, majd nyomd meg az Enter billentyűt diff --git a/i18n/id/cosmic_settings.ftl b/i18n/id/cosmic_settings.ftl index 6ef7fc7..8ae3b70 100644 --- a/i18n/id/cosmic_settings.ftl +++ b/i18n/id/cosmic_settings.ftl @@ -61,8 +61,6 @@ vpn-error = Galat VPN .connect = Gagal menyambungkan ke VPN .connection-editor = Penyunting sambungan gagal .connection-settings = Gagal mendapatkan pengaturan untuk sambungan aktif - .openvpn-config-path = Jalur berkas tidak valid untuk konfig OpenVPN - .openvpn-config-path-desc = Berkas dipilih harus berada di sistem berkas lokal. .updating-state = Gagal memperbarui status pengelola jaringan .wireguard-config-path = Jalur berkas tidak valid untuk konfigurasi WireGuard .wireguard-config-path-desc = Berkas yang dipiih harus di sistem berkas lokal. @@ -229,19 +227,6 @@ style = Gaya .round = Bulat .slightly-round = Sedikit bulat .square = Persegi - .frosted-glass = Kaca es - .frosted-system-interface = Antarmuka sistem - .frosted-system-interface-desc = Menerapkan kaca es ke Peluncur, pustaka aplikasi, ikhtisar ruang kerja, kontrol pada layar - .frosted-windows = Jendela - .frosted-windows-desc = Menerapkan kaca es ke jendela dan dialog - .frosted-panels = Panel - .frosted-panels-desc = Menerapkan kaca es ke panel dan dok - .frosted-applets = Applet - .frosted-applets-desc = Menerapkan kaca es ke menu applet pada panel dan dok - .frosted-thickness = Ketebalan es - .less = lebih - .more = kurang - .glass-opacity = Opasitas kaca interface-density = Kepadatan antarmuka .comfortable = Nyaman .compact = Kompak @@ -304,7 +289,7 @@ super-key = Tindakan tombol super .launcher = Buka Peluncur .workspaces = Buka Ruang Kerja .applications = Buka Aplikasi - .none = Tidak Ada + .disable = Nonaktifkan edge-gravity = Jendela mengapung bergerak ke tepi terdekat window-controls = Kontrol jendela .maximize = Tampilkan tombol maksimalkan @@ -548,22 +533,6 @@ keyboard-special-char = Entri Karakter Spesial .compose = Tombol compose .compose-desc = Tombol compose memungkinkan berbagai macam karakter untuk memasukkan. Untuk menggunakannya, tekan compose dan kemudian serangkaian karakter. Misalnya, tombol compose diikuti dengan C dan o akan memasukkan ©, sedangkan tombol compose diikuti dengan a dan ‘ akan memasukkan á. .caps = Tombol Caps Lock - .ctrl = Control - .ctrl-right = Ctrl Kanan - .swap-with-ctrl = Tukar dengan Control - .alt = Alt - .alt-left = Alt Kiri - .alt-right = Alt Kanan - .super = Super - .super-left = Super Kiri - .super-right = Super Kanan - .menu = Tombol menu - .backspace = Backspace - .escape = Escape - .swap-with-escape = Tukar dengan Escape - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = Tidak ada keyboard-typing-assist = Pengetikan .repeat-rate = Kecepatan pengulangan .repeat-delay = Penundaan pengulangan @@ -849,9 +818,3 @@ xdg-entry-x11-applications = Kompatibilitas Aplikasi X11 xdg-entry-window-management-comment = Tindakan tombol Super, opsi kontrol jendela, dan pengubinan jendela tambahan xdg-entry-wired-comment = Sambungan berkabel dan profil sambungan no-search-results = Tidak ada jaringan yang sesuai pencarian anda. -workspaces-navigation = Navigasi - .wraparound = Pindahkan antara ruang kerja pertama dan terakhir menggunakan pintasan papan ketik dan gerakan -bluetooth-display-passkey = Pemasangan Bluetooth - .description = Silakan ketik kunci sandi berikut pada { $device }, kemudian tekan Enter -bluetooth-display-pin = Pemasangan Bluetooth - .description = Silakan ketik PIN berikut pada { $device }, kemudian tekan Enter diff --git a/i18n/it/cosmic_settings.ftl b/i18n/it/cosmic_settings.ftl index d978a64..b7d4b9a 100644 --- a/i18n/it/cosmic_settings.ftl +++ b/i18n/it/cosmic_settings.ftl @@ -254,6 +254,7 @@ never = Mai ## Desktop: Appearance appearance = Aspetto + .desc = Colore d'accento e tema COSMIC. accent-color = Colore d'accento app-background = Sfondo applicazione o finestra auto = Automatico diff --git a/i18n/kk/cosmic_settings.ftl b/i18n/kk/cosmic_settings.ftl index 651323d..2b58689 100644 --- a/i18n/kk/cosmic_settings.ftl +++ b/i18n/kk/cosmic_settings.ftl @@ -61,8 +61,6 @@ vpn-error = VPN қатесі .connect = VPN-ге қосылу сәтсіз аяқталды .connection-editor = Байланыс редакторының жұмысы сәтсіз аяқталды .connection-settings = Белсенді байланыстар үшін баптауларды алу сәтсіз аяқталды - .openvpn-config-path = OpenVPN баптаулары үшін файлға дейінгі жол жарамсыз - .openvpn-config-path-desc = Таңдалған файл жергілікті файлдық жүйеде болуы тиіс. .updating-state = Желі менеджерінің күйін жаңарту сәтсіз аяқталды .wireguard-config-path = WireGuard конфигурациясы үшін файл жолы жарамсыз .wireguard-config-path-desc = Таңдалған файл жергілікті файлдық жүйеде болуы тиіс. @@ -177,7 +175,7 @@ x-hours = *[other] сағат } never = Ешқашан -appearance = Сыртқы көрініс +appearance = Сыртқы түрі accent-color = Акцент түсі app-background = Терезе фоны auto = Автоматты түрде @@ -185,11 +183,11 @@ close = Жабу color-picker = Түс таңдаушы copied-to-clipboard = Алмасу буферіне көшірілді copy-to-clipboard = Алмасу буферіне көшіру -dark = Қою +dark = Қараңғы export = Экспорттау hex = Он алтылық import = Импорттау -light = Ашық +light = Жарық mode-and-colors = Режим мен түстер recent-colors = Соңғы түстер reset-to-default = Әдепкі күйге қайтару @@ -224,19 +222,6 @@ style = Стиль .round = Дөңгелек .slightly-round = Сәл дөңгелектелген .square = Шаршы - .frosted-glass = Мөлдір емес шыны - .frosted-system-interface = Жүйелік интерфейс - .frosted-system-interface-desc = Мөлдір емес шыны эффектін іске қосқыш, қолданбалар библиотекасы, жұмыс үстелі көрінісі, экрандағы басқару элементтері үшін іске асырады - .frosted-windows = Терезелер - .frosted-windows-desc = Мөлдір емес шыны эффектін терезелер мен сұхбат терезелері үшін іске асырады - .frosted-panels = Панельдер - .frosted-panels-desc = Мөлдір емес шыны эффектін панель мен бекіту панелі (док) үшін іске асырады - .frosted-applets = Апплеттер - .frosted-applets-desc = Мөлдір емес шыны эффектін панель мен доктағы апплеттер мәзірі үшін іске асырады - .frosted-thickness = Мөлдір еместігінің шамасы - .less = азырақ - .more = көбірек - .glass-opacity = Шынының мөлдір еместігі interface-density = Интерфейс тығыздығы .comfortable = Ыңғайлы .compact = Ықшам @@ -296,7 +281,7 @@ super-key = Super пернесінің әрекеті .launcher = Іске қосқышты ашу .workspaces = Жұмыс орындарын ашу .applications = Қолданбаларды ашу - .none = Ешнәрсе + .disable = Сөндіру edge-gravity = Қалқымалы терезелер жақын маңдағы шеттерге тартылады window-controls = Терезе басқару элементтері .maximize = Жазық қылу батырмасын көрсету @@ -468,22 +453,6 @@ keyboard-special-char = Арнайы таңбаларды енгізу .compose = Compose пернесі .compose-desc = Compose пернесі таңбалардың алуан түрін енгізуге мүмкіндік береді. Оны пайдалану үшін, compose пернесін, содан кейін таңбалар тізбегін басыңыз. Мысалы, compose пернесінен кейін C және o басылса, © таңбасы енгізіледі, ал compose пернесінен кейін a және ‘ басылса, á таңбасы енгізіледі. .caps = Caps Lock пернесі - .ctrl = Control - .ctrl-right = Оң жақ Ctrl - .swap-with-ctrl = Control-мен ауыстыру - .alt = Alt - .alt-left = Сол жақ Alt - .alt-right = Оң жақ Alt - .super = Super - .super-left = Сол жақ Super - .super-right = Оң жақSuper - .menu = Menu key - .backspace = Backspace - .escape = Escape - .swap-with-escape = Escape-пен алмастыру - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = Ешнәрсе keyboard-typing-assist = Теру .repeat-rate = Қайталау жиілігі .repeat-delay = Қайталау кідірісі @@ -849,9 +818,3 @@ xdg-entry-x11-applications = X11 қолданбаларының үйлесімд xdg-entry-window-management-comment = Super пернесінің әрекеті, терезелерді басқару опциялары және терезелерді қатар қоюдың қосымша опциялары xdg-entry-wired-comment = Сымды қосылымдар және қосылымдар профильдері no-search-results = Сіздің іздеуіңізге ешбір желі сәйкес келмейді. -workspaces-navigation = Навигация - .wraparound = Бірінші және соңғы жұмыс орындары арасында пернетақта жарлықтары мен ым қимылдар арқылы ауысу -bluetooth-display-passkey = Bluetooth жұптау - .description = { $device } құрылғысында келесі кілттік кодты енгізіңіз, одан кейін Enter басыңыз -bluetooth-display-pin = Bluetooth жұптау - .description = { $device } құрылғысында келесі PIN кодты енгізіңіз, одан кейін Enter басыңыз diff --git a/i18n/kmr/cosmic_settings.ftl b/i18n/kmr/cosmic_settings.ftl index fa9ba50..e69de29 100644 --- a/i18n/kmr/cosmic_settings.ftl +++ b/i18n/kmr/cosmic_settings.ftl @@ -1,857 +0,0 @@ -save = Tomar bike -cancel = Têk bibe -close = Bigire -password = Borînpeyv -forget-dialog = Ev tora Wi-Fi ji bîr bike? - .description = Ji bo ku tu di pêşerojê de vê tora Wi-Fi bikar bînî, divê tu dîsa borînpeyvekê binivîsî. -remove = Rake -import = Têxîne -export = Derxîne -username = Navê bikarhêner -light = Ronî -identity = Nasname -applets = Sepanok -password-confirm = Borînpeyvê biperjîne -dark = Tarî -confirm = Bipejirîne -settings = Sazkarî -replace = Biguhêrîne -add = Tevlî bike -appearance = Xuyang -panel = Destgeh -connect = Girê bide -unknown = Nenas -connected = Hat girêdan -panel-left = Çep -super-key = Çalakiya bişkoka Super - .launcher = Destpêkerê veke - .workspaces = Qadên xebatê veke - .applications = Sepanan veke - .none = Ne yek -x-minutes = - { $number } { $number -> - [one] xulek - *[other] xulek - } -vrr = Rêjeya nûkirina guhêrbar - .enabled = Çalak e - .force = Her dem - .auto = Xweber - .disabled = Neçalak e -window-hint-accent = Rengê nîşana çarçoveya çalak -fit-to-screen = Li gorî dîmenderê tije bike -control-tint = Rengkirina hêmanên kontrolê - .desc = Ji bo paşrûyê bişkokên standard, ketanên lêgerînê, ketanên nivîsê û hêmanên wekhev tê bikaranîn -toggle-stacking = Komkirina çarçoveyê biguhêrîne -panel-top = Jor -no-applets-found = Tu sepanok nehatin dîtin... -region = Herêm -zoom-in = Nêzîk bike -place-here = Sepanokan li vir bi cih bike --requires-restart = Pêdivî bi jinûve despêkirinê heye -workspaces-orientation = Arasteya qadên xebatê - .vertical = Stûnî - .horizontal = Asoyî -acceleration-desc = Hestiyariya şopandinê li gorî lezê xweber diguhêrîne -all-displays = Hemû dîmender -scheduling = Demsazkirin - .manual = Demsazkirina destî -frosted = Bandora cama qeşa li ser navrûya pergalê - .desc = Li ser destgeh, bender, sepanok, destpêker û pirtûkxaneya sepanan bandora mijîkirina paşrûyê disepîne -about-hardware = Reqalav - .model = Modêla reqalavê - .memory = Bîrdank - .processor = Pêvajoker - .graphics = Grafîk - .disk-capacity = Kapasîteya dîskê -short = Kurt -vpn = VPN - .connections = Girêdanên VPNê - .error = Tevlîkirina rêkxistinê VPNê têk çû - .remove = Profîla girêdanê rake - .select-file = Peleke rêkxistinê VPNê hilbijêre -power-mode = Awaya hêzê - .battery = Jiyana betariyê dirêj bike - .battery-desc = Bikaranîna hêzê kêmkirî û performansa bêdeng - .balanced = Hevseng - .balanced-desc = Performansa bêdeng û bikaranîna hêzê navîn - .performance = Performansa bilind - .performance-desc = Performansa bilind û bikaranîna hêzê - .no-backend = Backend nehat dîtin. system76-power an jî power-profiles-daemon saz bike. -wired = Têlkirî - .adapter = Adaptorê têlkirî { $id } - .connections = Girêdanên têlkirî - .devices = Amûrên têlkirî - .remove = Profîla girêdanê rake -bluetooth-available = Amûrên nêzîk -cable-unplugged = Kebl nehatiye girêdan -color-picker = Hilbijêrê rengan -interface-font = Cûrenivîsa pergalê -default = Berdest -zoom-out = Dûr bixe -hot-corner = Quncika germ - .top-left-corner = Ji bo qadên xebatê quncika çepê ya jorîn çalak bike -keyboard-typing-assist = Nivîsandin - .repeat-rate = Rêjeya dûbarekirinê - .repeat-delay = Derengiya dûbarekirinê -edge-gravity = Çarçoveyên herikbar ber bi qeraxên nêzîk ve tê kişandin -amplification = Bilindkirina dengê - .desc = Mafê dide ku deng heya 150% were bilindkirin -recent-colors = Rengên dawîn -about-os = Pergala xebatê - .os = Pergala xebatê - .os-architecture = Avasaziya pergala xebatê - .kernel = Guhertoya kernelê - .desktop-environment = Hawirdora sermaseyê - .windowing-system = Pergala çarçoveyê -panel-behavior-and-position = Tevger û cih - .autohide = Destgehê xweber veşêre - .dock-autohide = Benderê xweber veşêre - .position = Cihê li ser dîmenderê - .display = Li ser dîmenderê nîşan bide -add-language = Zimên tevlî bike - .context = Zimên tevlî bike -password-mismatch = Borînpeyv û piştrastkirin divê li hev bikin -accessibility = Gihîştin - .vision = Dîtin - .on = Vekirî ye - .off = Girtî ye - .unavailable = Ne pêkan e - .screen-reader = Xwînerê dîmenderê - .high-contrast = Awayê berevajiya bilind - .invert-colors = Rengan berevajî bike - .color-filters = Parzûnên rengan -container-background = Paşrûyê konteynirê - .desc-detail = Rengê paşrûyêa konteynirê ji bo gerandina darika kêlekê, kaşoya alî, gotûbêj û alavokên wekhev tê bikaranîn. Bi berdestî, rengê paşrûya konteynirê xweber ji paşrûyê çarçoveyê tê girtin. - .reset = Vegere awayê xweber - .desc = Ji bo gerandina benda kêlekê, kaşoya alî, gotûbêj û alavokên wekhev tê bikaranîn -primary-button = Bişkoka sereke - .desc = Rêza bişkokên fîzîkî diyar dike - .left = Çep - .right = Rast -sound-alerts = Hişyarî - .volume = Asta dengê hişyariyan - .sound = Dengê hişyariyan -icon-theme = Rûkara îkonan - .desc = Komkeke cûda ya îkonan li ser sepanan disepîne -keyboard-shortcuts = Kurteriyên kilîtdankê - .desc = Kurteriyan nîşan bide û kesane bike -switch-between-windows = Di navbera çarçoveyan de biguhêrîne -sound-usb-audio = Dengê USB -text-tint = Rengkirina nivîsa navrûyê - .desc = Ji bo bidestxistina rengên nivîsa navrûyê ku li ser rûyên cûda berevajiyeke têrker pêşkêş dikin tê bikaranîn -online-accounts = Jimarên serhêl - .desc = Jimar, IMAP û SMTP û têketinên pargîdaniyê tevlî bike -open-workspaces-view = Pêşdîtina qadên xebatê veke -all = Hemû -remove-user = Bikarhêner rake -sound-input = Ketan - .volume = Asta dengê ketanê - .device = Amûra ketanê - .level = Asta ketanê -add-another-keybinding = Kurteriyeke din tevlî bike -copy-to-clipboard = Bo jêgirtankê jê bigire -monospace-font = Cûrenivîsa monospace -experimental-settings = Sazkariyên ezmûnkirî -recent-folders = Peldankên dawîn -color-filter = Cûreyê parzûna rengan - .unknown = Parzûna nenas çalak e - .greyscale = Rengên gewr - .deuteranopia = Kesk/Sor (kêmbûna kesk, Deuteranopia) - .protanopia = Sor/Kesk (kêmbûna sor, Protanopia) - .tritanopia = Şîn/Zer (kêmbûna şîn, Tritanopia) -migrate-workspace = - Qada xebatê bibe derana { $direction -> - *[down] jêr - [left] çep - [right] rast - [up] jor - } -battery = Betarî - .minute = - { $value } { $value -> - [one] xulek - *[other] xulek - } - .hour = - { $value } { $value -> - [one] demjimêr - *[other] demjimêr - } - .day = - { $value } { $value -> - [one] roj - *[other] roj - } - .less-than-minute = Kêmtir ji xulekekê - .and = û - .remaining-time = - { $time } heya { $action -> - [full] tije bibe - *[other] vala - } -search-applets = Sepanokan bigere... -pinch-to-zoom = Ji bo nêzîkbûnê bitikîne - .desc = Ji bo sepanên ku piştgiriya zoomê dikin, du tiliyan bikar bîne da ku nêzî naverokê bibe -wifi = Wi-Fi - .adapter = Adaptorê Wi-Fi { $id } - .forget = Ev tor ji bîr bike -x-hours = - { $number } { $number -> - [one] demjimêr - *[other] demjimêr - } -added = Hate tevlîkirin -input-source-switch = Çavkaniya ketanê zimanê kilîtdankê biguhêrîne -focus-navigation = Gerandina balkişandinê - .focus-follows-cursor = Balkêşî nîşanderê dişopîne - .focus-follows-cursor-delay = Derengiya balkêşiyê nîşanderê dişopîne di mç de - .cursor-follows-focus = Nîşander balkêşiyê dişopîne -full-name = Navê tije -app-background = Paşrûyê çarçoveyê -panel-right = Rast -sound-device-profiles = Profîlên amûrê -keyboard-sources = Çavkaniyên ketanê - .desc = Çavkaniyên ketanê dikarin bi riya bikaranîna kombînasyona kilîtên Super+Space werin guhertin. Ev dikare di sazkariyên kurteriyên kilîtdankê de were kesanekirin. - .move-up = Bilivîne jor - .move-down = Bilivîne jêr - .settings = Sazkarî - .view-layout = Awayê kilîtdankê nîşan bide - .remove = Rake - .add = Çavkaniya ketanê tevlî bike -nav-shortcuts = Gerandin - .prev-output = Balê bikişîne ser derana paş - .next-output = Balê bikişîne ser derana pêş - .last-workspace = Balê bikişîne ser qada xebatê ya dawî - .prev-workspace = Balê bikişîne ser qada xebatê ya paş - .next-workspace = Balê bikişîne ser qada xebatê ya pêş - .focus = - Balkişandina çarçoveyê { $direction -> - *[down] jêr - [in] hundir - [left] çep - [out] derve - [right] rast - [up] jor - } - .output = - Deranê biguhêrîne { $direction -> - *[down] jêr - [left] çep - [right] rast - [up] jor - } - .workspace = Biguhêrîne bo qada xebatê { $num } -hearing = Guhdarîkirin - .mono = Dengê stereo wekî mono bilîze -preferred-languages = Zimanên bijarte - .desc = Rêza zimanan diyar dike ka kîjan ziman ji bo navrûya bikarhêner tê bikaranîn. Guhertin di têketina din de dikevin bandorê. -sound-hd-audio = Dengê HD -network-and-wireless = Tor & Bêtêlî -panel-style = Şêwaz - .anchor-gap = Valahiya di navbera destgeh û qeraxên dîmenderê de - .dock-anchor-gap = Valahiya di navbera bender û qeraxên dîmenderê de - .extend = Destgehê dirêjî qeraxên dîmenderê bike - .dock-extend = Benderê dirêjî qeraxên dîmenderê bike - .appearance = Xuyang - .size = Mezinahî - .background-opacity = Ronahiya paşrûyê -panel-appearance = Xuyang - .match = Li gorî sermaseyê li hev bîne - .light = Ronî - .dark = Tarî -workspaces-multi-behavior = Tevgera pir-dîmender - .span = Dîmender qadên xebatê yên hevpar parve dikin - .separate = Her dîmender xwedî qadên xebatê yên serbixwe ye -replace-shortcut-dialog = Kurteriyê biguherîne? - .desc = { $shortcut } ji aliyê { $name } ve tê bikaranîn. Ku tu wê biguhêrînî, { $name } wê were neçalakkirin. -rgb = RGB -about-device = Navê amûrê - .desc = Ev nav ji bo amûrên din ên torê an Bluetoothê xuya dike -no-vpn = Tu girêdanên VPNê heyî tune ne. -start-segment = Beşa destpêkê -desktop = Sermase -reset-to-default = Vegere rewşa berdest -debug = Debug -enable-export = Rûkara heyî li ser sepanên GNOME disepîne - .desc = Ne hemû amûr piştgiriya guhertina xweber dikin. Sepanên ne-COSMIC dibe ku piştî guhertina rûkarê pêdivî bi jinûvedestpêkirinê bike. -shortcut-name = Navê kurteriyê -style = Şêwaz - .round = Gilover - .slightly-round = Hinekî gilover - .square = Çargoşe - .frosted-glass = Mijbûna camê - .frosted-system-interface = Navrûya pergalê - .frosted-system-interface-desc = Mijbûna camê li ser destpêker, pirtûkxaneya sepanan, pêşdîtina qada xebatê, kontrolên li ser dîmenderê tê sepandin. - .frosted-windows = Çarçove - .frosted-windows-desc = Mijbûna camê li ser çarçove û gotûbêjan tê sepandin. - .frosted-panels = Destgeh - .frosted-panels-desc = Mijbûna camê li ser destgeh û benderê tê sepandin. - .frosted-applets = Sepanok - .frosted-applets-desc = Mijbûna camê li ser menuyên sepanokan, destgeh û benderê tê sepandin. - .frosted-thickness = Qalindiya camê - .less = kêmtir - .more = bêtir - .glass-opacity = Zelalaliya camê -panel-applets = Rêkxistin - .dock-desc = Sepanokên benderê bi rêk bixe - .desc = Sepanokên destgehê bi rêk bixe -qr-code-unavailable = Koda QR ne pêkan e -small = Biçûk -window-tiling = Berhevkirina çarçoveyê - .horizontal = Berhevkirina asoyî saz bike - .vertical = Berhevkirina stûnî saz bike - .swap-window = Berhevkirina biguhêrîne - .toggle-tiling = Berhevkirina çarçoveyê biguhêrîne - .toggle-stacking = Komkirina çarçoveyê biguhêrîne - .toggle-floating = Çarçoveyê herikbar biguhêrîne - .toggle-orientation = Arasteyê biguherîne -change-password = Borînpeyvê biguhêrîne -disable-while-typing = Di dema nivîsandinê de asteng bike -long = Dirêj -copied-to-clipboard = Bo jêgirtankê hate jêgirtin -bluetooth-confirm-pin = PINa Bluetoothê bipejirîne - .description = Tika ye piştrast bike ka PINa jêrîn bi ya ku li ser { $device } xuya dibe re yek e -legacy-app-scaling = Pîvandina sepanên pergala çarçoveyê X11 - .scaled-gaming = Ji bo lîstik û sepanên dîmendera tije baştir bike - .gaming-description = Dibe ku sepanên X11 li gorî sepanên Wayland hinekî mezintir/biçûktir xuya bibin - .scaled-applications = Ji bo sepanan baştir bike - .applications-description = Dibe ku lîstik û sepanên X11 ên dîmendera tije bi çareseriya dîmenderê re nelihevhatî bin - .scaled-compatibility = Awaya lihevhatinê ya herî pir - .compatibility-description = Dibe ku sepanên X11 li ser dîmenderên HiDPI mijok xuya bibin - .preferred-display = Dîmenderê bijarte ji bo lîstik û sepanên X11 ên dîmendera tije - .no-display = Ne yek -night-light = Ronahiya şevê - .auto = Xweber (rojavabûn heya hilatina rojê) - .desc = Bi rengên germ ronahiya şîn kêm bike -custom-shortcuts = Kurteriyên kesane - .add = Kurteriyê tevlî bike - .context = Kurteriya kesane tevlî bike - .none = Tu kurteriyên kesane tune ne -visible-networks = Torên dîtbar -terminate = Biqedîne -window-hint-accent-toggle = Rengê sereke yê rûkarê wekî nîşana çarçoveya çalak bi kar bîne -type-to-search = Ji bo lêgerînê binivîse... -workspaces-behavior = Tevgera qada xebatê - .dynamic = Qadên xebatê yên dînamîk - .dynamic-desc = Qadên xebatê yên vala xweber radike. - .fixed = Jimara guhertî ya qadên xebatê - .fixed-desc = Di pêşdîtinê de qadên xebatê tevlî bike yan jî rake. -wireguard-dialog = Amûra WireGuard tevlî bike - .description = Ji bo rêkxistina WireGuard navekî amûrê hilbijêre. -remove-connection-dialog = Profîla girêdanê rake? - .vpn-description = Ji bo ku tu di pêşerojê de vê torê bi kar bînî, divê tu dîsa borînpeyvekê têxînî. - .wired-description = Ji bo ku tu di pêşerojê de vê profîlê bi kar bînî, divê tu dîsa biafirînî. -click-behavior = Tevgera tikandinê - .click-finger = Tikandinê duyemîn bi du tiliyan û tikandinê navîn bi sê tiliyan - .button-areas = Tikandinê duyemîn li quncika rastê ya jêrîn û tikandinê navîn li navenda jêrîn -move-windows = Çarçoveyan bilivîne - .direction = - Çarçoveyê bilivîne { $direction -> - *[down] jêr - [left] çep - [right] rast - [up] jor - } bilivîne - .display = - Çarçoveyê bilivîne dîmendera din { $direction -> - *[down] jêr - [left] çep - [right] rast - [up] jor - } - .workspace = - Çarçoveyê bilivîne qada xebatê ya din { $direction -> - *[below] jêr - [left] çep - [right] rast - [above] jor - } - .workspace-num = Çarçoveyê bilivîne qada xebatê { $num } - .prev-workspace = Çarçoveyê bilivîne qada xebatê ya paş - .next-workspace = Çarçoveyê bilivîne qada xebatê ya pêş - .last-workspace = Çarçoveyê bilivîne qada xebatê ya dawî - .next-display = Çarçoveyê bilivîne dîmenderê pêş - .prev-display = Çarçoveyê bilivîne dîmenderê paş - .send-to-prev-workspace = Çarçoveyê bilivîne qada xebatê ya paş - .send-to-next-workspace = Çarçoveyê bilivîne qada xebatê ya pêş -switch-workspaces = Qadên xebatê biguhêrîne - .horizontal = Bi çar tiliyan ber bi çepê/rastê ve bikişîne - .vertical = Bi çar tiliyan ber bi jor/jêr ve bikişîne -applications = Sepan -shadow-and-corners = Sî û quncikên çarçoveyê -system-controls = Kontrolên pergalê -auto-switch = Di navbera awayên ronî û tarî de xweber biguhêrîne - .sunrise = Di dema hilatina rojê de derbasî awayê ronî dibe - .sunset = Di dema rojavabûnê de derbasî awayê tarî dibe - .next-sunrise = Di hilatina rojê ya bê de derbasî awayê ronî dibe - .next-sunset = Di rojavabûna bê de derbasî awayê tarî dibe -keyboard-numlock-boot = Numlock - .boot-state = Rewşa dema vêxistinê - .last-boot = Vêxistina dawî - .on = Vekirî ye - .off = Girtî ye - .set = Rewşa Numlock a dema vêxistinê saz bike -about-related = Sazkariyên têkildar - .support = Piştgiriyê werbigire -tap-to-click = Ji bo tikandinê pê lê bike - .desc = Ji bo tikandinê sereke bi yek tilî, ji bo tikandinê duyemîn bi du tilî, û ji bo tikandinê navîn bi sê tilî çalak dike -interface-density = Tîrbûna navrûyê - .comfortable = Hedar - .compact = Pêkhatî - .spacious = Fereh -open-application-library = Pirtûkxaneya sepanê veke -slow = Hêdî -system-shortcut = Pergal - .app-library = Pirtûkxaneya sepanan veke - .brightness-down = Ronahiya dîmenderê kêm bike - .brightness-up = Ronahiya dîmenderê bêtir bike - .display-toggle = Dîmenderê navxweyî biguhêrîne - .home-folder = Peldanka rûpela sereke veke - .keyboard-brightness-down = Ronahiya kilîtdankê kêm bike - .keyboard-brightness-up = Ronahiya kilîtdankê bêtir bike - .launcher = Destpêkerê veke - .log-out = Derkeve - .lock-screen = Dîmenderê kilît bike - .mute = Dengê deranê qut bike - .mute-mic = Dengê ketanê mîkrofonê qut bike - .play-pause = Bilizîne/rawestîne - .play-next = Strana pêş - .play-prev = Strana paş - .poweroff = Vemrîne - .screenshot = Wêneyê dîmenderê bigire - .suspend = Rawestîne - .terminal = Termînalê veke - .touchpad-toggle = Touchpadê biguhêrîne - .volume-lower = Asta dengê ya deran kêm bike - .volume-raise = Asta dengê ya deranê bêtir bike - .web-browser = Gerokeke tevnê veke - .window-switcher = Di navbera çarçoveyên vekirî de biguhêrîne - .window-switcher-previous = Di navbera çarçoveyên vekirî de berevajî biguhêrîne - .workspace-overview = Pêşdîtina qadên xebatê veke -network-name = Navê torê -large = Mezin -scrolling = Şemitandin - .two-finger = Bi du tiliyan bişemtîne - .edge = Bi tilîyekê li ser qeraxê bişemtîne - .speed = Leza şemitandinê - .natural = Şemitandinê xwezayî - .natural-desc = Li şûna nîşandanê, naverokê bişemtîne -auth-dialog = Rastandin pêdivî ye - .vpn-description = Navê bikarhêner û borînpeyva ku ji bo rajekarê VPNê pêdivî ye têxîne. - .wifi-description = Borînpeyv an koda şîfrekirinê têxîne. Tu dikarî her wiha bi riya tikandina bişkoka "WPS" ya li ser routerê jî girê bidî. -add-user = Bikarhêner tevlî bike -enable = Çalak bike -add-image = Wêneyê tevlî bike -migrate-workspace-next = Qada xebatê bibe derana pêş -formatting = Awa - .dates = Dîrok - .time = Dem - .date-and-time = Dîrok & Dem - .numbers = Jimar - .measurement = Pîvan - .paper = Pelik -disabled = Neçalakkirî -add-applet = Sepanokê tevlî bike -show-extended-input-sources = Çavkaniyên ketanê yên dirêjkirî nîşan bide -mode-and-colors = Awa û reng -center-segment = Beşa navîn -panel-missing = Rêkxistina destgehê wenda ye - .desc = Pelê rêkxistinê destgehê ji ber bikaranîna rêkxistin kesane yan jî xerabûna wê wenda ye. - .fix = Bo rewşa berdest ji nû ve saz bike -invalid-username = Navê bikarhêner nederbasdar e -mirroring = Dûbarekirin - .id = Dûbarekirin { $id } - .dont = Dûbarekirinê neke - .mirror = Dûbarekirin { $display } - .project = - Bişîne bo { $display -> - [all] hemû dîmenderan - *[other] { $display } - } - .project-count = - bo { $count } dîmenderên dinbişîne { $count -> - [1] dîmender - *[other] dîmender - } -orientation = Araste - .standard = Standard - .rotate-90 = 90° bizivirîne - .rotate-180 = 180° bizivirîne - .rotate-270 = 270° bizivirîne -auto = Xweber -end-segment = Beşa dawîn -bluetooth-adapters = Adaptorên Bluetoothê -time-format = Awaya dîrok û demê - .twenty-four = Dema 24-demjimêr - .show-seconds = Çirkeyan nîşan bide - .first = Roja yekem a hefteyê - .show-date = Dîrokê di sepanoka demê de nîşan bide - .friday = Înî - .saturday = Şemî - .sunday = Yekşem - .monday = Duşem -accent-color = Rengê sereke -type-key-combination = Kombînasyona kilîtan binivîse -keyboard-special-char = Têketina tîpên taybet - .alternate = Kilîta tîpên alternatîf - .compose = Kilîta taybe - .compose-desc = Kilîta compose mafê dide ku tîpên cûda werin nivîsandin. Ji bo bikaranînê, pêşî compose û paşê rêzek tîpan bitikîne. Bo mînak, kilîta compose li dû C û o wê © binivîse, dema ku kilîta compose li dû a û ‘ wê á binivîse. - .caps = Kilîta Caps Lock - .ctrl = Control - .ctrl-right = Ctrl a rastê - .swap-with-ctrl = Swap û Control - .alt = Alt - .alt-left = Alt a çepê - .alt-right = Alt a rastê - .super = Super - .super-left = Super a çepê - .super-right = Super a rastê - .menu = Kilîta Menu - .backspace = Backspace - .escape = Escape - .swap-with-escape = Swap û Escape - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = Ne yek -manage-windows = Rêveberê çarçoveyan - .close = Çarçoveyê bigire - .maximize = Çarçoveyê mezin bike - .fullscreen = Çarçoveyê dîmendera tije - .minimize = Çarçoveyê biçûk bike - .resize-inwards = Çarçoveyê ber bi hundir veji nû ve mezinahiyê biguhêrîn - .resize-outwards = Çarçoveyê ber bi derve ve ji nû ve mezinahiyê biguhêrîne - .toggle-sticky = Çarçoveyê daliqandî biguhêrîne -never = Tu car -install-additional-languages = Zimanên vebijêrkî saz bike -sound-output = Deran - .volume = Asta dengê deranê - .device = Amûra deranê - .level = Asta deranê - .config = Rêkxistin - .balance = Balans - .left = Çep - .right = Rast -window-controls = Kontrolên çarçoveyan - .maximize = Bişkoka mezinkirinê nîşan bide - .minimize = Bişkoka biçûkkirinê nîşan bide - .active-window-hint = Nîşana çarçoveya çalak nîşan bide -shadows-tiling = Çarçoveyên berhevkirî - .clip = Li gorî quncikên pergalê li hev bîne - .shadow = Sî bisepîne -window-management-appearance = Rêveberê çarçoveyê - .active-hint = Mezinahiya nîşana çarçoveyê çalak - .gaps = Valahiyên li derdora çarçoveyên berhevkirî -migrate-workspace-prev = Qada xebatê bibe derana paş -legacy-app-global-shortcuts = Kurteriyên gerdûnî di sepanên X11 de - .desc = Kurteriyên gerdûnî rê didin ku bûyerên kilîtdank û mişkê yên di sepanekê de, ji bo taybetmendiyên wekî push-to-talk an jî push-to-mute ji aliyê sepanên din ve werin naskirin. Bi awayê berdest, kurteriyên gerdûnî di sepanên X11 de hatine girtin da ku sepanên din nikaribin çalakiyên te yên hestiyar bişopînin. - .none = Tu kilît tune ne - .modifiers = Guherîner (Super, Shift, Control, Alt) - .combination = Hemû kilît dema ku guherînerên Super, Control an Alt tên pêlkirin - .all = Hemû kilît - .mouse = Bûyerên bişkoka mişkê di sepanên X11 de -activate = Çalak bike -power-saving = Vebijêrkên parastina hêzê - .turn-off-screen-after = Dîmenderê vemirîne piştî ... - .auto-suspend = Rawestanina xweber - .auto-suspend-ac = Dema bi keblê hêzê ve were girêdan xweber rawestîne - .auto-suspend-battery = Dema betarî kêm be xweber rawestîne -connected-devices = Amûrên girêdayî - .unknown = Amûra nenas -icons-and-toolkit = Rûkara îkon û amûran -sound-applications = Sepan - .desc = Dengê sepanan û sazkarî -time-zone = Herêma demê - .auto = Herêma dema xweber - .auto-info = Pêdiviya wê bi rajekarên cîh û gihîştina înternetê heye -dialog-add = Tevlî bike -fast = Bilez -add-color = Rengê tevlî bike -shadows-floating = Çarçoveyên herikbar - .clip = Quncikên pergalê bişopîne û sî bisepîne -network-device-state = - .activated = Hate girêdan - .config = Tê girêdan - .deactivating = Tê qutkirin - .disconnected = Qut bû - .failed = Girêdan têk çû - .ip-check = Girêdan tê kontrolkirin - .ip-config = IP û zanyariyên routing tê xwestin - .need-auth = Rastandin pêdivî ye - .prepare = Ji bo girêdanê tê amadekirin - .secondaries = Li benda girêdana duyemîn e - .unavailable = Ne pêkan e - .unknown = Rewşa nenas - .unmanaged = Nehatiye birêvebirin - .unplugged = Kebl nehatiye girêdan -command = Ferman -gestures = Tevger - .four-finger-down = Bi çar tiliyan ber bi jêr ve bikişîne - .four-finger-left = Bi çar tiliyan ber bi çepê ve bikişîne - .four-finger-right = Bi çar tiliyan ber bi rastê ve bikişîne - .four-finger-up = Bi çar tiliyan ber bi jor ve bikişîne - .three-finger-any = Bi sê tiliyan her alî bikişîne -system = Pergal & Jimar -no-networks = Tu tor nehatin dîtin. -open-new-folder = Peldanka nû veke -panel-bottom = Jêr -share = Torê parve bike -fill = Tije bike -custom = Kesane -bluetooth-paired = Amûrên berê hatine girêdan - .connect = Girê bide - .battery = { $percentage }% betarî -dialog = Gotûbêj - .title = Van sazkariyên dîmenderê bihêle? - .keep-changes = Guhertinan bihêle - .change-prompt = Guhertinên sazkariyan wê di { $time } çirek de xweber werin têkbirin. - .revert-settings = Sazkariyan têk bibe -sound-device-port-unplugged = Hatiye qutkirin -navigate = Gerandin -workspaces-overview-thumbnails = Wêneyên piçûk ên pêşdîtina qadê xebatê - .show-number = Jimara qadê xebatê nîşan bide - .show-name = Navê qadê xebatê nîşan bide -color = Reng - .depth = Kûrahiya rengê - .profile = Profîla rengê - .sidebar = Profîlên Rengê - .temperature = Germahiya rengê -hex = Hex -magnifier = Mezinker - .controls = - An van kurteriyan bi kar bîne: { $zoom_in -> - [zero] { "" } - *[other] - { "" } - { $zoom_in } ji bo nêzîk bibe, - }{ $zoom_out -> - [zero] { "" } - *[other] - { "" } - { $zoom_out } ji bo dûr bibe, - } - Super + bi mişka xwe bişemtîne - .scroll_controls = Bi Super + şemitandin, nêzîkbûnê bi mişk an touchpadê çalak bike - .show_overlay = Rûpûşa mezinkerê nîşan bide - .increment = Asta mezinkirinê - .signin = Di dema têketinê de mezinkerê bide destpêkirin - .applet = Mezinkerê li ser destgehê çalak bike/neke - .movement = Dîmena nêzîkirî livandinê nîşan dide - .continuous = Bi mayînde ligel nîşander - .onedge = Dema nîşander digihêje qeraxê - .centered = Ji bo ku nîşanderê li navîn bimîne -colors = Reng -administrator = Rêveber - .desc = Rêveber dikarin sazkariyan ji bo hemû bikarhêneran biguhêrînin, bikarhênerên din tevlî bikin an jî rakin -scan-to-connect-description = Ji bo girêdana bi vê torê ve, koda QRê bixwîne. -modified = { $count } hatiyê guhertin -workspaces-overview = Pêşdîtina qadên xebatê - .action-on-typing = Çalakî di dema nivîsandinê de - .none = Ne yek - .launcher = Destpêkerê veke - .applications = Sepanan veke -xdg-entry-touchpad = Touchpad -time-region = Herêm & Ziman -power = Hêz & Betarî -xdg-entry-wired = Têlkirî -xdg-entry-startup-apps-comment = Sepanên ku di dema têketinê de dixebitin bi rêk bixîne -xdg-entry-region-language = Herêm & Ziman -time-date = Dîrok & Dem - .auto = Xweber saz bike - .auto-ntp = Dîrok û dem wê dema herêma demê were sazkirin, xweber werin rojanekirin -xdg-entry-mouse-keywords = COSMIC;Mişk;Lezbûn;Şemitandin; -xdg-entry-bluetooth-comment = Amûrên Bluetoothê bi rê ve bibe -xdg-entry-notifications-keywords = COSMIC;Agahdarî;Kilîtkirin; -xdg-entry-startup-apps-keywords = COSMIC;Destpêk;Sepan; -xdg-entry-default-apps-comment = Geroka tevnê ya berdest, rajegirê enameyê, geroka pelê, û sepanên din -xdg-entry-keyboard-comment = Çavkaniyên ketanê, guhertin, ketanê tîpên taybet, kurterê -xdg-entry-wired-keywords = COSMIC;Têlkirî;LAN;Tor;Girêdan; -xdg-entry-power = Hêz & Betarî -xdg-entry-appearance-keywords = COSMIC;Reng;Îkon;Cûrenivîs;Rûkar -xdg-entry-mouse = Mişk -xdg-entry-dock-keywords = COSMIC;Bender;Destgeh;Sepanok -bluetooth = Bluetooth - .status = Dema sazkiryên Bluetoothê vekirî bin, ev pergal wekî { $aliases } xuya dibe. - .connected = Hate girêdan - .connecting = Tê girêdan - .disconnecting = Tê qutkirin - .connect = Girê bide - .disconnect = Qut bike - .forget = Ji bîr bike - .dbus-error = Di dema danûstandina bi DBus re şaşetiyek çê bû: { $why } - .disabled = Rajekara Bluetoothê neçalak e - .inactive = Rajekara Bluetoothê ne çalak e - .unknown = Rajekara Bluetoothê nehate çalakkirin. Gelo BlueZ hatiye sazkirin? -xdg-entry-mouse-comment = Leza mişkê, lezbûn û şemitandina xwezayî -xdg-entry-system = Pergal & Jimar -firmware = Firmware -xdg-entry-panel-keywords = COSMIC;Destgeh;Sepanok -xdg-entry-window-management = Rêveberê çarçoveyê -xdg-entry-a11y = Gihîştin -xdg-entry-time-language-comment = Dîroka pergalê, dem, herêm û ziman bi rê ve bibe -xdg-entry-desktop-keywords = COSMIC;Sermase; -default-apps = Sepanên berdest - .web-browser = Geroka tevnê - .file-manager = Rêveberê pelê - .mail-client = Rajigera enameyê - .music = Muzîk - .video = Vîdiyo - .photos = Wêne - .calendar = Salname - .terminal = Termînal - .other-associations = Têkiliyên din - .text-editor = Edîtorê nivîsê - .not-installed = Ne sazkirî ye -xdg-entry-x11-applications-keywords = COSMIC;X11;Sepan;Lîstik;Lihevhatin; -xdg-entry-displays-comment = Sazkariyên rêkxistinê yên dîmenderê bi rê ve bibe -xdg-entry-touchpad-keywords = COSMIC;Touchpad;Tevger; -xdg-entry-time-language = Dem & Ziman -xdg-entry-users = Bikarhêner -window-management = Rêveberê çarçoveyê -xdg-entry-system-keywords = COSMIC;Pergal;Zanyarî;Jimar;Firmware; -xdg-entry-default-apps = Sepanên berdest -xdg-entry-wireless-keywords = COSMIC;WiFi;Wi-Fi;Tor;Girêdan; -xdg-entry-applications-comment = Sepanên kesane, sepanên destpêkê, û sazkariyên lihevhatina sepanên X11 -mouse = Mişk - .speed = Leza mişkê - .acceleration = Lezgîniya mişkê çalak bike -dock = Bender -xdg-entry-about-keywords = COSMIC;Derbar -xdg-entry-panel = Destgeh -xdg-entry-notifications = Agahdarî -display = Dîmender - .arrangement = Bicihkirina dîmenderê - .arrangement-desc = Ji bo ji nû ve bicihkirina dîmenderan bikşîne - .enable = Dîmenderê çalak bike - .external = { $size } { $output } dîmenderê derveyî - .laptop = { $size } dîmenderê laptopê - .options = Vebijêrkên dîmenderê - .refresh-rate = Rêjeya nûkirinê - .resolution = Çareserî - .scale = Pîvan - .additional-scale-options = Vebijêrkên pîvanê yên din -xdg-entry-a11y-keywords = COSMIC;Gihîştin;A11y;Dîmender;Xwîner;Mezinker;Berevajî;Reng; -xdg-entry-wireless-comment = Girêdanên Wi-Fi û profîlên girêdanê -xdg-entry-desktop = Sermase -xdg-entry-date-time-keywords = COSMIC;Dem;Herêm; -xdg-entry-desktop-comment = Wêneya dîwêr, xuyang, destgeh, bender, rêveberê çarçoveyê û sazkairyên qada xebatê -xdg-entry-wallpaper = Wêneya dîwêr -xdg-entry-keyboard = Kilîtdank -xdg-entry-a11y-comment = Xwînerê dîmenderê, mezinker, berevajiya bilind, û parzûnên rengan -xdg-entry-displays = Dîmender -xdg-entry-network = Tor & Bêtêlî -sound = Deng -xdg-entry-date-time = Dîrok & Dem -notifications = Agahdarî -xdg-entry-users-comment = Rastandin û jimarên bikarhêner -startup-apps = Sepanên destpêkê - .add = Sepan tevlî bike - .user = Sepanên ku dema tu têdikevî pergala dixebitin - .none = Tu sepanên destpêkê nehatin tevlîkirin - .remove-dialog-title = { $name } rake? - .remove-dialog-description = Ev sepana destpêkê rake? - .add-startup-app = Sepana destpêkê tevlî bike -xdg-entry-input-comment = Sazkariyên kilîtdankê û mişkê -xdg-entry-bluetooth-keywords = COSMIC;Bluetooth; -about = Derbar -input-devices = Amûrên ketanê -xdg-entry-dock-comment = Bendeke vebijêrkî ji bo sepan û sepanokan -xdg-entry-network-keywords = COSMIC;Tor;Bêtêlî;WiFi;VPN; -xdg-entry-wallpaper-comment = Wêneyên dîwêr, reng û vebijêrkên pêşandana wêneyan -xdg-entry-dock = Bender -xdg-entry-startup-apps = Sepanên destpêkê -workspaces = Qadên xebatê -xdg-entry-wireless = Wi-Fi -xdg-entry-workspaces-keywords = COSMIC;Qada xebatê;Araste;Pêşdîtin;Dîmender; -xdg-entry-system-comment = Zanyariyên pergalê, jimar û rojanekirinên firmwareyê -xdg-entry-x11-applications-comment = Pîvandina sepanên pergala çarçoveya X11, dîmenderê sereke û kurteriyên gerdûnî -xdg-entry-region-language-comment = Li gorî herêma xwe dîrok, dem û jimaran saz bike -xdg-entry-wallpaper-keywords = COSMIC;Wêneya dîwêr;Paşrû;Pêşandan; -xdg-entry-users-keywords = COSMIC;Bikarhêner;Jimar; -xdg-entry-about-comment = Navê amûrê, zanyariyên reqalavê, sazkariyên kesane yên pergala xebitandinê -xdg-entry-vpn-keywords = COSMIC;VPN;Tor;Girêdan;OpenVPN;OpenConnect; -users = Bikarhêner - .admin = Rêveber - .standard = Standard - .profile-add = Wêneyê profîlê hilbijêre -xdg-entry-appearance-comment = Rengên taybet û rûkar -xdg-entry-time-language-keywords = COSMIC;Pergal;Dem;Dîrok;Herêm;Ziman; -xdg-entry-input-keywords = COSMIC;Ketan;Kilîtdank;Mişk; -xdg-entry-comment = Sepana sazkariyan ji bo sermaseya COSMIC -xdg-entry-notifications-comment = Sazkariyên rawestandina balkêşiyê, agahdariyên dîmendera kilîtê û sazkariyên taybetî yên sepanan -xdg-entry-applications = Sepan -xdg-entry-sound-keywords = COSMIC;Deng;Deng;Hişyarî;Pipewire; -xdg-entry-power-keywords = COSMIC;Hêz;Betarî -legacy-applications = Lihevhatina sepanên X11 -xdg-entry-default-apps-keywords = COSMIC;Berdest;Sepan -xdg-entry-keywords = COSMIC;Sazkarî; -xdg-entry-region-language-keywords = COSMIC;Herêm;Ziman;Dîrok;Awa;Dem;Sazkariyên herêmî;Herêmîkirin; -xdg-entry-about = Derbar -xdg-entry-input = Amûrên ketanê -xdg-entry-applications-keywords = COSMIC;Berdest;Sepan;Destpêk;X11;Lihevhatin -xdg-entry-sound-comment = Sazkariyên dengê yên ji bo amûr, hişyarî û sepanan -wallpaper = Wêneya dîwêr - .change = Wêneyê biguhêrîne her - .fit = Lihevhatîna wêneyê - .folder-dialog = Peldanka wêneyên dîwêr hilbijêre - .image-dialog = Wêneya dîwêr hilbijêre - .plural = Wêneyên dîwêr - .same = Li ser hemû dîmenderan heman wêneya dîwêr - .slide = Pêşandana wêneyan -xdg-entry-touchpad-comment = Leza touchpadê, vebijêrkên tikandinê û tevger -xdg-entry-keyboard-keywords = COSMIC;Kilîtdank;Ketan;Çavkanî;Kurterê; -xdg-entry-vpn-comment = Girêdanên VPN û profîlên girêdanê -keyboard = Kilîtdank -xdg-entry-appearance = Xuyang -xdg-entry-window-management-keywords = COSMIC;Çarçove;Rêveberî;Berhevkirin;Super;Kilît; -xdg-entry-workspaces-comment = Arasteya qada xebatê, pêşdîtin û tevgerên pir-dîmender -xdg-entry-network-comment = Girêdanên torê bi rê ve bibe -xdg-entry-panel-comment = Benda pergalê sereke ya ji bo menu û sepanokan -touchpad = Touchpad - .acceleration = Lezgîniya touchpadê çalak bike - .speed = Leza touchpadê -xdg-entry-sound = Deng -xdg-entry-power-comment = Awayên hêzê û vebijêrkên parastina hêzê -xdg-entry-displays-keywords = COSMIC;Dîmender; -time = Dem & Ziman -xdg-entry-workspaces = Qadên xebatê -xdg-entry-date-time-comment = Herêma demê, sazkariyên demjimêra xweber û awaya demê -xdg-entry-x11-applications = Lihevhatina sepanên X11 -xdg-entry-window-management-comment = Çalakiya bişkoka Super, vebijêrkên kontrolkirina çarçoveyan û vebijêrkên din ên berhevkirina çarçoveyan -xdg-entry-wired-comment = Girêdanên têlkirî û profîlên girêdanê -app = Sazkariyên COSMIC -dbus-connection-error = Girêdana bi DBus re têk çû -known-networks = Torên naskirî -connecting = Tê girêdan… -disconnect = Qut bike -ok = Baş e -number = { $number } -add-vpn = VPNê tevlî bike -airplane-on = Awaya balafirê vekirî ye. -forget = Ji bîr bike -add-network = Torê tevlî bike - .profile = Profîlê tevlî bike -vpn-error = Şaşetiya VPN - .config = Tevlîkirina rêkxistinê VPNê têk çû - .connect = Girêdana bi VPNê re têk çû - .connection-editor = Edîtorê girêdanê têk çû - .connection-settings = Sazkariyên ji bo girêdanên çalak nehatin standin - .openvpn-config-path = Rêgeha pelê OpenVPNê nederbasdar e - .openvpn-config-path-desc = Pela hilbijartî divê li ser pergala pelan a xwecihî be. - .updating-state = Rewşa rêveberiyê torê nehat rojanekirin - .wireguard-config-path = Rêgeha pelê WireGuard nederbasdar e - .wireguard-config-path-desc = Pela hilbijartî divê li ser pergala pelan a xwecihî be. - .wireguard-device = Amûra WireGuard nehate afirandin - .with-password = - VPN nehate sazkirin { $field -> - *[username] navê bikarhêner - [password] borînpeyv - [password-flags] alên-borînpeyvê - } bi nmcli re -bluetooth-display-passkey = Cotkirina Bluetoothê - .description = Tika ye kilîta borandinê ya jêrîn li ser { $device } binivîse, paşê Enterê bitikîne -bluetooth-display-pin = Cotkirina Bluetoothê - .description = Tika ye PINa jêrîn li ser { $device } binivîse, paşê Enterê bitikîne -workspaces-navigation = Gerandin - .wraparound = Di navbera yekem û dawîn qadê xebatê de digere bi riya bikaranîna kurteriyên kilîtdankê û tevgeran -no-search-results = Tu tor li lêgerînên te li hev nakin . diff --git a/i18n/ko/cosmic_settings.ftl b/i18n/ko/cosmic_settings.ftl index 41694bd..77d04a2 100644 --- a/i18n/ko/cosmic_settings.ftl +++ b/i18n/ko/cosmic_settings.ftl @@ -764,22 +764,3 @@ xdg-entry-workspaces = 작업 공간 xdg-entry-date-time-comment = 시간대와 자동 시계 설정 및 시간 형식 xdg-entry-x11-applications = X11 앱 호환성 xdg-entry-wired-comment = 유선 연결 및 연결 프로필 -xdg-entry-touchpad = 터치패드 -xdg-entry-startup-apps-comment = 로그인 시 실행할 앱 설정 -xdg-entry-region-language = 지역 & 언어 -xdg-entry-startup-apps-keywords = COSMIC;시작;앱; -xdg-entry-system = 시스템 & 계정 -xdg-entry-time-language-comment = 시스템 날짜와 시간, 지역 및 언어 관리 -xdg-entry-touchpad-keywords = COSMIC;터치패드;제스처; -xdg-entry-time-language = 시간 & 언어 -xdg-entry-users = 사용자 -xdg-entry-system-keywords = COSMIC;시스템;정보;계정;펌웨어; -xdg-entry-users-comment = 인증 및 사용자 계정 -xdg-entry-startup-apps = 시작 앱 -xdg-entry-system-comment = 시스템 정보와 계정 및 펌웨어 업데이트 -xdg-entry-region-language-comment = 지역에 기반한 날짜와 시간 및 숫자 형식 -xdg-entry-time-language-keywords = COSMIC;시스템;시간;날짜;지역;언어; -xdg-entry-sound-keywords = COSMIC;소리;오디오;알림;Pipewire; -xdg-entry-sound = 소리 -xdg-entry-touchpad-comment = 터치패드 속도와 클릭 옵션 및 제스처 -xdg-entry-wallpaper-comment = 바탕화면 이미지와 색상 및 슬라이드 쇼 옵션 diff --git a/i18n/lo/cosmic_settings.ftl b/i18n/lo/cosmic_settings.ftl deleted file mode 100644 index e69de29..0000000 diff --git a/i18n/lt/cosmic_settings.ftl b/i18n/lt/cosmic_settings.ftl index 54ce4a1..880dc9f 100644 --- a/i18n/lt/cosmic_settings.ftl +++ b/i18n/lt/cosmic_settings.ftl @@ -1,9 +1,9 @@ time-region = Regionas ir kalba panel-left = Kairė super-key = Super klavišo veiksmas - .launcher = Atverti programų leistuką + .launcher = Atidaryti aplikacijų paleidėją .workspaces = Atidaryti darbo sritis - .applications = Atidaryti programą + .applications = Atidaryti aplikaciją .disable = Neaktyvus x-minutes = { $number } { $number -> @@ -28,10 +28,8 @@ save = Išsaugoti vpn-error = VPN klaida .config = Nepavyko pridėti VPN konfigūracijos .connect = Nepavyko prisijungti prie VPN - .connection-editor = Ryšio rengyklės triktis - .connection-settings = Nepavyko gauti veikiančių ryšių nuostatų - .openvpn-config-path = Neteisingas OpenVPN konfigūracinio failo kelias - .openvpn-config-path-desc = Pasirinktas failas turi egzistuoti lokalioje failų sistemoje. + .connection-editor = Prisijungimo redaguoklės problema + .connection-settings = Nepavyko gauti aktyvaus prisijungimo nustatymų .updating-state = Nepavyko atnaujinti tinklo valdytojo būsenos .wireguard-config-path = Klaidingas WireGuard nustatymų failo kelio vardas .wireguard-config-path-desc = Pasirinktas failas turi būti lokalioje failų sistemoje. @@ -48,7 +46,7 @@ no-applets-found = Apletų nerasta... region = Regionas zoom-in = Priartinti place-here = Padėti apletą čia --requires-restart = Reikia paleisti iš naujo +-requires-restart = Reikalingas paleidimas iš naujo workspaces-orientation = Darbo sričių orientacija .vertical = Vertikali .horizontal = Horizontali @@ -57,7 +55,7 @@ all-displays = Visi ekranai scheduling = Planavimas .manual = Rankininis planavimas frosted = Apšalusio stiklo efektas sistemos komponentuose - .desc = Taikomas fono suliejimas skydelyje, doke, apletuose, programų paleidyklėje ir programų bibliotekoje + .desc = Taikomas fono suliejimas panelėje, aplikacijos doke, apletuose, programų paleidyklėje ir aplikacijų bibliotekoje password = Slaptažodis about-hardware = Aparatinė įranga .model = Modelis @@ -68,9 +66,9 @@ about-hardware = Aparatinė įranga short = Trumpas vpn = VPN .connections = VPN prisijungimai - .error = Nepavyko pridėti VPN nuostatų + .error = Nepavyko pridėti VPN nustatymų .remove = Pašalinti prisijungimo profilį - .select-file = Pasirinkti VPN konfigūracijos failą + .select-file = Pasirinkti VPN konfigūracinė failą power-mode = Maitinimo režimas .battery = Ilgesnis baterijos veikimo laikas .battery-desc = Mažesnis energijos suvartojimas ir tylus veikimas @@ -85,7 +83,7 @@ wired = Laidinis .devices = Laidiniai įrenginiai .remove = Pašalinti ryšio profilį bluetooth-available = Įrenginiai netoliese -cable-unplugged = Kabelis atjungtas +cable-unplugged = Kabelis neprijungtas color-picker = Spalvų pipetė interface-font = Sistemos šriftas forget-dialog = Pamirštį šį Wi-Fi tinklą? @@ -98,19 +96,19 @@ hot-corner = Aktyvusis Kampas (Hot Corner) keyboard-typing-assist = Rašymas .repeat-rate = Pakartojimo dažnis .repeat-delay = Pakartojimo uždelsimas -edge-gravity = Slankūs langai traukiami prie artimiausių kraštų +edge-gravity = Slankių langų trauka prie artimiausių kraštų bluetooth = Bluetooth - .status = Jūsų įrenginys matomas kaip { $aliases }, kol Bluetooth nuostatos bus įjungtos. + .status = Jūsų įrenginys matomas kaip { $aliases }, kol Bluetooth nustatymai bus įjungti. .connected = Prisijungta .connecting = Jungiamasi .disconnecting = Atsijungiama .connect = Prisijungti .disconnect = Atsijungti .forget = Pamiršti - .dbus-error = Klaida veikiant su DBus: { $why } - .disabled = Bluetooth tarnyba išjungta - .inactive = Bluetooth tarnyba neaktyvi - .unknown = Nepavyksta altyvuoti Bluetooth tarnybos. Ar jūsų įrenginyje įdiegtas BlueZ paketas? + .dbus-error = Įvyko klaida procese su DBus: { $why } + .disabled = Bluetooth funkcionalumas išjungtas + .inactive = Bluetooth functionalumas neaktyvus + .unknown = Bluetooth functionalumas negali būti aktyvuotas. Ar jūsų įrenginys įdiegtas BlueZ paketas? amplification = Stiprinimas .desc = Leidžia padidinti garsumą iki 150% recent-colors = Pastarosios spalvos @@ -121,7 +119,7 @@ about-os = Operacinė sistema .desktop-environment = Darbalaukio aplinka .windowing-system = Langų valdymo sistema panel-behavior-and-position = Elgsena ir pozicija - .autohide = Automatiškai slėpti skydelį + .autohide = Automatiškai slėpti panelę .dock-autohide = Automatiškai slėpti doką .position = Pozicija ekrane .display = Rodyti ekrane @@ -139,9 +137,9 @@ accessibility = Prieinamumas .color-filters = Spalvų filtrai firmware = Programinė aparatinė įranga container-background = Įrankių fono spalva - .desc-detail = Įrankių fono spalva naudojama naršymo šonjuostėse, šoniniame meniu, iššokančiuose languose ir panašiuose komponentuose. Pagal numatytus nustatymus, ši fono spalva automatiškai parenkama pagal lango fono spalvą. + .desc-detail = Įrankių fono spalva naudojama navigavimo šonjuostėse, šoniniame stalčiuje, iššokančiuose languose ir panašiuose komponentuose. Pagal numatytus nustatymus, ši fono spalva automatiškai parenkama pagal lango fono spalvą. .reset = Atstatyti į automatinį - .desc = Naudojama naršymo šonjuostėse, šoniniame meniu, iššokančiuose languose ir panašiuose komponentuose + .desc = Naudojama navigavimo šonjuostėse, šoniniame stalčiuje, iššokančiuose languose ir panašiuose komponentuose primary-button = Pagrindiniai mygtukai .desc = Nustato fizinių mygtukų tvarką .left = Kairė @@ -150,7 +148,7 @@ sound-alerts = Įspėjimai .volume = Įspėjimo garsumas .sound = Įspėjimo garsas icon-theme = Piktogramų tema - .desc = Skirtingų piktogramų rinkinių taikymas programoms + .desc = Skirtingų piktogramų rinkinių taikymas aplikacijoms import = Importuoti keyboard-shortcuts = Klaviatūros spartieji klavišai .desc = Peržiūrėti ir modifikuoti sparčiuosius klavišus @@ -182,7 +180,7 @@ sound-input = Įvestis add-another-keybinding = Pridėti kitą klavišų kombinacija copy-to-clipboard = Kopijuoti į iškarpinę monospace-font = Lygiaplotis šriftas -experimental-settings = Eksperimentinės nuostatos +experimental-settings = Eksperimentiniai nustatymai recent-folders = Pastarieji aplankai color-filter = Spalvų filtrų tipai .unknown = Aktyvus nežinomas filtras @@ -236,10 +234,10 @@ x-hours = } added = Pridėta input-source-switch = Perjungti klaviatūros kalbos įvesties šaltinį -focus-navigation = Aktyvaus lango vairavimas - .focus-follows-cursor = Aktyvuoti langą po žymekliu - .focus-follows-cursor-delay = Delsa ms kol langas po žymekliu bus aktyvuotas - .cursor-follows-focus = Perkelti žymeklį į aktyvų langą +focus-navigation = Navigacija pagal fokusą + .focus-follows-cursor = Fokusas seka žymeklį + .focus-follows-cursor-delay = Fokusas seka žymeklį su atidėjimu (mikrosekundės) + .cursor-follows-focus = Žymeklis seka fokusą full-name = Vardas ir Pavardė app-background = Lango fonas panel-right = Dešinė @@ -285,19 +283,19 @@ preferred-languages = Pageidaujamos kalbos .desc = Kalbų tvarka nulemia, kuri kalba bus naudojama naudotojo sąsajoje. Pakeitimai įsigalios po kito prisijungimo. display = Monitoriai .arrangement = Monitorių išdėstyimas - .arrangement-desc = Perdėstykite monitorius juos vilkdami + .arrangement-desc = Pertvarkite monitorius velkant juos .enable = Įjungti monitorių .external = { $size } { $output } išorinis monitorius .laptop = { $size } nešiojamo kompiuterio monitorius .options = Monitoriaus parinktys .refresh-rate = Atnaujinimo dažnis - .resolution = Raiška + .resolution = Rezoliucija .scale = Mastelis .additional-scale-options = Papildomos mastelio parinktys panel-style = Stilius - .anchor-gap = Tarpas tarp skydelio ir ekrano krašto + .anchor-gap = Tarpas tarp panelės ir ekrano krašto .dock-anchor-gap = Tarpas tarp doko ir ekrano krašto - .extend = Ištęsti skydelį iki ekrano kraštų + .extend = Ištęsti panelę iki ekrano kraštų .dock-extend = Ištęsti doką iki ekrano kraštų .appearance = Išvaizda .size = Dydis @@ -307,35 +305,35 @@ panel-appearance = Išvaizda .match = Pagal darbalaukį .light = Šviesi .dark = Tamsi -workspaces-multi-behavior = Darbas su keliais monitoriais +workspaces-multi-behavior = Elgsena su keletais monitoriais .span = Darbo sritis tęsiasi per visus monitorius - .separate = Kiekvieno monitoriaus darbo sritis atskira + .separate = Kiekvienas monitorius turi savo atskirą darbo sritį replace-shortcut-dialog = Pakeisti spartųjį klavišą? .desc = { $shortcut } naudoja { $name }. Jeigu norite pakeisti, { $name } bus išjungtas. rgb = RŽM about-device = Įrenginio vardas .desc = Šis pavadinimas rodomas kitiems tinklo arba „Bluetooth“ įrenginiams -no-vpn = Nėra prieinamų VPN ryšių +no-vpn = VPN ryšys nėra prieinamas. start-segment = Pradžios segmentas desktop = Darbalaukis identity = Tapatybė reset-to-default = Atstatyti į numatytas reikšmes disconnect = Atjungti ok = Gerai -app = COSMIC Nuostatos +app = COSMIC Settings debug = Derinti sound = Garsas enable-export = Taikyti dabartinę temą GNOME aplikacijose - .desc = Ne visi programiniai rinkiniai palaiko automatinį perjungimą. Pakeitus temą , gali reikėti iš naujo paleisti ne COSMIC tipo programas.. + .desc = Ne visi programiniai rinkiniai palaiko automatinį perjungimą. Po temos pakeitimo , ne COSMIC tipo aplikacijoms gali prireikti paleidimo iš naujo. number = { $number } shortcut-name = Sparčių klavišų derinio pavadinimas style = Stilius .round = Apvalus - .slightly-round = Truputį suapvalintas + .slightly-round = Lengvai apvalus .square = Kampuotas panel-applets = Konfigūracija .dock-desc = Konfigūruoti doko apletus - .desc = Konfigūruoti skydelio apletus + .desc = Konfigūruoti panelės apletus qr-code-unavailable = QR kodas negalimas small = Mažas notifications = Pranešimai @@ -370,8 +368,8 @@ legacy-app-scaling = X11 langų sistemos programų mastelis .preferred-display = Pageidaujamas žaidimų ir viso ekrano X11 programų ekranas .no-display = Joks night-light = Nakties šviesa - .auto = Automatiškai (nuo saulėlydžio iki saulėtekio) - .desc = Mažiau mėlynos šviesos ir šiltesnės spalvos + .auto = Automatinė (nuo saulėlydžio iki saulėtekio) + .desc = Sumažinta mėlyna šviesa ir padidinamas spalvų šiltumas about = Apie input-devices = Įvesties įrenginiai custom-shortcuts = Pasirinktiniai sparčiųjų klavišų deriniai @@ -385,11 +383,11 @@ window-hint-accent-toggle = Naudoti temos akcento spalvą, kaip aktyvaus lango type-to-search = Norint ieškoti, pradėkite rašyti… workspaces-behavior = Darbo sričių elgsena .dynamic = Dinamiškos darbo sritys - .dynamic-desc = Tuščios darbo sritys pašalinamos automatiškai + .dynamic-desc = Automatiškai pašalinamos tuščios darbo sritys .fixed = Pastovus darbo sričių skaičius - .fixed-desc = Peržiūrioje pridėkite arba pašalinkite darbo sritis. + .fixed-desc = Darbo sričių pridėjimas arba pašalinamas darbo sričių apžvalgos režime. wireguard-dialog = Pridėti WireGuard įrenginį - .description = Pasirinkite įrenginio pavadinimą WireGuard nuostatoms. + .description = Pasirinkite įrenginio vardą WireGuard nustatymams. remove-connection-dialog = Pašalinti prisijungimo profilį .vpn-description = Jums reikės įvesti slaptažodį iš naujo, kad galėtumėte naudotis šiuo tinklu ateityje. .wired-description = Jums reikės atkurti šį profilį, kad galėtumėte naudotis šiuo prisijungimu. @@ -435,10 +433,10 @@ applications = Aplikacijos dbus-connection-error = Nepavyko prisijungti prie DBus system-controls = Sistemos valdymas auto-switch = Automatinis šviesaus ir tamsaus režimo valdymas - .sunrise = Šviesus režimas įjungiamas tekant saulei - .sunset = Tamsus režimas įjungiamas saulei leidžiantis - .next-sunrise = Šviesus režimas įjungiamas kitą kartą saulei tekant - .next-sunset = Tamsus režimas įjungiamas kitą kartą saulei leidžiantis + .sunrise = Įjungiamas šviesus režimas tekant saulei + .sunset = Įjungiamas tamsus režimas saulei leidžiantis + .next-sunrise = Įjungiamas šviesus režimas kitą kartą saulei tekant + .next-sunset = Įjungiamas tamsus režimas kitą kartą saulei leidžiantis add-vpn = Pridėti VPN cancel = Atšaukti keyboard-numlock-boot = Numlock @@ -458,9 +456,9 @@ interface-density = Sąsajos tankumas open-application-library = Atidaryti Aplikacijų Sąrašą connected = Prisijungta slow = Lėtas -network-name = Tinklo pavadinimas +network-name = Tinklo Pavadinimas large = Didelis -panel = Skydelis +panel = Panelė scrolling = Slinkimas .two-finger = Slinkimas dviem pirštais .edge = Vieno piršto slinkimas palei kraštą @@ -494,8 +492,8 @@ users = Naudotojai forget = Pamiršti center-segment = Centrinis segmentas panel-missing = Panelė nesukonfigūruota - .desc = Skydelio konfigūracijos failas nerastas nes buvo netinkamai sukonfigūruotas arba sugadintas. - .fix = Grąžinti numatytas nuostatas + .desc = Panelės konfigūraciniai failai nerasti dėl netinkamo jų modifikavimo arba tas failas buvo sugadintas. + .fix = Nustatyti į numatytus nustatymus invalid-username = Netinkamas naudotojo vardas mirroring = Veidrodinis atvaizdavimas .id = Atvaizduojamas { $id } @@ -541,7 +539,7 @@ manage-windows = Valdyti langus .toggle-sticky = Įjungti/išjungti lipnų langą never = Niekada install-additional-languages = Pridėti papildomas kalbas -settings = Nuostatai +settings = Nustatymai sound-output = Išvestis .volume = Išvesties garsumas .device = Išvesties įrenginys @@ -553,7 +551,7 @@ sound-output = Išvestis wallpaper = Darbalaukio fonas .change = Keisti paveiksliuką kas .fit = Darbalaukio fono talpinimas ekrane - .folder-dialog = Pasirinkite darbalaukio fonų aplanką + .folder-dialog = Pasirinkite darbalaukio fono aplankalą .image-dialog = Pasirinkite darbalaukio foną .plural = Darbalaukio fonai .same = Kiekvienam ekrane toks pat fonas @@ -575,15 +573,15 @@ legacy-app-global-shortcuts = Sparčiųjų klavišų kombinacijos X11 programose .all = Visi klavišai .mouse = Peles mygtuko veiksmai X11 programose activate = Aktyvuoti -replace = Keisti +replace = Pakeisti power-saving = Energijos taupymo parinktys - .turn-off-screen-after = Išjungti ekraną po + .turn-off-screen-after = Išjunkti ekraną po .auto-suspend = Automatinis miego režimas .auto-suspend-ac = Automatinis miego režimas, kai prijungtas maitinimas .auto-suspend-battery = Automatinis miego režimas, kai naudojama baterija connected-devices = Prijungti įrenginiai .unknown = Nežinomas įrenginys -icons-and-toolkit = Piktogramų ir įrankių stiliai +icons-and-toolkit = Ikonų ir įrankių rinkinio temos sound-applications = Aplikacijos .desc = Aplikacijų garsumas ir nustatymai time-zone = Laiko juosta @@ -601,10 +599,10 @@ network-device-state = .disconnected = Atsijungta .failed = Nepavyko prisijungti .ip-check = Tikrinamas ryšys - .ip-config = Užklausiama IP adreso ir maršrutizavimo informacijos - .need-auth = Reikja patvirtinti tapatumą + .ip-config = Vykdoma IP adreso and maršrutizavimo informacijos užklausa + .need-auth = Reikalinga autentifikacija .prepare = Ruošiamasi prisijungti - .secondaries = Laukiama prisijungiant antrąkart + .secondaries = Laukiama antrinio ryšio .unavailable = Nepasiekiama .unknown = Nežinoma būsena .unmanaged = Nevaldomas @@ -620,10 +618,10 @@ gestures = Gestai .four-finger-up = Keturių pirštų braukimas aukštyn .three-finger-any = Trijų pirštų braukimas system = Sistema ir paskyros -no-networks = Tinklų nerasta -open-new-folder = Atverti naują aplanką +no-networks = Nebuvo rasta tinklų. +open-new-folder = Atidaryti naują aplanką panel-bottom = Apačia -share = Dalintis tinklu +share = Pasidalinti tinklu add = Pridėti time = Laikas ir kalba fill = Užpildyti @@ -637,7 +635,7 @@ dialog = Dialogas .change-prompt = Nustatymai bus automatiškai atkurti po { $time } sekundžių. .revert-settings = Atkurti nustatymus navigate = Naviguoti -workspaces-overview-thumbnails = Darbo sričių peržiūros miniatiūros +workspaces-overview-thumbnails = Darbo sričių apžvalgos režimo miniatiūros .show-number = Rodyti darbo srities numerį .show-name = Rodyti darbo srities vardą color = Spalvos @@ -648,33 +646,33 @@ color = Spalvos hex = Šešioliktainis magnifier = Didinamasis stiklas .controls = - Arba naudokite sparčiaisius klavišus: { $zoom_in -> + Arba pasinaudokite sparčiaisiais klavišais: { $zoom_in -> [zero] { "" } *[other] { "" } - { $zoom_in } priartinti, + { $zoom_in } priartinimui, }{ $zoom_out -> [zero] { "" } *[other] { "" } - { $zoom_out } tolinti, + { $zoom_out } atitolinimui, } Super + slinkimas su pele .scroll_controls = Įgalinkite pelės ar jutiklinio pulto vaizdo mastelio keitimą su Super + slinkimas .show_overlay = Rodyti didinamojo stiklo perdangą .increment = Artinimo dydis .signin = Įjungti didinamąjį stiklą prisijungimo ekrane - .applet = Didinamojo stiklo jungiklio apletas skydelyje - .movement = Priartinto vaizdo judinimas - .continuous = Nuolat su pelės žymekliu + .applet = Didinamojo stiklo jungiklio apletas panelėje + .movement = Priartinto vaizdo judėjimas + .continuous = Nuolatos su pelės žymekliu .onedge = Kai žymeklis pasiekia ekrano ribą .centered = Laikyti žymeklį centre colors = Spalvos administrator = Administratorius .desc = Administratorius gali keisti nustatymus visiems naudotojams, pridėti ir pašalinti kitus naudotojus -scan-to-connect-description = Norėdami prisijungti prie šio tinklo, skenuokite QR kodą. +scan-to-connect-description = Norinti prisijungti prie šio tinklo, skenuokite QR kodą. modified = Pakeista: { $count } -known-networks = Įsiminti tinklai +known-networks = Žinomi tinklai network-and-wireless = Tinklas ir belaidis ryšys sound-device-port-unplugged = Neprijungta sound-hd-audio = HD garsas @@ -721,103 +719,98 @@ shadows-floating = Slankieji langai workspaces-overview = Darbo sričių apžvalga .action-on-typing = Veiksmas rašant .none = Jokia - .launcher = Atverti Leistuką - .applications = Atidaryti Programas + .launcher = Atidaryti Aplikacijų leidyklę + .applications = Atidaryti Aplikacijas connect = Prisijungti light = Šviesi dark = Tamsus xdg-entry-touchpad = Jutiklinis kilimėlis xdg-entry-wired = Laidinis -xdg-entry-startup-apps-comment = Konfigūruoti programas paleidžiamas prisijungus +xdg-entry-startup-apps-comment = Konfigūruoti aplikacijas paleidžiamas prisijungus xdg-entry-region-language = Regionas ir Kalba xdg-entry-mouse-keywords = COSMIC;Pelė;Pagreitis;Slinkimas; xdg-entry-bluetooth-comment = Valdyti Bluetooth įrenginius -xdg-entry-notifications-keywords = COSMIC;Pranešimai;Užraktas; -xdg-entry-startup-apps-keywords = COSMIC;Paleistis;Programa; -xdg-entry-default-apps-comment = Numatytoji naršyklė, pašto programa, failų naršyklė ir kitos programos -xdg-entry-keyboard-comment = Įvesties įtaisai, perjungimas, specialių ženklų įvestis, spartieji klavišai -xdg-entry-wired-keywords = COSMIC;Laidinis;LAN;Tinklas;Ryšys; +xdg-entry-notifications-keywords = COSMIC;Pranešimai;Užrakinimas; +xdg-entry-startup-apps-keywords = COSMIC;Paleistis;Aplikacija; +xdg-entry-default-apps-comment = Numatytoji naršyklė, pašto programa, failų naršyklė ir kitos aplikacijos +xdg-entry-keyboard-comment = Įvesties šaltiniai, perjungimas, specialių ženklų įvestis, spartieji klavišai +xdg-entry-wired-keywords = COSMIC;Laidinis;LAN;Tinkas;Ryšys; xdg-entry-power = Energija ir Baterija xdg-entry-mouse = Pelė -xdg-entry-dock-keywords = COSMIC;Dokas;Skydelis;Apletas +xdg-entry-dock-keywords = COSMIC;Dokas;Panelė;Apletas xdg-entry-mouse-comment = Pelės greitis, pagreitis ir natūralus slinkimas xdg-entry-system = Sistema ir Paskyros -xdg-entry-panel-keywords = COSMIC;Skydelis;Apletas +xdg-entry-panel-keywords = COSMIC;Panelė;Apletas xdg-entry-window-management = Langų Valdymas xdg-entry-a11y = Prieinamumas -xdg-entry-time-language-comment = Tvarkyti sistemos datą, laiką, regioną ir kalbą +xdg-entry-time-language-comment = Valdyti sistemos datą, laiką, regioną ir kalbą xdg-entry-desktop-keywords = COSMIC;Darbalaukis; -xdg-entry-x11-applications-keywords = COSMIC;X11;Programa;Žaidimas;Suderinamumas; -xdg-entry-displays-comment = Tvarkyti ekrano nuostatas +xdg-entry-x11-applications-keywords = COSMIC;X11;Aplikacijos;Žaidimas;Suderinamumas; +xdg-entry-displays-comment = Valdyti ekrano konfigūracijos nustatymus xdg-entry-touchpad-keywords = COSMIC;Jutiklinis kilimėlis; Gestai; xdg-entry-time-language = Laikas ir Kalba xdg-entry-users = Naudotojai xdg-entry-system-keywords = COSMIC;Sistema;Informacija;Paskyros;Programinė aparatinė įranga; -xdg-entry-default-apps = Numatytosios programos +xdg-entry-default-apps = Numatytosios Aplikacijos xdg-entry-wireless-keywords = COSMIC;WiFi-Wi-Fi;Tinklas;Ryšys; -xdg-entry-applications-comment = Numatytosios programos, pradžios programos ir X11 programų suderinamumo nuostatos +xdg-entry-applications-comment = Numatytosios aplikacijos, pradžios aplikacijos ir X11 aplikacijų suderinamumo nustatymai xdg-entry-about-keywords = COSMIC;Apie -xdg-entry-panel = Skydelis +xdg-entry-panel = Panelė xdg-entry-notifications = Pranešimai xdg-entry-a11y-keywords = COSMIC;Prieinamumas;A11y;Ekranas;Skaitytuvas;Didinamasis stiklas;Kontrastas;Spalva; xdg-entry-wireless-comment = Wi-Fi ryšiai ir ryšių profiliai xdg-entry-desktop = Darbalaukis xdg-entry-date-time-keywords = COSMIC;Laikas;Zona; -xdg-entry-desktop-comment = Darbalaukio fonas, išvaizda, skydelis, dokas, langų valdymo ir darbo sričių nuostatos +xdg-entry-desktop-comment = Darbalaukio fonas, išvaizda, panelė, dokas, langų valdymo ir darbo sričių nustatymai xdg-entry-wallpaper = Darbalaukio fonas xdg-entry-keyboard = Klaviatūra xdg-entry-a11y-comment = Ekrano Skaitytuvas, didinamasis stiklas, didelis kontrastas ir spalvų filtrai xdg-entry-displays = Ekranai xdg-entry-network = Tinklas ir Belaidis ryšys xdg-entry-date-time = Data ir Laikas -xdg-entry-users-comment = Naudotojų tapatumo patvirtinimas ir paskyros -xdg-entry-input-comment = Klaviatūros ir pelės nuostatos +xdg-entry-users-comment = Autentifikacija ir naudotojų paskyros +xdg-entry-input-comment = Klaviatūros ir pelės nustatymai xdg-entry-bluetooth-keywords = COSMIC;Bluetooth; -xdg-entry-dock-comment = Pasirinktinė juosta programoms ir apletams +xdg-entry-dock-comment = Pasirinktina juosta aplikacijomis ir apletams xdg-entry-network-keywords = COSMIC;Tinklas;Bevielis ryšys;WiFi;VPN; xdg-entry-wallpaper-comment = Darbalaukio paveikslėlis, spalvos ir skaidrių parinktys xdg-entry-dock = Dokas -xdg-entry-startup-apps = Paleisties programos +xdg-entry-startup-apps = Pradžios Aplikacijos xdg-entry-wireless = Wi-Fi xdg-entry-workspaces-keywords = COSMIC;Darbo sritis;Orientacija;Apžvalga;Monitorius; -xdg-entry-system-comment = Sistemos informacija, paskyros ir programinės aparatinės įrangos naujiniai -xdg-entry-x11-applications-comment = X11 langų sistemos programų mastelis, pagrindinis ekranas ir sistemos greitieji klavišai -xdg-entry-region-language-comment = Datų, laiko ir skaičių formatas pagal pasirinktą regioną +xdg-entry-system-comment = Sistemos informacija, paskyros ir programinės aparatinės įrangos atnaujinimai +xdg-entry-x11-applications-comment = X11 langų sistemos aplikacijų mastelis, pagrindinis ekranas ir sistemos greitieji klavišai +xdg-entry-region-language-comment = Datų, laiko ir skaičių formatas pagal nustatytą regioną xdg-entry-wallpaper-keywords = COSMIC;Darbalaukio fonas;Fonas;Skaidrės; xdg-entry-users-keywords = COSMIC;Naudotojas;Paskyra; -xdg-entry-about-comment = Įrenginio pavadinimas, techninė informacija, operacinės sistemos numatytosios nuostatos +xdg-entry-about-comment = Įrenginio pavadinimas, techninė informacija, operacinės sistemos numatytieji nustatymai xdg-entry-vpn-keywords = COSMIC;VPN;Ryšys;Prisijungimai;OpenVPN;OpenConnect; xdg-entry-time-language-keywords = COSMIC;Sistema;Laikas;Data;Regionas;Kalba; xdg-entry-input-keywords = COSMIC;Įvestis;Klaviatūra;Pelė;Pelytė; -xdg-entry-comment = COSMIC darbalaukio nuostatų programa -xdg-entry-notifications-comment = Režimas „Netrukdyti“, užrakinto ekrano pranešimai ir programų nuostatos -xdg-entry-applications = Programos +xdg-entry-comment = COSMIC desktop aplikacijų nustatymai +xdg-entry-notifications-comment = Netrukdyti režimas, užrakinto ekrano pranešimai ir programų nustatymai +xdg-entry-applications = Aplikacijos xdg-entry-sound-keywords = COSMIC;Garsas;Audio;Pranešimai;Pipewire; xdg-entry-power-keywords = COSMIC;Energija;Baterija -xdg-entry-default-apps-keywords = COSMIC;Numatyta;Programa -xdg-entry-keywords = COSMIC;Nuostatos; +xdg-entry-default-apps-keywords = COSMIC;Numatyta;Aplikacija +xdg-entry-keywords = COSMIC;Nustatymai; xdg-entry-region-language-keywords = COSMIC;Regionas;Kalba;Data;Formatas;Laikas;Vietovė;Lokalizavimas; xdg-entry-about = Apie xdg-entry-input = Įvesties Įrenginiai -xdg-entry-applications-keywords = COSMIC;Numatytieji;Programa;Paleistis;X11;Suderinamumas -xdg-entry-sound-comment = Įrenginių, pranešimų ir programų garso nuostatos +xdg-entry-applications-keywords = COSMIC;Numatytas;Aplikacija;Paleidimas;X11;Suderinamumas +xdg-entry-sound-comment = Audio nustatymai įrenginiams, pranešimams ir aplikacijoms xdg-entry-touchpad-comment = Jutiklinis kilimėlio greitis, valdymo parinktys, gestai xdg-entry-keyboard-keywords = COSMIC;Klaviatūra;Įvestis;Šaltinis;Spartieji klavišai; xdg-entry-vpn-comment = VPN ryšiai ir prisijungimų profiliai xdg-entry-appearance = Išvaizda -xdg-entry-workspaces-comment = Darbo sričių orientacija, peržiūra ir veikimas keliuose monitoriuose -xdg-entry-network-comment = Tvarkyti tinklo ryšius -xdg-entry-panel-comment = Pagrindinė sistemos meniu ir apletų juosta +xdg-entry-workspaces-comment = Darbo sričių orientacija, apžvalga ir keletos monitorių funkcionavimas +xdg-entry-network-comment = Valdyti tinklo ryšius +xdg-entry-panel-comment = Pagrindinė sistemos juosta apletams ir meniu xdg-entry-sound = Garsas xdg-entry-power-comment = Energijos režimai ir energijos taupymo parinktys xdg-entry-displays-keywords = COSMIC;Ekranas; xdg-entry-workspaces = Darbo sritys -xdg-entry-date-time-comment = Laiko juosta, automatinės laikrodžio nuostatos ir laiko formatai -xdg-entry-x11-applications = Suderinamumas su X11 programomis +xdg-entry-date-time-comment = Laiko juosta, automatiniai laikrodžio nustatymai ir laiko formatavimas +xdg-entry-x11-applications = X11 Aplikacijų Suderinamumas xdg-entry-wired-comment = Laidiniai ryšiai ir ryšių profiliai no-search-results = Joks tinklas neatitinka jūsų paieškos. -xdg-entry-appearance-comment = Akcentų spalvos ir stiliai -xdg-entry-window-management-keywords = COSMIC;Langas;Valdymas;Išklojimas;Super;Klavišas; -xdg-entry-window-management-comment = „Super“ klavišo veiksmas, langų valdymo parinktys, papildomos langų klojimo parinktys -workspaces-navigation = Judėjimas - .wraparound = Judėkite tarp pirmos ir paskutinės darbo sričių naudodamiesi sparčiaisias klavišais ir gestais diff --git a/i18n/nl/cosmic_settings.ftl b/i18n/nl/cosmic_settings.ftl index 8c3edfc..7c2c2cc 100644 --- a/i18n/nl/cosmic_settings.ftl +++ b/i18n/nl/cosmic_settings.ftl @@ -8,16 +8,16 @@ number = { $number } xdg-entry-about = Over xdg-entry-about-comment = Apparaatnaam, hardware-informatie, standaardinstellingen van het besturingssysteem -xdg-entry-a11y = Toegankelijkheid -xdg-entry-a11y-comment = Schermlezer, vergrootglas, hoog contrast, en kleurenfilters -xdg-entry-appearance = Uiterlijk +xdg-entry-a11y = Toegankelijkheden +xdg-entry-a11y-comment = Toegankelijkheidsinstellingen +xdg-entry-appearance = Weergave xdg-entry-appearance-comment = Accentkleuren en thema's xdg-entry-applications = Toepassingen -xdg-entry-applications-comment = Standaardtoepassingen, autostart-toepassingen, en X11-compatibiliteitsinstellingen +xdg-entry-applications-comment = Instellingen voor toepassingen beheren xdg-entry-date-time = Datum en tijd -xdg-entry-date-time-comment = Tijdszone, automatische tijdinstellingen en tijdnotatie -xdg-entry-default-apps = Standaardtoepassingen -xdg-entry-default-apps-comment = Standaard webbrowser, e-mailclient, bestandsbeheerder, en andere toepassingen +xdg-entry-date-time-comment = Tijdszone, automatische klokinstellingen en tijdformatering +xdg-entry-default-apps = Standaard toepassingen +xdg-entry-default-apps-comment = Standaard webbrowser, mailprogramma, bestandsbeheerder en andere apps xdg-entry-desktop = Bureaublad xdg-entry-displays = Beeldschermen xdg-entry-displays-comment = Weergaveopties, grafische modi en nachtlicht @@ -248,6 +248,7 @@ never = Nooit ## Desktop: Appearance appearance = Uiterlijk + .desc = Accentkleuren en thema's accent-color = Accentkleur app-background = Vensterachtergrond auto = Automatisch @@ -264,8 +265,8 @@ mode-and-colors = Kleuren en lichte/donkere modus recent-colors = Recente kleuren reset-to-default = Naar standaardinstellingen terugzetten rgb = RGB -window-hint-accent = Kleur van vensterfocus-aanduiding -window-hint-accent-toggle = Gebruik de accentkleur van het thema voor de vensterfocus-aanduiding +window-hint-accent = Accentkleur als visuele hint voor het actieve venster +window-hint-accent-toggle = Gebruik de accentkleur van het thema als visuele hint voor het actieve venster auto-switch = Automatisch wisselen tussen lichte en donkere modus .sunrise = Wissel naar lichte modus bij zonsopgang .sunset = Wissel naar donkere modus bij zonsondergang @@ -294,7 +295,7 @@ interface-density = Interfacedichtheid .compact = Compact .spacious = Ruim window-management-appearance = Vensterbeheer - .active-hint = Grootte van vensterfocus-aanduiding + .active-hint = Grootte visuele hint voor het actieve venster .gaps = Ruimte rondom getegelde vensters ### Experimental @@ -370,7 +371,7 @@ edge-gravity = Zwevende vensters worden door de randen van het scherm aangetrokk window-controls = Vensterbeheer .maximize = Maximaliseerknop tonen .minimize = Minimaliseerknop tonen - .active-window-hint = Vensterfocus-aanduiding tonen + .active-window-hint = Gebruik visuele hint voor het actieve venster focus-navigation = Focusbesturing .focus-follows-cursor = Focus volgt de cursor .focus-follows-cursor-delay = Vertraging voor focus volgt de cursor in ms @@ -870,17 +871,3 @@ sound-hd-audio = HD-audio sound-device-profiles = Apparaatprofielen amplification = Verhoog maximum volume .desc = Hiermee kan het volume tot 150% worden verhoogd -xdg-entry-appearance-keywords = COSMIC;Accent;Kleur;Accentkleur;Icoon;Iconen;Lettertype;Thema -xdg-entry-a11y-keywords = COSMIC;Toegankelijkheid;A11y;Scherm;Lezer;Schermlezer;Vergrootglas;Contrast;Kleur; -xdg-entry-comment = Instellingentoepassing voor COSMIC -xdg-entry-keywords = COSMIC;Instellingen; -workspaces-navigation = Navigatie - .wraparound = Ga met sneltoetsen en gebaren ook tussen het eerste en laatste werkblad heen en weer -xdg-entry-bluetooth-comment = Bluetooth-apparaten beheren -xdg-entry-desktop-keywords = COSMIC;Bureaublad; -xdg-entry-about-keywords = COSMIC;Over; -xdg-entry-date-time-keywords = COSMIC;Tijd;Zone;Tijdzone; -xdg-entry-desktop-comment = Schermachtergrond, uiterlijk, paneel, dock, vensterbeheer, en werkbladinstellingen -xdg-entry-bluetooth-keywords = COSMIC;Bluetooth; -xdg-entry-default-apps-keywords = COSMIC;Standaard;Toepassing;Standaardtoepassing -xdg-entry-applications-keywords = COSMIC;Standaard;Opstart;Autostart;Toepassingen;Standaardtoepassingen;Autostarttoepassingen;X11;Compatibiliteit; diff --git a/i18n/oc/cosmic_settings.ftl b/i18n/oc/cosmic_settings.ftl index 099babc..22d8560 100644 --- a/i18n/oc/cosmic_settings.ftl +++ b/i18n/oc/cosmic_settings.ftl @@ -24,6 +24,3 @@ add-network = Apondre una ret .profile = Apondre perfil unknown = Desconegut ok = D’acòrdi -light = Clar -dark = Fosc -appearance = Aparéncia diff --git a/i18n/pa/cosmic_settings.ftl b/i18n/pa/cosmic_settings.ftl index 8cb0093..1da2454 100644 --- a/i18n/pa/cosmic_settings.ftl +++ b/i18n/pa/cosmic_settings.ftl @@ -123,7 +123,7 @@ dock = ਡੌਕ sound-hd-audio = HD ਆਡੀਓ network-and-wireless = ਨੈੱਟਵਰਕ ਅਤੇ ਬੇਤਾਰ username = ਵਰਤੋਂਕਾਰ ਦਾ ਨਾਂ -light = ਫਿੱਕਾ +light = ਹਲਕਾ no-vpn = ਕੋਈ VPN ਕਨੈਕਸ਼ਨ ਮੌਜੂਦ ਨਹੀਂ ਹੈ। start-segment = ਸ਼ੁਰੂ ਭਾਗ desktop = ਡੈਸਕਟਾਪ @@ -149,7 +149,7 @@ terminate = ਖ਼ਤਮ type-to-search = ਖੋਜਣ ਲਈ ਲਿਖੋ... workspaces = ਵਰਕਸਪੇਸ password-confirm = ਪਾਸਵਰਡ ਦੀ ਤਸਦੀਕ ਕਰੋ -applications = ਐਪਲੀਕੇਸ਼ਨ +applications = ਐਪਲੀਕੇਸ਼ਨਾਂ dbus-connection-error = DBus ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਲਈ ਅਸਫ਼ਲ ਹੈ system-controls = ਸਿਸਟਮ ਕੰਟਰੋਲ dark = ਗੂੜ੍ਹਾ diff --git a/i18n/pl/cosmic_settings.ftl b/i18n/pl/cosmic_settings.ftl index 40749f2..73ca92c 100644 --- a/i18n/pl/cosmic_settings.ftl +++ b/i18n/pl/cosmic_settings.ftl @@ -116,8 +116,6 @@ vpn-error = Błąd VPN .connect = Nie udało się połączyć z VPN .connection-editor = Błąd edytora połączenia .connection-settings = Nie udało się uzyskać ustawień dla aktywnych połączeń - .openvpn-config-path = Nieprawidłowa ścieżka pliku konfiguracji OpenVPN - .openvpn-config-path-desc = Wybrany plik musi być w lokalnym systemie plików. .updating-state = Nie udało się zaktualizować stanu menedżera sieci .wireguard-config-path = Nieprawidłowa ścieżka pliku konfiguracji WireGuard .wireguard-config-path-desc = Wybrany plik musi znajdować się w lokalnym systemie plików system. @@ -294,19 +292,6 @@ style = Styl .round = Okrągły .slightly-round = Lekko zaokrąglony .square = Kwadratowy - .frosted-glass = Oszronione szkło - .frosted-system-interface = Interfejs systemu - .frosted-system-interface-desc = Użyj oszronionego szkła do Programu startowego, biblioteki aplikacji, podglądu obszarów roboczych i elementów kontrolnych na ekranie - .frosted-windows = Okna - .frosted-windows-desc = Użyj oszronionego szkła w oknach i dialogach - .frosted-panels = Panele - .frosted-panels-desc = Użyj oszronionego szkła w panelach i doku - .frosted-applets = Aplety - .frosted-applets-desc = Użyj oszronionego szkła w apletach menu na panelu i doku - .frosted-thickness = Grubość szronu - .less = mniej - .more = więcej - .glass-opacity = Przeźroczystość szkła interface-density = Zagęszczenie interfejsu .comfortable = Wygodne .compact = Zwarte @@ -379,7 +364,7 @@ super-key = Klawisz Super .launcher = Otwórz program startowy .workspaces = Otwórz obszary robocze .applications = Otwórz aplikacje - .none = Nie przypisany + .disable = Wyłącz edge-gravity = Pływające okna są przyciągane do pobliskich krawędzi window-controls = Sterowanie oknami .maximize = Pokaż przycisk maksymalizacji @@ -425,7 +410,7 @@ display = Wyświetlacz .external = { $size } { $output } Zewnętrzny Wyświetlacz .laptop = { $size } Wyświetlacz Laptopa .options = Opcje Wyświetlacza - .refresh-rate = Częstotliwość odświeżania ekranu + .refresh-rate = Prędkość odświeżania ekranu .resolution = Rozdzielczość .scale = Skala .additional-scale-options = Dodatkowe opcje skalowania @@ -577,22 +562,6 @@ keyboard-special-char = Wpis znaków specjalnych .compose = Klawisz komponujący .compose-desc = Klawisz komponujący umożliwia wprowadzanie różnorodnych liter. By z niego skorzystać, naciśnij go a następnie kombinację znaków. Na przykład, po naciśnięciu klawisza komponującego a następnie C i o wyjdzie ©, lub klawisz komponujący a następnie a i ' wyjdzie á. .caps = Klawisz Caps Lock - .ctrl = Control - .ctrl-right = Prawy Ctrl - .swap-with-ctrl = Zamień z Control - .alt = Alt - .alt-left = Lewy Alt - .alt-right = Prawy Alt - .super = Super - .super-left = Lewy Super - .super-right = Prawy Super - .menu = Klawisz Menu - .backspace = Backspace - .escape = Escape - .swap-with-escape = Zamień zEscape - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = Nie Przypisany keyboard-typing-assist = Pisanie .repeat-rate = Tempo powtarzania .repeat-delay = Opóźnienie powtarzania @@ -959,9 +928,3 @@ xdg-entry-window-management-keywords = COSMIC;Okna;Zarządzanie;Kafelkowanie;Sup xdg-entry-panel-comment = Podstawowy panel z menu i apletami xdg-entry-displays-keywords = COSMIC;Wyświetlacz;Ekran; no-search-results = Żadna sieć nie odpowiada twojemu wyszukiwaniu. -workspaces-navigation = Navigation - .wraparound = Przemieszczaj się między pierwszym a ostatnim obszarem roboczym używając skrótów klawiszowych i gestów -bluetooth-display-passkey = Parowanie Bluetooth - .description = Wpisz ten kod na { $device } i naciśnij Enter -bluetooth-display-pin = Bluetooth Pairing - .description = Wpisz PIN na { $device } i naciśnij Enter diff --git a/i18n/pt-BR/cosmic_settings.ftl b/i18n/pt-BR/cosmic_settings.ftl index 8a36d4a..cfc2d69 100644 --- a/i18n/pt-BR/cosmic_settings.ftl +++ b/i18n/pt-BR/cosmic_settings.ftl @@ -60,10 +60,8 @@ vpn-error = Erro de VPN .connect = Falha ao conectar na VPN .connection-editor = Falha de edição da conexão .connection-settings = Falha ao obter as configurações das conexões ativas - .openvpn-config-path = Caminho de arquivo inválido para a configuração do OpenVPN - .openvpn-config-path-desc = O arquivo escolhido deve estar em um sistema de arquivos local. .updating-state = Falha ao atualizar o status do gerenciador de rede - .wireguard-config-path = Caminho de arquivo inválido para a configuração do WireGuard + .wireguard-config-path = Caminho do arquivo inválido para a configuração do WireGuard .wireguard-config-path-desc = O arquivo selecionado deve estar em um sistema de arquivos local. .wireguard-device = Falha ao criar um dispositivo WireGuard .with-password = @@ -202,11 +200,11 @@ close = Fechar color-picker = Seletor de cores copied-to-clipboard = Copiado para a área de transferência copy-to-clipboard = Copiar para a área de transferência -dark = Estilo escuro +dark = Escuro export = Exportar hex = Hex import = Importar -light = Estilo claro +light = Claro mode-and-colors = Modo e cores recent-colors = Cores recentes reset-to-default = Restaurar padrão @@ -219,13 +217,13 @@ auto-switch = Alternar automaticamente entre os modos claro e escuro .next-sunrise = Altera para o modo claro no próximo nascer do sol .next-sunset = Altera para o modo escuro no próximo pôr do sol container-background = Fundo do contêiner - .desc-detail = A cor de fundo do contêiner é usada para a barra lateral de navegação, a gaveta lateral, as caixas de diálogo e widgets similares. Por padrão, a cor de fundo do contêiner é automaticamente derivada do fundo da janela. + .desc-detail = A cor de fundo do contêiner é usada para a barra lateral de navegação, a gaveta lateral, as caixas de diálogos e widgets similares. Por padrão, a cor de fundo do contêiner é automaticamente derivada do fundo da janela. .reset = Restaurar para automático - .desc = Usada para a barra lateral de navegação, a gaveta lateral, as caixas de diálogo e widgets similares + .desc = Usada para a barra lateral de navegação, a gaveta lateral, as caixas de diálogos e widgets similares control-tint = Tonalidade dos componentes de controle .desc = Usado para os fundos dos botões padrão, entradas de busca, entradas de texto e componentes similares frosted = Efeito de vidro fosco na interface do sistema - .desc = Aplica um desfoque de fundo ao painel, à dock, aos miniaplicativos, ao lançador e à biblioteca de aplicativos + .desc = Ativa desfoque de fundo ao painel, à dock, aos miniaplicativos, ao lançador e à biblioteca de aplicativos enable-export = Aplicar o tema atual para aplicativos GNOME .desc = Nem todos os toolkits suportam trocar automaticamente. Aplicativos que não são de COSMIC podem precisar ser reiniciados após uma mudança de tema. icon-theme = Tema de ícones @@ -236,19 +234,6 @@ style = Estilo .round = Arredondado .slightly-round = Levemente arredondado .square = Quadrado - .frosted-glass = Vidro fosco - .frosted-system-interface = Interface do sistema - .frosted-system-interface-desc = Aplica efeito de vidro fosco ao lançador, à biblioteca de aplicativos, à visão geral dos espaços de trabalho e aos controles na tela - .frosted-windows = Janelas - .frosted-windows-desc = Aplica efeito de vidro fosco a janelas e caixas de diálogo - .frosted-panels = Painéis - .frosted-panels-desc = Aplica efeito de vidro fosco ao painel e à dock - .frosted-applets = Miniaplicativos - .frosted-applets-desc = Aplica efeito de vidro fosco aos menus dos miniaplicativos no painel e na dock - .frosted-thickness = Espessura do efeito fosco - .less = menor - .more = maior - .glass-opacity = Opacidade do vidro interface-density = Densidade da interface .comfortable = Confortável .compact = Compacta @@ -321,7 +306,7 @@ super-key = Ação da tecla Super (Windows) .launcher = Abrir o lançador .workspaces = Abrir a visão geral dos espaços de trabalho .applications = Abrir o menu de aplicativos - .none = Nenhuma + .disable = Desabilitar edge-gravity = Janelas flutuantes gravitam em direção às bordas próximas window-controls = Controles de janela .maximize = Mostrar botão de maximizar @@ -459,7 +444,7 @@ connected-devices = Dispositivos conectados .unknown = Dispositivo desconhecido power-mode = Modo de energia .battery = Economia de energia - .battery-desc = Baixo consumo de energia e desempenho limitado + .battery-desc = Baixo consumo de energia e desempenho silencioso .balanced = Balanceado .balanced-desc = Desempenho padrão e consumo de energia moderado .performance = Alto desempenho @@ -505,24 +490,8 @@ keyboard-sources = Fontes de entrada keyboard-special-char = Entrada de caracteres especiais .alternate = Tecla de caracteres especiais .compose = Tecla de composição - .compose-desc = A tecla de composição permite a inserção de uma grande variedade de caracteres. Para usá-la, pressione a tecla de composição seguida pela sequência de caracteres. Por exemplo, a tecla de composição seguida de "C" e "o" irá inserir "©", enquanto a tecla de composição seguida de "a" e ‘ irá inserir "á". + .compose-desc = A tecla de composição permite a inserção de uma grande variedade de caracteres. Para usá-la, pressione a tecla de composição seguida pela sequência de caracteres. Por exemplo, a tecla de composição seguida das teclas C e O irá inserir "©", enquanto a tecla de composição seguida das teclas A e ' irá inserir um "á". .caps = Tecla Caps Lock - .ctrl = Ctrl - .ctrl-right = Ctrl direita - .swap-with-ctrl = Trocar com Ctrl - .alt = Alt - .alt-left = Alt esquerda - .alt-right = Alt direita - .super = Super - .super-left = Super esquerda - .super-right = Super direita - .menu = Tecla menu - .backspace = Backspace - .escape = Esc - .swap-with-escape = Trocar com Esc - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = Nenhuma keyboard-typing-assist = Digitação .repeat-rate = Taxa de repetição .repeat-delay = Taxa de atraso @@ -705,33 +674,33 @@ open-workspaces-view = Abrir a visão geral dos espaços de trabalho ## Time & Language time = Hora e Idioma -time-date = Data e hora +time-date = Data e Hora .auto = Definir automaticamente .auto-ntp = A data e a hora serão atualizadas automaticamente quando o fuso horário for definido -time-zone = Fuso horário +time-zone = Fuso Horário .auto = Fuso horário automático .auto-info = Requer um serviço de localização e acesso à Internet time-format = Formato de data e hora .twenty-four = Formato de 24 horas .show-seconds = Mostrar segundos .first = Primeiro dia da semana - .show-date = Mostrar a data no miniaplicativo de hora + .show-date = Mostrar a data no painel .friday = Sexta-feira .saturday = Sábado .sunday = Domingo .monday = Segunda-feira -time-region = Região e idioma +time-region = Região e Idioma formatting = Formatação .dates = Datas .time = Horas - .date-and-time = Data e hora + .date-and-time = Data e Hora .numbers = Números .measurement = Medidas .paper = Papel preferred-languages = Idiomas preferidos .desc = A ordem dos idiomas determina qual idioma será usado para a tradução do desktop. As alterações entram em vigor no próximo início de sessão. add-language = Adicionar idioma - .context = Adicionar idioma + .context = Adicionar Idioma install-additional-languages = Instalar idiomas adicionais region = Região @@ -864,7 +833,7 @@ xdg-entry-appearance-keywords = COSMIC;Destaque;Accent;Cor;Ícone;Fonte;Tema xdg-entry-mouse = Mouse xdg-entry-dock-keywords = COSMIC;Dock;Painel;Applet;Miniaplicativo xdg-entry-mouse-comment = Velocidade do mouse, aceleração e rolagem natural -xdg-entry-system = Sistema e contas +xdg-entry-system = Sistema e Contas xdg-entry-panel-keywords = COSMIC;Painel;Applet;Miniaplicativo xdg-entry-window-management = Gerenciamento de janelas xdg-entry-a11y = Acessibilidade @@ -873,7 +842,7 @@ xdg-entry-desktop-keywords = COSMIC;Desktop;Área;Trabalho; xdg-entry-x11-applications-keywords = COSMIC;X11;Aplicativo;Jogos;Compatibilidade; xdg-entry-displays-comment = Gerenciar configurações de tela xdg-entry-touchpad-keywords = COSMIC;Touchpad;Gestos; -xdg-entry-time-language = Hora e idioma +xdg-entry-time-language = Hora e Idioma xdg-entry-users = Usuários xdg-entry-system-keywords = COSMIC;Sistema;Info;Contas;Firmware; xdg-entry-default-apps = Aplicativos padrão @@ -942,9 +911,3 @@ xdg-entry-x11-applications = Compatibilidade com aplicativos X11 xdg-entry-window-management-comment = Ação da tecla Super, opções de controle de janela e opções de janelas lado a lado (tiling) xdg-entry-wired-comment = Conexões de rede com fio e perfis de conexão no-search-results = Nenhuma rede corresponde à sua pesquisa. -workspaces-navigation = Navegação - .wraparound = Navegar entre o primeiro e o último espaço de trabalho usando atalhos de teclado e gestos -bluetooth-display-passkey = Emparelhamento Bluetooth - .description = Por favor, digite a seguinte chave em { $device }, depois pressione Enter -bluetooth-display-pin = Emparelhamento Bluetooth - .description = Por favor, digite o seguinte PIN em { $device }, depois pressione Enter diff --git a/i18n/pt/cosmic_settings.ftl b/i18n/pt/cosmic_settings.ftl index c3f5cf6..c5e60f3 100644 --- a/i18n/pt/cosmic_settings.ftl +++ b/i18n/pt/cosmic_settings.ftl @@ -33,8 +33,8 @@ xdg-entry-notifications = Notificações xdg-entry-notifications-comment = "Não Perturbe", notificações na tela de bloqueio e ajustes por aplicativo xdg-entry-panel = Panel xdg-entry-panel-comment = Barra superior com controles e menus -xdg-entry-power = Energia e bateria -xdg-entry-power-comment = Modos de energia e opções de poupança de energia +xdg-entry-power = Energia e Bateria +xdg-entry-power-comment = Modos de energia e opções de economia de energia xdg-entry-region-language = Região e Idioma xdg-entry-region-language-comment = Formatação de datas, horas e números baseados em sua região xdg-entry-sound = Som @@ -164,6 +164,7 @@ notifications = Notificações ## Desktop: Panel panel = Painel + .desc = Barra do sistema principal para menus e miniaplicativos. add = Adicionar add-applet = Adicionar miniaplicativo all = Todos @@ -206,6 +207,7 @@ panel-missing = A configuração do painel está em falta ## Desktop: Dock dock = Doca + .desc = Uma barra opcional para aplicações e miniaplicativos. ## Desktop: Window management @@ -492,7 +494,7 @@ system-shortcut = Sistema .keyboard-brightness-down = Diminuir o brilho do teclado .keyboard-brightness-up = Aumentar o brilho do teclado .launcher = Abrir o lançador - .log-out = Terminar sessão + .log-out = Sair .lock-screen = Bloquear o ecrã .mute = Silenciar saída de áudio .mute-mic = Silenciar entrada do microfone @@ -578,6 +580,7 @@ time-format = Formato de Data e Hora .sunday = Domingo .monday = Segunda-feira time-region = Região e Idioma + .desc = Formatar datas, horas e números baseado na sua região. ## System @@ -856,4 +859,3 @@ workspaces-overview = Visão geral das áreas de trabalho .none = Nenhuma .launcher = Abrir lançador .applications = Abrir aplicações -xdg-entry-power-keywords = COSMIC;Energia;Bateria diff --git a/i18n/ru/cosmic_settings.ftl b/i18n/ru/cosmic_settings.ftl index 2c4815c..6240086 100644 --- a/i18n/ru/cosmic_settings.ftl +++ b/i18n/ru/cosmic_settings.ftl @@ -16,22 +16,22 @@ close = Закрыть color-picker = Выбор цвета copied-to-clipboard = Скопировано в буфер обмена copy-to-clipboard = Копировать в буфер обмена -dark = Тёмная +dark = Тёмное export = Экспорт hex = Hex import = Импорт -light = Светлая -mode-and-colors = Цвета и тема оформления +light = Светлое +mode-and-colors = Цвета и оформление recent-colors = Недавние цвета reset-to-default = Вернуть по умолчанию rgb = RGB window-hint-accent = Цвет подсветки активного окна window-hint-accent-toggle = Использовать акцентный цвет в качестве подсветки активного окна -auto-switch = Автоматически переключать тему - .sunrise = Сменится на светлую при восходе - .sunset = Сменится на тёмную при закате - .next-sunrise = Сменится на светлую при следующем восходе - .next-sunset = Сменится на тёмную при следующем закате +auto-switch = Автоматически переключать оформление + .sunrise = Сменится на светлое при восходе + .sunset = Сменится на тёмное при закате + .next-sunrise = Сменится на светлое при следующем восходе + .next-sunset = Сменится на тёмное при следующем закате container-background = Фон контейнера .desc-detail = Цвет фона контейнера используется для боковой панели навигации, бокового меню, диалоговых окон и других подобных виджетов. По умолчанию он автоматически определяется на основе фона окна. .reset = Вернуть автоматический @@ -50,20 +50,7 @@ text-tint = Оттенок текста интерфейса style = Стиль .round = Округлый .slightly-round = Слегка округлый - .square = Прямоугольный - .frosted-glass = Эффект матового стекла - .frosted-system-interface = Системный интерфейс - .frosted-system-interface-desc = Применяет эффект матового стекла к панели запуска, библиотеке приложений, обзору рабочих столов и экранным элементам управления - .frosted-windows = Окна - .frosted-windows-desc = Применяет эффект матового стекла к окнам и диалогам - .frosted-panels = Панели - .frosted-panels-desc = Применяет эффект матового стекла к панели и доку - .frosted-applets = Апплеты - .frosted-applets-desc = Применяет эффект матового стекла к меню апплетов на панели и в доке - .frosted-thickness = Степень матовости - .less = мин - .more = макс - .glass-opacity = Непрозрачность стекла + .square = Прямой # interface density left out for now window-management = Управление окнами @@ -125,11 +112,11 @@ notifications = Уведомления dock = Док hot-corner = Активные углы .top-left-corner = Открывать рабочие столы при наведении в левый верхний угол -super-key = Действие клавиши Super +super-key = Клавиша Super .launcher = Открывает панель запуска .workspaces = Открывает обзор рабочих столов .applications = Открывает приложения - .none = Отсутствует + .disable = Отключена window-controls = Элементы управления окнами .minimize = Отображать кнопку «Свернуть» .maximize = Отображать кнопку «Развернуть» @@ -350,22 +337,6 @@ keyboard-special-char = Ввод специальных символов .compose = Клавиша Compose .compose-desc = Клавиша Compose позволяет вводить широкое множество символов. Для этого нужно нажать на неё, а затем ввести последовательность «составляющих» символов. Например, нажатие Compose, латинских «o» и «c» введёт «©», а нажатие Compose, «з» и «=» — «₽». .caps = Клавиша Caps Lock - .ctrl = Control - .ctrl-right = Правый Ctrl - .swap-with-ctrl = Замена Control - .alt = Alt - .alt-left = Левый Alt - .alt-right = Правый Alt - .super = Super - .super-left = Левый Super - .super-right = Правый Super - .menu = Клавиша «Меню» - .backspace = Backspace - .escape = Escape - .swap-with-escape = Замена Escape - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = Отсутствует keyboard-typing-assist = Ввод текста .repeat-rate = Скорость повторения .repeat-delay = Задержка повторения @@ -600,11 +571,9 @@ vpn-error = Ошибка VPN .connect = Не удалось подключиться к VPN .connection-editor = Сбой редактора соединений .connection-settings = Не удалось получить настройки активных подключений - .openvpn-config-path = Некорректный путь к файлу конфигурации OpenVPN - .openvpn-config-path-desc = Выбранный файл должен находиться в локальной файловой системе. .updating-state = Не удалось обновить состояние сетевого менеджера - .wireguard-config-path = Некорректный путь к файлу конфигурации WireGuard - .wireguard-config-path-desc = Выбранный файл должен находиться в локальной файловой системе. + .wireguard-config-path = Некорректный путь до файла конфигурации WireGuard + .wireguard-config-path-desc = Выбранный файл должен находиться на локальной файловой системе. .wireguard-device = Не удалось создать устройство WireGuard .with-password = Не удалось настроить { $field -> @@ -919,9 +888,3 @@ xdg-entry-x11-applications = Совместимость с приложения xdg-entry-window-management-comment = Действие кнопки Super, параметры размещения и управления окнами xdg-entry-wired-comment = Проводные соединения и профили no-search-results = По запросу не найдено ни одной сети. -workspaces-navigation = Навигация - .wraparound = Переход между крайними рабочими столами при помощи сочетаний клавиш и жестов -bluetooth-display-passkey = Сопряжение по Bluetooth - .description = Введите следующий код на { $device }, затем нажмите Enter -bluetooth-display-pin = Сопряжение по Bluetooth - .description = Введите следующий PIN-код на { $device }, затем нажмите Enter diff --git a/i18n/sat/cosmic_settings.ftl b/i18n/sat/cosmic_settings.ftl deleted file mode 100644 index 08b54bd..0000000 --- a/i18n/sat/cosmic_settings.ftl +++ /dev/null @@ -1,2 +0,0 @@ -cancel = ᱵᱟᱹᱛᱤᱞ -save = ᱥᱟᱧᱪᱟᱣ diff --git a/i18n/sr/cosmic_settings.ftl b/i18n/sr/cosmic_settings.ftl index da3828d..e69de29 100644 --- a/i18n/sr/cosmic_settings.ftl +++ b/i18n/sr/cosmic_settings.ftl @@ -1,822 +0,0 @@ -cancel = Откажи -connected = Повезано -confirm = Потврди -panel-left = Лево -connect = Повежи -super-key = Радња Супер тастера - .launcher = Отвори покретача - .workspaces = Отвори радне просторе - .applications = Отвори програме - .disable = Онемогући -x-minutes = - { $number } { $number -> - [one] минут - *[other] минута - } -vrr = Променљива стопа освежавања - .enabled = Омогућено - .force = Увек - .auto = Самостално - .disabled = Онемогућено -window-hint-accent = Боја наговештаја за активни прозор -fit-to-screen = Уклопи у екран -control-tint = Боја компоненте за управљање - .desc = Користи се за позадине уобичајених дугмади, поља за претрагу, поља за унос текста и сличних компоненти -close = Затвори -save = Сачувај -vpn-error = Грешка ВПН-а - .config = Неуспешно додавање поставки ВПН-а - .connect = Неуспешно повезивање на ВПН - .connection-editor = Уређивач везе није успео - .connection-settings = Неуспешно преузимање подешавања за активне везе - .updating-state = Неуспешно ажурирање стања руководиоца мреже - .wireguard-config-path = Неисправна путања до датотеке подешавања за Вајергард - .wireguard-config-path-desc = Изабрана датотека мора бити у локалном систему датотека. - .wireguard-device = Неуспешно стварање уређаја за Вајергард - .with-password = - Неуспешно постављање ВПН { $field -> - *[username] username - [password] password - [password-flags] password-flags - } помоћу nmcli -toggle-stacking = Окини слагање прозора -panel-top = Горе -no-applets-found = Није пронађен ниједан програмчић... -region = Област -zoom-in = Увећај -place-here = Поставите програмчиће овде --requires-restart = Захтева поновно покретање -workspaces-orientation = Смер радних простора - .vertical = Усправно - .horizontal = Водоравно -acceleration-desc = Самостално прилагођава осетљивост праћења на основу брзине -all-displays = Сви екрани -scheduling = Заказивање - .manual = Ручно заказивање -frosted = Ефекат матираног стакла на системском прочељу - .desc = Примењује замућење позадине на окно, док, програмчиће, покретач и библиотеку програма -password = Лозинка -about-hardware = Хардвер - .model = Модел хардвера - .memory = Меморија - .processor = Процесор - .graphics = Графика - .disk-capacity = Капацитет диска -short = Кратко -vpn = ВПН - .connections = ВПН везе - .remove = Уклони профил везе - .select-file = Изабери датотеку са поставкама ВПН-а - .error = Неуспешно додавање ВПН подешавања -power-mode = Режим напајања - .battery = Продужено трајање батерије - .battery-desc = Смањена употреба напајања и утишан рад - .balanced = Уравнотежено - .balanced-desc = Тихи учинак и умерена потрошња енергије - .performance = Висок учинак - .performance-desc = Највећи учинак и потрошња енергије - .no-backend = Позадинац није пронађен. Инсталирај system76-power или power-profiles-daemon. -wired = Жичана - .adapter = Жичани адаптер { $id } - .connections = Жичане везе - .devices = Жичани уређаји - .remove = Уклони профил везе -bluetooth-available = Уређаји у близини -cable-unplugged = Кабел није прикључен -color-picker = Бирач боје -interface-font = Системски фонт -forget-dialog = Заборавити ову бежичну мрежу? - .description = Поново ћете морати да унесете лозинку да бисте у будућности користили ову бежичну мрежу. -remove = Уклони -default = Подразумевано -zoom-out = Умањи -hot-corner = Врући угао - .top-left-corner = Омогући горњи леви врући угао за радне просторе -keyboard-typing-assist = Куцање - .repeat-rate = Брзина понављања - .repeat-delay = Интервал понављања -edge-gravity = Лебдећи прозори теже ка најближим ивицама -amplification = Појачање - .desc = Омогућава повећање јачине звука на 150% -recent-colors = Недавне боје -about-os = Оперативни систем - .os = Оперативни систем - .os-architecture = Архитектура оперативног система - .kernel = Издање језгра - .desktop-environment = Радно окружење - .windowing-system = Прозорски систем -panel-behavior-and-position = Понашање и положаји - .autohide = Самостално сакриј траку - .dock-autohide = Самостално сакриј док - .position = Положај на екрану - .display = Прикажи на екрану -add-language = Додај језик - .context = Додај језик -password-mismatch = Лозинка и потврда се морају поклапати -accessibility = Приступачност - .vision = Вид - .on = Укључено - .off = Искључено - .unavailable = Недоступно - .screen-reader = Читач екрана - .high-contrast = Режим високог контраста - .invert-colors = Изврни боје - .color-filters = Филтери боје -container-background = Позадина контејнера - .desc-detail = Боја позадине контејнера се користи за бочни панел за навигацију, бочну фиоку, прозорчиће и сличне елементе. Подразумевано, боја позадине контејнера се самостално изводи из позадине прозора. - .reset = Врати на самостално - .desc = Користи се за бочни панел за навигацију, бочну фиоку, прозорчиће и сличне елементе -primary-button = Главно дугме - .desc = Подешава поредак физичких дугмади - .left = Лево - .right = Десно -sound-alerts = Упозорења - .volume = Јачина звука упозорења - .sound = Звук упозорења -icon-theme = Тема иконица - .desc = Примењује различит скуп иконица на програме -import = Увези -keyboard-shortcuts = Пречице тастатуре - .desc = Прикажи и прилагоди пречице -switch-between-windows = Пребацујте се између прозора -text-tint = Боја текста прочеља - .desc = Користи се за одређивање боја текста прочеља које имају довољан контраст на различитим површинама -online-accounts = Налози на мрежи - .desc = Додај налоге, ИМАП и СМТП, пословну пријаву -open-workspaces-view = Отвори преглед радних простора -all = Све -remove-user = Уклони корисника -unknown = Непознато -sound-input = Улаз - .volume = Јачина звука на улазу - .device = Улазни уређај - .level = Ниво улаза -add-another-keybinding = Додај још једну комбинацију тастера -copy-to-clipboard = Копирај у оставу -monospace-font = Фонт утврђене ширине -experimental-settings = Експериментална подешавања -recent-folders = Недавне фасцикле -color-filter = Врста филтера боје - .unknown = Непознат филтер је активан - .greyscale = Сива скала - .deuteranopia = Зелена/црвена (слабост зелене боје, деутеранопија) - .protanopia = Црвена/зелена (слабост црвене боје, протанопија) - .tritanopia = Плава/жута (слабост плаве боје, тританопија) -migrate-workspace = - Пресели радни простор на излаз { $direction -> - *[down] доле - [left] лево - [right] десно - [up] горе - } -connecting = Повезивање… -battery = Батерија - .minute = - { $value } { $value -> - [one] минут - *[other] минута - } - .hour = - { $value } { $value -> - [one] сат - *[other] сати - } - .day = - { $value } { $value -> - [one] дан - *[other] дана - } - .less-than-minute = Мање од једног минута - .and = и - .remaining-time = - { $time } до { $action -> - [full] пуног - *[other] празног - } -search-applets = Претрага програмчића... -export = Извези -pinch-to-zoom = Штипај за увећање - .desc = Користите два прста за увећање садржаја, за програме који подржавају увећање -wifi = Бежична - .adapter = Бежични адаптер { $id } - .forget = Заборави ову мрежу -x-hours = - { $number } { $number -> - [one] сат - *[other] сати - } -added = Додато -input-source-switch = Промени извор уноса језика тастатуре -focus-navigation = Навигација фокусом - .focus-follows-cursor = Фокус прати показивач - .focus-follows-cursor-delay = Интервал праћења фокуса показивачем у мс - .cursor-follows-focus = Показивач прати фокус -full-name = Име и презиме -app-background = Позадина прозора -panel-right = Десно -keyboard-sources = Извори уноса - .desc = Извори уноса се могу пребацити помоћу комбинације тастера Super+Space. Ово се може прилагодити у подешавањима пречица тастатуре. - .move-up = Помери горе - .move-down = Помери доле - .settings = Подешавања - .view-layout = Прикажи распоред тастатуре - .remove = Уклони - .add = Додај извор уноса -nav-shortcuts = Навигација - .prev-output = Усредсреди претходни излаз - .next-output = Усредсреди следећи излаз - .last-workspace = Усредсреди последњи радни простор - .prev-workspace = Усредсреди претходни радни простор - .next-workspace = Усредсреди следећи радни простор - .focus = - Усредсреди прозор { $direction -> - *[down] доле - [in] унутра - [left] лево - [out] напоље - [right] десно - [up] горе - } - .output = - Пребаци на излаз { $direction -> - *[down] доле - [left] лево - [right] десно - [up] горе - } - .workspace = Пребаци на радни простор { $num } -hearing = Слух - .mono = Пусти стерео звук као моно -preferred-languages = Жељени језици - .desc = Редослед језика одређује који се језик користи за корисничко прочеље. Измене ступају на снагу при следећој пријави. -panel-style = Стил - .anchor-gap = Размак између траке и ивица екрана - .dock-anchor-gap = Размак између дока и ивица екрана - .extend = Прошири траку до ивица екрана - .dock-extend = Прошири док до ивица екрана - .appearance = Изглед - .size = Величина - .background-opacity = Непровидност позадине -username = Корисничко име -light = Светла -panel-appearance = Изглед - .match = Поклопи радну површину - .light = Светла - .dark = Тамна -workspaces-multi-behavior = Понашање са више екрана - .span = Радни простори се протежу преко екрана - .separate = Екрани имају раздвојене радне просторе -replace-shortcut-dialog = Заменити пречицу? - .desc = { $name } користи { $shortcut }. Ако је замените, { $name } ће бити онемогућено. -rgb = РГБ -about-device = Назив уређаја - .desc = Овај назив се појављује другим мрежним или Блутут уређајима -no-vpn = Нема доступних ВПН веза. -start-segment = Почетак сегмента -desktop = Радна површ -identity = Идентитет -reset-to-default = Врати на подразумевано -disconnect = Прекини везу -ok = У реду -app = Космик подешавања -debug = Уклањање грешака -enable-export = Примени тренутну тему на Гномове програме - .desc = Не подржавају сви скупови алата самостално пребацивање. Програме који нису Космик може бити потребно поново покренути након промене теме. -number = { $number } -shortcut-name = Назив пречице -style = Стил - .round = Заобљено - .slightly-round = Благо заобљено - .square = Квадратно -panel-applets = Подешавање - .dock-desc = Подеси програмчиће дока - .desc = Подеси програмчиће траке -qr-code-unavailable = КР код није доступан -small = Мало -window-tiling = Поплочавање прозора - .horizontal = Подеси водоравни смер - .vertical = Подеси усправни смер - .swap-window = Замени прозор - .toggle-tiling = Промени стање поплочавања прозора - .toggle-stacking = Промени стање слагања прозора - .toggle-floating = Промени стање плутања прозора - .toggle-orientation = Промени смер -change-password = Промени лозинку -disable-while-typing = Онемогући током куцања -long = Дуго -copied-to-clipboard = Копирано у оставу -bluetooth-confirm-pin = Потврдите ПИН блутута - .description = Потврдите да се следећи ПИН подудара са оним који је приказан на { $device } -legacy-app-scaling = Скалирање програма у Икс-11 систему прозора - .scaled-gaming = Оптимизуј за игре и програме у пуном екрану - .gaming-description = Икс-11 програми се могу појавити благо већи/мањи у поређењу са Вејленд програмима - .scaled-applications = Оптимизуј за програме - .applications-description = Игре и Икс-11 програми у пуном екрану могу се не поклопити са резолуцијом вашег екрана - .scaled-compatibility = Режим максималне усаглашености - .compatibility-description = Икс-11 програми се могу појавити замућеним на HiDPI екранима - .preferred-display = Жељени екран за игре и Икс-11 програме у пуном екрану - .no-display = Ништа -night-light = Ноћно светло - .auto = Самостално (од заласка до изласка сунца) - .desc = Умањи плаво светло топлијим бојама -custom-shortcuts = Произвољне пречице - .add = Додај пречицу - .context = Додај произвољну пречицу - .none = Нема произвољних пречица -visible-networks = Видљиве мреже -applets = Програмчићи -terminate = Окончај -window-hint-accent-toggle = Употреби акцентну боју теме као наговештај за активни прозор -type-to-search = Куцајте за претрагу... -workspaces-behavior = Понашање радног простора - .dynamic = Динамички радни простори - .dynamic-desc = Самостално уклања празне радне просторе. - .fixed = Неизмењив број радних простора - .fixed-desc = Додај или уклони радне просторе у прегледу. -wireguard-dialog = Додај Вајергард уређај - .description = Изаберите назив уређаја за подешавање Вајергарда. -remove-connection-dialog = Уклонити профил везе? - .vpn-description = Биће потребно да поново унесете лозинку како бисте у будућности користили ову мрежу. - .wired-description = Мораћете поново да креирате овај профил да бисте га у будућности користили. -password-confirm = Потврди лозинку -click-behavior = Понашање клика - .click-finger = Секундарни клик са два прста и средњи клик са три прста - .button-areas = Секундарни клик у доњем десном углу и средњи клик у доњем центру -move-windows = Помери прозоре - .direction = - Помери прозор { $direction -> - *[down] доле - [left] лево - [right] десно - [up] горе - } - .display = - Помери прозор за један екран { $direction -> - *[down] доле - [left] лево - [right] десно - [up] горе - } - .workspace = - Помери прозор за један радни простор { $direction -> - *[below] испод - [left] лево - [right] десно - [above] изнад - } - .workspace-num = Помери прозор у радни простор { $num } - .prev-workspace = Помери прозор у претходни радни простор - .next-workspace = Помери прозор у следећи радни простор - .last-workspace = Премешта прозор на последњи радни простор - .next-display = Премешта прозор на следећи екран - .prev-display = Премешта прозор на претходни екран - .send-to-prev-workspace = Премешта прозор у претходни радни простор - .send-to-next-workspace = Премешта прозор у следећи радни простор -switch-workspaces = Пребаци радне просторе - .horizontal = Превлачење са четири прста лево/десно - .vertical = Превлачење са четири прста горе/доле -applications = Програми -dbus-connection-error = Није успело повезивање са Д-сабирницом -system-controls = Системске контроле -auto-switch = Самостално пребацивање између светлог и тамног режима - .sunrise = Пребацује на светли режим при изласку сунца - .sunset = Пребацује на тамни режим при заласку сунца - .next-sunrise = Пребацује на светли режим при следећем изласку сунца - .next-sunset = Пребацује на тамни режим при следећем заласку сунца -dark = Тамна -add-vpn = Додај ВПН -keyboard-numlock-boot = Num Lock - .boot-state = Стање при покретању - .last-boot = Последње покретање - .on = Укључено - .off = Искључено - .set = Постави стање Num Lock-а при подизању -about-related = Повезана подешавања - .support = Потражите подршку -tap-to-click = Тапни за клик - .desc = Омогућава тап једним прстом за примарни клик, тап два прста за секундарни клик и тап три прста за средњи клик -interface-density = Густина прочеља - .comfortable = Удобно - .compact = Збијено - .spacious = Пространо -open-application-library = Отвори библиотеку програма -slow = Споро -network-name = Назив мреже -large = Велико -scrolling = Помицање - .two-finger = Помицање са два прста - .edge = Помицање дуж ивице једним прстом - .speed = Брзина помицања - .natural = Природно помицање - .natural-desc = Помакни садржај, уместо приказа -auth-dialog = Потребно је потврђивање идентитета - .vpn-description = Унесите корисничко име и лозинку које захтева ВПН услуга. - .wifi-description = Унесите лозинку или кључ за шифровање. Такође се можете повезати притискањем дугмета „WPS“ на рутеру. -add-user = Додај корисника -enable = Омогући -add-image = Додај слику -migrate-workspace-next = Пресели радни простор на следећи излаз -airplane-on = Режим авиона је укључен. -formatting = Форматирање - .dates = Датуми - .time = Време - .date-and-time = Датум и време - .numbers = Бројеви - .measurement = Мерење - .paper = Папир -disabled = Онемогућено -add-applet = Додај програмчић -show-extended-input-sources = Прикажи проширене изворе улаза -mode-and-colors = Режим и боје -forget = Заборави -center-segment = Средишњи сегмент -panel-missing = Подешавање траке недостаје - .desc = Датотека са подешавањима траке недостаје због употребе прилагођеног подешавања или је оштећена. - .fix = Врати на подразумевано -invalid-username = Неисправно корисничко име -mirroring = Пресликавање - .id = Пресликавање { $id } - .dont = Немој пресликати - .mirror = Пресликај { $display } - .project = - Пројектуј на { $display -> - [all] све екране - *[other] { $display } - } - .project-count = - Пројектује на { $count } { $count -> - [1] други екран - *[other] других екрана - } -orientation = Смер - .standard = Обично - .rotate-90 = Заокрени за 90° - .rotate-180 = Заокрени за 180° - .rotate-270 = Заокрени за 270° -auto = Самостално -end-segment = Крајњи сегмент -bluetooth-adapters = Блутут адаптери -time-format = Формат датума и времена - .twenty-four = 24-часовни формат - .show-seconds = Прикажи секунде - .first = Први дан у недељи - .show-date = Прикажи датум у програмчићу за време - .friday = Петак - .saturday = Субота - .sunday = Недеља - .monday = Понедељак -accent-color = Боја за наглашавање -type-key-combination = Укуцај комбинацију тастера -manage-windows = Управљај прозорима - .close = Затвори прозор - .maximize = Увећај прозор - .fullscreen = Прозор преко целог екрана - .minimize = Умањи прозор - .resize-inwards = Промени величину прозора ка унутра - .resize-outwards = Промени величину прозора ка споља - .toggle-sticky = Окини лепљиви прозор -never = Никада -install-additional-languages = Инсталирај додатне језике -settings = Подешавања -sound-output = Излаз - .volume = Јачина излаза - .device = Излазни уређај - .level = Ниво излаза - .config = Поставка - .balance = Равнотежа - .left = Лево - .right = Десно -window-controls = Контроле прозора - .maximize = Прикажи дугме за увећање - .minimize = Прикажи дугме за умањење - .active-window-hint = Прикажи ознаку за активни прозор -window-management-appearance = Управљање прозорима - .active-hint = Величина ознаке за активни прозор - .gaps = Размаци око поређаних прозора -migrate-workspace-prev = Пресели радни простор на претходни излаз -legacy-app-global-shortcuts = Опште пречице у програмима Икс-11 - .desc = Опште пречице омогућавају да притисаци тастатура и догађаји дугмића миша у програмима буду препознати од стране других програма за функције као што су „притисни-за-говор“ или „притисни-за-утишавање“. Подразумевано, опште пречице су онемогућене у програмима Икс-11 како би се осигурало да други програми не могу пратити догађаје тастатуре и миша који садрже осетљиве податке. - .none = Нема кључева - .modifiers = Заменски тастери (Super, Shift, Control, Alt) - .combination = Сви тастери док су заменски тастери Super, Control или Alt притиснути - .all = Сви тастери - .mouse = Догађаји дугмади миша у Икс-11 програмима -activate = Покрени -replace = Замени -power-saving = Могућности штедње енергије - .turn-off-screen-after = Искључи екран након - .auto-suspend = Самостално обустављање - .auto-suspend-ac = Самостално обустављање када је прикључен - .auto-suspend-battery = Самостално обустављање при напајању батеријом -connected-devices = Повезани уређаји - .unknown = Непознат уређај -icons-and-toolkit = Иконице и теме скупа алата -sound-applications = Програми - .desc = Јачина звука и подешавања програма -time-zone = Временска зона - .auto = Самостална временска зона - .auto-info = Захтева услуге локације и приступ интернету -dialog-add = Додај -fast = Брзо -add-color = Додај боју -add-network = Додај мрежу - .profile = Додај профил -network-device-state = - .activated = Повезано - .config = Повезује се - .deactivating = Веза се прекида - .disconnected = Веза прекинута - .failed = Неуспешно повезивање - .ip-check = Провера везе - .ip-config = Захтевање ИП и информација о рутирању - .need-auth = Потребно је потврђивање идентитета - .prepare = Припрема за повезивање - .secondaries = Чекање секундарне везе - .unavailable = Недоступно - .unknown = Непознато стање - .unmanaged = Неуправљиво - .unplugged = Кабел није прикључен -command = Наредба -gestures = Гестови - .four-finger-down = Превлачење са четири прста на доле - .four-finger-left = Превлачење са четири прста на лево - .four-finger-right = Превлачење са четири прста на десно - .four-finger-up = Превлачење са четири прста на горе - .three-finger-any = Превлачење са три прста у било ком смеру -system = Систем и налози -no-networks = Ниједна мрежа није пронађена. -open-new-folder = Отвори нову фасциклу -panel-bottom = Доле -share = Дељење мреже -add = Додај -fill = Попуна -custom = Прилагођено -bluetooth-paired = Претходно повезани уређаји - .connect = Повежи - .battery = { $percentage }% батерија -dialog = Прозорче - .title = Задржати подешавања екрана? - .keep-changes = Задржи измене - .change-prompt = Измене подешавања ће се самостално вратити за { $time } секунди. - .revert-settings = Врати подешавања -navigate = Навигирај -workspaces-overview-thumbnails = Сличице прегледа радних простора - .show-number = Прикажи број радног простора - .show-name = Прикажи назив радног простора -color = Боја - .depth = Дубина боје - .profile = Профил боје - .sidebar = Профили боја - .temperature = Температура боје -hex = Хекс -magnifier = Лупа - .controls = - Или употребите ове пречице: { $zoom_in -> - [zero] { "" } - *[other] - { "" } - { $zoom_in } за увећање, - }{ $zoom_out -> - [zero] { "" } - *[other] - { "" } - { $zoom_out } за умањење, - } - Супер + помакните точком миша - .scroll_controls = Омогући увећање мишем или додирном таблом помоћу Супер + помицање - .show_overlay = Прикажи прекривање лупе - .increment = Корак увећања - .signin = Покрени лупу при пријави - .applet = Окини лупу у програмчићу на траци - .movement = Померање увећаног прегледа - .continuous = Континуирано показивачем - .onedge = Када показивач досегне ивицу - .centered = За задржавање показивача на средини -colors = Боје -administrator = Администратор - .desc = Администратори могу да промене подешавања за све кориснике, као и да додају и уклоне друге кориснике -scan-to-connect-description = Скенирај КР код да би се повезао на ову мрежу. -modified = { $count } измењено -sound-usb-audio = УСБ аудио -sound-device-profiles = Профили уређаја -sound-hd-audio = ХД аудио -shadow-and-corners = Сенка и углови прозора -shadows-tiling = Поплочани прозори - .clip = Поклопи системске углове - .shadow = Примени сенке -shadows-floating = Лебдећи прозори - .clip = Поклопи системске углове и примени сенке -sound-device-port-unplugged = Ископчано -workspaces-overview = Преглед радних простора - .action-on-typing = Радња при куцању - .none = Ништа - .launcher = Отвори покретач - .applications = Отварање програма -xdg-entry-touchpad = Додирна табла -time-region = Регион и језик -power = Напајање и батерија -xdg-entry-wired = Жичана -xdg-entry-startup-apps-comment = Подеси програме који се покрећу при пријави -xdg-entry-region-language = Регион и језик -time-date = Датум и време - .auto = Постави самостално - .auto-ntp = Датум и време ће се самостално ажурирати када се постави временска зона -xdg-entry-mouse-keywords = COSMIC;Mouse;Acceleration;Scrolling;Космик;миш;убрзање;помицање;Kosmik;miš;ubrzanje;pomicanje; -xdg-entry-bluetooth-comment = Управљај Блутут уређајима -xdg-entry-notifications-keywords = COSMIC;Notification;Lock;Космик;обавештење;закључавање;Kosmik;obaveštenje;zaključavanje; -xdg-entry-startup-apps-keywords = COSMIC;Startup;Application;Космик;Покретање;Програм;kosmik;pokretanje;program; -xdg-entry-default-apps-comment = Подразумевани веб-прегледач, програм за е-пошту, прегледач датотека и остали програми -xdg-entry-keyboard-comment = Извори уноса, пребацивање, унос посебних знакова, пречице -xdg-entry-wired-keywords = COSMIC;Wired;LAN;Network;Connection;Космик;Жичана;ЛАН;Мрежа;Веза;kosmik;žičana;lan;mreža;veza; -xdg-entry-power = Напајање и батерија -xdg-entry-appearance-keywords = COSMIC;Accent;Color;Icon;Font;Theme;Космик;Нагласак;Боја;Иконица;Фонт;Тема;kosmik;naglasak;boja;ikonica;font;tema -xdg-entry-mouse = Миш -xdg-entry-dock-keywords = COSMIC;Dock;Panel;Applet;Космик;Док;Окно;Програмчић;kosmik;dok;okno;programčić -bluetooth = Блутут - .status = Овај систем је видљив као { $aliases } док су подешавања за Блутут отворена. - .connected = Повезано - .connecting = Повезује се - .disconnecting = Веза се прекида - .connect = Повежи - .disconnect = Прекини везу - .forget = Заборави - .dbus-error = Дошло је до грешке при интеракцији са Д-сабирницом: { $why } - .disabled = Услуга блутута је онемогућена - .inactive = Услуга блутута није покренута - .unknown = Није могуће покренути услугу блутута. Да ли је BlueZ инсталиран? -xdg-entry-mouse-comment = Брзина миша, убрзање и природно помицање -xdg-entry-system = Систем и налози -firmware = Фирмвер -xdg-entry-panel-keywords = COSMIC;Panel;Applet;Космик;површ;програмчић;Kosmik;površ;programčić -xdg-entry-window-management = Управљање прозорима -xdg-entry-a11y = Приступачност -xdg-entry-time-language-comment = Управљај системским датумом, временом, облашћу и језиком -xdg-entry-desktop-keywords = COSMIC;Desktop;Космик;Радна површина;kosmik;radna površina; -default-apps = Подразумевани програми - .web-browser = Веб прегледач - .file-manager = Управник датотека - .mail-client = Програм за е-пошту - .music = Музика - .video = Видео - .photos = Фотографије - .calendar = Календар - .terminal = Терминал - .other-associations = Остала повезивања - .text-editor = Уређивач текста - .not-installed = Није инсталирано -xdg-entry-x11-applications-keywords = COSMIC;X11;Application;Game;Compatibility;Космик;Икс-11;Програм;Игрица;Усаглашеност;kosmik;iks-11;program;igrica;usaglašenost; -xdg-entry-displays-comment = Управљај подешавањима поставки екрана -xdg-entry-touchpad-keywords = COSMIC;Touchpad;Gesture;Космик;додирна табла;гест;Kosmik;dodirna tabla;gest; -xdg-entry-time-language = Време и језик -xdg-entry-users = Корисници -window-management = Управљање прозорима -xdg-entry-system-keywords = COSMIC;System;Info;Accounts;Firmware;Космик;Систем;Подаци;Налози;Фирмвер;kosmik;sistem;podaci;nalozi;firmver; -xdg-entry-default-apps = Подразумевани програми -xdg-entry-wireless-keywords = Космик;Бежична;Вај-фај;Мрежа;Веза; -xdg-entry-applications-comment = Подразумевани програми, почетни програми и подешавања усаглашености програма за Икс-11 -appearance = Изглед -mouse = Миш - .speed = Брзина миша - .acceleration = Омогући убрзање миша -dock = Док -xdg-entry-about-keywords = COSMIC;About;Космик;О програму;Kosmik;O programu -xdg-entry-panel = Површ -xdg-entry-notifications = Обавештења -display = Екрани - .arrangement = Распоред екрана - .arrangement-desc = Превуците екране да бисте их преуредили - .enable = Омогући екран - .external = { $size } { $output } спољни екран - .laptop = { $size } екран преносиног рачунара - .options = Подешавања приказа - .refresh-rate = Учесталост освежавања - .resolution = Резолуција - .scale = Размера - .additional-scale-options = Додатне могућности размере -xdg-entry-a11y-keywords = COSMIC;Accessibility;A11y;Screen;Reader;Magnifier;Contrast;Color;Космик;Приступачност;Екран;Читач;Лупа;Контраст;Боја;kosmik;pristupačnost;ekran;čitač;lupa;kontrast;boja; -xdg-entry-wireless-comment = Бежичне везе и профили везе -xdg-entry-desktop = Радна површина -xdg-entry-date-time-keywords = COSMIC;Time;Zone;Космик;Време;Зона;kosmik;vreme;zona; -xdg-entry-desktop-comment = Позадина, изглед, окно, док, управљање прозорима и подешавања радног простора -xdg-entry-wallpaper = Позадина -xdg-entry-keyboard = Тастатура -xdg-entry-a11y-comment = Читач екрана, лупа, велики контраст и филтери боја -xdg-entry-displays = Екрани -xdg-entry-network = Мрежа и бежична веза -sound = Звук -xdg-entry-date-time = Датум и време -notifications = Обавештења -xdg-entry-users-comment = Потврђивање идентитета и кориснички налози -startup-apps = Почетни програми - .add = Додај програм - .user = Програми који се покрећу када се пријавите - .none = Није додат ниједан програм за покретање - .remove-dialog-title = Уклонити { $name }? - .remove-dialog-description = Уклонити овај програм за покретање? - .add-startup-app = Додај програм за покретање -xdg-entry-input-comment = Подешавања тастатуре и миша -xdg-entry-bluetooth-keywords = COSMIC;Bluetooth;Космик;Блутут;kosmik;blutut; -about = О систему -input-devices = Улазни уређаји -xdg-entry-dock-comment = Необавезна трака за апликације и програмчиће -xdg-entry-network-keywords = COSMIC;Network;Wireless;WiFi;VPN;Космик;мрежа;бежична веза;бежична;ВПН;Kosmik;mreža;bežična veza;bežična;vpn; -xdg-entry-wallpaper-comment = Слике позадине, боје и могућности покретног приказа -xdg-entry-dock = Док -xdg-entry-startup-apps = Почетни програми -workspaces = Радни простори -xdg-entry-wireless = Бежична -xdg-entry-workspaces-keywords = COSMIC;WiFi;Wi-Fi;Network;Connection;Космик;Радни простор;Смер;Преглед;Монитор;kosmik;radni prostor;smer;pregled;monitor; -xdg-entry-system-comment = Подаци о систему, налози и ажурирања фирмвера -xdg-entry-x11-applications-comment = Размера програма прозорног система Икс-11, главни екран и опште пречице -xdg-entry-region-language-comment = Форматирајте датуме, време и бројеве на основу вашег региона -panel = Трака -xdg-entry-wallpaper-keywords = COSMIC;Wallpaper;Background;Slideshow;Космик;позадина;позадина;покретни приказ;Kosmik;pozadina;pozadina;pokretni prikaz; -xdg-entry-users-keywords = COSMIC;User;Account;Космик;корисник;налог;Kosmik;korisnik;nalog; -xdg-entry-about-comment = Назив уређаја, подаци о хардверу, подразумевана подешавања оперативног система -xdg-entry-vpn-keywords = COSMIC;VPN;Network;Connection;OpenVPN;OpenConnect;Космик;ВПН;мрежа;веза;ОпенВПН;ОпенКонект;kosmik;vpn;mreža;veza;openvpn;openkonekt; -users = Корисници - .admin = Админ - .standard = Обичан - .profile-add = Изаберите слику профила -xdg-entry-appearance-comment = Боје нагласка и теме -xdg-entry-time-language-keywords = COSMIC;System;Time;Date;Region;Language;Космик;систем;време;датум;област;језик;Kosmik;sistem;vreme;datum;oblast;jezik; -xdg-entry-input-keywords = COSMIC;Input;Keyboard;Mouse;Mice;Космик;Унос;Тастатура;Миш;Мишеви;kosmik;unos;tastatura;miš;miševi; -xdg-entry-comment = Програм Подешавања за Космик радну површину -xdg-entry-notifications-comment = Не узнемиравај, обавештења на закључаном екрану и подешавања по програмима -xdg-entry-applications = Програми -xdg-entry-sound-keywords = COSMIC;Sound;Audio;Alert;Pipewire;Космик;Звук;Аудио;Упозорење;Пајпвајер;kosmik;zvuk;audio;upozorenje;pajpvajer; -xdg-entry-power-keywords = COSMIC;Power;Battery;Космик;Напајање;Батерија;kosmik;napajanje;baterija -legacy-applications = Усаглашеност програма Икс-11 -xdg-entry-default-apps-keywords = COSMIC;Default;Application;Космик;Подразумевано;Програм;kosmik;podrazumevano;program -xdg-entry-keywords = COSMIC;Settings;Космик;Подешавања;kosmik;podešavanja; -xdg-entry-region-language-keywords = COSMIC;Region;Language;Date;Format;Time;Locale;Localization;Космик;Регион;Језик;Датум;Формат;Време;Локалитет;Локализација;kosmik;region;jezik;datum;format;vreme;lokalitet;lokalizacija; -xdg-entry-about = О програму -xdg-entry-input = Улазни уређаји -xdg-entry-applications-keywords = COSMIC;Default;Application;Startup;X11;Compatibility;Космик;Подразумевано;Програм;Покретање;Икс-11;Усаглашеност;kosmik;podrazumevano;program;pokretanje;iks-11;usaglašenost -xdg-entry-sound-comment = Подешавања звука за уређаје, упозорења и програме -wallpaper = Позадина - .change = Промени слику сваких - .fit = Уклапање позадине - .folder-dialog = Изаберите фасциклу позадине - .image-dialog = Изаберите слику позадине - .plural = Позадине - .same = Иста позадина на свим екранима - .slide = Покретни приказ -xdg-entry-touchpad-comment = Брзина додирне табле, могућности клика и гестова -xdg-entry-keyboard-keywords = COSMIC;Keyboard;Input;Source;Shortcuts;Космик;тастатура;унос;извор;пречице;Kosmik;tastatura;unos;izvor;prečice; -xdg-entry-vpn-comment = ВПН везе и профили везе -keyboard = Тастатура -xdg-entry-appearance = Изглед -xdg-entry-window-management-keywords = COSMIC;Window;Management;Tiling;Super;Key;Космик;Прозор;Управљање;Поплочавање;Супер;Тастер;kosmik;prozor;upravljanje;popločavanje;super;taster; -xdg-entry-workspaces-comment = Смер радних простора, преглед и понашање са више екрана -xdg-entry-network-comment = Управљај мрежним везама -xdg-entry-panel-comment = Примарна системска трака за изборнике и програмчиће -touchpad = Додирна табла - .acceleration = Омогући убрзање додирне табле - .speed = Брзина додирне табле -xdg-entry-sound = Звук -xdg-entry-power-comment = Режими напајања и могућности уштеде енергије -xdg-entry-displays-keywords = COSMIC;Display;Космик;Екран;kosmik;ekran; -time = Време и језик -xdg-entry-workspaces = Радни простори -xdg-entry-date-time-comment = Временска зона, самостална подешавања сата и форматирање времена -xdg-entry-x11-applications = Усаглашеност програма Икс-11 -xdg-entry-window-management-comment = Радња Супер тастера, могућности управљања прозором и додатне могућности поплочавања прозора -xdg-entry-wired-comment = Жичане везе и профили везе -known-networks = Познате мреже -network-and-wireless = Мрежа и бежична веза -keyboard-special-char = Унос посебних знакова - .alternate = Тастер заменских знакова - .compose = Саставни тастер - .compose-desc = Саставни тастер омогућава унос великого броја различитих знакова. Да бисте га користили, притисните саставни тастер, а затим низ знакова. На пример, саставни тастер праћено словима C и o унеће ©, док саставни тастер праћено словима a и ‘ унеће á. - .caps = Тастер Caps Lock -system-shortcut = Систем - .app-library = Отвори библиотеку програма - .brightness-down = Смањи осветљење екрана - .brightness-up = Повећај осветљење екрана - .display-toggle = Промени стање унутрашњег екрана - .home-folder = Отвори личну фасциклу - .keyboard-brightness-down = Смањи осветљење тастатуре - .keyboard-brightness-up = Повећај осветљење тастатуре - .launcher = Отвори покретач - .log-out = Одјави се - .lock-screen = Закључај екран - .mute = Утишај аудио излаз - .mute-mic = Утишај микрофонски улаз - .play-pause = Пусти/паузирај - .play-next = Следећа нумера - .play-prev = Претходна нумера - .poweroff = Искључи - .screenshot = Направи снимак екрана - .suspend = Обустави - .terminal = Отвори терминал - .touchpad-toggle = Промени стање додирне табле - .volume-lower = Смањи јачину звука на излазу - .volume-raise = Повећај јачину звука на излазу - .web-browser = Отвори веб прегледач - .window-switcher = Пребаци између отворених прозора - .window-switcher-previous = Пребаци између отворених прозора у обратном смеру - .workspace-overview = Отвори преглед радног простора -workspaces-navigation = Навигација - .wraparound = Померите се између првог и последњег радног простора помоћу пречица на тастатури и гестова -no-search-results = Ниједна мрежа се не поклопи са вашом претрагом. diff --git a/i18n/sv/cosmic_settings.ftl b/i18n/sv/cosmic_settings.ftl index 06089ec..5f216c2 100644 --- a/i18n/sv/cosmic_settings.ftl +++ b/i18n/sv/cosmic_settings.ftl @@ -111,19 +111,6 @@ style = Stil .round = Rund .slightly-round = Lite rund .square = Fyrkant - .frosted-glass = Frostat glas - .frosted-system-interface = Systemgränssnitt - .frosted-system-interface-desc = Tillämpar frostat glas på programstartare, programbibliotek, arbetsyteöversikten, kontroller som ritas upp på skärmen - .frosted-windows = Fönster - .frosted-windows-desc = Tillämpar frostat glas på fönster och dialogrutor - .frosted-panels = Paneler - .frosted-panels-desc = Tillämpar frostat glas på paneler och docka - .frosted-applets = Miniprogram - .frosted-applets-desc = Tillämpar frostat glas på miniprogrammenyer i panel och docka - .frosted-thickness = Frostens tjocklek - .less = mindre - .more = mer - .glass-opacity = Glasets ogenomskinlighet interface-density = Gränssnittstäthet .comfortable = Bekväm .compact = Tät @@ -139,7 +126,7 @@ super-key = Åtgärd för Super-tangent .launcher = Öppna programstartare .workspaces = Öppna arbetsytor .applications = Öppna program - .none = Ingen + .disable = Inaktivera edge-gravity = Flytande fönster dras till närliggande kanter ## Testinställningar @@ -613,22 +600,6 @@ keyboard-special-char = Specialteckeninmatning .compose = Compose-tangent .compose-desc = Compose-tangenten tillåter en stor mängd olika tecken att matas in. För att göra det, tryck compose och sedan en teckensekvens. Om du t.ex. trycker på compose-tangenten och sedan C och o kommer du att mata in ©, medan compose-tangenten och sedan a och ' kommer att mata in á. .caps = Caps Lock-tangent - .ctrl = Control - .ctrl-right = Höger Ctrl - .swap-with-ctrl = Byt med Control - .alt = Alt - .alt-left = Vänster Alt - .alt-right = Höger Alt - .super = Super - .super-left = Vänster Super - .super-right = Höger Super - .menu = Menytangent - .backspace = Backsteg - .escape = Escape - .swap-with-escape = Byt med Escape - .print-screen = Print Screen-tangent - .scroll-lock = Scroll Lock-tangent - .none = Inget keyboard-typing-assist = Tangenttrycksrespons .repeat-rate = Upprepningshastighet .repeat-delay = Upprepningsfördröjning @@ -877,8 +848,6 @@ vpn-error = VPN Fel .connect = Misslyckades att ansluta till VPN .connection-editor = Anslutningsredigerare misslyckades .connection-settings = Misslyckades att erhålla inställningar för aktiva anslutningar - .openvpn-config-path = Ogiltig sökväg for OpenVPN-konfiguration - .openvpn-config-path-desc = Vald fil måste ligga på ett lokalt filsystem. .updating-state = Misslyckades att uppdatera tillstånd för 'network manager' .wireguard-config-path = Ogiltig sökväg för Wireguard config .wireguard-config-path-desc = Vald fil måste ligga på ett lokalt filsystem. @@ -957,9 +926,3 @@ xdg-entry-region-language-keywords = COSMIC;Region;Språk;Datum;Format;Tid;Lokal xdg-entry-keyboard-keywords = COSMIC;Tangentbord;Inmatning;Källa;Genvägar; xdg-entry-window-management-keywords = COSMIC;Fönster;Hantering;Kaklande;Super;Tangent; no-search-results = Inga nätverk matchar din sökning. -workspaces-navigation = Navigering - .wraparound = Flytta mellan första och sista arbetsytan med hjälp av tangentbordsgenvägar och gester -bluetooth-display-passkey = Bluetooth-koppling - .description = Mata in följande säkerhetskod på { $device }, tryck sedan Enter -bluetooth-display-pin = Bluetooth-koppling - .description = Ange följande PIN på { $device }, tryck sedan Enter diff --git a/i18n/uk/cosmic_settings.ftl b/i18n/uk/cosmic_settings.ftl index fb61345..82c9769 100644 --- a/i18n/uk/cosmic_settings.ftl +++ b/i18n/uk/cosmic_settings.ftl @@ -96,19 +96,6 @@ style = Стиль .round = Заокруглений .slightly-round = Трохи заокруглений .square = Квадратний - .frosted-glass = Матове скло - .frosted-system-interface = Системні елементи - .frosted-system-interface-desc = Розмиття запускача, бібліотеки застосунків, режиму огляду й елементів керування - .frosted-windows = Вікна - .frosted-windows-desc = Розмиття вікон і діалогових вікон - .frosted-panels = Панелі - .frosted-panels-desc = Розмиття панелі й області завдань - .frosted-applets = Віджети - .frosted-applets-desc = Розмиття спливних меню віджетів - .frosted-thickness = Щільність - .less = Менше - .more = Більше - .glass-opacity = Прозорість скла # interface density left out for now window-management-appearance = Керування вікнами .active-hint = Розмір підказки активного вікна @@ -171,7 +158,7 @@ super-key = Клавіша Super .launcher = Відкриває запускач .workspaces = Відкриває меню робочих просторів .applications = Відкриває меню застосунків - .none = Нічого + .disable = Вимкнути window-controls = Керування вікнами .minimize = Показувати кнопку згортання .maximize = Показувати кнопку розгортання @@ -316,22 +303,6 @@ keyboard-special-char = Введення спеціальних символів .compose = Клавіша компонування .compose-desc = Клавіша компонування дозволяє вводити широкий спектр символів. Щоб скористатися нею, натисніть Compose, а потім послідовність символів. Наприклад, клавіша Compose, а потім C і o введуть ©, а клавіша Compose, а потім a і ‘ введуть á. .caps = Клавіша Caps Lock - .ctrl = Control - .ctrl-right = Правий Ctrl - .swap-with-ctrl = Поміняти місцями з Control - .alt = Alt - .alt-left = Лівий Alt - .alt-right = Правий Alt - .super = Super - .super-left = Лівий Super - .super-right = Правий Super - .menu = Клавіша контекстного меню - .backspace = Backspace - .escape = Escape - .swap-with-escape = Поміняти місцями з Escape - .print-screen = Print Screen - .scroll-lock = Scroll Lock - .none = Немає keyboard-typing-assist = Введення .repeat-rate = Частота повторів .repeat-delay = Затримка повторів @@ -553,7 +524,7 @@ users = Користувачі .standard = Звичайний .profile-add = Вибрати зображення профілю remove = Вилучити -connect = З’єднати +connect = З'єднати password = Пароль username = Ім'я користувача settings = Налаштування @@ -573,10 +544,10 @@ no-networks = Мереж не знайдено. no-vpn = Немає доступних VPN-з'єднань. password-confirm = Підтвердити пароль visible-networks = Видимі мережі -auth-dialog = Авторизація обов’язкова +auth-dialog = Авторизація обов'язкова .vpn-description = Введіть ім’я користувача та пароль, необхідні для служби VPN. - .wifi-description = Введіть пароль або ключ шифрування. Також можна під’єднатися через кнопку «WPS» на маршрутизаторі. -forget-dialog = Забути цю Wi‑Fi-мережу? + .wifi-description = Введіть пароль або ключ шифрування. Також можна підключитися через кнопку «WPS» на маршрутизаторі. +forget-dialog = Забути цю Wi-Fi мережу? .description = Вам потрібно буде знову ввести пароль, щоб використовувати цю мережу в майбутньому. network-device-state = .activated = З'єднано @@ -593,9 +564,9 @@ network-device-state = .unknown = Невідомий стан .unmanaged = Некерований .unplugged = Дріт від'єднано -remove-connection-dialog = Вилучити профіль з’єднання? +remove-connection-dialog = Вилучити профіль з'єднання? .vpn-description = Щоб скористатися цією мережею знову, вам потрібно буде повторно ввести пароль. - .wired-description = Щоб скористатися цим з’єднанням знову, вам потрібно буде створити цей профіль повторно. + .wired-description = Щоб скористатися цим підключенням знову, вам потрібно буде створити цей профіль повторно. vpn = VPN .connections = VPN з'єднання .error = Не вдалося додати налаштування VPN @@ -603,11 +574,9 @@ vpn = VPN .select-file = Обрати файл налаштувань VPN vpn-error = Помилка VPN .config = Не вдалося додати конфігурацію VPN - .connect = Не вдалося з’єднатися з VPN + .connect = Не вдалося з'єднатися з VPN .connection-editor = Помилка редактора з’єднань .connection-settings = Не вдалося отримати налаштування активних з’єднань - .openvpn-config-path = Неправильний шлях до файлу конфігурації OpenVPN - .openvpn-config-path-desc = Вибраний файл повинен знаходитися в локальній файловій системі. .updating-state = Не вдалося оновити стан мережевого менеджера .wireguard-config-path = Недійсний шлях до профілю WireGuard .wireguard-config-path-desc = Обраний файл має бути локальним. @@ -622,7 +591,7 @@ wifi = Wi-Fi .adapter = Бездротовий адаптер { $id } .forget = Забути цю мережу wireguard-dialog = Додати пристрій WireGuard - .description = Оберіть назву пристрою для профілю WireGuard. + .description = Оберіть ім'я пристрою для профілю WireGuard. activate = Активувати confirm = Підтвердити enable = Увімкнути @@ -638,11 +607,11 @@ bluetooth = Bluetooth .disabled = Служба Bluetooth вимкнена .inactive = Служба Bluetooth неактивна .unknown = Неможливо активувати службу Bluetooth. Можливо, у вас не встановлено пакет BlueZ? -bluetooth-paired = З’єднані у минулому пристрої - .connect = З’єднати +bluetooth-paired = З'єднані у минулому пристрої + .connect = З'єднати .battery = { $percentage }% заряду bluetooth-confirm-pin = Перевірка PIN-коду між Bluetooth-пристроями - .description = Підтвердіть, що цей PIN-код збігається із тим, який показується на іншому пристрої: { $device } + .description = Будь ласка, підтвердіть, що цей PIN-код збігається із тим, який відображається на іншому пристрої: { $device } bluetooth-available = Пристрої поблизу bluetooth-adapters = Адаптери Bluetooth accessibility = Доступність @@ -661,7 +630,7 @@ dbus-connection-error = Не вдалося з'єднатися з DBus identity = Ідентичність magnifier = Лупа .controls = - Або скористайтеся такими сполученнями: { $zoom_in -> + Або скористайтеся такими скороченнями: { $zoom_in -> [zero] { "" } *[other] { "" } @@ -793,7 +762,7 @@ startup-apps = Автозапуск .add-startup-app = Додати застосунок до автозапуску legacy-applications = Сумісність із застосунками X11 legacy-app-global-shortcuts = Глобальні сполучення клавіш у застосунках X11 - .desc = Глобальні сполучення дозволяють іншим застосункам реагувати на натискання клавіш і кнопок миші, навіть якщо вони виконані в іншому застосунку, наприклад, для функцій активації або вимкнення голосу кнопкою. Типово ця функція вимкнена у застосунках X11, щоб уникнути перехоплення чутливої інформації. + .desc = Глобальні сполучення дозволяють іншим застосункам реагувати на натискання клавіш і кнопок миші, навіть якщо вони виконані в іншому застосунку, наприклад для функцій активації або вимкнення голосу кнопкою. За замовчуванням ця функція вимкнена у застосунках X11, щоб уникнути перехоплення чутливої інформації. .none = Ніякі клавіші .modifiers = Модифікатори (Super, Shift, Control, Alt) .combination = Усі клавіши у комбінації з клавішами Super, Control або Alt @@ -818,8 +787,8 @@ invalid-username = Неприпустиме ім'я користувача password-mismatch = Обидва паролі мусять збігатися save = Зберегти qr-code-unavailable = QR-код недоступний -network-name = Назва мережі -share = Поділитись мережею +network-name = Ім'я мережі +share = Ширити мережу scan-to-connect-description = Відскануйте QR-код, щоб з'єднатися з цією мережею. sound-hd-audio = HD Аудіо sound-usb-audio = USB Аудіо @@ -830,7 +799,7 @@ shadows-tiling = Укладені вікна .clip = Вирівняти до системних кутів .shadow = Застосувати тіні shadow-and-corners = Тіні й кути вікон -sound-device-port-unplugged = Від’єднано +sound-device-port-unplugged = Відключено place-here = Розмістити тут віджети workspaces-overview = Режим огляду робочих просторів .action-on-typing = Дія при введенні тексту @@ -895,7 +864,7 @@ xdg-entry-workspaces = Робочі простори xdg-entry-date-time-comment = Часовий пояс, автоматичне налаштування годинника та формат часу xdg-entry-x11-applications = Сумісність із застосунками X11 xdg-entry-window-management-comment = Дія клавіші Super, параметри керування вікнами та додаткові налаштування укладання вікон -xdg-entry-wired-comment = Дротове з’єднання і профілі з’єднань +xdg-entry-wired-comment = Дротове з'єднання і профілі підключень xdg-entry-desktop-comment = Тло, вигляд, панель, область завдань, керування вікнами та налаштування робочого простору xdg-entry-mouse-keywords = COSMIC;Миша;Прискорення;Прокручування;Гортання;КОСМІК;КОСМОС;КОСМІЧНЕ; xdg-entry-notifications-keywords = COSMIC;Сповіщення;Блокування;КОСМІК;КОСМОС;КОСМІЧНЕ; @@ -931,9 +900,3 @@ xdg-entry-displays-keywords = COSMIC;Дисплей;Екран;КОСМІК;КО xdg-entry-bluetooth-keywords = COSMIC;Bluetooth;Блютуз;Бездротове;З’єднання;КОСМІК;КОСМОС;КОСМІЧНЕ; xdg-entry-a11y-comment = Екранний читач, лупа, високий контраст і фільтри кольорів no-search-results = Пошук не дав результатів. -workspaces-navigation = Навігація - .wraparound = Перехід між першим і останнім робочим простором сполученнями клавіш і жестами -bluetooth-display-pin = Злучення Bluetooth - .description = Введіть PIN-код на { $device }, далі натисніть Enter -bluetooth-display-passkey = Злучення Bluetooth - .description = Введіть код для створення пари на { $device }, далі натисніть Enter diff --git a/i18n/zh-CN/cosmic_settings.ftl b/i18n/zh-CN/cosmic_settings.ftl index 9a628cf..a8fab47 100644 --- a/i18n/zh-CN/cosmic_settings.ftl +++ b/i18n/zh-CN/cosmic_settings.ftl @@ -120,8 +120,6 @@ vpn-error = VPN 错误 .connect = 连接 VPN 失败 .connection-editor = 连接编辑器失败 .connection-settings = 获取活跃连接设置失败 - .openvpn-config-path = OpenVPN 配置文件路径无效 - .openvpn-config-path-desc = 所选文件必须在本地文件系统上。 .updating-state = 更新网络管理器状态失败 .wireguard-config-path = WireGuard 配置文件路径无效 .wireguard-config-path-desc = 所选文件必须在本地文件系统上。 @@ -284,7 +282,7 @@ container-background = 容器背景 .desc = 用于导航侧栏、侧边抽屉、对话框等小部件 control-tint = 控件色调 .desc = 用于标准按钮、搜索输入框、文本输入框等组件的背景 -frosted = 系统界面磨砂玻璃效应 +frosted = 系统界面磨砂玻璃效果 .desc = 对面板、程序坞、小部件、启动器和应用程序库应用背景模糊效果 enable-export = 将此主题应用到 GNOME 应用程序 .desc = 并非所有工具包都支持自动切换。非 COSMIC 应用程序可能需要在主题更改后重新启动。 @@ -296,19 +294,6 @@ style = 样式 .round = 圆角 .slightly-round = 微圆角 .square = 方角 - .frosted-glass = 磨砂玻璃效应 - .frosted-system-interface = 系统界面 - .frosted-system-interface-desc = 将磨砂玻璃应用于启动器、应用程序库、 工作区总览、屏幕控件 - .frosted-windows = 窗口 - .frosted-windows-desc = 将磨砂玻璃应用于窗口和对话框 - .frosted-panels = 面板 - .frosted-panels-desc = 将磨砂玻璃应用于面板和程序坞 - .frosted-applets = 小部件 - .frosted-applets-desc = 将磨砂玻璃应用于处在面板与程序坞的小部件 - .frosted-thickness = 磨砂厚度 - .less = 少 - .more = 多 - .glass-opacity = 玻璃不透明度 interface-density = 界面密度 .comfortable = 适中 .compact = 紧凑 @@ -348,8 +333,8 @@ small = 小 start-segment = 开始区段 panel-appearance = 外观 .match = 匹配桌面 - .light = 亮色模式 - .dark = 暗色模式 + .light = 亮色 + .dark = 暗色 panel-behavior-and-position = 行为和位置 .autohide = 自动隐藏面板 .dock-autohide = 自动隐藏程序坞 @@ -381,7 +366,7 @@ super-key = Super 键动作 .launcher = 打开启动器 .workspaces = 打开工作区 .applications = 打开应用程序 - .none = 无 + .disable = 禁用 edge-gravity = 悬浮窗口吸附到附近边缘 window-controls = 窗口控制 .maximize = 显示最大化按钮 @@ -565,22 +550,6 @@ keyboard-special-char = 特殊字符输入 .compose = 组合键 (Compose Key) .compose-desc = 组合键允许输入种类繁多的字符。使用方法:按下组合键,然后依次输入字符序列。例如,按下组合键后依次输入 C 和 o 可输入 ©,而按下组合键后依次输入 a 和 ‘ 则可输入 á。 .caps = 大写锁定键 - .ctrl = Control 键 - .ctrl-right = 右 Control 键 - .swap-with-ctrl = Control 键互换 - .alt = Alt 键 - .alt-left = 左 Alt 键 - .alt-right = 右 Alt 键 - .super = Super 键 - .super-left = 左 Super 键 - .super-right = 右 Super 键 - .menu = Menu 键 - .backspace = 退格键 - .escape = Escape 键 - .swap-with-escape = Escape 键互换 - .print-screen = Print Screen 键 - .scroll-lock = Scroll Lock 键 - .none = 无 keyboard-typing-assist = 打字 .repeat-rate = 重复率 .repeat-delay = 重复延迟 @@ -945,9 +914,3 @@ xdg-entry-keyboard-keywords = COSMIC;键盘;输入;输入源;快捷键; xdg-entry-window-management-keywords = COSMIC;窗口;管理;平铺;Super;键; xdg-entry-displays-keywords = COSMIC;显示器;屏幕; no-search-results = 无网络符合您的搜索。 -workspaces-navigation = 导航 - .wraparound = 使用快捷键和手势在第一个和最后一个工作区间切换 -bluetooth-display-passkey = 蓝牙配对 - .description = 请在 { $device } 上输入以下密钥,然后按回车键 -bluetooth-display-pin = 蓝牙配对 - .description = 请在 { $device } 上输入以下 PIN 码,然后按回车键 diff --git a/i18n/zh-TW/cosmic_settings.ftl b/i18n/zh-TW/cosmic_settings.ftl index 0a1076b..413d3a4 100644 --- a/i18n/zh-TW/cosmic_settings.ftl +++ b/i18n/zh-TW/cosmic_settings.ftl @@ -12,7 +12,7 @@ add-vpn = 新增 VPN airplane-on = 飛航模式已開啟。 cable-unplugged = 網路線已拔除 connect = 連線 -connected = 已連線 +connected = 已經連線 connecting = 連線中… disconnect = 中斷連線 forget = 忘記此網路 @@ -60,8 +60,6 @@ vpn-error = VPN 錯誤 .connect = 連線至 VPN 失敗 .connection-editor = 連線編輯器失敗 .connection-settings = 取得活動連線的設定失敗 - .openvpn-config-path = OpenVPN 設定的檔案路徑無效 - .openvpn-config-path-desc = 所選檔案必須位於本機檔案系統上。 .updating-state = 更新網路管理員狀態失敗 .wireguard-config-path = WireGuard 設定的檔案路徑無效 .wireguard-config-path-desc = 所選檔案必須位於本機檔案系統上。 @@ -70,7 +68,7 @@ vpn-error = VPN 錯誤 使用 nmcli 設定 VPN { $field -> *[username] 使用者名稱 [password] 密碼 - [password-flags] 密碼旗標 + [password-flags] 密碼選項 }失敗 wired = 有線網路 .adapter = 有線網路卡 { $id } @@ -221,11 +219,11 @@ auto-switch = 在淺色與深色模式間自動切換 container-background = 容器背景 .desc-detail = 容器背景與導航列、側邊欄、對話方塊等元件相關,預設從應用程式或視窗背景進行衍生。 .reset = 重設至自動 - .desc = 容器背景色與導覽列、側邊欄、對話方塊等元件相關 + .desc = 容器背景色與導航列、側邊欄、對話方塊等元件相關 control-tint = 控制元件色調 .desc = 使用於標準按鈕、搜尋輸入、文字輸入和類似元件的背景 frosted = 系統介面呈現磨砂玻璃的透明效果 - .desc = 將磨砂玻璃的透明效果套用至面板、Dock、小程式、啟動器及程式庫 + .desc = 將磨砂玻璃的透明效果套用至面板、程式塢、工具程式、啟動器及程式庫 enable-export = 將目前主題套用至 GNOME 應用程式 .desc = 並非所有工具組都支援自動切換。非 COSMIC 應用程式在主題變更後可能需要重新啟動。 icon-theme = 圖示主題 @@ -234,21 +232,8 @@ text-tint = 介面文字色調 .desc = 用來衍生出介面文字的顏色,其有足夠對比於各種表面 style = 樣式 .round = 圓角 - .slightly-round = 略微圓角 + .slightly-round = 略為圓角 .square = 直角 - .frosted-glass = 磨砂玻璃 - .frosted-system-interface = 系統介面 - .frosted-system-interface-desc = 將磨砂玻璃的透明效果套用至啟動器、程式庫、工作區總覽及螢幕控制 - .frosted-windows = 視窗 - .frosted-windows-desc = 將磨砂玻璃的透明效果套用至視窗及對話方塊 - .frosted-panels = 面板 - .frosted-panels-desc = 將磨砂玻璃的透明效果套用至面板及 Dock - .frosted-applets = 小程式 - .frosted-applets-desc = 將磨砂玻璃的透明效果套用至處在面板和 Dock 的小程式選單 - .frosted-thickness = 磨砂厚度 - .less = 少 - .more = 多 - .glass-opacity = 玻璃不透明度 interface-density = 介面密度 .comfortable = 舒適 .compact = 緊湊 @@ -271,19 +256,19 @@ notifications = 通知 ## Desktop: Panel panel = 面板 -add = 新增 -add-applet = 新增小程式 +add = 添增 +add-applet = 新增工具程式 all = 全部 -applets = 小程式 +applets = 工具程式 center-segment = 中間位置 end-segment = 末尾位置 large = 大 -no-applets-found = 找不到小程式... +no-applets-found = 找不到工具程式... panel-bottom = 底部 panel-left = 左側 panel-right = 右側 -panel-top = 頂端 -search-applets = 搜尋小程式... +panel-top = 頂部 +search-applets = 搜尋工具程式... small = 小 start-segment = 起始位置 panel-appearance = 外觀 @@ -292,27 +277,27 @@ panel-appearance = 外觀 .dark = 深色 panel-behavior-and-position = 行為和位置 .autohide = 自動隱藏面板 - .dock-autohide = 自動隱藏 Dock + .dock-autohide = 自動隱藏程式塢 .position = 螢幕上的位置 - .display = 在顯示器上顯示 + .display = 顯示在螢幕上 panel-style = 樣式 .anchor-gap = 面板與螢幕邊緣的間距 - .dock-anchor-gap = Dock 與螢幕邊緣的間距 + .dock-anchor-gap = 程式塢與螢幕邊緣的間距 .extend = 將面板延伸至螢幕邊緣 - .dock-extend = 將 Dock 延伸至螢幕邊緣 + .dock-extend = 將程式塢延伸至螢幕邊緣 .appearance = 外觀 .size = 尺寸 - .background-opacity = 背景不透明度 + .background-opacity = 背景透明度 panel-applets = 配置 - .dock-desc = 配置 Dock 小程式 - .desc = 配置面板小程式 + .dock-desc = 配置程式塢工具程式 + .desc = 配置工具程式面板 panel-missing = 面板設定遺失 .desc = 面板設定檔案因使用自訂設定而遺失,或已損毀。 .fix = 重設為預設值 ## Desktop: Dock -dock = Dock +dock = 程式塢 ## Desktop: Window management @@ -321,7 +306,7 @@ super-key = Super 鍵動作 .launcher = 開啟啟動器 .workspaces = 開啟工作區 .applications = 開啟應用程式 - .none = 無 + .disable = 停用 edge-gravity = 浮動視窗吸附至附近邊緣 window-controls = 視窗控制項 .maximize = 顯示最大化按鈕 @@ -360,16 +345,16 @@ color = 色彩 .profile = 色彩設定檔 .sidebar = 色彩設定檔 .temperature = 色溫 -display = 顯示器 - .arrangement = 顯示器排列 - .arrangement-desc = 拖曳顯示器以重新排列 - .enable = 啟用顯示器 - .external = { $size } { $output } 的外接顯示器 - .laptop = { $size } 筆電顯示器 - .options = 顯示選項 - .refresh-rate = 更新率 +display = 顯示螢幕 + .arrangement = 螢幕排列 + .arrangement-desc = 拖曳螢幕來更改排列方式 + .enable = 啟用顯示螢幕 + .external = { $size } { $output } 外接顯示螢幕 + .laptop = { $size } 筆電顯示螢幕 + .options = 顯示螢幕螢幕選項 + .refresh-rate = 螢幕更新頻率 .resolution = 解析度 - .scale = 縮放 + .scale = 縮放大小 .additional-scale-options = 其他縮放選項 mirroring = 投影 .id = 正在投影 { $id } @@ -393,7 +378,7 @@ orientation = 螢幕方向 .rotate-90 = 旋轉 90 度 .rotate-180 = 旋轉 180 度 .rotate-270 = 旋轉 270 度 -vrr = 可變更新率 +vrr = 可變刷新率 .enabled = 已啟用 .force = 總是 .auto = 自動 @@ -408,7 +393,7 @@ dialog = 對話框 ## Sound -sound = 音效 +sound = 音響 sound-output = 輸出 .volume = 輸出音量 .device = 輸出裝置 @@ -500,27 +485,11 @@ keyboard-sources = 輸入法 .view-layout = 檢視鍵盤布局 .remove = 移除 .add = 新增輸入法 -keyboard-special-char = 特殊字元輸入 - .alternate = 替代字元鍵 - .compose = 組合鍵 - .compose-desc = 組合鍵可輸入多種字元。使用時,請先按下組合鍵,然後輸入一串字元。例如,先按下組合鍵,接著輸入 C 和 o 即可輸入 ©;而先按下組合鍵,接著輸入 a 和 ‘ 則可輸入 á。 +keyboard-special-char = 特殊字輸入 + .alternate = 進階按鍵 + .compose = 組合按鍵 + .compose-desc = 組合按鍵允許輸入多樣字元。要使用它,請按組合按鍵,再按字元依序。例如,按組合按鍵接著按 C 和 o 鍵,將輸入 ©;按組合按鍵接著按 a 和 ‘ 鍵,將輸入 á。 .caps = 大寫鎖定鍵 - .ctrl = Ctrl 鍵 - .ctrl-right = 右側 Ctrl 鍵 - .swap-with-ctrl = 與 Ctrl 鍵交換 - .alt = Alt 鍵 - .alt-left = 左側 Alt 鍵 - .alt-right = 右側 Alt 鍵 - .super = Super 鍵 - .super-left = 左 Super 鍵 - .super-right = 右 Super 鍵 - .menu = 選單鍵 - .backspace = Backspace 鍵 - .escape = Esc 鍵 - .swap-with-escape = 與 Esc 鍵互換 - .print-screen = Print Screen 鍵 - .scroll-lock = 捲動鎖定鍵 - .none = 無 keyboard-typing-assist = 輸入 .repeat-rate = 重複速率 .repeat-delay = 重複延遲 @@ -538,7 +507,7 @@ show-extended-input-sources = 顯示延伸輸入來源 keyboard-shortcuts = 鍵盤快速鍵 .desc = 顯示與修改快速鍵 -add-another-keybinding = 新增另一個鍵盤快速鍵 +add-another-keybinding = 添加另一個按鍵組合 cancel = 取消 command = 指令 custom = 自訂 @@ -629,9 +598,9 @@ move-windows = 移動視窗 .send-to-next-workspace = 將視窗移至下一個工作區 system-shortcut = 系統 .app-library = 開啟應用程式庫 - .brightness-down = 降低顯示器亮度 - .brightness-up = 提高顯示器亮度 - .display-toggle = 切換內部顯示器 + .brightness-down = 降低螢幕亮度 + .brightness-up = 提高螢幕亮度 + .display-toggle = 切換內部顯示螢幕 .home-folder = 開啟家目錄 .keyboard-brightness-down = 降低鍵盤亮度 .keyboard-brightness-up = 提高鍵盤亮度 @@ -644,7 +613,7 @@ system-shortcut = 系統 .play-next = 下一首 .play-prev = 上一首 .poweroff = 關機 - .screenshot = 擷取螢幕畫面 + .screenshot = 螢幕擷圖 .suspend = 休眠 .terminal = 開啟終端機 .touchpad-toggle = 切換觸控板 @@ -714,7 +683,7 @@ time-format = 日期與時間格式 .twenty-four = 24 小時制 .show-seconds = 顯示秒數 .first = 每週第一天 - .show-date = 在時間小程式中顯示日期 + .show-date = 在時間工具程式中顯示日期 .friday = 星期五 .saturday = 星期六 .sunday = 星期日 @@ -826,9 +795,9 @@ full-name = 全名 invalid-username = 無效的使用者名稱 password-mismatch = 密碼與確認密碼必須相符 save = 儲存 -xdg-entry-dock-comment = 可選應用程式和小程式的工具列 -xdg-entry-dock = Dock -xdg-entry-displays-keywords = COSMIC;顯示器;螢幕; +xdg-entry-dock-comment = 可選的應用程式和工具程式的工具欄 +xdg-entry-dock = 程式塢 +xdg-entry-displays-keywords = COSMIC;顯示器;熒幕; xdg-entry-displays-comment = 管理顯示器設定 xdg-entry-displays = 顯示器 xdg-entry-desktop-keywords = COSMIC;桌面; @@ -853,22 +822,22 @@ xdg-entry-about-keywords = COSMIC;關於 xdg-entry-about-comment = 裝置名稱、硬體資訊、作業系統預設 xdg-entry-about = 關於 xdg-entry-keywords = COSMIC;設定; -xdg-entry-dock-keywords = COSMIC;Dock;面板;小程式 +xdg-entry-dock-keywords = COSMIC;程式塢;面板;工具程式 xdg-entry-region-language = 地區與語言 xdg-entry-notifications-keywords = COSMIC;通知;鎖定; xdg-entry-power = 電源與電池 -xdg-entry-panel-keywords = COSMIC;面板;小程式 +xdg-entry-panel-keywords = COSMIC;面板;工具程式 xdg-entry-panel = 面板 xdg-entry-notifications = 通知 xdg-entry-startup-apps = 開機啟動應用程式 xdg-entry-region-language-comment = 依據您所在的地區設定日期、時間和數字的格式 xdg-entry-notifications-comment = 勿擾模式、鎖定螢幕通知、及各個應用程式設定 -xdg-entry-sound-keywords = COSMIC;Sound;Audio;Alert;Pipewire;音效;音訊;提醒; +xdg-entry-sound-keywords = COSMIC;音響;音訊;提醒;Pipewire; xdg-entry-power-keywords = COSMIC;電源;電池 xdg-entry-region-language-keywords = COSMIC;地區;語言;日期;格式;時間;本地;本地化; xdg-entry-sound-comment = 裝置、提醒和應用程式的音訊設定 -xdg-entry-panel-comment = 用於選單和小程式的主要系統列 -xdg-entry-sound = 音效 +xdg-entry-panel-comment = 主要系統列, 用於選單和工具程式 +xdg-entry-sound = 音響 xdg-entry-power-comment = 電源模式和省電選項 xdg-entry-network-keywords = COSMIC;網路;無線;WiFi;VPN; xdg-entry-network-comment = 管理網路連線 @@ -882,7 +851,7 @@ xdg-entry-keyboard = 鍵盤 xdg-entry-input-keywords = COSMIC;輸入;鍵盤;滑鼠; xdg-entry-input-comment = 鍵盤與滑鼠設定 xdg-entry-input = 輸入裝置 -xdg-entry-desktop-comment = 桌布、外觀、面板、Dock、視窗管理和工作區設定 +xdg-entry-desktop-comment = 桌布、外觀、面板、程式塢、視窗管理和工作區設定 xdg-entry-default-apps-comment = 預設網頁瀏覽器、郵件用戶端、檔案管理器和其他應用程式 xdg-entry-touchpad = 觸控板 xdg-entry-wired = 有線連接 @@ -899,7 +868,7 @@ xdg-entry-system-keywords = COSMIC;系統;資訊;帳號;韌體; xdg-entry-wireless-keywords = COSMIC;WiFi;Wi-Fi;網路;連接; xdg-entry-wireless-comment = Wi-Fi 連接與連接設定檔案 xdg-entry-wallpaper = 背景圖片 -xdg-entry-users-comment = 身分驗證與使用者帳號 +xdg-entry-users-comment = 身份驗證與使用者帳號 xdg-entry-wallpaper-comment = 背景圖片、顏色及投影片選項 xdg-entry-wireless = Wi-Fi xdg-entry-workspaces-keywords = COSMIC;工作區;方向;總覽;螢幕; @@ -934,7 +903,7 @@ workspaces-overview = 工作區總覽 .none = 無 .launcher = 開啟啟動器 .applications = 開啟應用程式 -place-here = 在此放置小程式 +place-here = 在此放置工具程式 shadow-and-corners = 視窗陰影與角型 shadows-tiling = 平鋪視窗 .clip = 符合系統角型 @@ -942,9 +911,3 @@ shadows-tiling = 平鋪視窗 shadows-floating = 浮動視窗 .clip = 符合系統角型和套用陰影 no-search-results = 沒有網路符合您所要搜尋的。 -workspaces-navigation = 導覽 - .wraparound = 使用快捷鍵和手勢在第一個和最後個工作區間切換 -bluetooth-display-passkey = 藍牙配對 - .description = 請在 { $device } 上輸入密金鑰,然後按 Enter 鍵 -bluetooth-display-pin = 藍牙配對 - .description = 請在 { $device } 上輸入 PIN 碼,然後按 Enter 鍵 diff --git a/justfile b/justfile index c25c959..deed88c 100644 --- a/justfile +++ b/justfile @@ -53,31 +53,26 @@ heaptrack *args: check-features: #!/usr/bin/env bash set -ex + cargo check --no-default-features cargo check - for service_manager in \ - "systemd" \ - "openrc" + for feature in \ + "page-accessibility" \ + "page-about" \ + "page-bluetooth" \ + "page-date" \ + "page-default-apps" \ + "page-display" \ + "page-input" \ + "page-legacy-applications" \ + "page-networking" \ + "page-power" \ + "page-region" \ + "page-sound" \ + "page-users" \ + "page-window-management" \ + "page-workspaces" do - cargo check --no-default-features --features "${service_manager}" - for feature in \ - "page-accessibility" \ - "page-about" \ - "page-bluetooth" \ - "page-date" \ - "page-default-apps" \ - "page-display" \ - "page-input" \ - "page-legacy-applications" \ - "page-networking" \ - "page-power" \ - "page-region" \ - "page-sound" \ - "page-users" \ - "page-window-management" \ - "page-workspaces" - do - cargo check --no-default-features --features "${feature},${service_manager}" - done + cargo check --no-default-features --features "${feature}" done # Bump cargo version, create git commit, and create tag diff --git a/page/Cargo.toml b/page/Cargo.toml index 77e5954..7547599 100644 --- a/page/Cargo.toml +++ b/page/Cargo.toml @@ -5,9 +5,9 @@ edition = "2024" [dependencies] derive_setters = "0.1.9" -regex = "1.13.1" +regex = "1.12.3" slotmap = "1.1.1" -cosmic = { workspace = true } +libcosmic = { workspace = true } downcast-rs = "2.0.2" url = "2.5.8" slab = "0.4.12" diff --git a/page/src/binder.rs b/page/src/binder.rs index fe7f43e..b9aee2b 100644 --- a/page/src/binder.rs +++ b/page/src/binder.rs @@ -3,12 +3,15 @@ use crate::section::{self, Section}; use crate::{Content, Info, Page}; +use cosmic::Element; +use cosmic::Task; use cosmic::app::ContextDrawer; -use cosmic::{Element, Task}; use regex::Regex; use slotmap::{SecondaryMap, SlotMap, SparseSecondaryMap}; -use std::any::{Any, TypeId}; -use std::collections::HashMap; +use std::{ + any::{Any, TypeId}, + collections::HashMap, +}; /// All settings pages are registered and managed by the [`Binder`]. pub struct Binder { diff --git a/page/src/lib.rs b/page/src/lib.rs index 26335d5..23f894d 100644 --- a/page/src/lib.rs +++ b/page/src/lib.rs @@ -5,9 +5,7 @@ mod binder; pub use binder::{AutoBind, Binder}; mod insert; -use cosmic::app::ContextDrawer; -use cosmic::iced::Subscription; -use cosmic::{Element, Task}; +use cosmic::{Element, Task, app::ContextDrawer, iced::Subscription}; use downcast_rs::{Downcast, impl_downcast}; pub use insert::Insert; diff --git a/pages/sound/Cargo.toml b/pages/sound/Cargo.toml deleted file mode 100644 index 310b071..0000000 --- a/pages/sound/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "cosmic-settings-sound" -version = "0.1.0" -edition = "2024" -rust-version.workspace = true - -[dependencies] -futures = "0.3.33" -intmap = "3.1.3" -tokio = { workspace = true, features = ["time"] } -tracing = "0.1.44" - -[dependencies.cosmic-settings-audio-client] -git = "https://github.com/pop-os/cosmic-settings-daemon" -features = ["codec"] diff --git a/pages/sound/src/lib.rs b/pages/sound/src/lib.rs deleted file mode 100644 index 575ef4c..0000000 --- a/pages/sound/src/lib.rs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2026 System76 -// SPDX-License-Identifier: GPL-3.0-only - -pub mod model; -use std::sync::Arc; - -pub use cosmic_settings_audio_client as audio_client; -use futures::{SinkExt, StreamExt}; - -pub async fn subscribe( - mut emitter: futures::channel::mpsc::Sender, - apply_fn: fn(Message) -> T, -) { - loop { - let mut client = match audio_client::connect().await { - Ok(client) => client, - Err(why) => { - if let audio_client::zlink::Error::Io(ref why) = why - && why.kind() == std::io::ErrorKind::NotFound - { - tracing::error!("cosmic-settings-daemon varlink service not found."); - } else { - tracing::error!( - ?why, - "failed to connect to cosmic-settings's varlink service" - ); - } - - tokio::time::sleep(std::time::Duration::from_secs(3)).await; - continue; - } - }; - - if let Ok(Ok(mut stream)) = client.recv_events().await { - _ = emitter - .send(apply_fn(Message::Client(Arc::new(client)))) - .await; - while let Some(message) = stream.next().await { - match message { - Ok(event) => { - _ = emitter.send(apply_fn(Message::Subscription(event))).await; - } - Err(why) => { - tracing::error!(?why, "event error"); - } - } - } - } - } -} - -#[derive(Clone, Debug)] -pub enum Message { - /// Connection to `com.system76.CosmicSettings`. - Client(Arc), - /// Messages from the varlink audio client, - Subscription(audio_client::Event), -} diff --git a/pages/sound/src/model.rs b/pages/sound/src/model.rs deleted file mode 100644 index c18ae6d..0000000 --- a/pages/sound/src/model.rs +++ /dev/null @@ -1,558 +0,0 @@ -// Copyright 2026 System76 -// SPDX-License-Identifier: GPL-3.0-only - -use std::sync::Arc; - -use cosmic_settings_audio_client::{ - self as audio_client, Availability, PlaybackInfo, ProfileInfo, RouteInfo, -}; -use intmap::IntMap; - -pub type DeviceId = u32; -pub type NodeId = u32; - -#[derive(Debug, Default)] -pub struct Model { - #[allow(clippy::type_complexity)] - pub device_profile_dropdowns: Vec<(DeviceId, String, Option, Vec, Vec)>, - pub device_names: IntMap, - pub device_profiles: IntMap>, - pub device_profiles_active: IntMap, - pub device_routes: IntMap>, - pub node_devices: IntMap>, - pub playback: Vec, - pub sinks: Nodes, - pub sources: Nodes, - pub active_sink: ActiveNode, - pub active_source: ActiveNode, - pub default_sink: Option, - pub default_source: Option, - pub text: Text, -} - -#[derive(Clone, Debug)] -pub struct Playback { - pub id: NodeId, - pub info: PlaybackInfo, - pub mute: bool, - pub volume: u32, - pub balance: Option, - /// Explicitly selected output. `None` means the playback follows the default sink. - pub sink_id: Option, -} - -impl Playback { - pub fn name(&self) -> &str { - [ - self.info.application_name.as_deref(), - self.info.application_id.as_deref(), - self.info.media_name.as_deref(), - Some(self.info.node_name.as_str()), - ] - .into_iter() - .flatten() - .find(|value| !value.is_empty()) - .unwrap_or_default() - } - - pub fn description(&self) -> Option<&str> { - self.info - .media_name - .as_deref() - .filter(|description| !description.is_empty() && *description != self.name()) - } - - pub fn selected_sink(&self, default_sink: Option) -> Option { - self.sink_id.or(default_sink) - } -} - -#[derive(Debug, Default)] -pub struct Text { - pub hd_audio: String, - pub usb_audio: String, -} - -#[derive(Debug, Default)] -pub struct Nodes { - active: Option, - pub sorted_display: Vec>, - pub sorted_index: Vec, - pub balance: Vec>, - pub card_profile_device: Vec>, - pub description: Vec, - pub devices: Vec>, - pub display: Vec>, - pub mute: Vec, - pub name: Vec, - pub id: Vec, - pub volume: Vec, -} - -impl Nodes { - pub fn active(&self) -> Option { - self.active.and_then(|active| { - self.sorted_index - .iter() - .position(|idx| *idx as usize == active) - }) - } - - pub fn dropdown_sort(&mut self) { - let mut enumerated_displays = self - .display - .clone() - .into_iter() - .enumerate() - .map(|(index, display)| (index as u16, display)) - .collect::>(); - enumerated_displays.sort_by_key(|v| v.1.clone()); - let (indexes, displays): (Vec<_>, Vec<_>) = enumerated_displays.into_iter().unzip(); - self.sorted_display = displays; - self.sorted_index = indexes; - } - - pub fn remove(&mut self, node_id: u32) -> bool { - let Some(pos) = self.id.iter().position(|id| node_id == *id) else { - return false; - }; - self.balance.remove(pos); - self.card_profile_device.remove(pos); - self.description.remove(pos); - self.devices.remove(pos); - self.display.remove(pos); - self.mute.remove(pos); - self.name.remove(pos); - self.id.remove(pos); - self.volume.remove(pos); - self.dropdown_sort(); - if self.active == Some(pos) { - self.active = None; - } - true - } -} - -#[derive(Debug, Default)] -pub struct ActiveNode { - pub volume_text: String, - pub volume: u32, - pub balance: Option, - pub mute: bool, -} - -impl Model { - pub fn update(&mut self, event: audio_client::Event) { - tracing::info!(target: "sound", ?event, "update"); - match event { - audio_client::Event::NodeMute(node_id, mute) => { - if let Some(playback) = self.playback.iter_mut().find(|item| item.id == node_id) { - playback.mute = mute; - } else if let Some(pos) = self.sinks.id.iter().position(|id| node_id == *id) { - self.sinks.mute[pos] = mute; - if self.sinks.active == Some(pos) { - self.active_sink.mute = mute; - } - } else if let Some(pos) = self.sources.id.iter().position(|id| node_id == *id) { - self.sources.mute[pos] = mute; - if self.sources.active == Some(pos) { - self.active_source.mute = mute; - } - } - } - - audio_client::Event::NodeVolume(node_id, volume, balance) => { - if let Some(playback) = self.playback.iter_mut().find(|item| item.id == node_id) { - playback.volume = volume; - playback.balance = balance; - } else if let Some(pos) = self.sinks.id.iter().position(|id| node_id == *id) { - self.sinks.volume[pos] = volume; - self.sinks.balance[pos] = balance; - if self.default_sink.as_ref().is_some_and(|&id| id == node_id) - && let Some(pos) = self.sinks.active - { - self.active_sink.mute = self.sinks.mute[pos]; - self.active_sink.balance = balance; - self.active_sink.volume = self.sinks.volume[pos]; - self.active_sink.volume_text = self.active_sink.volume.to_string(); - } - } else if let Some(pos) = self.sources.id.iter().position(|id| node_id == *id) { - self.sources.volume[pos] = volume; - self.sources.balance[pos] = balance; - if self - .default_source - .as_ref() - .is_some_and(|&id| id == node_id) - && let Some(pos) = self.sources.active - { - self.active_source.mute = self.sources.mute[pos]; - self.active_source.volume = self.sources.volume[pos]; - self.active_source.volume_text = self.active_source.volume.to_string(); - } - } - } - - audio_client::Event::DefaultSink(node_id) => { - self.default_sink = Some(node_id); - if let Some(pos) = self.sinks.id.iter().position(|&id| id == node_id) { - self.sinks.active = Some(pos); - self.active_sink.mute = self.sinks.mute[pos]; - self.active_sink.volume = self.sinks.volume[pos]; - self.active_sink.volume_text = self.active_sink.volume.to_string(); - } - } - - audio_client::Event::DefaultSource(node_id) => { - self.default_source = Some(node_id); - if let Some(pos) = self.sources.id.iter().position(|&id| id == node_id) { - self.sources.active = Some(pos); - self.active_source.mute = self.sources.mute[pos]; - self.active_source.volume = self.sources.volume[pos]; - self.active_source.volume_text = self.active_source.volume.to_string(); - } - } - - audio_client::Event::Device(device_id, device) => { - self.device_names - .insert(device_id, self.translate(&device.description)); - } - - audio_client::Event::Node(node_id, node) => { - self.node_devices.insert(node_id, node.device_id); - if node.is_sink { - let pos = if let Some(pos) = self.sinks.id.iter().position(|&id| id == node_id) - { - self.sinks.description[pos] = self.translate(&node.description); - self.sinks.name[pos] = node.name; - self.sinks.card_profile_device[pos] = node.card_profile_device; - pos - } else { - self.sinks.display.push(Arc::default()); - self.sinks - .description - .push(self.translate(&node.description)); - self.sinks.id.push(node_id); - self.sinks.volume.push(0); - self.sinks.balance.push(None); - self.sinks.mute.push(false); - self.sinks.name.push(node.name); - self.sinks.devices.push(node.device_id); - self.sinks - .card_profile_device - .push(node.card_profile_device); - self.sinks.id.len() - 1 - }; - - self.sinks.display[pos] = node - .device_id - .zip(node.card_profile_device) - .and_then(|(device_id, node_card_profile_device)| { - let routes = self.device_routes.get(device_id)?; - for route in routes { - if matches!(route.availability, Availability::No) || !route.is_sink - { - continue; - } - - if route.devices.contains(&node_card_profile_device) { - return Some(node_name( - &self.translate(&route.description), - &self.sinks.description[pos], - )); - } - } - - None - }) - .unwrap_or_else(|| { - node_name( - &node.device_profile_description, - &self.sinks.description[pos], - ) - }); - - self.sinks.dropdown_sort(); - - if let Some(default_node_id) = self.default_sink - && default_node_id == node_id - { - self.sinks.active = Some(pos); - self.active_sink.mute = self.sinks.mute[pos]; - self.active_sink.volume = self.sinks.volume[pos]; - self.active_sink.volume_text = self.active_sink.volume.to_string(); - } - } else { - let pos = - if let Some(pos) = self.sources.id.iter().position(|&id| id == node_id) { - self.sources.description[pos] = self.translate(&node.description); - self.sources.name[pos] = node.name; - self.sources.card_profile_device[pos] = node.card_profile_device; - pos - } else { - self.sources - .description - .push(self.translate(&node.description)); - self.sources.display.push(Arc::default()); - self.sources.id.push(node_id); - self.sources.volume.push(0); - self.sources.balance.push(None); - self.sources.mute.push(false); - self.sources.name.push(node.name); - self.sources.devices.push(node.device_id); - self.sources - .card_profile_device - .push(node.card_profile_device); - self.sources.id.len() - 1 - }; - - if let Some(name) = node.device_id.zip(node.card_profile_device).map_or_else( - || { - Some(node_name( - &node.device_profile_description, - &self.sources.description[pos], - )) - }, - |(device_id, node_card_profile_device)| { - let routes = self.device_routes.get(device_id)?; - for route in routes { - if route.is_sink || matches!(route.availability, Availability::No) { - continue; - } - - if route.devices.contains(&node_card_profile_device) { - return Some(node_name( - &self.translate(&route.description), - &self.sources.description[pos], - )); - } - } - - None - }, - ) { - self.sources.display[pos] = name; - self.sources.dropdown_sort(); - } else { - // Remove sources that are unplugged. - self.sources.remove(node_id); - return; - } - - if let Some(default_node_id) = self.default_source - && default_node_id == node_id - { - self.sources.active = Some(pos); - self.active_source.mute = self.sources.mute[pos]; - self.active_source.volume = self.sources.volume[pos]; - self.active_source.volume_text = self.active_source.volume.to_string(); - } - } - } - - audio_client::Event::Playback(node_id, info) => { - if let Some(playback) = self.playback.iter_mut().find(|item| item.id == node_id) { - playback.info = info; - } else { - self.playback.push(Playback { - id: node_id, - info, - mute: false, - volume: 0, - balance: None, - sink_id: None, - }); - } - self.playback - .sort_by(|a, b| a.name().cmp(b.name()).then(a.id.cmp(&b.id))); - } - - audio_client::Event::PlaybackTarget(playback_id, sink_id) => { - if let Some(playback) = self - .playback - .iter_mut() - .find(|playback| playback.id == playback_id) - { - playback.sink_id = sink_id; - } - } - - audio_client::Event::ActiveRoute(device_id, _index, route) => { - self.update_device_names(device_id, &route); - } - - audio_client::Event::Route(device_id, index, route) => { - let routes = self.device_routes.entry(device_id).or_default(); - if routes.len() < index as usize + 1 { - let additional = (index as usize + 1) - routes.capacity(); - routes.reserve_exact(additional); - routes.extend(std::iter::repeat_n(RouteInfo::default(), additional)); - } - routes[index as usize] = route.clone(); - // self.update_device_names(device_id, &route); - } - - audio_client::Event::ActiveProfile(device_id, profile) => { - self.device_profiles_active.insert(device_id, profile); - self.update_device_profile_dropdowns(); - } - - audio_client::Event::Profile(device_id, index, profile) => { - let profiles = self.device_profiles.entry(device_id).or_default(); - if profiles.len() < index as usize + 1 { - let additional = (index as usize + 1) - profiles.capacity(); - profiles.reserve_exact(additional); - profiles.extend(std::iter::repeat_n(ProfileInfo::default(), additional)); - } - - profiles[index as usize] = profile; - self.update_device_profile_dropdowns(); - } - - audio_client::Event::RemoveNode(node_id) => { - self.node_devices.remove(node_id); - self.playback.retain(|item| item.id != node_id); - for playback in &mut self.playback { - if playback.sink_id == Some(node_id) { - playback.sink_id = None; - } - } - - if !self.sinks.remove(node_id) { - self.sources.remove(node_id); - } - } - - audio_client::Event::RemoveDevice(device_id) => { - self.device_names.remove(device_id); - self.device_profiles.remove(device_id); - self.device_profiles_active.remove(device_id); - self.device_routes.remove(device_id); - self.update_device_profile_dropdowns(); - } - - _ => (), - } - } - - pub fn translate(&self, description: &str) -> String { - description - .replace("High Definition", "HD") - .replace("DisplayPort", "DP") - .replace("Controller", "") - .replace("HD Audio", &self.text.hd_audio) - .replace("USB Audio", &self.text.usb_audio) - } - - fn update_device_names(&mut self, device_id: DeviceId, route: &RouteInfo) { - if matches!(route.availability, Availability::No) { - return; - } - - let compatible_nodes = self.node_devices.iter().filter_map(|(node, &dev_id)| { - if dev_id? == device_id { - Some(node) - } else { - None - } - }); - - if route.is_sink { - for n_id in compatible_nodes { - let Some(pos) = self.sinks.id.iter().position(|&node| node == n_id) else { - continue; - }; - - let Some(card_profile_device) = self.sinks.card_profile_device[pos] else { - continue; - }; - - if route.devices.contains(&card_profile_device) { - self.sinks.display[pos] = - node_name(&route.description, &self.sinks.description[pos]); - self.sinks.dropdown_sort(); - break; - } - } - } else { - for n_id in compatible_nodes { - let Some(pos) = self.sources.id.iter().position(|&node| node == n_id) else { - continue; - }; - - let Some(card_profile_device) = self.sources.card_profile_device[pos] else { - continue; - }; - - if route.devices.contains(&card_profile_device) { - self.sources.display[pos] = - node_name(&route.description, &self.sources.description[pos]); - self.sources.dropdown_sort(); - break; - } - } - } - } - - fn update_device_profile_dropdowns(&mut self) { - self.device_profile_dropdowns = self - .device_profiles - .iter() - .filter_map(|(device_id, profiles)| { - let name = self.device_names.get(device_id)?.as_str(); - let (active_profile, indexes, descriptions) = self - .device_profiles_active - .get(device_id) - .map(|profile| { - let (indexes, descriptions): (Vec<_>, Vec<_>) = profiles - .iter() - .filter(|p| { - p.index == profile.index - || !matches!(p.availability, audio_client::Availability::No) - }) - .map(|p| (p.index, p.description.clone())) - .collect(); - - let pos = profiles - .iter() - .filter(|p| { - p.index == profile.index - || !matches!(p.availability, audio_client::Availability::No) - }) - .enumerate() - .find(|(_, p)| p.index == profile.index) - .map(|(pos, _)| pos); - - (pos, indexes, descriptions) - }) - .unwrap_or_else(|| { - let (indexes, descriptions): (Vec<_>, Vec<_>) = profiles - .iter() - .filter(|p| !matches!(p.availability, audio_client::Availability::No)) - .map(|p| (p.index, p.description.clone())) - .collect(); - - (None, indexes, descriptions) - }); - - Some(( - device_id, - name.to_owned(), - active_profile, - indexes, - descriptions, - )) - }) - .collect::>(); - - self.device_profile_dropdowns.sort_by(|a, b| a.1.cmp(&b.1)); - } -} - -fn node_name(route: &str, node: &str) -> Arc { - if route.is_empty() { - node.to_owned() - } else { - [route, " - ", node].concat() - } - .into() -} diff --git a/pages/wallpapers/Cargo.toml b/pages/wallpapers/Cargo.toml index 7746a18..b148edb 100644 --- a/pages/wallpapers/Cargo.toml +++ b/pages/wallpapers/Cargo.toml @@ -4,6 +4,8 @@ version = "1.0.7" edition = "2024" rust-version.workspace = true +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + [dependencies] cosmic-bg-config = { workspace = true } cosmic-randr-shell = { workspace = true } @@ -13,10 +15,10 @@ fast_image_resize = { version = "6", features = [ "image", ] } futures-lite = "2.6.1" -futures-util = "0.3.33" -image.workspace = true +futures-util = "0.3.32" +image = "0.25.9" infer = "0.19.0" -jxl-oxide = { version = "0.12.6", features = ["image"] } +jxl-oxide = { version = "0.12.5", features = ["image"] } tokio = { workspace = true, features = ["sync"] } tracing = "0.1.44" walkdir = "=2.5.0" diff --git a/pages/wallpapers/src/lib.rs b/pages/wallpapers/src/lib.rs index aed1423..498b424 100644 --- a/pages/wallpapers/src/lib.rs +++ b/pages/wallpapers/src/lib.rs @@ -4,17 +4,18 @@ use fast_image_resize::SrcCropping; use futures_lite::Stream; use futures_util::StreamExt; use image::imageops::FilterType; -use image::{DynamicImage, ImageBuffer, ImageDecoder, ImageResult, Limits, Rgba, RgbaImage}; +use image::{DynamicImage, ImageBuffer, Rgba, RgbaImage}; use jxl_oxide::integration::JxlDecoder; -use std::borrow::Cow; -use std::collections::HashMap; -use std::collections::hash_map::DefaultHasher; use std::fs::File; -use std::hash::{Hash, Hasher}; -use std::io::Read; use std::os::unix::ffi::OsStrExt; -use std::path::{Path, PathBuf}; -use std::pin::Pin; +use std::{ + borrow::Cow, + collections::{HashMap, hash_map::DefaultHasher}, + hash::{Hash, Hasher}, + io::Read, + path::{Path, PathBuf}, + pin::Pin, +}; use walkdir::WalkDir; pub const DEFAULT_COLORS: &[Color] = &[ @@ -103,7 +104,6 @@ pub async fn load_each_from_path( ) -> Pin>> { let candidate_paths: Vec<_> = WalkDir::new(path) .max_depth(3) - .follow_links(true) .into_iter() .filter_map(Result::ok) .filter(|entry| entry.file_type().is_file()) @@ -134,7 +134,7 @@ pub async fn load_each_from_path( }) .buffered(4) .filter_map(|value| async { value.ok().flatten() }) - .take(500); + .take(100); Box::pin(future) } @@ -304,7 +304,7 @@ fn open_image(input_buffer: &mut Vec, path: &Path) -> Option { return None; }; - match decode(image_decoder) { + match image_decoder.decode() { Ok(image) => Some(image), Err(why) => { tracing::error!(?path, ?why, "image decode failed"); @@ -313,24 +313,6 @@ fn open_image(input_buffer: &mut Vec, path: &Path) -> Option { } } -fn decode( - mut reader: image::ImageReader>>, -) -> ImageResult { - let mut limits = Limits::default(); - reader.limits(limits.clone()); - - let mut decoder = reader.into_decoder()?; - let orientation = decoder.orientation()?; - - limits.reserve(decoder.total_bytes())?; - decoder.set_limits(limits)?; - - let mut image = DynamicImage::from_decoder(decoder)?; - image.apply_orientation(orientation); - - Ok(image) -} - // https://users.rust-lang.org/t/how-to-trim-image-to-circle-image-without-jaggy/70374/2 fn round(img: &mut image::ImageBuffer, Vec>, radius: [u32; 4]) { let (width, height) = img.dimensions(); @@ -452,19 +434,11 @@ fn border_radius( pub fn decode_jpegxl(path: &std::path::Path) -> eyre::Result { let file = File::open(path).map_err(|why| eyre!("failed to open jxl image file: {why}"))?; - let mut decoder = + let decoder = JxlDecoder::new(file).map_err(|why| eyre!("failed to read jxl image header: {why}"))?; - let orientation = decoder - .orientation() - .map_err(|why| eyre!("failed to read jxl image orientation: {why}"))?; - - let mut image = image::DynamicImage::from_decoder(decoder) - .map_err(|why| eyre!("failed to decode jxl image: {why}"))?; - - image.apply_orientation(orientation); - - Ok(image) + image::DynamicImage::from_decoder(decoder) + .map_err(|why| eyre!("failed to decode jxl image: {why}")) } /// Use `fast-image-resize` crate for faster thumbnail generation. diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/accent b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/accent deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/accent +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/active_hint b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/active_hint deleted file mode 100644 index e440e5c..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/active_hint +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/alpha_map b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/alpha_map deleted file mode 100644 index 06f3e6a..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/alpha_map +++ /dev/null @@ -1,16 +0,0 @@ -( - extremely_low: 0.9, - extremely_low_2: 0.87692, - very_low: 0.85385, - very_low_2: 0.83076, - low: 0.80769, - low_2: 0.78461, - medium: 0.76154, - medium_2: 0.73846, - high: 0.71538, - high_2: 0.69231, - very_high: 0.66023, - very_high_2: 0.64615, - extremely_high: 0.62308, - extremely_high_2: 0.6, -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/bg_color b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/bg_color deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/bg_color +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/corner_radii b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/corner_radii deleted file mode 100644 index 7d52139..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/corner_radii +++ /dev/null @@ -1,8 +0,0 @@ -( - radius_0: (0.0, 0.0, 0.0, 0.0), - radius_xs: (4.0, 4.0, 4.0, 4.0), - radius_s: (8.0, 8.0, 8.0, 8.0), - radius_m: (16.0, 16.0, 16.0, 16.0), - radius_l: (32.0, 32.0, 32.0, 32.0), - radius_xl: (160.0, 160.0, 160.0, 160.0), -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/destructive b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/destructive deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/destructive +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted deleted file mode 100644 index 55b60b7..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted +++ /dev/null @@ -1 +0,0 @@ -Medium \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_applets b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_applets deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_applets +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_panel b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_panel deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_panel +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_system_interface b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_system_interface deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_system_interface +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_windows b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_windows deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/frosted_windows +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/gaps b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/gaps deleted file mode 100644 index 6fe974b..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/gaps +++ /dev/null @@ -1 +0,0 @@ -(0, 8) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/neutral_tint b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/neutral_tint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/neutral_tint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/palette b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/palette deleted file mode 100644 index 16e8c50..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/palette +++ /dev/null @@ -1,35 +0,0 @@ -( - name: "cosmic-dark", - bright_red: "#FFA09AFF", - bright_green: "#5EDB8CFF", - bright_orange: "#FFA37DFF", - gray_1: "#1B1B1BFF", - gray_2: "#262626FF", - neutral_0: "#000000FF", - neutral_1: "#030303FF", - neutral_2: "#161616FF", - neutral_3: "#2E2E2EFF", - neutral_4: "#484848FF", - neutral_5: "#636363FF", - neutral_6: "#808080FF", - neutral_7: "#9E9E9EFF", - neutral_8: "#BEBEBEFF", - neutral_9: "#DEDEDEFF", - neutral_10: "#FFFFFFFF", - accent_blue: "#63D0DFFF", - accent_indigo: "#A1C0EBFF", - accent_purple: "#E79CFEFF", - accent_pink: "#FF9CB1FF", - accent_red: "#FDA1A0FF", - accent_orange: "#FFAD00FF", - accent_yellow: "#F7E062FF", - accent_green: "#92CF9CFF", - accent_warm_grey: "#CABAB4FF", - ext_warm_grey: "#9B8E8AFF", - ext_orange: "#FFAD00FF", - ext_yellow: "#FEDB40FF", - ext_blue: "#48B9C7FF", - ext_purple: "#CF7DFFFF", - ext_pink: "#F93A83FF", - ext_indigo: "#3E88FFFF", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/primary_container_bg b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/primary_container_bg deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/primary_container_bg +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/secondary_container_bg b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/secondary_container_bg deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/secondary_container_bg +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/spacing b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/spacing deleted file mode 100644 index 464b264..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/spacing +++ /dev/null @@ -1,12 +0,0 @@ -( - space_none: 0, - space_xxxs: 4, - space_xxs: 8, - space_xs: 12, - space_s: 16, - space_m: 24, - space_l: 32, - space_xl: 48, - space_xxl: 64, - space_xxxl: 128, -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/success b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/success deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/success +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/text_tint b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/text_tint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/text_tint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/warning b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/warning deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/warning +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/window_hint b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/window_hint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v2/window_hint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/list_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/list_button deleted file mode 100644 index 7ed0fdb..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/list_button +++ /dev/null @@ -1,74 +0,0 @@ -( - base: ( - red: 0.0, - green: 0.0, - blue: 0.0, - alpha: 0.0, - ), - hover: ( - red: 0.0, - green: 0.0, - blue: 0.0, - alpha: 0.0, - ), - pressed: ( - red: 0.08610422, - green: 0.08610421, - blue: 0.08610421, - alpha: 0.5, - ), - selected: ( - red: 0.0, - green: 0.0, - blue: 0.0, - alpha: 0.0, - ), - selected_text: ( - red: 0.3882353, - green: 0.8156863, - blue: 0.8745098, - alpha: 1.0, - ), - focus: ( - red: 0.3882353, - green: 0.8156863, - blue: 0.8745098, - alpha: 1.0, - ), - divider: ( - red: 0.7532969, - green: 0.7532969, - blue: 0.75329685, - alpha: 0.2, - ), - on: ( - red: 0.7532969, - green: 0.7532969, - blue: 0.75329685, - alpha: 1.0, - ), - disabled: ( - red: 0.0, - green: 0.0, - blue: 0.0, - alpha: 0.0, - ), - on_disabled: ( - red: 0.7532969, - green: 0.7532969, - blue: 0.75329685, - alpha: 0.65, - ), - border: ( - red: 0.743206, - green: 0.74320585, - blue: 0.74320585, - alpha: 1.0, - ), - disabled_border: ( - red: 0.743206, - green: 0.74320585, - blue: 0.74320585, - alpha: 0.5, - ), -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/accent b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/accent deleted file mode 100644 index 5519c3b..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/accent +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#63D0DFFF", - hover: "#63BAC6FF", - pressed: "#3C737AFF", - selected: "#63BAC6FF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#000000FF", - on: "#000000FF", - disabled: "#63D0DFFF", - on_disabled: "#326870FF", - border: "#63D0DFFF", - disabled_border: "#63D0DF80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/accent_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/accent_button deleted file mode 100644 index 0e79e51..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/accent_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#63D0DFFF", - hover: "#63BAC6FF", - pressed: "#3C737AFF", - selected: "#63BAC6FF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#030303FF", - on: "#000000FF", - disabled: "#63D0DFFF", - on_disabled: "#00000080", - border: "#63D0DFFF", - disabled_border: "#63D0DF80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/accent_text b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/accent_text deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/accent_text +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/active_hint b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/active_hint deleted file mode 100644 index e440e5c..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/active_hint +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/alpha_map b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/alpha_map deleted file mode 100644 index 06f3e6a..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/alpha_map +++ /dev/null @@ -1,16 +0,0 @@ -( - extremely_low: 0.9, - extremely_low_2: 0.87692, - very_low: 0.85385, - very_low_2: 0.83076, - low: 0.80769, - low_2: 0.78461, - medium: 0.76154, - medium_2: 0.73846, - high: 0.71538, - high_2: 0.69231, - very_high: 0.66023, - very_high_2: 0.64615, - extremely_high: 0.62308, - extremely_high_2: 0.6, -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/background b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/background deleted file mode 100644 index 8568268..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/background +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#1B1B1BFF", - component: ( - base: "#2E2E2EFF", - hover: "#434343FF", - pressed: "#585858FF", - selected: "#434343FF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#C0C0C033", - on: "#C0C0C0FF", - disabled: "#2E2E2E80", - on_disabled: "#C0C0C0A6", - border: "#BEBEBEFF", - disabled_border: "#BEBEBE80", - ), - divider: "#444444FF", - on: "#E7E7E7FF", - small_widget: "#27272740", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/button b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/button deleted file mode 100644 index ea09e2d..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#9E9E9E40", - hover: "#63636366", - pressed: "#2B2B2B9F", - selected: "#63636366", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#C0C0C033", - on: "#C0C0C0FF", - disabled: "#9E9E9E20", - on_disabled: "#C0C0C0A6", - border: "#BEBEBEFF", - disabled_border: "#BEBEBE80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/control_tint b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/control_tint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/control_tint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/corner_radii b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/corner_radii deleted file mode 100644 index 7d52139..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/corner_radii +++ /dev/null @@ -1,8 +0,0 @@ -( - radius_0: (0.0, 0.0, 0.0, 0.0), - radius_xs: (4.0, 4.0, 4.0, 4.0), - radius_s: (8.0, 8.0, 8.0, 8.0), - radius_m: (16.0, 16.0, 16.0, 16.0), - radius_l: (32.0, 32.0, 32.0, 32.0), - radius_xl: (160.0, 160.0, 160.0, 160.0), -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/destructive b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/destructive deleted file mode 100644 index 428c1d1..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/destructive +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#FFA09AFF", - hover: "#E0948FFF", - pressed: "#8A5B58FF", - selected: "#E0948FFF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#000000FF", - on: "#000000FF", - disabled: "#FFA09AFF", - on_disabled: "#80504DFF", - border: "#FFA09AFF", - disabled_border: "#FFA09A80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/destructive_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/destructive_button deleted file mode 100644 index fc8066f..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/destructive_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#FFA09AFF", - hover: "#E0948FFF", - pressed: "#8A5B58FF", - selected: "#E0948FFF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#030303FF", - on: "#000000FF", - disabled: "#FFA09AFF", - on_disabled: "#00000080", - border: "#FFA09AFF", - disabled_border: "#FFA09A80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted deleted file mode 100644 index 55b60b7..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted +++ /dev/null @@ -1 +0,0 @@ -Medium \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_applets b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_applets deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_applets +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_panel b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_panel deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_panel +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_system_interface b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_system_interface deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_system_interface +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_windows b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_windows deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/frosted_windows +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/gaps b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/gaps deleted file mode 100644 index 6fe974b..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/gaps +++ /dev/null @@ -1 +0,0 @@ -(0, 8) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/icon_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/icon_button deleted file mode 100644 index cb5fa87..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/icon_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#00000000", - hover: "#63636333", - pressed: "#16161680", - selected: "#63636333", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#BEBEBE33", - on: "#BEBEBEFF", - disabled: "#00000000", - on_disabled: "#BEBEBEA6", - border: "#BEBEBEFF", - disabled_border: "#BEBEBE80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/is_dark b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/is_dark deleted file mode 100644 index f32a580..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/is_dark +++ /dev/null @@ -1 +0,0 @@ -true \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/is_high_contrast b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/is_high_contrast deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/is_high_contrast +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/link_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/link_button deleted file mode 100644 index eec0dff..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/link_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#00000000", - hover: "#00000000", - pressed: "#00000000", - selected: "#00000000", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#63D0DF33", - on: "#63D0DFFF", - disabled: "#00000000", - on_disabled: "#32687080", - border: "#BEBEBEFF", - disabled_border: "#BEBEBE80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/name b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/name deleted file mode 100644 index 7147ddb..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/name +++ /dev/null @@ -1 +0,0 @@ -"cosmic-dark" \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/palette b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/palette deleted file mode 100644 index 16e8c50..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/palette +++ /dev/null @@ -1,35 +0,0 @@ -( - name: "cosmic-dark", - bright_red: "#FFA09AFF", - bright_green: "#5EDB8CFF", - bright_orange: "#FFA37DFF", - gray_1: "#1B1B1BFF", - gray_2: "#262626FF", - neutral_0: "#000000FF", - neutral_1: "#030303FF", - neutral_2: "#161616FF", - neutral_3: "#2E2E2EFF", - neutral_4: "#484848FF", - neutral_5: "#636363FF", - neutral_6: "#808080FF", - neutral_7: "#9E9E9EFF", - neutral_8: "#BEBEBEFF", - neutral_9: "#DEDEDEFF", - neutral_10: "#FFFFFFFF", - accent_blue: "#63D0DFFF", - accent_indigo: "#A1C0EBFF", - accent_purple: "#E79CFEFF", - accent_pink: "#FF9CB1FF", - accent_red: "#FDA1A0FF", - accent_orange: "#FFAD00FF", - accent_yellow: "#F7E062FF", - accent_green: "#92CF9CFF", - accent_warm_grey: "#CABAB4FF", - ext_warm_grey: "#9B8E8AFF", - ext_orange: "#FFAD00FF", - ext_yellow: "#FEDB40FF", - ext_blue: "#48B9C7FF", - ext_purple: "#CF7DFFFF", - ext_pink: "#F93A83FF", - ext_indigo: "#3E88FFFF", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/primary b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/primary deleted file mode 100644 index c779f21..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/primary +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#272727FF", - component: ( - base: "#363636FF", - hover: "#4A4A4AFF", - pressed: "#5E5E5EFF", - selected: "#4A4A4AFF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#CACACA33", - on: "#CACACAFF", - disabled: "#36363680", - on_disabled: "#CACACAA6", - border: "#BEBEBEFF", - disabled_border: "#BEBEBE80", - ), - divider: "#515151FF", - on: "#F8F8F8FF", - small_widget: "#34343440", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/secondary b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/secondary deleted file mode 100644 index 069a373..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/secondary +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#343434FF", - component: ( - base: "#3B3B3BFF", - hover: "#4F4F4FFF", - pressed: "#626262FF", - selected: "#4F4F4FFF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#D0D0D033", - on: "#D0D0D0FF", - disabled: "#3B3B3B80", - on_disabled: "#D0D0D0A6", - border: "#BEBEBEFF", - disabled_border: "#BEBEBE80", - ), - divider: "#515151FF", - on: "#C7C7C7FF", - small_widget: "#41414140", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/shade b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/shade deleted file mode 100644 index 1afc7ab..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/shade +++ /dev/null @@ -1 +0,0 @@ -"#00000052" \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/spacing b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/spacing deleted file mode 100644 index 464b264..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/spacing +++ /dev/null @@ -1,12 +0,0 @@ -( - space_none: 0, - space_xxxs: 4, - space_xxs: 8, - space_xs: 12, - space_s: 16, - space_m: 24, - space_l: 32, - space_xl: 48, - space_xxl: 64, - space_xxxl: 128, -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/success b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/success deleted file mode 100644 index 8bdbb8b..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/success +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#5EDB8CFF", - hover: "#5FC384FF", - pressed: "#3A7851FF", - selected: "#5FC384FF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#000000FF", - on: "#000000FF", - disabled: "#5EDB8CFF", - on_disabled: "#2F6E46FF", - border: "#5EDB8CFF", - disabled_border: "#5EDB8C80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/success_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/success_button deleted file mode 100644 index 972c4f3..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/success_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#5EDB8CFF", - hover: "#5FC384FF", - pressed: "#3A7851FF", - selected: "#5FC384FF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#030303FF", - on: "#000000FF", - disabled: "#5EDB8CFF", - on_disabled: "#00000080", - border: "#5EDB8CFF", - disabled_border: "#5EDB8C80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/text_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/text_button deleted file mode 100644 index cd17f71..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/text_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#00000000", - hover: "#63636333", - pressed: "#16161680", - selected: "#63636333", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#63D0DF33", - on: "#63D0DFFF", - disabled: "#00000000", - on_disabled: "#63D0DFA6", - border: "#BEBEBEFF", - disabled_border: "#BEBEBE80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/text_tint b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/text_tint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/text_tint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/transparent_background b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/transparent_background deleted file mode 100644 index 8981793..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/transparent_background +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#1B1B1B99", - component: ( - base: "#2E2E2E99", - hover: "#2E2E2E99", - pressed: "#2E2E2E99", - selected: "#2E2E2E99", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#C0C0C033", - on: "#C0C0C099", - disabled: "#2E2E2E4C", - on_disabled: "#C0C0C0A6", - border: "#BEBEBEFF", - disabled_border: "#BEBEBE80", - ), - divider: "#414141AD", - on: "#E7E7E799", - small_widget: "#27272740", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/transparent_primary b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/transparent_primary deleted file mode 100644 index 3f25243..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/transparent_primary +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#272727E6", - component: ( - base: "#363636E6", - hover: "#363636E6", - pressed: "#363636E6", - selected: "#363636E6", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#CACACA33", - on: "#CACACAE6", - disabled: "#36363673", - on_disabled: "#CACACAA6", - border: "#BEBEBEFF", - disabled_border: "#BEBEBE80", - ), - divider: "#505050EB", - on: "#F8F8F8E6", - small_widget: "#34343440", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/transparent_secondary b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/transparent_secondary deleted file mode 100644 index b2a0ac2..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/transparent_secondary +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#343434FF", - component: ( - base: "#3B3B3BFF", - hover: "#3B3B3BFF", - pressed: "#3B3B3BFF", - selected: "#3B3B3BFF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#D0D0D033", - on: "#D0D0D0FF", - disabled: "#3B3B3B80", - on_disabled: "#D0D0D0A6", - border: "#BEBEBEFF", - disabled_border: "#BEBEBE80", - ), - divider: "#515151FF", - on: "#C7C7C7FF", - small_widget: "#41414140", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/warning b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/warning deleted file mode 100644 index 944161b..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/warning +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#FFA37DFF", - hover: "#E09678FF", - pressed: "#8A5C49FF", - selected: "#E09678FF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#000000FF", - on: "#000000FF", - disabled: "#FFA37DFF", - on_disabled: "#80523FFF", - border: "#FFA37DFF", - disabled_border: "#FFA37D80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/warning_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/warning_button deleted file mode 100644 index e184d57..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/warning_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#FFA37DFF", - hover: "#E09678FF", - pressed: "#8A5C49FF", - selected: "#E09678FF", - selected_text: "#63D0DFFF", - focus: "#63D0DFFF", - divider: "#FFFFFFFF", - on: "#000000FF", - disabled: "#FFA37DFF", - on_disabled: "#00000080", - border: "#FFA37DFF", - disabled_border: "#FFA37D80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/window_hint b/resources/default_schema/com.system76.CosmicTheme.Dark/v2/window_hint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v2/window_hint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/accent b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/accent deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/accent +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/active_hint b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/active_hint deleted file mode 100644 index e440e5c..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/active_hint +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/alpha_map b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/alpha_map deleted file mode 100644 index 06f3e6a..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/alpha_map +++ /dev/null @@ -1,16 +0,0 @@ -( - extremely_low: 0.9, - extremely_low_2: 0.87692, - very_low: 0.85385, - very_low_2: 0.83076, - low: 0.80769, - low_2: 0.78461, - medium: 0.76154, - medium_2: 0.73846, - high: 0.71538, - high_2: 0.69231, - very_high: 0.66023, - very_high_2: 0.64615, - extremely_high: 0.62308, - extremely_high_2: 0.6, -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/bg_color b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/bg_color deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/bg_color +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/corner_radii b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/corner_radii deleted file mode 100644 index 7d52139..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/corner_radii +++ /dev/null @@ -1,8 +0,0 @@ -( - radius_0: (0.0, 0.0, 0.0, 0.0), - radius_xs: (4.0, 4.0, 4.0, 4.0), - radius_s: (8.0, 8.0, 8.0, 8.0), - radius_m: (16.0, 16.0, 16.0, 16.0), - radius_l: (32.0, 32.0, 32.0, 32.0), - radius_xl: (160.0, 160.0, 160.0, 160.0), -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/destructive b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/destructive deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/destructive +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted deleted file mode 100644 index 55b60b7..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted +++ /dev/null @@ -1 +0,0 @@ -Medium \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_applets b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_applets deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_applets +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_panel b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_panel deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_panel +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_system_interface b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_system_interface deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_system_interface +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_windows b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_windows deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/frosted_windows +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/gaps b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/gaps deleted file mode 100644 index 6fe974b..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/gaps +++ /dev/null @@ -1 +0,0 @@ -(0, 8) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/neutral_tint b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/neutral_tint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/neutral_tint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/palette b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/palette deleted file mode 100644 index 71b3c7d..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/palette +++ /dev/null @@ -1,35 +0,0 @@ -Light(( - name: "cosmic-light", - bright_red: "#890418FF", - bright_green: "#00572CFF", - bright_orange: "#792C00FF", - gray_1: "#D7D7D7FF", - gray_2: "#E4E4E4FF", - neutral_0: "#FFFFFFFF", - neutral_1: "#DEDEDEFF", - neutral_2: "#BEBEBEFF", - neutral_3: "#9E9E9EFF", - neutral_4: "#808080FF", - neutral_5: "#636363FF", - neutral_6: "#484848FF", - neutral_7: "#2E2E2EFF", - neutral_8: "#161616FF", - neutral_9: "#030303FF", - neutral_10: "#000000FF", - accent_blue: "#00525AFF", - accent_indigo: "#2E496DFF", - accent_purple: "#68217CFF", - accent_pink: "#86043AFF", - accent_red: "#78292EFF", - accent_orange: "#624000FF", - accent_yellow: "#534800FF", - accent_green: "#185529FF", - accent_warm_grey: "#554742FF", - ext_warm_grey: "#9B8E8AFF", - ext_orange: "#FBB86CFF", - ext_yellow: "#F7E062FF", - ext_blue: "#6ACAD8FF", - ext_purple: "#D58CFFFF", - ext_pink: "#FF9CDDFF", - ext_indigo: "#95C4FCFF", -)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/primary_container_bg b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/primary_container_bg deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/primary_container_bg +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/secondary_container_bg b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/secondary_container_bg deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/secondary_container_bg +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/spacing b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/spacing deleted file mode 100644 index 464b264..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/spacing +++ /dev/null @@ -1,12 +0,0 @@ -( - space_none: 0, - space_xxxs: 4, - space_xxs: 8, - space_xs: 12, - space_s: 16, - space_m: 24, - space_l: 32, - space_xl: 48, - space_xxl: 64, - space_xxxl: 128, -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/success b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/success deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/success +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/text_tint b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/text_tint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/text_tint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/warning b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/warning deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/warning +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/window_hint b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/window_hint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v2/window_hint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/list_button b/resources/default_schema/com.system76.CosmicTheme.Light/v1/list_button deleted file mode 100644 index 2a63b93..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v1/list_button +++ /dev/null @@ -1,74 +0,0 @@ -( - base: ( - red: 0.0, - green: 0.0, - blue: 0.0, - alpha: 0.0, - ), - hover: ( - red: 0.0, - green: 0.0, - blue: 0.0, - alpha: 0.0, - ), - pressed: ( - red: 0.74320567, - green: 0.743206, - blue: 0.74320585, - alpha: 0.5, - ), - selected: ( - red: 0.0, - green: 0.0, - blue: 0.0, - alpha: 0.0, - ), - selected_text: ( - red: 0.0, - green: 0.32156864, - blue: 0.3529412, - alpha: 1.0, - ), - focus: ( - red: 0.0, - green: 0.32156864, - blue: 0.3529412, - alpha: 1.0, - ), - divider: ( - red: 0.15292808, - green: 0.15292814, - blue: 0.15292796, - alpha: 0.2, - ), - on: ( - red: 0.15292808, - green: 0.15292814, - blue: 0.15292796, - alpha: 1.0, - ), - disabled: ( - red: 0.0, - green: 0.0, - blue: 0.0, - alpha: 0.0, - ), - on_disabled: ( - red: 0.15292808, - green: 0.15292814, - blue: 0.15292796, - alpha: 0.65, - ), - border: ( - red: 0.08610404, - green: 0.08610427, - blue: 0.08610421, - alpha: 1.0, - ), - disabled_border: ( - red: 0.08610404, - green: 0.08610427, - blue: 0.08610421, - alpha: 0.5, - ), -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/accent b/resources/default_schema/com.system76.CosmicTheme.Light/v2/accent deleted file mode 100644 index adea896..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/accent +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#00525AFF", - hover: "#14555CFF", - pressed: "#5F888CFF", - selected: "#14555CFF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#FFFFFFFF", - on: "#FFFFFFFF", - disabled: "#00525AFF", - on_disabled: "#7FA8ACFF", - border: "#00525AFF", - disabled_border: "#00525A80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/accent_button b/resources/default_schema/com.system76.CosmicTheme.Light/v2/accent_button deleted file mode 100644 index b9eb27a..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/accent_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#00525AFF", - hover: "#14555CFF", - pressed: "#5F888CFF", - selected: "#14555CFF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#DEDEDEFF", - on: "#FFFFFFFF", - disabled: "#00525AFF", - on_disabled: "#FFFFFF80", - border: "#00525AFF", - disabled_border: "#00525A80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/accent_text b/resources/default_schema/com.system76.CosmicTheme.Light/v2/accent_text deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/accent_text +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/active_hint b/resources/default_schema/com.system76.CosmicTheme.Light/v2/active_hint deleted file mode 100644 index e440e5c..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/active_hint +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/alpha_map b/resources/default_schema/com.system76.CosmicTheme.Light/v2/alpha_map deleted file mode 100644 index 06f3e6a..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/alpha_map +++ /dev/null @@ -1,16 +0,0 @@ -( - extremely_low: 0.9, - extremely_low_2: 0.87692, - very_low: 0.85385, - very_low_2: 0.83076, - low: 0.80769, - low_2: 0.78461, - medium: 0.76154, - medium_2: 0.73846, - high: 0.71538, - high_2: 0.69231, - very_high: 0.66023, - very_high_2: 0.64615, - extremely_high: 0.62308, - extremely_high_2: 0.6, -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/background b/resources/default_schema/com.system76.CosmicTheme.Light/v2/background deleted file mode 100644 index 70dc626..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/background +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#D7D7D7FF", - component: ( - base: "#F5F5F5FF", - hover: "#F6F6F6FF", - pressed: "#F7F7F7FF", - selected: "#F6F6F6FF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#27272733", - on: "#272727FF", - disabled: "#F5F5F580", - on_disabled: "#272727A6", - border: "#161616FF", - disabled_border: "#16161680", - ), - divider: "#B0B0B0FF", - on: "#121212FF", - small_widget: "#CACACA40", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/button b/resources/default_schema/com.system76.CosmicTheme.Light/v2/button deleted file mode 100644 index 5b5826a..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#2E2E2E40", - hover: "#2B2B2B66", - pressed: "#6868689F", - selected: "#2B2B2B66", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#27272733", - on: "#272727FF", - disabled: "#2E2E2E20", - on_disabled: "#272727A6", - border: "#161616FF", - disabled_border: "#16161680", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/control_tint b/resources/default_schema/com.system76.CosmicTheme.Light/v2/control_tint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/control_tint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/corner_radii b/resources/default_schema/com.system76.CosmicTheme.Light/v2/corner_radii deleted file mode 100644 index 7d52139..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/corner_radii +++ /dev/null @@ -1,8 +0,0 @@ -( - radius_0: (0.0, 0.0, 0.0, 0.0), - radius_xs: (4.0, 4.0, 4.0, 4.0), - radius_s: (8.0, 8.0, 8.0, 8.0), - radius_m: (16.0, 16.0, 16.0, 16.0), - radius_l: (32.0, 32.0, 32.0, 32.0), - radius_xl: (160.0, 160.0, 160.0, 160.0), -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/destructive b/resources/default_schema/com.system76.CosmicTheme.Light/v2/destructive deleted file mode 100644 index a13c718..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/destructive +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#890418FF", - hover: "#811727FF", - pressed: "#A3616BFF", - selected: "#811727FF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#FFFFFFFF", - on: "#FFFFFFFF", - disabled: "#890418FF", - on_disabled: "#C4828CFF", - border: "#890418FF", - disabled_border: "#89041880", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/destructive_button b/resources/default_schema/com.system76.CosmicTheme.Light/v2/destructive_button deleted file mode 100644 index bb2de29..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/destructive_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#890418FF", - hover: "#811727FF", - pressed: "#A3616BFF", - selected: "#811727FF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#DEDEDEFF", - on: "#FFFFFFFF", - disabled: "#890418FF", - on_disabled: "#FFFFFF80", - border: "#890418FF", - disabled_border: "#89041880", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted b/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted deleted file mode 100644 index 55b60b7..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted +++ /dev/null @@ -1 +0,0 @@ -Medium \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_applets b/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_applets deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_applets +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_panel b/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_panel deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_panel +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_system_interface b/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_system_interface deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_system_interface +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_windows b/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_windows deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/frosted_windows +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/gaps b/resources/default_schema/com.system76.CosmicTheme.Light/v2/gaps deleted file mode 100644 index 6fe974b..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/gaps +++ /dev/null @@ -1 +0,0 @@ -(0, 8) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/icon_button b/resources/default_schema/com.system76.CosmicTheme.Light/v2/icon_button deleted file mode 100644 index 52138d5..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/icon_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#00000000", - hover: "#63636333", - pressed: "#BEBEBE80", - selected: "#63636333", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#16161633", - on: "#161616FF", - disabled: "#00000000", - on_disabled: "#161616A6", - border: "#161616FF", - disabled_border: "#16161680", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/is_dark b/resources/default_schema/com.system76.CosmicTheme.Light/v2/is_dark deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/is_dark +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/is_high_contrast b/resources/default_schema/com.system76.CosmicTheme.Light/v2/is_high_contrast deleted file mode 100644 index 02e4a84..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/is_high_contrast +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/link_button b/resources/default_schema/com.system76.CosmicTheme.Light/v2/link_button deleted file mode 100644 index 826da6e..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/link_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#00000000", - hover: "#00000000", - pressed: "#00000000", - selected: "#00000000", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#00525A33", - on: "#00525AFF", - disabled: "#00000000", - on_disabled: "#00292D80", - border: "#161616FF", - disabled_border: "#16161680", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/name b/resources/default_schema/com.system76.CosmicTheme.Light/v2/name deleted file mode 100644 index 9dce5c6..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/name +++ /dev/null @@ -1 +0,0 @@ -"cosmic-light" \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/palette b/resources/default_schema/com.system76.CosmicTheme.Light/v2/palette deleted file mode 100644 index 3b9eda9..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/palette +++ /dev/null @@ -1,35 +0,0 @@ -( - name: "cosmic-light", - bright_red: "#890418FF", - bright_green: "#00572CFF", - bright_orange: "#792C00FF", - gray_1: "#D7D7D7FF", - gray_2: "#E4E4E4FF", - neutral_0: "#FFFFFFFF", - neutral_1: "#DEDEDEFF", - neutral_2: "#BEBEBEFF", - neutral_3: "#9E9E9EFF", - neutral_4: "#808080FF", - neutral_5: "#636363FF", - neutral_6: "#484848FF", - neutral_7: "#2E2E2EFF", - neutral_8: "#161616FF", - neutral_9: "#030303FF", - neutral_10: "#000000FF", - accent_blue: "#00525AFF", - accent_indigo: "#2E496DFF", - accent_purple: "#68217CFF", - accent_pink: "#86043AFF", - accent_red: "#78292EFF", - accent_orange: "#624000FF", - accent_yellow: "#534800FF", - accent_green: "#185529FF", - accent_warm_grey: "#554742FF", - ext_warm_grey: "#9B8E8AFF", - ext_orange: "#FBB86CFF", - ext_yellow: "#F7E062FF", - ext_blue: "#6ACAD8FF", - ext_purple: "#D58CFFFF", - ext_pink: "#FF9CDDFF", - ext_indigo: "#95C4FCFF", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/primary b/resources/default_schema/com.system76.CosmicTheme.Light/v2/primary deleted file mode 100644 index 8610d9c..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/primary +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#EBEBEBFF", - component: ( - base: "#DADADAFF", - hover: "#DEDEDEFF", - pressed: "#E2E2E2FF", - selected: "#DEDEDEFF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#14141433", - on: "#141414FF", - disabled: "#DADADA80", - on_disabled: "#141414A6", - border: "#161616FF", - disabled_border: "#16161680", - ), - divider: "#C2C2C2FF", - on: "#202020FF", - small_widget: "#DDDDDD40", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/secondary b/resources/default_schema/com.system76.CosmicTheme.Light/v2/secondary deleted file mode 100644 index cb87ef0..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/secondary +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#FCFCFCFF", - component: ( - base: "#F5F5F5FF", - hover: "#F6F6F6FF", - pressed: "#F7F7F7FF", - selected: "#F6F6F6FF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#27272733", - on: "#272727FF", - disabled: "#F5F5F580", - on_disabled: "#272727A6", - border: "#161616FF", - disabled_border: "#16161680", - ), - divider: "#D2D2D2FF", - on: "#2C2C2CFF", - small_widget: "#EEEEEE40", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/shade b/resources/default_schema/com.system76.CosmicTheme.Light/v2/shade deleted file mode 100644 index 8714b7f..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/shade +++ /dev/null @@ -1 +0,0 @@ -"#00000014" \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/spacing b/resources/default_schema/com.system76.CosmicTheme.Light/v2/spacing deleted file mode 100644 index 464b264..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/spacing +++ /dev/null @@ -1,12 +0,0 @@ -( - space_none: 0, - space_xxxs: 4, - space_xxs: 8, - space_xs: 12, - space_s: 16, - space_m: 24, - space_l: 32, - space_xl: 48, - space_xxl: 64, - space_xxxl: 128, -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/success b/resources/default_schema/com.system76.CosmicTheme.Light/v2/success deleted file mode 100644 index 0b24f8c..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/success +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#00572CFF", - hover: "#145937FF", - pressed: "#5F8A75FF", - selected: "#145937FF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#FFFFFFFF", - on: "#FFFFFFFF", - disabled: "#00572CFF", - on_disabled: "#7FAB96FF", - border: "#00572CFF", - disabled_border: "#00572C80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/success_button b/resources/default_schema/com.system76.CosmicTheme.Light/v2/success_button deleted file mode 100644 index 8e69154..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/success_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#00572CFF", - hover: "#145937FF", - pressed: "#5F8A75FF", - selected: "#145937FF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#DEDEDEFF", - on: "#FFFFFFFF", - disabled: "#00572CFF", - on_disabled: "#FFFFFF80", - border: "#00572CFF", - disabled_border: "#00572C80", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/text_button b/resources/default_schema/com.system76.CosmicTheme.Light/v2/text_button deleted file mode 100644 index b95c9c0..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/text_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#00000000", - hover: "#63636333", - pressed: "#BEBEBE80", - selected: "#63636333", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#00525A33", - on: "#00525AFF", - disabled: "#00000000", - on_disabled: "#00525AA6", - border: "#161616FF", - disabled_border: "#16161680", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/text_tint b/resources/default_schema/com.system76.CosmicTheme.Light/v2/text_tint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/text_tint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/transparent_background b/resources/default_schema/com.system76.CosmicTheme.Light/v2/transparent_background deleted file mode 100644 index 8f9a00d..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/transparent_background +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#D7D7D799", - component: ( - base: "#F5F5F599", - hover: "#F5F5F599", - pressed: "#F5F5F599", - selected: "#F5F5F599", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#27272733", - on: "#27272799", - disabled: "#F5F5F54C", - on_disabled: "#272727A6", - border: "#161616FF", - disabled_border: "#16161680", - ), - divider: "#9B9B9BAD", - on: "#12121299", - small_widget: "#CACACA40", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/transparent_primary b/resources/default_schema/com.system76.CosmicTheme.Light/v2/transparent_primary deleted file mode 100644 index d1f0b03..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/transparent_primary +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#EBEBEBD9", - component: ( - base: "#DADADAD9", - hover: "#DADADAD9", - pressed: "#DADADAD9", - selected: "#DADADAD9", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#14141433", - on: "#141414D9", - disabled: "#DADADA6C", - on_disabled: "#141414A6", - border: "#161616FF", - disabled_border: "#16161680", - ), - divider: "#BCBCBCE0", - on: "#202020D9", - small_widget: "#DDDDDD40", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/transparent_secondary b/resources/default_schema/com.system76.CosmicTheme.Light/v2/transparent_secondary deleted file mode 100644 index b8753f1..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/transparent_secondary +++ /dev/null @@ -1,20 +0,0 @@ -( - base: "#FCFCFCFF", - component: ( - base: "#F5F5F5FF", - hover: "#F5F5F5FF", - pressed: "#F5F5F5FF", - selected: "#F5F5F5FF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#27272733", - on: "#272727FF", - disabled: "#F5F5F580", - on_disabled: "#272727A6", - border: "#161616FF", - disabled_border: "#16161680", - ), - divider: "#D2D2D2FF", - on: "#2C2C2CFF", - small_widget: "#EEEEEE40", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/warning b/resources/default_schema/com.system76.CosmicTheme.Light/v2/warning deleted file mode 100644 index b84809e..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/warning +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#792C00FF", - hover: "#753714FF", - pressed: "#9B755FFF", - selected: "#753714FF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#FFFFFFFF", - on: "#FFFFFFFF", - disabled: "#792C00FF", - on_disabled: "#BC967FFF", - border: "#792C00FF", - disabled_border: "#792C0080", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/warning_button b/resources/default_schema/com.system76.CosmicTheme.Light/v2/warning_button deleted file mode 100644 index 695ca71..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/warning_button +++ /dev/null @@ -1,14 +0,0 @@ -( - base: "#792C00FF", - hover: "#753714FF", - pressed: "#9B755FFF", - selected: "#753714FF", - selected_text: "#00525AFF", - focus: "#00525AFF", - divider: "#000000FF", - on: "#FFFFFFFF", - disabled: "#792C00FF", - on_disabled: "#FFFFFF80", - border: "#792C00FF", - disabled_border: "#792C0080", -) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v2/window_hint b/resources/default_schema/com.system76.CosmicTheme.Light/v2/window_hint deleted file mode 100644 index 4af1832..0000000 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v2/window_hint +++ /dev/null @@ -1 +0,0 @@ -None \ No newline at end of file diff --git a/rust-toolchain.toml b/rust-toolchain.toml index fb5449a..f35f369 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.93.0" +channel = "1.90.0" components = ["clippy", "rustfmt"] diff --git a/rustfmt.toml b/rustfmt.toml deleted file mode 100644 index c1578aa..0000000 --- a/rustfmt.toml +++ /dev/null @@ -1 +0,0 @@ -imports_granularity = "Module" diff --git a/subscriptions/a11y-manager/Cargo.toml b/subscriptions/a11y-manager/Cargo.toml index 4a00d17..bfdf7c2 100644 --- a/subscriptions/a11y-manager/Cargo.toml +++ b/subscriptions/a11y-manager/Cargo.toml @@ -12,5 +12,5 @@ iced_futures = { git = "https://github.com/pop-os/libcosmic" } num-derive = "0.4.2" num-traits = "0.2.19" sctk.workspace = true -tokio = "1.53.1" +tokio = "1.49.0" tracing = "0.1.44" diff --git a/subscriptions/a11y-manager/src/lib.rs b/subscriptions/a11y-manager/src/lib.rs index ba9b8e4..0bcd849 100644 --- a/subscriptions/a11y-manager/src/lib.rs +++ b/subscriptions/a11y-manager/src/lib.rs @@ -1,11 +1,17 @@ use cosmic_protocols::a11y::v1::client::cosmic_a11y_manager_v1::{self, ActiveState}; use num_derive::{FromPrimitive, ToPrimitive}; -use sctk::reexports::calloop::{self, LoopSignal, channel}; -use sctk::reexports::calloop_wayland_source::WaylandSource; -use sctk::reexports::client::globals::{GlobalListContents, registry_queue_init}; -use sctk::reexports::client::protocol::wl_registry; -use sctk::reexports::client::{ConnectError, Connection, Dispatch, Proxy, WEnum}; -use sctk::registry::RegistryState; +use sctk::{ + reexports::{ + calloop::{self, LoopSignal, channel}, + calloop_wayland_source::WaylandSource, + client::{ + ConnectError, Connection, Dispatch, Proxy, WEnum, + globals::{GlobalListContents, registry_queue_init}, + protocol::wl_registry, + }, + }, + registry::RegistryState, +}; use tokio::sync::mpsc; #[derive(Debug, Clone, Copy)] diff --git a/subscriptions/accessibility/Cargo.toml b/subscriptions/accessibility/Cargo.toml index 5e29785..2a3b5e6 100644 --- a/subscriptions/accessibility/Cargo.toml +++ b/subscriptions/accessibility/Cargo.toml @@ -8,8 +8,8 @@ publish = true [dependencies] cosmic-dbus-a11y = { git = "https://github.com/pop-os/dbus-settings-bindings" } -futures = "0.3.33" +futures = "0.3.32" iced_futures = { git = "https://github.com/pop-os/libcosmic" } -tokio = { version = "1.53.1", features = ["sync", "time"] } +tokio = { version = "1.49.0", features = ["sync", "time"] } tracing = "0.1.44" -zbus = "5.18" +zbus = "5.13" diff --git a/subscriptions/airplane-mode/Cargo.toml b/subscriptions/airplane-mode/Cargo.toml index b4ef7ae..403f6fe 100644 --- a/subscriptions/airplane-mode/Cargo.toml +++ b/subscriptions/airplane-mode/Cargo.toml @@ -7,8 +7,8 @@ rust-version.workspace = true publish = true [dependencies] -futures = "0.3.33" +futures = "0.3.32" iced_futures = { git = "https://github.com/pop-os/libcosmic" } -log = "0.4.33" -rustix = "1.1.4" -tokio = "1.53.1" +log = "0.4.29" +rustix = "1.1.3" +tokio = "1.49.0" diff --git a/subscriptions/airplane-mode/src/lib.rs b/subscriptions/airplane-mode/src/lib.rs index 48f4c8e..1e326e7 100644 --- a/subscriptions/airplane-mode/src/lib.rs +++ b/subscriptions/airplane-mode/src/lib.rs @@ -42,9 +42,8 @@ fn is_airplane_mode(rfkill_state: &HashMap) -> bool { mod rfkill { use futures::stream::Stream; - use std::collections::HashMap; use std::os::unix::fs::OpenOptionsExt; - use std::{fs, io, mem, slice}; + use std::{collections::HashMap, fs, io, mem, slice}; use tokio::io::unix::AsyncFd; // /usr/include/linux/rfkill.h diff --git a/subscriptions/bluetooth/Cargo.toml b/subscriptions/bluetooth/Cargo.toml index 1b044d5..0fb5a0d 100644 --- a/subscriptions/bluetooth/Cargo.toml +++ b/subscriptions/bluetooth/Cargo.toml @@ -8,8 +8,8 @@ publish = true [dependencies] bluez-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings" } -futures = "0.3.33" +futures = "0.3.32" iced_futures = { git = "https://github.com/pop-os/libcosmic" } -tokio = "1.53.1" +tokio = "1.49.0" tracing = "0.1.44" -zbus = "5.18.0" +zbus = "5.13.2" diff --git a/subscriptions/bluetooth/src/adapter.rs b/subscriptions/bluetooth/src/adapter.rs index 756f893..eb5de34 100644 --- a/subscriptions/bluetooth/src/adapter.rs +++ b/subscriptions/bluetooth/src/adapter.rs @@ -2,11 +2,13 @@ // SPDX-License-Identifier: MPL-2.0 use crate::{Active, Event}; -use std::collections::HashMap; -use std::convert::Infallible; -use std::hash::{Hash, Hasher}; -use std::path::PathBuf; -use std::time::Duration; +use std::{ + collections::HashMap, + convert::Infallible, + hash::{Hash, Hasher}, + path::PathBuf, + time::Duration, +}; use zbus::zvariant::OwnedObjectPath; #[derive(Default, Debug, Clone)] diff --git a/subscriptions/bluetooth/src/agent.rs b/subscriptions/bluetooth/src/agent.rs index 99fcaae..cb7e7db 100644 --- a/subscriptions/bluetooth/src/agent.rs +++ b/subscriptions/bluetooth/src/agent.rs @@ -40,7 +40,7 @@ pub async fn watch( bluez .register_agent( &agent_path, - <&'static str>::from(bluez_zbus::agent1::Capability::KeyboardDisplay), + <&'static str>::from(bluez_zbus::agent1::Capability::DisplayYesNo), ) .await?; diff --git a/subscriptions/bluetooth/src/device.rs b/subscriptions/bluetooth/src/device.rs index 2ba1854..aec4a72 100644 --- a/subscriptions/bluetooth/src/device.rs +++ b/subscriptions/bluetooth/src/device.rs @@ -3,9 +3,11 @@ use crate::{Active, Event}; use futures::join; -use std::collections::HashMap; -use std::hash::{Hash, Hasher}; -use std::time::Duration; +use std::{ + collections::HashMap, + hash::{Hash, Hasher}, + time::Duration, +}; use zbus::zvariant::OwnedObjectPath; const DEFAILT_DEVICE_ICON: &str = "bluetooth-symbolic"; diff --git a/subscriptions/bluetooth/src/subscription.rs b/subscriptions/bluetooth/src/subscription.rs index b92b262..c88b98f 100644 --- a/subscriptions/bluetooth/src/subscription.rs +++ b/subscriptions/bluetooth/src/subscription.rs @@ -5,11 +5,9 @@ use crate::{AdapterUpdate, Device, DeviceUpdate, Event}; use std::pin::Pin; use bluez_zbus::BluetoothDevice; -use futures::channel::mpsc; -use futures::stream::FusedStream; +use futures::{channel::mpsc, stream::FusedStream}; use iced_futures::futures::{SinkExt, StreamExt}; -use zbus::fdo; -use zbus::zvariant::OwnedObjectPath; +use zbus::{fdo, zvariant::OwnedObjectPath}; enum DevicePropertyWatcherTask { Add(OwnedObjectPath), diff --git a/subscriptions/network-manager/Cargo.toml b/subscriptions/network-manager/Cargo.toml new file mode 100644 index 0000000..e40a2a8 --- /dev/null +++ b/subscriptions/network-manager/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "cosmic-settings-network-manager-subscription" +version = "1.0.7" +edition = "2024" +license = "MPL-2.0" +rust-version.workspace = true +publish = true + +[dependencies] +cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bindings" } +secret-service = { version = "5.1.0", features = ["rt-tokio-crypto-rust"] } +nm-secret-agent-manager = { git = "https://github.com/pop-os/dbus-settings-bindings" } +futures = "0.3.32" +iced_futures = { git = "https://github.com/pop-os/libcosmic" } +itertools = "0.14.0" +secure-string = "0.3.0" +thiserror = "2.0.18" +tokio = "1.49.0" +tracing = "0.1.44" +zbus = { version = "5.13.2", features = ["tokio"] } +bitflags = "2.11.0" diff --git a/subscriptions/network-manager/LICENSE.md b/subscriptions/network-manager/LICENSE.md new file mode 100644 index 0000000..8dc5b15 --- /dev/null +++ b/subscriptions/network-manager/LICENSE.md @@ -0,0 +1,359 @@ +Mozilla Public License Version 2.0 +================================== + +## 1. Definitions + +### 1.1. "Contributor" +means each individual or legal entity that creates, contributes to +the creation of, or owns Covered Software. + +### 1.2. "Contributor Version" +means the combination of the Contributions of others (if any) used +by a Contributor and that particular Contributor's Contribution. + +### 1.3. "Contribution" +means Covered Software of a particular Contributor. + +### 1.4. "Covered Software" +means Source Code Form to which the initial Contributor has attached +the notice in Exhibit A, the Executable Form of such Source Code +Form, and Modifications of such Source Code Form, in each case +including portions thereof. + +### 1.5. "Incompatible With Secondary Licenses" +means + ++ (a) that the initial Contributor has attached the notice described +in Exhibit B to the Covered Software; or + ++ (b) that the Covered Software was made available under the terms of +version 1.1 or earlier of the License, but not also under the +terms of a Secondary License. + +### 1.6. "Executable Form" +means any form of the work other than Source Code Form. + +### 1.7. "Larger Work" +means a work that combines Covered Software with other material, in +a separate file or files, that is not Covered Software. + +### 1.8. "License" +means this document. + +### 1.9. "Licensable" +means having the right to grant, to the maximum extent possible, +whether at the time of the initial grant or subsequently, any and +all of the rights conveyed by this License. + +### 1.10. "Modifications" +means any of the following: + ++ (a) any file in Source Code Form that results from an addition to, +deletion from, or modification of the contents of Covered +Software; or + ++ (b) any new file in Source Code Form that contains any Covered +Software. + +### 1.11. "Patent Claims" of a Contributor +means any patent claim(s), including without limitation, method, +process, and apparatus claims, in any patent Licensable by such +Contributor that would be infringed, but for the grant of the +License, by the making, using, selling, offering for sale, having +made, import, or transfer of either its Contributions or its +Contributor Version. + +### 1.12. "Secondary License" +means either the GNU General Public License, Version 2.0, the GNU +Lesser General Public License, Version 2.1, the GNU Affero General +Public License, Version 3.0, or any later versions of those +licenses. + +### 1.13. "Source Code Form" +means the form of the work preferred for making modifications. + +### 1.14. "You" (or "Your") +means an individual or a legal entity exercising rights under this +License. For legal entities, "You" includes any entity that +controls, is controlled by, or is under common control with You. For +purposes of this definition, "control" means (a) the power, direct +or indirect, to cause the direction or management of such entity, +whether by contract or otherwise, or (b) ownership of more than +fifty percent (50%) of the outstanding shares or beneficial +ownership of such entity. + +## 2. License Grants and Conditions + +### 2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + ++ (a) under intellectual property rights (other than patent or trademark) +Licensable by such Contributor to use, reproduce, make available, +modify, display, perform, distribute, and otherwise exploit its +Contributions, either on an unmodified basis, with Modifications, or +as part of a Larger Work; and + ++ (b) under Patent Claims of such Contributor to make, use, sell, offer +for sale, have made, import, and otherwise transfer either its +Contributions or its Contributor Version. + +### 2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +### 2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + ++ (a) for any code that a Contributor has removed from Covered Software; +or + ++ (b) for infringements caused by: (i) Your and any other third party's +modifications of Covered Software, or (ii) the combination of its +Contributions with other software (except as part of its Contributor +Version); or + ++ (c) under Patent Claims infringed by Covered Software in the absence of +its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +### 2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +### 2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +### 2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +### 2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +## 3. Responsibilities + +### 3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +### 3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + ++ (a) such Covered Software must also be made available in Source Code +Form, as described in Section 3.1, and You must inform recipients of +the Executable Form how they can obtain a copy of such Source Code +Form by reasonable means in a timely manner, at a charge no more +than the cost of distribution to the recipient; and + ++ (b) You may distribute such Executable Form under the terms of this +License, or sublicense it under different terms, provided that the +license for the Executable Form does not attempt to limit or alter +the recipients' rights in the Source Code Form under this License. + +### 3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +### 3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +### 3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +## 4. Inability to Comply Due to Statute or Regulation + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +## 5. Termination + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + + +## 6. Disclaimer of Warranty + +**Covered Software is provided under this License on an "as is" +basis, without warranty of any kind, either expressed, implied, or +statutory, including, without limitation, warranties that the +Covered Software is free of defects, merchantable, fit for a +particular purpose or non-infringing. The entire risk as to the +quality and performance of the Covered Software is with You. +Should any Covered Software prove defective in any respect, You +(not any Contributor) assume the cost of any necessary servicing, +repair, or correction. This disclaimer of warranty constitutes an +essential part of this License. No use of any Covered Software is +authorized under this License except under this disclaimer.** + + +#7. Limitation of Liability + +**Under no circumstances and under no legal theory, whether tort +(including negligence), contract, or otherwise, shall any +Contributor, or anyone who distributes Covered Software as +permitted above, be liable to You for any direct, indirect, +special, incidental, or consequential damages of any character +including, without limitation, damages for lost profits, loss of +goodwill, work stoppage, computer failure or malfunction, or any +and all other commercial damages or losses, even if such party +shall have been informed of the possibility of such damages. This +limitation of liability shall not apply to liability for death or +personal injury resulting from such party's negligence to the +extent applicable law prohibits such limitation. Some +jurisdictions do not allow the exclusion or limitation of +incidental or consequential damages, so this exclusion and +limitation may not apply to You.** + + +## 8. Litigation + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +## 9. Miscellaneous + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +## 10. Versions of the License + +### 10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +### 10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +### 10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +### 10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +## Exhibit A - Source Code Form License Notice + + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +## Exhibit B - "Incompatible With Secondary Licenses" Notice + + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. + diff --git a/subscriptions/network-manager/src/active_conns.rs b/subscriptions/network-manager/src/active_conns.rs new file mode 100644 index 0000000..e902b2a --- /dev/null +++ b/subscriptions/network-manager/src/active_conns.rs @@ -0,0 +1,69 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: MPL-2.0 + +use crate::Wrapper; + +use super::Event; +use cosmic_dbus_networkmanager::nm::NetworkManager; +use futures::{SinkExt, StreamExt}; +use iced_futures::{Subscription, stream}; +use std::{fmt::Debug, hash::Hash}; +use zbus::Connection; + +#[derive(Debug, Clone)] +pub enum State { + Continue(Connection), + Error, +} + +pub fn active_conns_subscription( + id: I, + conn: Connection, +) -> iced_futures::Subscription { + Subscription::run_with(Wrapper { id, conn: conn }, |Wrapper { id: _id, conn }| { + let conn = conn.clone(); + stream::channel(50, move |output| async move { + watch(conn, output).await; + futures::future::pending().await + }) + }) +} + +pub async fn watch(conn: zbus::Connection, mut output: futures::channel::mpsc::Sender) { + let mut state = State::Continue(conn); + + loop { + state = start_listening(state, &mut output).await; + } +} + +async fn start_listening( + state: State, + output: &mut futures::channel::mpsc::Sender, +) -> State { + let conn = match state { + State::Continue(conn) => conn, + State::Error => futures::future::pending().await, + }; + let network_manager = match NetworkManager::new(&conn).await { + Ok(n) => n, + Err(why) => { + tracing::error!(why = why.to_string(), "Failed to connect to NetworkManager"); + return State::Error; + } + }; + + let mut active_conns_changed = network_manager.receive_active_connections_changed().await; + active_conns_changed.next().await; + + while let (Some(_change), _) = futures::future::join( + active_conns_changed.next(), + tokio::time::sleep(tokio::time::Duration::from_secs(1)), + ) + .await + { + _ = output.send(Event::ActiveConns).await; + } + + State::Continue(conn) +} diff --git a/subscriptions/network-manager/src/available_wifi.rs b/subscriptions/network-manager/src/available_wifi.rs new file mode 100644 index 0000000..f467092 --- /dev/null +++ b/subscriptions/network-manager/src/available_wifi.rs @@ -0,0 +1,117 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: MPL-2.0 + +use cosmic_dbus_networkmanager::{ + device::wireless::WirelessDevice, + interface::enums::{ApFlags, ApSecurityFlags, DeviceState}, +}; + +use futures::StreamExt; +use itertools::Itertools; +use std::{collections::HashMap, sync::Arc}; +use zbus::zvariant::ObjectPath; + +use super::hw_address::HwAddress; + +pub async fn handle_wireless_device( + device: WirelessDevice<'_>, + hw_address: Option, +) -> zbus::Result> { + device.request_scan(HashMap::new()).await?; + + let mut scan_changed = device.receive_last_scan_changed().await; + + if let Some(t) = scan_changed.next().await + && let Ok(-1) = t.get().await + { + tracing::error!("wireless device scan errored"); + return Ok(Default::default()); + } + + let access_points = device.get_access_points().await?; + + let state: DeviceState = device + .upcast() + .await + .and_then(|dev| dev.cached_state()) + .unwrap_or_default() + .map(|s| s.into()) + .unwrap_or_else(|| DeviceState::Unknown); + + // Sort by strength and remove duplicates + let mut aps = HashMap::::new(); + for ap in access_points { + let (ssid_res, strength_res) = futures::join!(ap.ssid(), ap.strength()); + + if let Some((ssid, strength)) = ssid_res.ok().zip(strength_res.ok()) { + let ssid = String::from_utf8_lossy(&ssid.clone()).into_owned(); + if let Some(access_point) = aps.get(&ssid) + && access_point.strength > strength + { + continue; + } + + let Ok(flags) = ap.rsn_flags().await else { + continue; + }; + let network_type = if flags.intersects(ApSecurityFlags::KEY_MGMT_802_1X) { + NetworkType::EAP + } else if flags.intersects(ApSecurityFlags::KEY_MGMTPSK | ApSecurityFlags::KEY_MGMT_SAE) + { + NetworkType::PskOrSae + } else if flags.intersects(ApSecurityFlags::KEY_MGMT_OWE) || flags.is_empty() { + NetworkType::Open + } else { + continue; + }; + + aps.insert( + ssid.clone(), + AccessPoint { + ssid: Arc::from(ssid), + strength, + state, + working: false, + path: ap.inner().path().to_owned(), + secured: !ap.wpa_flags().await?.is_empty(), + wps_push: ap.flags().await?.contains(ApFlags::WPS_PBC), + network_type, + hw_address: hw_address + .as_ref() + .and_then(|str_addr| HwAddress::from_str(str_addr)) + .unwrap_or_default(), + }, + ); + } + } + + let aps = aps + .into_values() + .sorted_by(|a, b| b.strength.cmp(&a.strength)) + .collect(); + + Ok(aps) +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct AccessPoint { + pub ssid: Arc, + pub strength: u8, + pub state: DeviceState, + pub working: bool, + pub path: ObjectPath<'static>, + pub hw_address: HwAddress, + pub secured: bool, + pub wps_push: bool, + pub network_type: NetworkType, +} + +// TODO do we want to support eap methods other than peap in the applet? +// Then we'd need a dropdown for the eap method, +// and tls requires a cert instead of a password +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum NetworkType { + Open, + PskOrSae, + EAP, +} diff --git a/subscriptions/network-manager/src/current_networks.rs b/subscriptions/network-manager/src/current_networks.rs new file mode 100644 index 0000000..2fc6b9b --- /dev/null +++ b/subscriptions/network-manager/src/current_networks.rs @@ -0,0 +1,112 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: MPL-2.0 + +use cosmic_dbus_networkmanager::{ + active_connection::ActiveConnection, device::SpecificDevice, + interface::enums::ActiveConnectionState, +}; +use std::net::Ipv4Addr; + +pub async fn active_connections( + active_connections: Vec>, +) -> zbus::Result> { + let mut info = Vec::::with_capacity(active_connections.len()); + for connection in active_connections { + let ipv4 = connection + .ip4_config() + .await? + .address_data() + .await + .unwrap_or_default(); + let addresses: Vec<_> = ipv4.iter().map(|d| d.address).collect(); + let state = connection + .state() + .await + .unwrap_or(ActiveConnectionState::Unknown); + + if connection.vpn().await.unwrap_or_default() { + info.push(ActiveConnectionInfo::Vpn { + name: connection.id().await?, + ip_addresses: addresses.clone(), + }); + continue; + } + for device in connection.devices().await.unwrap_or_default() { + match device + .downcast_to_device() + .await + .ok() + .and_then(|inner| inner) + { + Some(SpecificDevice::Wired(wired_device)) => { + info.push(ActiveConnectionInfo::Wired { + name: connection.id().await?, + hw_address: wired_device.hw_address().await?, + speed: wired_device.speed().await?, + ip_addresses: addresses.clone(), + }); + } + Some(SpecificDevice::Wireless(wireless_device)) => { + if let Ok(access_point) = wireless_device.active_access_point().await { + info.push(ActiveConnectionInfo::WiFi { + name: String::from_utf8_lossy(&access_point.ssid().await?).into_owned(), + ip_addresses: addresses.clone(), + hw_address: wireless_device.hw_address().await?, + state, + strength: access_point.strength().await.unwrap_or_default(), + }); + } + } + Some(SpecificDevice::WireGuard(_)) => { + info.push(ActiveConnectionInfo::Vpn { + name: connection.id().await?, + ip_addresses: addresses.clone(), + }); + } + _ => {} + } + } + } + + info.sort_by(|a, b| { + let helper = |conn: &ActiveConnectionInfo| match conn { + ActiveConnectionInfo::Vpn { name, .. } => format!("0{name}"), + ActiveConnectionInfo::Wired { name, .. } => format!("1{name}"), + ActiveConnectionInfo::WiFi { name, .. } => format!("2{name}"), + }; + helper(a).cmp(&helper(b)) + }); + + Ok(info) +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum ActiveConnectionInfo { + Wired { + name: String, + hw_address: String, + speed: u32, + ip_addresses: Vec, + }, + WiFi { + name: String, + ip_addresses: Vec, + hw_address: String, + state: ActiveConnectionState, + strength: u8, + }, + Vpn { + name: String, + ip_addresses: Vec, + }, +} + +impl ActiveConnectionInfo { + pub fn name(&self) -> String { + match &self { + Self::Wired { name, .. } => name.clone(), + Self::WiFi { name, .. } => name.clone(), + Self::Vpn { name, .. } => name.clone(), + } + } +} diff --git a/subscriptions/network-manager/src/devices.rs b/subscriptions/network-manager/src/devices.rs new file mode 100644 index 0000000..235b0b5 --- /dev/null +++ b/subscriptions/network-manager/src/devices.rs @@ -0,0 +1,254 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: MPL-2.0 + +use super::Event; +pub use cosmic_dbus_networkmanager::interface::enums::{ + ActiveConnectionState, DeviceState, DeviceType, +}; + +use core::hash; +use cosmic_dbus_networkmanager::nm::NetworkManager; +use futures::{SinkExt, StreamExt}; +use iced_futures::{self, Subscription, stream}; +use std::{fmt::Debug, hash::Hash, sync::Arc}; +use zbus::{Connection, zvariant::ObjectPath}; + +#[derive(Debug, Clone, Eq, PartialEq)] +pub struct DeviceInfo { + pub path: ObjectPath<'static>, + pub device_type: DeviceType, + pub interface: String, + pub state: DeviceState, + pub active_connection: Option<(DeviceConnection, ActiveConnectionState)>, + pub available_connections: Vec, + pub known_connections: Vec, +} + +#[derive(Debug, Clone, Eq, PartialEq)] +pub struct DeviceConnection { + pub path: ObjectPath<'static>, + pub id: String, + pub uuid: Arc, +} + +#[derive(Debug, Clone, Eq, PartialEq)] +pub struct KnownDeviceConnection { + pub id: String, + pub uuid: Arc, +} + +pub async fn list( + conn: &zbus::Connection, + device_type_filter: fn(DeviceType) -> bool, +) -> zbus::Result> { + let nm = NetworkManager::new(conn).await?; + + let (devices, nm_settings) = futures::try_join!(nm.devices(), nm.settings())?; + + let connection_settings: &Vec<_> = &futures::stream::FuturesOrdered::from_iter( + nm_settings + .list_connections() + .await? + .into_iter() + .map(|connection| async move { connection.get_settings().await }), + ) + .filter_map(|res| async move { res.ok() }) + .collect() + .await; + + let device_iter = devices.into_iter().map(|device| async move { + let (interface, hw_address, device_type, state, available_connections) = + futures::try_join!( + device.interface(), + device.hw_address(), + device.device_type(), + device.state(), + device.available_connections() + ) + .ok()?; + + if !device_type_filter(device_type) { + return None; + } + + if hw_address.is_empty() { + return None; + } + + let (active_connection, available_connections) = futures::join!( + async { + let connection = device.active_connection().await?; + + let (id, uuid, state) = + futures::try_join!(connection.id(), connection.uuid(), connection.state())?; + + Ok::<_, zbus::Error>(( + DeviceConnection { + id, + uuid: Arc::from(uuid), + path: connection.inner().path().to_owned(), + }, + state, + )) + }, + futures::stream::FuturesOrdered::from_iter(available_connections.into_iter().map( + |conn| async move { + let path = conn.inner().path().to_owned(); + + let settings = conn.get_settings().await.ok()?; + + let id = settings + .get("connection")? + .get("id")? + .downcast_ref::() + .ok()?; + + let uuid = settings["connection"] + .get("uuid")? + .downcast_ref::() + .ok()?; + + Some(DeviceConnection { + id, + uuid: Arc::from(uuid), + path, + }) + } + ),) + .filter_map(|res| async move { res }) + .collect::>() + ); + + let known_connections = connection_settings + .iter() + .flat_map(|conn_settings| { + let connection = conn_settings.get("connection")?; + + let interface_name = connection + .get("interface-name")? + .downcast_ref::() + .ok()?; + + if interface_name != interface { + return None; + } + + let id = connection.get("id")?.downcast_ref::().ok()?; + let uuid = connection.get("uuid")?.downcast_ref::().ok()?; + + Some(KnownDeviceConnection { + uuid: Arc::from(uuid), + id, + }) + }) + .collect(); + + Some(DeviceInfo { + path: device.inner().path().to_owned(), + device_type, + interface, + state, + active_connection: active_connection.ok(), + known_connections, + available_connections, + }) + }); + + let devices_info = futures::stream::FuturesOrdered::from_iter(device_iter) + .filter_map(|res| async move { res }) + .collect::>() + .await; + + Ok(devices_info) +} + +pub fn subscription( + id: I, + has_popup: bool, + conn: Connection, +) -> iced_futures::Subscription { + struct Wrapper { + id: I, + has_popup: bool, + conn: Connection, + } + impl Hash for Wrapper { + fn hash(&self, state: &mut H) { + self.id.hash(state); + self.has_popup.hash(state); + } + } + Subscription::run_with( + Wrapper { + id, + has_popup, + conn, + }, + |Wrapper { + id, + has_popup, + conn, + }| { + let conn = conn.clone(); + let has_popup = *has_popup; + stream::channel(50, move |output| async move { + watch(conn, has_popup, output).await; + futures::future::pending().await + }) + }, + ) +} + +pub async fn watch( + conn: zbus::Connection, + has_popup: bool, + mut output: futures::channel::mpsc::Sender, +) { + let mut state = State::Continue(conn); + + loop { + state = start_listening(state, has_popup, &mut output).await; + } +} + +#[derive(Debug, Clone)] +pub enum State { + Continue(Connection), + Error, +} + +async fn start_listening( + state: State, + has_popup: bool, + output: &mut futures::channel::mpsc::Sender, +) -> State { + let conn = match state { + State::Continue(conn) => conn, + State::Error => futures::future::pending().await, + }; + let network_manager = match NetworkManager::new(&conn).await { + Ok(n) => n, + Err(why) => { + tracing::error!( + why = why.to_string(), + "failed to connect to network_manager" + ); + return State::Error; + } + }; + + let mut devices_changed = network_manager.receive_devices_changed().await; + + let secs = if has_popup { 4 } else { 60 }; + + while let (Some(_change), _) = futures::future::join( + devices_changed.next(), + tokio::time::sleep(tokio::time::Duration::from_secs(secs)), + ) + .await + { + _ = output.send(Event::Devices).await; + } + + State::Continue(conn) +} diff --git a/subscriptions/network-manager/src/hw_address.rs b/subscriptions/network-manager/src/hw_address.rs new file mode 100644 index 0000000..db29158 --- /dev/null +++ b/subscriptions/network-manager/src/hw_address.rs @@ -0,0 +1,38 @@ +#[derive(Copy, Clone, PartialEq, Eq, Default, Debug, PartialOrd, Ord)] +pub struct HwAddress { + address: u64, +} + +impl HwAddress { + pub fn from_str(arg: &str) -> Option { + let columnless_vec = arg.split(":").collect::>(); + if columnless_vec.len() * 3 - 1 != arg.len() { + return None; + } + for byte in &columnless_vec { + if byte.len() != 2 { + return None; + } + } + u64::from_str_radix(columnless_vec.join("").as_str(), 16) + .ok() + .map(|address| HwAddress { address }) + } + pub fn from_string(arg: &str) -> Option { + HwAddress::from_str(arg) + } +} + +impl std::fmt::Display for HwAddress { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let hex = format!("{:#x}", self.address) + .trim_start_matches("0x") + .chars() + .collect::>() + .chunks(2) + .map(|chunk| chunk.iter().cloned().collect::()) + .collect::>() + .join(":"); + write!(f, "{}", hex) + } +} diff --git a/subscriptions/network-manager/src/lib.rs b/subscriptions/network-manager/src/lib.rs new file mode 100644 index 0000000..631eda9 --- /dev/null +++ b/subscriptions/network-manager/src/lib.rs @@ -0,0 +1,1170 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: MPL-2.0 + +pub mod active_conns; +pub mod available_wifi; +pub mod current_networks; +pub mod devices; +pub mod hw_address; +pub mod nm_secret_agent; +pub mod wireless_enabled; + +use std::{collections::HashMap, fmt::Debug, hash::Hash, sync::Arc, time::Duration}; + +use available_wifi::NetworkType; +pub use cosmic_dbus_networkmanager as dbus; +pub use dbus::settings::connection::Settings; + +use cosmic_dbus_networkmanager::{ + device::SpecificDevice, + interface::{ + enums::{self, ActiveConnectionState, DeviceType, NmConnectivityState}, + settings::connection::ConnectionSettingsProxy, + }, + nm::NetworkManager, + settings::{NetworkManagerSettings, connection::Connection}, +}; +use futures::{ + FutureExt, SinkExt, StreamExt, + channel::mpsc::{UnboundedReceiver, UnboundedSender, unbounded}, +}; +use iced_futures::{Subscription, stream}; +use secure_string::SecureString; +use tokio::process::Command; +use zbus::zvariant::{self, ObjectPath, Value}; + +use self::{ + available_wifi::{AccessPoint, handle_wireless_device}, + current_networks::{ActiveConnectionInfo, active_connections}, +}; + +pub type SSID = Arc; +pub type UUID = Arc; + +pub(crate) struct Wrapper { + id: I, + conn: zbus::Connection, +} + +impl Hash for Wrapper { + fn hash(&self, state: &mut H) { + self.id.hash(state); + } +} + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error("failed to list bluetooth devices with rfkill")] + BluetoothRfkillList(std::io::Error), + #[error("failed to activate connection")] + ConnectionActivate, + #[error("no wifi devices found")] + NoWiFiDevices, + #[error("zbus error")] + Zbus(#[from] zbus::Error), + #[error("missing connection field")] + MissingField(&'static str), +} + +#[derive(Debug)] +pub enum State { + Ready(zbus::Connection), + Waiting(zbus::Connection, UnboundedReceiver), + Finished, +} + +/// Reloads state on available connection changes. +pub async fn watch_connections_changed( + conn: zbus::Connection, + mut output: futures::channel::mpsc::Sender, +) { + let Ok(nm) = NetworkManager::new(&conn).await else { + return; + }; + + let mut device_stream = nm.receive_devices_changed().await; + + loop { + // Emits updates when available connections changes. + let connections_changed = std::pin::pin!(async { + let devices = nm.devices().await.unwrap_or_default(); + + let mut connection_streams = + futures::stream::FuturesUnordered::from_iter(devices.into_iter().map( + |device| async move { device.receive_available_connections_changed().await }, + )) + .collect::>() + .await; + + let mut available_connections = futures::stream::FuturesUnordered::from_iter( + connection_streams + .iter_mut() + .map(|stream| async { stream.next().await }), + ); + + loop { + _ = futures::join!( + available_connections.next(), + tokio::time::sleep(Duration::from_secs(3)) + ); + + // TODO: although it should consume the stream, the stream is never empty. + // while available_connections.next().now_or_never().is_some() {} + + let state = NetworkManagerState::new(&conn).await.unwrap_or_default(); + + _ = output + .send(Event::RequestResponse { + req: Request::Reload, + state, + success: true, + }) + .await; + } + }); + + // Reload the connection streams whenever devices change. + futures::future::select(connections_changed, device_stream.next()).await; + } +} + +pub fn subscription( + id: I, + conn: zbus::Connection, +) -> iced_futures::Subscription { + struct Wrapper { + id: I, + conn: zbus::Connection, + } + impl Hash for Wrapper { + fn hash(&self, state: &mut H) { + self.id.hash(state); + } + } + Subscription::run_with(Wrapper { id, conn }, |Wrapper { id, conn }| { + let conn = conn.clone(); + stream::channel( + 50, + |output: futures::channel::mpsc::Sender| async move { + watch(conn, output).await; + futures::future::pending().await + }, + ) + }) +} + +pub async fn watch(conn: zbus::Connection, mut output: futures::channel::mpsc::Sender) { + let mut state = State::Ready(conn); + + loop { + state = start_listening(state, &mut output).await; + } +} + +async fn start_listening( + state: State, + output: &mut futures::channel::mpsc::Sender, +) -> State { + match state { + State::Ready(conn) => { + let (tx, rx) = unbounded(); + + if output + .send(Event::Init { + conn: conn.clone(), + sender: tx, + state: NetworkManagerState::new(&conn).await.unwrap_or_default(), + }) + .await + .is_ok() + { + State::Waiting(conn, rx) + } else { + State::Finished + } + } + State::Waiting(conn, mut rx) => { + let network_manager = match NetworkManager::new(&conn).await { + Ok(n) => n, + Err(_) => return State::Finished, + }; + + match rx.next().await { + Some(Request::Deactivate(uuid)) => { + let mut success = false; + for c in network_manager + .active_connections() + .await + .unwrap_or_default() + { + if c.uuid().await.unwrap_or_default().as_str() == uuid.as_ref() + && network_manager.deactivate_connection(&c).await.is_ok() + { + success = true; + if let Ok(ActiveConnectionState::Deactivated) = c.state().await { + break; + } else { + let mut changed = c.receive_state_changed().await; + _ = tokio::time::timeout(Duration::from_secs(5), async move { + loop { + if let Some(next) = changed.next().await + && let Ok(ActiveConnectionState::Deactivated) = + next.get().await.map(ActiveConnectionState::from) + { + break; + } + } + }) + .await; + } + break; + } + } + + _ = request_response(&conn, Request::Deactivate(uuid.clone()), success) + .then(|event| output.send(event)) + .await; + } + + Some(Request::Disconnect(ssid)) => { + let mut success = false; + for c in network_manager + .active_connections() + .await + .unwrap_or_default() + { + if c.id().await.unwrap_or_default().as_str() == ssid.as_ref() + && network_manager.deactivate_connection(&c).await.is_ok() + { + success = true; + if let Ok(ActiveConnectionState::Deactivated) = c.state().await { + break; + } else { + let mut changed = c.receive_state_changed().await; + _ = tokio::time::timeout(Duration::from_secs(5), async move { + loop { + if let Some(next) = changed.next().await + && let Ok(ActiveConnectionState::Deactivated) = + next.get().await.map(ActiveConnectionState::from) + { + break; + } + } + }) + .await; + } + break; + } + } + + _ = request_response(&conn, Request::Disconnect(ssid.clone()), success) + .then(|event| output.send(event)) + .await; + } + + Some(Request::SetAirplaneMode(airplane_mode)) => { + // wifi + let mut success = network_manager + .set_wireless_enabled(!airplane_mode) + .await + .is_ok(); + // bluetooth + success = success + && Command::new("rfkill") + .arg(if airplane_mode { "block" } else { "unblock" }) + .arg("bluetooth") + .output() + .await + .is_ok(); + + let mut state = NetworkManagerState::new(&conn).await.unwrap_or_default(); + state.airplane_mode = if success { + airplane_mode + } else { + !airplane_mode + }; + if state.airplane_mode { + state.wifi_enabled = false; + } + + _ = output + .send(Event::RequestResponse { + req: Request::SetAirplaneMode(airplane_mode), + success, + state, + }) + .await; + } + + Some(Request::SetWiFi(enabled)) => { + let success = network_manager.set_wireless_enabled(enabled).await.is_ok(); + + let mut state = NetworkManagerState::new(&conn).await.unwrap_or_default(); + + state.wifi_enabled = if success { enabled } else { !enabled }; + + if state.wifi_enabled { + tokio::time::sleep(Duration::from_secs(3)).await; + } + + _ = request_response(&conn, Request::SetWiFi(enabled), success) + .then(|event| output.send(event)) + .await; + } + + Some(Request::Authenticate { + ssid, + identity, + password, + secret_tx, + interface, + }) => { + let nm_state = NetworkManagerState::new(&conn).await.unwrap_or_default(); + + let success = nm_state + .connect_wifi( + &conn, + &ssid, + identity.as_deref(), + Some(password.unsecure()), + secret_tx.clone(), + if identity.is_some() { + NetworkType::EAP + } else { + NetworkType::PskOrSae + }, + interface.clone(), + ) + .await + .is_ok(); + + _ = output + .send(Event::RequestResponse { + req: Request::Authenticate { + ssid: ssid.clone(), + identity: identity.clone(), + password: password.clone(), + secret_tx: secret_tx.clone(), + interface, + }, + success, + state: NetworkManagerState::new(&conn).await.unwrap_or_default(), + }) + .await; + } + + Some(Request::SelectAccessPoint(ssid, network_type, secret_tx, interface)) => { + if matches!(network_type, NetworkType::Open) { + attempt_wifi_connection(&conn, ssid, network_type, output, None, interface) + .await; + } else { + // For secured networks, check if we have saved credentials + let has_saved = has_saved_wifi_credentials(&conn, &ssid).await; + + if !has_saved { + return State::Waiting(conn, rx); + } + + // We have saved credentials, attempt connection + attempt_wifi_connection( + &conn, + ssid, + network_type, + output, + secret_tx, + interface, + ) + .await; + } + } + + Some(Request::Activate(device_path, connection_path)) => { + let mut success = true; + + if let Err(why) = network_manager + .activate_connection_by_paths(&connection_path, &device_path) + .await + { + tracing::error!( + ?why, + "failed to activate connection on {device_path:?} to {connection_path}" + ); + success = false; + }; + + _ = request_response( + &conn, + Request::Activate(device_path, connection_path), + success, + ) + .then(|event| output.send(event)) + .await; + } + + Some(Request::Reload) => { + _ = output + .send(request_response(&conn, Request::Reload, true).await) + .await; + } + + Some(Request::Remove(uuid)) => { + let s = match NetworkManagerSettings::new(&conn).await { + Ok(s) => s, + Err(why) => { + tracing::error!(?why, "error getting network manager settings"); + _ = output + .send(Event::RequestResponse { + req: Request::Forget(uuid.clone()), + success: false, + state: NetworkManagerState::new(&conn) + .await + .unwrap_or_default(), + }) + .await; + + return State::Waiting(conn, rx); + } + }; + + let known_conns = s.list_connections().await.unwrap_or_default(); + let mut success = false; + for c in known_conns { + let settings = c.get_settings().await.ok().unwrap_or_default(); + + let c_uuid = settings + .get("connection") + .and_then(|conn| conn.get("uuid")) + .and_then(|uuid| uuid.downcast_ref::().ok()) + .unwrap_or_default(); + + if uuid.as_ref() == c_uuid.as_str() { + _ = c.delete().await; + success = true; + } + } + + _ = request_response(&conn, Request::Remove(uuid.clone()), success) + .then(|event| output.send(event)) + .await; + } + + Some(Request::Forget(ssid)) => { + let s = match NetworkManagerSettings::new(&conn).await { + Ok(s) => s, + Err(why) => { + tracing::error!(?why, "error getting network manager settings"); + _ = output + .send(Event::RequestResponse { + req: Request::Forget(ssid.clone()), + success: false, + state: NetworkManagerState::new(&conn) + .await + .unwrap_or_default(), + }) + .await; + + return State::Waiting(conn, rx); + } + }; + + let known_conns = s.list_connections().await.unwrap_or_default(); + let mut success = false; + for c in known_conns { + let settings = c.get_settings().await.ok().unwrap_or_default(); + let s = Settings::new(settings); + if s.wifi + .clone() + .and_then(|w| w.ssid) + .and_then(|ssid| String::from_utf8(ssid).ok()) + .is_some_and(|s| s == ssid.as_ref()) + { + _ = c.delete().await; + success = true; + break; + } + } + + _ = request_response(&conn, Request::Forget(ssid.clone()), success) + .then(|event| output.send(event)) + .await; + } + + Some(Request::GetWiFiCredentials(ssid, uuid, security_type, secret_tx)) => { + let s = match NetworkManagerSettings::new(&conn).await { + Ok(s) => s, + Err(why) => { + tracing::error!(?why, "error getting network manager settings"); + return State::Waiting(conn, rx); + } + }; + + match security_type { + NetworkType::Open => { + _ = output + .send(Event::WiFiCredentials { + ssid: ssid.clone(), + password: None, + security_type, + }) + .await; + } + t => { + let (tx, rx) = tokio::sync::oneshot::channel(); + let setting_name = if matches!(t, NetworkType::PskOrSae) { + "802-11-wireless-security" + } else { + "802-1x" + }; + let pw_key = if matches!(t, NetworkType::PskOrSae) { + "psk" + } else { + "password" + }; + if let Some(secret_tx) = secret_tx { + let _ = secret_tx + .send(nm_secret_agent::Request::GetSecrets { + setting_name: setting_name.to_string(), + uuid: uuid.to_string(), + resp_tx: tx, + }) + .await; + let _ = tokio::time::timeout(Duration::from_secs(10), async move { + if let Some(password) = + rx.await.ok().and_then(|mut secrets| secrets.remove(pw_key)) + { + _ = output + .send(Event::WiFiCredentials { + ssid: ssid.clone(), + password: Some(password), + security_type, + }) + .await; + } else { + _ = output + .send(Event::WiFiCredentials { + ssid: ssid.clone(), + password: None, + security_type, + }) + .await; + } + }) + .await; + } else { + let known_conns = s.list_connections().await.unwrap_or_default(); + for c in known_conns { + let settings = c.get_settings().await.ok().unwrap_or_default(); + let settings_parsed = Settings::new(settings.clone()); + + if let Some(saved_ssid) = settings_parsed + .wifi + .clone() + .and_then(|w| w.ssid) + .and_then(|s| String::from_utf8(s).ok()) + && saved_ssid == ssid.as_ref() + { + let password = c + .get_secrets("802-11-wireless-security") + .await + .ok() + .and_then(|secrets| { + // Look for PSK password + secrets + .get("802-11-wireless-security") + .and_then(|sec| sec.get("psk")) + .and_then(|v| { + v.downcast_ref::().ok() + }) + .map(|s| s.to_string()) + .or_else(|| { + // Fallback to WEP key + secrets + .get("802-11-wireless-security") + .and_then(|sec| sec.get("wep-key0")) + .and_then(|v| { + v.downcast_ref::().ok() + }) + .map(|s| s.to_string()) + }) + }); + + _ = output + .send(Event::WiFiCredentials { + ssid: ssid.clone(), + password: password.map(SecureString::from), + security_type, + }) + .await; + break; + } + } + } + } + } + } + + None => { + return State::Finished; + } + }; + + State::Waiting(conn, rx) + } + State::Finished => futures::future::pending().await, + } +} + +async fn request_response(conn: &zbus::Connection, req: Request, success: bool) -> Event { + Event::RequestResponse { + req, + success, + state: NetworkManagerState::new(conn).await.unwrap_or_default(), + } +} + +async fn has_saved_wifi_credentials(conn: &zbus::Connection, ssid: &str) -> bool { + let Ok(nm_settings) = NetworkManagerSettings::new(conn).await else { + return false; + }; + + let known_conns = nm_settings.list_connections().await.unwrap_or_default(); + + for connection in known_conns { + if let Ok(settings) = connection.get_settings().await { + let settings = Settings::new(settings); + if let Some(saved_ssid) = settings + .wifi + .and_then(|w| w.ssid) + .and_then(|ssid| String::from_utf8(ssid).ok()) + && saved_ssid == ssid + { + return true; + } + } + } + + false +} + +async fn attempt_wifi_connection( + conn: &zbus::Connection, + ssid: SSID, + network_type: NetworkType, + output: &mut futures::channel::mpsc::Sender, + secret_tx: Option>, + interface: Option, +) { + let state = NetworkManagerState::new(conn).await.unwrap_or_default(); + let success = if let Err(err) = state + .connect_wifi( + conn, + ssid.as_ref(), + None, + None, + secret_tx, + network_type, + interface.clone(), + ) + .await + { + tracing::error!("Failed to connect to access point: {:?}", err); + false + } else { + true + }; + + _ = request_response( + conn, + Request::SelectAccessPoint(ssid, network_type, None, interface), + success, + ) + .then(|event| output.send(event)) + .await; +} + +#[derive(Debug, Clone)] +pub enum Request { + /// Activate a device's connection profile + Activate(ObjectPath<'static>, ObjectPath<'static>), + /// Deactivate a connection + Deactivate(UUID), + /// Disconnect from an access point. + Disconnect(SSID), + /// Forget a known access point. + Forget(SSID), + /// Create a connection to a new access point. + Authenticate { + ssid: String, + identity: Option, + password: SecureString, + secret_tx: Option>, + interface: Option, + }, + /// Get WiFi credentials for a known access point. + GetWiFiCredentials( + SSID, + UUID, + NetworkType, + Option>, + ), + /// Signal to reload the service. + Reload, + /// Remove a connection profile. + Remove(UUID), + /// Connect to a known access point. + SelectAccessPoint( + SSID, + NetworkType, + Option>, + Option, + ), + /// Toggle airplaine mode. + SetAirplaneMode(bool), + /// Toggle WiFi enablement. + SetWiFi(bool), +} + +#[derive(Debug, Clone)] +pub enum Event { + RequestResponse { + req: Request, + state: NetworkManagerState, + success: bool, + }, + Init { + conn: zbus::Connection, + sender: UnboundedSender, + state: NetworkManagerState, + }, + Devices, + WiFiEnabled(bool), + WirelessAccessPoints, + ActiveConns, + WiFiCredentials { + ssid: SSID, + password: Option, + security_type: NetworkType, + }, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct NetworkManagerState { + pub wireless_access_points: Vec, + pub active_conns: Vec, + pub known_access_points: Vec, + pub wifi_enabled: bool, + pub airplane_mode: bool, + pub connectivity: NmConnectivityState, +} + +impl Default for NetworkManagerState { + fn default() -> Self { + Self { + wireless_access_points: Vec::new(), + active_conns: Vec::new(), + known_access_points: Vec::new(), + wifi_enabled: false, + airplane_mode: false, + connectivity: NmConnectivityState::Unknown, + } + } +} + +impl NetworkManagerState { + pub async fn new(conn: &zbus::Connection) -> Result { + let network_manager = NetworkManager::new(conn).await?; + let mut this = Self::default(); + + this.refresh_wifi_state(conn, &network_manager).await?; + + Ok(this) + } + + pub async fn refresh_wifi_state( + &mut self, + conn: &zbus::Connection, + network_manager: &NetworkManager<'_>, + ) -> Result<(), Error> { + let (airplane_mode, wireless_enabled, settings_res) = futures::join!( + Command::new("rfkill") + .arg("list") + .arg("bluetooth") + .output() + .then(|res| async move { + let Ok(output) = res else { + return false; + }; + + std::str::from_utf8(&output.stdout) + .ok() + .is_some_and(|stdout| stdout.contains("Soft blocked: yes")) + }), + network_manager + .wireless_enabled() + .then(|res| async move { res.unwrap_or_default() }), + NetworkManagerSettings::new(conn) + ); + + self.wifi_enabled = wireless_enabled; + self.airplane_mode = airplane_mode && !self.wifi_enabled; + + let settings = settings_res?; + + _ = settings.load_connections(&[]).await; + + let (known_conns, active_conns, devices, connectivity) = futures::join!( + settings.list_connections(), + network_manager.active_connections(), + network_manager.devices(), + network_manager.connectivity(), + ); + + let devices = devices.unwrap_or_default(); + let known_conns = known_conns.unwrap_or_default(); + + let (active_conns, wireless_access_points) = futures::join!( + // Retrieve active connections. + async move { + let mut active_conns = active_connections(active_conns.unwrap_or_default()) + .await + .unwrap_or_default(); + + active_conns.sort_by(|a, b| { + let helper = |conn: &ActiveConnectionInfo| match conn { + ActiveConnectionInfo::Vpn { name, .. } => format!("0{name}"), + ActiveConnectionInfo::Wired { name, .. } => format!("1{name}"), + ActiveConnectionInfo::WiFi { name, .. } => format!("2{name}"), + }; + helper(a).cmp(&helper(b)) + }); + + active_conns + }, + // Retrieve all access points, and sort by strength. + async move { + let mut wireless_access_points = futures::stream::FuturesUnordered::from_iter( + devices.iter().map(|device| async move { + if let Ok(Some(SpecificDevice::Wireless(wireless_device))) = + device.downcast_to_device().await + { + handle_wireless_device(wireless_device, device.hw_address().await.ok()) + .await + .unwrap_or_default() + } else { + Vec::new() + } + }), + ) + .fold( + Vec::with_capacity(devices.len()), + |mut access_points, mut f| async move { + access_points.append(&mut f); + access_points + }, + ) + .await; + + wireless_access_points.sort_by(|a, b| b.strength.cmp(&a.strength)); + wireless_access_points + } + ); + + // Concurrently get + let known_ssid: Vec> = futures::stream::FuturesOrdered::from_iter( + known_conns.into_iter().map(|c| async move { + let s = c.get_settings().await.ok()?; + let s = Settings::new(s); + let curr_ssid = s + .wifi + .clone() + .and_then(|w| w.ssid) + .and_then(|ssid| String::from_utf8(ssid).ok())?; + + Some(Arc::from(curr_ssid)) + }), + ) + .filter_map(|c| async move { c }) + .collect() + .await; + + self.known_access_points = wireless_access_points + .iter() + .filter(|a| { + known_ssid.contains(&a.ssid) + && !active_conns.iter().any(|ac| ac.name() == a.ssid.as_ref()) + }) + .cloned() + .collect(); + + self.wireless_access_points = wireless_access_points; + self.active_conns = active_conns; + self.connectivity = connectivity?; + + Ok(()) + } + + #[allow(dead_code)] + pub fn clear(&mut self) { + self.active_conns = Vec::new(); + self.known_access_points = Vec::new(); + self.wireless_access_points = Vec::new(); + } + + async fn connect_wifi( + &self, + conn: &zbus::Connection, + ssid: &str, + identity: Option<&str>, + password: Option<&str>, + mut secret_tx: Option>, + network_type: NetworkType, + interface: Option, + ) -> Result<(), Error> { + secret_tx = secret_tx.filter(|tx| !tx.is_closed()); + let nm = NetworkManager::new(conn).await?; + + for c in nm.active_connections().await.unwrap_or_default() { + if self + .wireless_access_points + .iter() + .any(|w| Ok(Some(w.ssid.as_ref())) == c.cached_id().as_ref().map(|v| v.as_deref())) + { + _ = nm.deactivate_connection(&c).await; + break; + } + } + + let mut conn_settings: HashMap<&str, HashMap<&str, zvariant::Value>> = HashMap::from([ + ( + "802-11-wireless", + HashMap::from([("ssid", Value::Array(ssid.as_bytes().into()))]), + ), + ( + "connection", + HashMap::from([ + ("id", Value::Str(ssid.into())), + ("type", Value::Str("802-11-wireless".into())), + ]), + ), + ]); + + if let Some(identity) = identity { + conn_settings.insert( + "802-1x", + HashMap::from([ + ("identity", Value::Str(identity.into())), + // most common default + ("eap", Value::Array(vec!["peap"].into())), + // most common default + ("phase2-auth", Value::Str("mschapv2".into())), + ]), + ); + if secret_tx.is_none() { + conn_settings + .get_mut("802-1x") + .unwrap() + .insert("password", Value::Str(password.unwrap_or("").into())); + } + let wireless = conn_settings.get_mut("802-11-wireless").unwrap(); + wireless.insert("security", Value::Str("802-11-wireless-security".into())); + wireless.insert("mode", Value::Str("infrastructure".into())); + conn_settings.insert( + "802-11-wireless-security", + HashMap::from([("key-mgmt", Value::Str("wpa-eap".into()))]), + ); + } else if let Some(pass) = password { + let entry = conn_settings.entry("802-11-wireless-security").or_default(); + _ = entry.insert("key-mgmt", Value::Str("wpa-psk".into())); + if secret_tx.is_none() { + _ = entry.insert("psk", Value::Str(pass.into())); + } + } + + let devices = nm.devices().await?; + for device in devices { + if !matches!( + device.device_type().await.unwrap_or(DeviceType::Other), + DeviceType::Wifi + ) || (interface.is_some() && interface != device.interface().await.ok()) + { + continue; + } + + let s = NetworkManagerSettings::new(conn).await?; + let known_conns = s.list_connections().await.unwrap_or_default(); + let mut known_conn = None; + for c in known_conns { + let settings = c.get_settings().await.ok().unwrap_or_default(); + + let s = Settings::new(settings); + if let Some(cur_ssid) = s + .wifi + .clone() + .and_then(|w| w.ssid) + .and_then(|ssid| String::from_utf8(ssid).ok()) + && cur_ssid == ssid + { + known_conn = Some(c); + break; + } + } + + let known_conn = if let Some(known_conn) = known_conn { + if (secret_tx.is_none() && password.is_some()) || identity.is_some() { + known_conn.update(conn_settings).await.unwrap(); + } + known_conn + } else { + let settings = nm.settings().await?; + let object_path = settings.add_connection(conn_settings).await?; + let known_connection = Connection::from( + ConnectionSettingsProxy::builder(settings.inner().connection()) + .path(object_path)? + .build() + .await?, + ); + let settings = known_connection.get_settings().await?; + let uuid = String::try_from( + settings + .get("connection") + .ok_or_else(|| Error::MissingField("connection"))? + .get("uuid") + .ok_or_else(|| Error::MissingField("uuid"))? + .clone(), + ) + .map_err(zbus::Error::Variant)?; + + if let Some((pass, secret_tx)) = password.zip(secret_tx.as_ref()) { + let pass = SecureString::from(pass); + let (applied_tx, applied_rx) = tokio::sync::oneshot::channel(); + + let _ = secret_tx + .send(nm_secret_agent::Request::SetSecrets { + setting_name: if identity.is_some() { + "802-1x".into() + } else { + "802-11-wireless-security".into() + }, + uuid, + secrets: if identity.is_some() { + HashMap::from([("password".to_string(), pass)]) + } else { + HashMap::from([("psk".to_string(), pass)]) + }, + applied_tx, + }) + .await; + if let Err(err) = applied_rx.await { + tracing::error!("Failed to set secret. {err:?}"); + } + } + + known_connection + }; + + if let Some(pass) = password { + let pass = SecureString::from(pass); + if let Some(secret_tx) = secret_tx.as_ref() { + let settings = known_conn.get_settings().await?; + let uuid = String::try_from( + settings + .get("connection") + .ok_or_else(|| Error::MissingField("connection"))? + .get("uuid") + .ok_or_else(|| Error::MissingField("uuid"))? + .clone(), + ) + .map_err(zbus::Error::Variant)?; + let (applied_tx, applied_rx) = tokio::sync::oneshot::channel(); + let setting_name: String = if identity.is_some() { + "802-1x".into() + } else { + "802-11-wireless-security".into() + }; + let _ = secret_tx + .send(nm_secret_agent::Request::SetSecrets { + setting_name, + uuid, + secrets: if identity.is_some() { + HashMap::from([("password".to_string(), pass)]) + } else { + HashMap::from([("psk".to_string(), pass)]) + }, + applied_tx, + }) + .await; + if let Err(err) = applied_rx.await { + tracing::error!("Failed to set secret. {err:?}"); + } + } + } + + let active_conn = nm.activate_connection(&known_conn, &device).await?; + let mut changes = active_conn.receive_state_changed().await; + _ = tokio::time::sleep(tokio::time::Duration::from_millis(500)).await; + let mut count = 5; + loop { + let state = active_conn.state().await; + if let Ok(enums::ActiveConnectionState::Activated) = state { + return Ok(()); + } else if let Ok(enums::ActiveConnectionState::Deactivated) = state { + break; + } + + if let Ok(Some(s)) = + tokio::time::timeout(Duration::from_secs(20), changes.next()).await + { + let state = s.get().await.unwrap_or_default().into(); + if matches!(state, enums::ActiveConnectionState::Activated) { + return Ok(()); + } + }; + + count -= 1; + if count <= 0 { + break; + } + } + if let Some(secret_tx) = secret_tx + && !matches!(network_type, NetworkType::Open) + { + let settings = known_conn.get_settings().await?; + let uuid = String::try_from( + settings + .get("connection") + .ok_or_else(|| Error::MissingField("connection"))? + .get("uuid") + .ok_or_else(|| Error::MissingField("uuid"))? + .clone(), + ) + .map_err(zbus::Error::Variant)?; + let (applied_tx, applied_rx) = tokio::sync::oneshot::channel(); + let setting_name: String = if identity.is_some() { + "802-1x".into() + } else { + "802-11-wireless-security".into() + }; + if let Err(err) = secret_tx + .send(nm_secret_agent::Request::SetSecrets { + setting_name, + uuid, + secrets: Default::default(), + applied_tx, + }) + .await + { + tracing::error!( + "Failed to reset access point secrets after failed activation: {err:?}" + ); + } else if let Err(err) = applied_rx.await { + tracing::error!( + "Failed to reset access point secrets after failed activation: {err:?}" + ); + } + } + return Err(Error::ConnectionActivate); + } + + Err(Error::NoWiFiDevices) + } +} diff --git a/subscriptions/network-manager/src/nm_secret_agent.rs b/subscriptions/network-manager/src/nm_secret_agent.rs new file mode 100644 index 0000000..fa697c9 --- /dev/null +++ b/subscriptions/network-manager/src/nm_secret_agent.rs @@ -0,0 +1,742 @@ +use std::{ + collections::{HashMap, HashSet}, + fmt::Debug, + sync::Arc, +}; + +use bitflags::bitflags; +use cosmic_dbus_networkmanager::interface::settings::connection::ConnectionSettingsProxy; +use futures::{SinkExt, Stream}; +use secure_string::SecureString; +use tokio::sync::oneshot; +use zbus::{ + ObjectServer, fdo, + zvariant::{OwnedValue, Str}, +}; + +pub type SecretSender = Arc>>>; + +pub const SECRET_ID: &str = "com.system76.CosmicSettings.NetworkManager"; +pub const DBUS_PATH: &str = "/org/freedesktop/NetworkManager/SecretAgent"; + +bitflags! { + #[derive(Debug, Clone, Copy, PartialEq, Eq)] + pub struct GetSecretsFlags: u32 { + /// No special behavior. + /// By default no user interaction is allowed and secrets must come + /// from persistent storage, otherwise an error is returned. + const NONE = 0x0; + + /// Allows interaction with the user (eg. prompt via UI). + const ALLOW_INTERACTION = 0x1; + + /// Explicitly request new secrets from the user. + /// Implies ALLOW_INTERACTION. + const REQUEST_NEW = 0x2; + + /// Request was initiated by a user action (via D-Bus). + const USER_REQUESTED = 0x4; + + /// Internal flag, not part of the public D-Bus API. + const ONLY_SYSTEM = 0x8000_0000; + + /// Internal flag, not part of the public D-Bus API. + const NO_ERRORS = 0x4000_0000; + } +} + +#[derive(thiserror::Error, Clone, Debug)] +pub enum Error { + #[error("zbus error")] + Zbus(#[from] zbus::Error), + #[error("listening for secret agent closed")] + RecvError(#[from] oneshot::error::RecvError), + #[error("secret service error")] + SecretService(#[from] Arc), + #[error("no password found for identifier: {0}")] + NoPasswordForIdentifier(String), + #[error("utf8 error")] + Utf8Error(#[from] std::string::FromUtf8Error), +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub enum PasswordFlag { + /// The system is responsible for providing and storing this secret. + None = 0, + /// A user-session secret agent is responsible for providing and storing + /// this secret; when it is required, agents will be asked to provide it. + AgentOwned = 1, + /// This secret should not be saved but should be requested from the user + /// each time it is required. This flag should be used for One-Time-Pad + /// secrets, PIN codes from hardware tokens, or if the user simply does not + /// want to save the secret. + NotSaved = 2, + /// in some situations it cannot be automatically determined that a secret is required or not. This flag hints that the secret is not required and should not be requested from the user. + NotRequired = 4, +} + +#[derive(Debug, Clone)] +pub struct SecretHint { + pub key: String, + pub message: Option, +} + +fn parse_hints(hints: Vec) -> Vec { + hints + .into_iter() + // fold message hints into previous hints + .fold(Vec::new(), |mut acc, hint| { + if let Some((key, msg)) = hint.split_once(':') { + if let Some(last) = acc.last_mut() { + last.message = Some(format!("{}: {}", key, msg)); + } + } else { + acc.push(SecretHint { + key: hint, + message: None, + }); + } + acc + }) +} + +#[derive(Debug, Clone)] +pub enum Event { + RequestSecret { + uuid: String, + name: String, + description: Option, + previous: SecureString, + tx: SecretSender, + }, + CancelGetSecrets { + uuid: String, + name: String, + }, + Failed(Error), +} + +#[derive(Debug)] +pub enum Request { + SetSecrets { + setting_name: String, + uuid: String, + secrets: HashMap, + applied_tx: oneshot::Sender<()>, + }, + GetSecrets { + setting_name: String, + uuid: String, + resp_tx: oneshot::Sender>, + }, +} + +pub fn secret_agent_stream( + identifier: impl AsRef, + rx: tokio::sync::mpsc::Receiver, +) -> impl Stream { + iced_futures::stream::channel( + 4, + move |mut msg_tx: futures::channel::mpsc::Sender| async move { + if let Err(e) = secret_agent_stream_impl(identifier.as_ref(), msg_tx.clone(), rx).await + { + let _ = msg_tx.send(Event::Failed(e)).await; + } + }, + ) +} + +async fn secret_agent_stream_impl( + identifier: &str, + msg_tx: futures::channel::mpsc::Sender, + mut rx: tokio::sync::mpsc::Receiver, +) -> Result<(), Error> { + // fail early if we can't connect, closing the channel + { + let ss = secret_service::SecretService::connect(secret_service::EncryptionType::Dh) + .await + .map_err(Arc::new)?; + let collection = ss.get_default_collection().await.map_err(Arc::new)?; + if collection.is_locked().await.map_err(Arc::new)? { + collection.unlock().await.map_err(Arc::new)?; + } + } + // register the secret agent with NetworkManager + let proxy = + nm_secret_agent_manager::AgentManagerProxy::builder(&zbus::Connection::system().await?) + .path("/org/freedesktop/NetworkManager/AgentManager")? + .build() + .await?; + + let _ = ObjectServer::at( + proxy.inner().connection().object_server(), + DBUS_PATH, + SettingsSecretAgent { tx: msg_tx }, + ) + .await?; + + proxy.register_with_capabilities(identifier, 1).await?; + + while let Some(request) = rx.recv().await { + match request { + Request::SetSecrets { + setting_name, + uuid, + secrets, + applied_tx, + } => { + let ss = secret_service::SecretService::connect(secret_service::EncryptionType::Dh) + .await + .map_err(Arc::new)?; + let collection = ss.get_default_collection().await.map_err(Arc::new)?; + + if secrets.is_empty() { + let mut attributes = std::collections::HashMap::new(); + attributes.insert("application", SECRET_ID); + attributes.insert("uuid", &uuid); + let search_items = collection + .search_items(attributes) + .await + .map_err(Arc::new)?; + + for item in &search_items { + item.delete().await.map_err(Arc::new)?; + } + let _ = applied_tx.send(()); + + continue; + } + + for (name, secret) in &secrets { + let mut attributes = std::collections::HashMap::new(); + attributes.insert("application", SECRET_ID); + attributes.insert("uuid", &uuid); + attributes.insert("setting_name", &setting_name); + attributes.insert("name", name); + let _item = collection + .create_item( + "NetworkManager Secret", + attributes, + secret.unsecure().as_bytes(), + true, + "text/plain", + ) + .await + .map_err(Arc::new)?; + } + let _ = applied_tx.send(()); + } + Request::GetSecrets { + setting_name, + uuid, + resp_tx, + } => { + let ss = secret_service::SecretService::connect(secret_service::EncryptionType::Dh) + .await + .map_err(Arc::new)?; + let collection = ss.get_default_collection().await.map_err(Arc::new)?; + + let mut attributes = std::collections::HashMap::new(); + attributes.insert("application", SECRET_ID); + attributes.insert("uuid", &uuid); + attributes.insert("setting_name", &setting_name); + + let search_items = collection + .search_items(attributes) + .await + .map_err(Arc::new)?; + + let mut secrets = HashMap::new(); + for item in &search_items { + let name = item + .get_attributes() + .await + .map_err(Arc::new)? + .get("name") + .cloned() + .unwrap_or_else(|| "unknown".to_string()); + let secret = item.get_secret().await.map_err(Arc::new)?; + let secret: String = String::from_utf8(secret)?; + secrets.insert(name, SecureString::from(secret)); + } + let _ = resp_tx.send(secrets); + } + } + } + Ok(()) +} + +fn parse_secret_flag(value: &str) -> PasswordFlag { + match value { + "0" => PasswordFlag::None, + "1" => PasswordFlag::AgentOwned, + "2" => PasswordFlag::NotSaved, + "4" => PasswordFlag::NotRequired, + _ => PasswordFlag::AgentOwned, + } +} + +fn setting_has_always_ask(setting: zbus::zvariant::Dict) -> bool { + for (key, value) in setting.iter() { + let Ok(key) = key.downcast_ref::() else { + continue; + }; + let Ok(value) = value.downcast_ref::() else { + continue; + }; + // we only care about "-flags" + if !key.ends_with("-flags") { + continue; + } + + if parse_secret_flag(value.as_str()) == PasswordFlag::NotSaved { + return true; + } + } + + false +} + +fn has_always_ask(setting: Option) -> bool { + setting.map(setting_has_always_ask).unwrap_or(false) +} + +fn is_connection_always_ask(connection: &HashMap>) -> bool { + let conn_setting = match connection.get("connection") { + Some(s) => s, + None => return false, + }; + + let conn_type = match conn_setting + .get("type") + .and_then(|v| v.downcast_ref::().ok()) + { + Some(t) => t, + None => return false, + }; + + // Primary setting (vpn, wifi, ethernet, etc) + if has_always_ask( + connection + .get(&conn_type) + .and_then(|d| d.get("data")) + .and_then(|data| data.downcast_ref::().ok()), + ) { + return true; + } + + match conn_type.as_str() { + "802-11-wireless" => { + if has_always_ask( + connection + .get("802-11-wireless-security") + .and_then(|d| d.get("data")) + .and_then(|data| data.downcast_ref::().ok()), + ) { + return true; + } + if has_always_ask( + connection + .get("802-1x") + .and_then(|d| d.get("data")) + .and_then(|data| data.downcast_ref::().ok()), + ) { + return true; + } + } + + "802-3-ethernet" => { + if has_always_ask( + connection + .get("pppoe") + .and_then(|d| d.get("data")) + .and_then(|data| data.downcast_ref::().ok()), + ) { + return true; + } + if has_always_ask( + connection + .get("802-1x") + .and_then(|d| d.get("data")) + .and_then(|data| data.downcast_ref::().ok()), + ) { + return true; + } + } + + _ => {} + } + + false +} + +#[derive(Debug)] +pub struct SettingsSecretAgent { + tx: futures::channel::mpsc::Sender, +} + +#[zbus::interface(name = "org.freedesktop.NetworkManager.SecretAgent")] +impl SettingsSecretAgent { + /// CancelGetSecrets method + async fn cancel_get_secrets( + &mut self, + connection_path: zbus::zvariant::ObjectPath<'_>, + setting_name: String, + ) -> fdo::Result<()> { + let conn = ConnectionSettingsProxy::builder( + &zbus::Connection::system() + .await + .map_err(|_| fdo::Error::Failed("failed to get uuid".to_string()))?, + ) + .path(connection_path)? + .build() + .await + .map_err(|e| fdo::Error::Failed(e.to_string()))?; + + let uuid = conn + .get_settings() + .await + .map_err(|e| fdo::Error::Failed(e.to_string()))? + .get("connection") + .and_then(|m| m.get("uuid")) + .and_then(|v| v.downcast_ref::().ok()) + .ok_or_else(|| fdo::Error::Failed("failed to get uuid".to_string()))? + .to_string(); + if let Err(e) = self + .tx + .clone() + .send(Event::CancelGetSecrets { + uuid, + name: setting_name, + }) + .await + && e.is_disconnected() + { + return Err(fdo::Error::Failed( + "failed to send cancel message".to_string(), + )); + } + + Ok(()) + } + + /// DeleteSecrets method + async fn delete_secrets( + &self, + connection: HashMap>, + connection_path: zbus::zvariant::ObjectPath<'_>, + ) -> fdo::Result<()> { + match self.delete_secrets_inner(connection, connection_path).await { + Ok(_) => Ok(()), + Err(err) => Err(fdo::Error::Failed(err.to_string())), + } + } + + /// GetSecrets method + async fn get_secrets( + &mut self, + connection: HashMap>, + connection_path: zbus::zvariant::ObjectPath<'_>, + setting_name: String, + hints: Vec, + flags: u32, + ) -> HashMap> { + self.get_secrets_inner(connection, connection_path, setting_name, hints, flags) + .await + .unwrap_or_default() + } + + /// SaveSecrets method + async fn save_secrets( + &self, + connection: HashMap>, + _connection_path: zbus::zvariant::ObjectPath<'_>, + ) -> fdo::Result<()> { + match self.save_secrets_inner(connection).await { + Ok(_) => Ok(()), + Err(err) => Err(fdo::Error::Failed(err.to_string())), + } + } +} + +impl SettingsSecretAgent { + pub async fn get_secrets_inner( + &mut self, + connection: HashMap>, + connection_path: zbus::zvariant::ObjectPath<'_>, + setting_name: String, + hints: Vec, + flags: u32, + ) -> Result>, Error> { + let flags = GetSecretsFlags::from_bits_truncate(flags); + + let ss = secret_service::SecretService::connect(secret_service::EncryptionType::Dh) + .await + .map_err(Arc::new)?; + + let collection = ss.get_default_collection().await.map_err(Arc::new)?; + + let conn_uuid = connection + .get("connection") + .and_then(|m| m.get("uuid")) + .and_then(|v| v.downcast_ref::().ok()) + .ok_or_else(|| Error::NoPasswordForIdentifier(setting_name.clone()))? + .to_string(); + + let conn = + ConnectionSettingsProxy::builder(&zbus::Connection::system().await.map_err(|_| { + Error::Zbus(fdo::Error::Failed("failed to get uuid".to_string()).into()) + })?) + .path(connection_path)? + .build() + .await + .map_err(|e| Error::Zbus(fdo::Error::Failed(e.to_string()).into()))?; + let settings = conn.get_settings().await?; + let is_vpn = settings + .get("connection") + .and_then(|m| m.get("type")) + .and_then(|v| v.downcast_ref::().ok()) + .is_some_and(|t| t == "vpn"); + let is_always_ask = is_connection_always_ask(&settings); + + let mut setting_attributes = std::collections::HashMap::new(); + setting_attributes.insert("application", SECRET_ID); + setting_attributes.insert("uuid", &conn_uuid); + setting_attributes.insert("setting_name", &setting_name); + + let search_items = collection + .search_items(setting_attributes.clone()) + .await + .map_err(Arc::new)?; + let mut result = HashMap::new(); + let mut setting = HashMap::new(); + + if hints.is_empty() { + for item in &search_items { + let name = item + .get_attributes() + .await + .map_err(Arc::new)? + .get("name") + .cloned() + .unwrap_or_else(|| "unknown".to_string()); + let secret = item.get_secret().await.map_err(Arc::new)?; + let secret: String = String::from_utf8(secret)?; + setting.insert(name, zbus::zvariant::OwnedValue::from(Str::from(secret))); + } + result.insert(setting_name, setting); + Ok(result) + } else { + let hints = parse_hints(hints); + let mut requested = HashSet::new(); + + for SecretHint { key, message } in &hints { + if requested.contains(key) { + continue; + } + requested.insert(key); + if flags.contains(GetSecretsFlags::REQUEST_NEW) + && flags.contains(GetSecretsFlags::ALLOW_INTERACTION) + || is_always_ask + { + // request the secret via the message channel + let (resp_tx, resp_rx) = oneshot::channel(); + // msg begins after ":" + let actual_hint = message.as_ref().map(|m| { + m.split_once(":") + .map(|(_, msg)| msg.trim().to_string()) + .unwrap_or(m.clone()) + }); + if let Err(e) = self + .tx + .clone() + .send(Event::RequestSecret { + uuid: conn_uuid.clone(), + name: setting_name.clone(), + description: actual_hint.clone(), + previous: String::new().into(), + tx: Arc::new(tokio::sync::Mutex::new(Some(resp_tx))), + }) + .await + && e.is_disconnected() + { + continue; + } else if let Ok(secret) = resp_rx.await { + let mut named_attribute = setting_attributes.clone(); + named_attribute.insert("name", key); + let _item = collection + .create_item( + "NetworkManager Secret", + named_attribute, + secret.unsecure().as_bytes(), + true, + "text/plain", + ) + .await + .map_err(Arc::new)?; + + setting.insert( + key.clone(), + zbus::zvariant::OwnedValue::from(Str::from(secret.unsecure())), + ); + } + } else if !is_always_ask { + let mut pos = None; + let mut pos_with_message = None; + for item in &search_items { + let attributes = item.get_attributes().await.map_err(Arc::new)?; + if let Some(value) = attributes.get("name") + && value == key + { + if let Some(saved_message) = attributes.get("message") { + if message.as_ref().is_some_and(|msg| msg == saved_message) { + pos_with_message = Some(item); + } + break; + } else { + pos = Some(item); + } + } + } + + if let Some(item) = pos_with_message.or(pos) { + let secret = item.get_secret().await.map_err(Arc::new)?; + let secret: String = String::from_utf8(secret)?; + if is_vpn { + // ask anyway, but offer the previous one as a hint + let (resp_tx, resp_rx) = oneshot::channel(); + let actual_hint = message.as_ref().map(|m| { + m.split_once(":") + .map(|(_, msg)| msg.trim().to_string()) + .unwrap_or(m.clone()) + }); + if let Err(e) = self + .tx + .clone() + .send(Event::RequestSecret { + uuid: conn_uuid.clone(), + name: setting_name.clone(), + description: actual_hint.clone(), + previous: SecureString::from(secret.clone()), + tx: Arc::new(tokio::sync::Mutex::new(Some(resp_tx))), + }) + .await + && e.is_disconnected() + { + continue; + } else if let Ok(secret) = resp_rx.await { + let mut named_attribute = setting_attributes.clone(); + named_attribute.insert("name", key); + let _item = collection + .create_item( + "NetworkManager Secret", + named_attribute, + secret.unsecure().as_bytes(), + true, + "text/plain", + ) + .await + .map_err(Arc::new)?; + + setting.insert( + key.clone(), + zbus::zvariant::OwnedValue::from(Str::from(secret.unsecure())), + ); + } + } else { + setting.insert( + key.clone(), + zbus::zvariant::OwnedValue::from(Str::from(secret)), + ); + } + } + } else { + // can't find the secret, and we can't request it, so we just skip it + continue; + } + } + result.insert(setting_name, setting); + Ok(result) + } + } + + pub async fn delete_secrets_inner( + &self, + connection: HashMap>, + _connection_path: zbus::zvariant::ObjectPath<'_>, + ) -> Result<(), Error> { + let ss = secret_service::SecretService::connect(secret_service::EncryptionType::Dh) + .await + .map_err(Arc::new)?; + let collection = ss.get_default_collection().await.map_err(Arc::new)?; + + let conn_uuid = connection + .get("connection") + .and_then(|m| m.get("uuid")) + .and_then(|v| v.downcast_ref::().ok()) + .ok_or_else(|| Error::NoPasswordForIdentifier("unknown".to_string()))? + .to_string(); + + let mut attributes = std::collections::HashMap::new(); + attributes.insert("application", SECRET_ID); + attributes.insert("uuid", &conn_uuid); + + let search_items = collection + .search_items(attributes) + .await + .map_err(Arc::new)?; + + for item in &search_items { + item.delete().await.map_err(Arc::new)?; + } + Ok(()) + } + + pub async fn save_secrets_inner( + &self, + connection: HashMap>, + ) -> Result<(), Error> { + let ss = secret_service::SecretService::connect(secret_service::EncryptionType::Dh) + .await + .map_err(Arc::new)?; + let collection = ss.get_default_collection().await.map_err(Arc::new)?; + let conn_uuid = connection + .get("connection") + .and_then(|m| m.get("uuid")) + .and_then(|v| v.downcast_ref::().ok()) + .ok_or_else(|| Error::NoPasswordForIdentifier("unknown".to_string()))? + .to_string(); + + let secret: Option<(String, String)> = connection + .get("802-11-wireless-security") + .and_then(|m| m.get("psk")) + .and_then(|v| v.downcast_ref::().ok()) + .map(|password| ("psk".to_string(), password.clone())) + .or_else(|| { + connection + .get("802-1x") + .and_then(|s| s.get("password")) + .and_then(|v| v.downcast_ref::().ok()) + .map(|password| ("802-1x-password".to_string(), password.clone())) + }); + if let Some((name, secret)) = secret { + let mut attributes = std::collections::HashMap::new(); + attributes.insert("application", SECRET_ID); + attributes.insert("uuid", &conn_uuid); + attributes.insert("setting_name", &name); + let _item = collection + .create_item( + "NetworkManager Secret", + attributes, + secret.as_bytes(), + true, + "text/plain", + ) + .await + .map_err(Arc::new)?; + Ok(()) + } else { + Err(Error::NoPasswordForIdentifier("unknown".to_string())) + } + } +} diff --git a/subscriptions/network-manager/src/wireless_enabled.rs b/subscriptions/network-manager/src/wireless_enabled.rs new file mode 100644 index 0000000..5ad940d --- /dev/null +++ b/subscriptions/network-manager/src/wireless_enabled.rs @@ -0,0 +1,65 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: MPL-2.0 + +use crate::Wrapper; + +use super::Event; +use cosmic_dbus_networkmanager::nm::NetworkManager; +use futures::{SinkExt, StreamExt}; +use iced_futures::{Subscription, stream}; +use std::{fmt::Debug, hash::Hash}; +use zbus::Connection; + +#[derive(Debug, Clone)] +pub enum State { + Continue(Connection), + Error, +} + +pub fn wireless_enabled_subscription( + id: I, + conn: Connection, +) -> iced_futures::Subscription { + Subscription::run_with(Wrapper { id, conn: conn }, |Wrapper { id: _id, conn }| { + let conn = conn.clone(); + stream::channel(50, move |output| async move { + watch(conn, output).await; + futures::future::pending().await + }) + }) +} + +pub async fn watch(conn: zbus::Connection, mut output: futures::channel::mpsc::Sender) { + let mut state = State::Continue(conn); + + loop { + state = start_listening(state, &mut output).await; + } +} + +async fn start_listening( + state: State, + output: &mut futures::channel::mpsc::Sender, +) -> State { + let conn = match state { + State::Continue(conn) => conn, + State::Error => futures::future::pending().await, + }; + + let network_manager = match NetworkManager::new(&conn).await { + Ok(n) => n, + Err(why) => { + tracing::error!(why = why.to_string(), "Failed to connect to NetworkManager"); + return State::Error; + } + }; + + let mut wireless_enabled_changed = network_manager.receive_wireless_enabled_changed().await; + + while let Some(change) = wireless_enabled_changed.next().await { + if let Ok(enable) = change.get().await { + _ = output.send(Event::WiFiEnabled(enable)).await; + } + } + State::Continue(conn) +} diff --git a/subscriptions/pulse/Cargo.toml b/subscriptions/pulse/Cargo.toml new file mode 100644 index 0000000..cc4760b --- /dev/null +++ b/subscriptions/pulse/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "cosmic-settings-pulse-subscription" +version = "0.1.0" +edition = "2024" +rust-version.workspace = true + +[dependencies] +libpulse-binding = { version = "2.30.1" } +rustix = { version = "1.1.3", features = ["pipe"] } +iced_futures = { git = "https://github.com/pop-os/libcosmic" } +futures = "0.3.32" +log = "0.4.27" diff --git a/subscriptions/pulse/src/lib.rs b/subscriptions/pulse/src/lib.rs new file mode 100644 index 0000000..4220765 --- /dev/null +++ b/subscriptions/pulse/src/lib.rs @@ -0,0 +1,751 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: MPL-2.0 + +// Make sure not to fail if pulse not found, and reconnect? +// change to device shouldn't send osd? + +use futures::{SinkExt, executor::block_on}; +use iced_futures::{Subscription, stream}; +use libpulse_binding::{ + callbacks::ListResult, + channelmap::Map, + context::{ + Context, FlagSet, State, + introspect::{CardInfo, CardProfileInfo, Introspector, ServerInfo, SinkInfo, SourceInfo}, + subscribe::{Facility, InterestMaskSet, Operation}, + }, + def::{PortAvailable, Retval}, + mainloop::{ + api::MainloopApi, + events::io::IoEventInternal, + standard::{IterateResult, Mainloop}, + }, + volume::{ChannelVolumes, Volume}, +}; +use std::{ + borrow::Cow, + cell::{Cell, RefCell}, + convert::Infallible, + io::{Read, Write}, + os::{ + fd::{FromRawFd, IntoRawFd, RawFd}, + raw::c_void, + }, + rc::Rc, + str::FromStr, + sync::mpsc, +}; + +pub fn subscription() -> iced_futures::Subscription { + Subscription::run_with("pulse", |_| { + stream::channel(20, |sender| async { + std::thread::spawn(move || thread(sender)); + futures::future::pending().await + }) + }) +} + +pub fn thread(sender: futures::channel::mpsc::Sender) { + let Some(mut main_loop) = Mainloop::new() else { + log::error!("Failed to create PA main loop"); + return; + }; + + let Some(mut context) = Context::new(&main_loop, "cosmic-osd") else { + log::error!("Failed to create PA context"); + return; + }; + + let data = Rc::new(Data { + main_loop: RefCell::new(Mainloop { + _inner: Rc::clone(&main_loop._inner), + }), + introspector: context.introspect(), + sink_volume: Cell::new(None), + sink_mute: Cell::new(None), + source_volume: Cell::new(None), + source_mute: Cell::new(None), + default_sink_name: RefCell::new(None), + default_source_name: RefCell::new(None), + sender: RefCell::new(sender.clone()), + }); + + let data_clone = data.clone(); + context.set_subscribe_callback(Some(Box::new(move |facility, operation, index| { + data_clone.subscribe_cb(facility.unwrap(), operation, index); + }))); + + let _ = context.connect(None, FlagSet::NOFAIL, None); + + loop { + if sender.is_closed() { + return; + } + + match main_loop.iterate(false) { + IterateResult::Success(_) => {} + IterateResult::Err(_e) => { + return; + } + IterateResult::Quit(_e) => { + return; + } + } + + if context.get_state() == State::Ready { + break; + } + } + + // Inspect all available cards on startup + data.introspector.get_card_info_list({ + let data_weak = Rc::downgrade(&data); + move |card_info_res| { + if let Some(data) = data_weak.upgrade() { + data.card_info_cb(card_info_res) + } + } + }); + + data.get_server_info(); + context.subscribe( + InterestMaskSet::SERVER | InterestMaskSet::SINK | InterestMaskSet::SOURCE, + |_| {}, + ); + + if let Err((err, retval)) = main_loop.run() { + log::error!("PA main loop returned {:?}, error {}", retval, err); + } +} + +#[derive(Clone, Debug)] +pub enum Event { + Balance(Option), + CardInfo(Card), + DefaultSink(String), + DefaultSource(String), + SinkVolume(u32), + Channels(PulseChannels), + SinkMute(bool), + SourceVolume(u32), + SourceMute(bool), +} + +enum Request { + Volume(u32, f32), + Balance(u32, f32), + Quit, +} + +#[derive(Debug)] +pub struct PulseChannels { + tx: mpsc::Sender, + pipe_tx: std::fs::File, + index: u32, +} + +impl Clone for PulseChannels { + fn clone(&self) -> Self { + Self { + tx: self.tx.clone(), + pipe_tx: self + .pipe_tx + .try_clone() + .expect("failed to clone PulseChannels pipe writer"), + index: self.index, + } + } +} + +/// Data used by the [`handle_balance_io_new`] callback. +struct HandleBalanceData( + Context, + ChannelVolumes, + Map, + std::sync::mpsc::Receiver, +); + +/// Callback for creating an IO event source [`MainloopApi::io_new`]. +extern "C" fn handle_balance_io_new( + api: *const MainloopApi, + event: *mut IoEventInternal, + reader_fd: RawFd, + _flags: libpulse_binding::mainloop::events::io::FlagSet, + data: *mut c_void, +) { + // Take ownership of the data and borrow its contents. + let mut data = unsafe { Box::::from_raw(data as _) }; + let HandleBalanceData(ctx, volumes, map, rx) = data.as_mut(); + + // Return early if the context is not ready, and give the data back. + if ctx.get_state() != State::Ready { + let _ = Box::leak(data); + return; + } + + // If the first byte cannot be read, destroy this event source with its reader and data. + let mut buf = [0u8; 1]; + let mut reader = unsafe { std::fs::File::from_raw_fd(reader_fd) }; + if reader.read_exact(&mut buf).is_err() { + (unsafe { &*api }) + .io_free + .as_ref() + .expect("io_free function is missing")(event); + return; + } + + // Give ownership of the reader back. + _ = reader.into_raw_fd(); + + while let Ok(req) = rx.try_recv() { + match req { + Request::Volume(index, volume_scale) => { + let mut intro = ctx.introspect(); + + let new_scale = Volume((volume_scale * Volume::NORMAL.0 as f32).round() as u32); + + if let Some(v) = volumes.scale(new_scale) { + _ = intro.set_sink_volume_by_index( + index, + v, + Some(Box::new(|success| { + if !success { + log::error!("Failed to set sink balance"); + } + })), + ); + } + } + Request::Balance(index, new_balance) => { + if map.can_balance() { + if let Some(v) = volumes.set_balance(&map, new_balance) { + let mut intro = ctx.introspect(); + + _ = intro.set_sink_volume_by_index( + index, + v, + Some(Box::new(|success| { + if !success { + log::error!("Failed to set sink balance"); + } + })), + ); + } + } + } + Request::Quit => unsafe { &*api } + .quit + .as_ref() + .expect("quit function missing")(api, 0), + } + } + + let _ = Box::leak(data); +} + +impl PulseChannels { + fn new( + volumes: ChannelVolumes, + map: Map, + api: &MainloopApi, + index: u32, + ctx: Context, + ) -> PulseChannels { + let (reader, writer) = rustix::pipe::pipe_with(rustix::pipe::PipeFlags::CLOEXEC) + .expect("failed to crate pipe"); + + let (tx, rx) = mpsc::channel::(); + + // Create IO event source object for handling speaker balance. + let event_source = api.io_new.as_ref().unwrap()( + api as *const _, + reader.into_raw_fd(), + libpulse_binding::mainloop::events::io::FlagSet::INPUT, + Some(handle_balance_io_new), + Box::into_raw(Box::new(HandleBalanceData(ctx, volumes, map, rx))) as *mut c_void, + ); + + if let Some(enable) = api.io_enable.as_ref() { + enable( + event_source, + libpulse_binding::mainloop::events::io::FlagSet::INPUT, + ); + } + + Self { + tx, + pipe_tx: std::fs::File::from(writer), + index, + } + } + + /// Change the active index. + #[inline] + pub fn set_index(&mut self, index: u32) { + self.index = index; + } + + /// Set the speaker balance of the active sink. + pub fn set_balance(&mut self, balance: f32) { + if let Err(err) = self.tx.send(Request::Balance(self.index, balance)) { + log::error!("Failed to send new balance to channel"); + } else { + self.pipe_tx + .write_all(&[1]) + .expect("PulseChannels pipe write failed"); + } + } + + /// Set the volume of the active sink. + pub fn set_volume(&mut self, volume: f32) { + if let Err(err) = self.tx.send(Request::Volume(self.index, volume)) { + log::error!("Failed to send new volume to channel"); + } else { + self.pipe_tx + .write_all(&[1]) + .expect("PulseChannels pipe write failed"); + } + } + + /// Request the pulse thread to quit. + pub fn quit(mut self) { + _ = self.tx.send(Request::Quit); + _ = self.pipe_tx.write_all(&[1]); + } +} + +#[derive(Clone, Debug, Hash, Eq, PartialEq)] +pub struct Card { + pub object_id: u32, + pub name: String, + pub product_name: String, + pub variant: DeviceVariant, + pub ports: Vec, + pub profiles: Vec, + pub active_profile: Option, +} + +#[derive(Clone, Debug, Hash, Eq, PartialEq)] +pub struct CardPort { + pub name: String, + pub description: String, + pub direction: Direction, + pub port_type: PortType, + pub profile_port: u32, + pub priority: u32, + pub profiles: Vec, + pub availability: Availability, +} + +#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] +pub enum Availability { + Unknown, + No, + Yes, +} + +impl From for Availability { + fn from(pa: PortAvailable) -> Self { + match pa { + PortAvailable::Unknown => Availability::Unknown, + PortAvailable::No => Availability::No, + PortAvailable::Yes => Availability::Yes, + } + } +} + +#[derive(Clone, Debug, Hash, Eq, PartialEq)] +pub struct CardProfile { + pub name: String, + pub description: String, + pub available: bool, + pub n_sinks: u32, + pub n_sources: u32, + pub priority: u32, +} + +#[derive(Clone, Debug, Hash, Eq, PartialEq)] +pub enum DeviceVariant { + Alsa { alsa_card: u32 }, + Bluez5 { address: String }, +} + +#[derive(Clone, Debug, Hash, Eq, PartialEq)] +pub enum Direction { + Input, + Output, + Both, +} + +#[derive(Default, Clone, Debug, Hash, Eq, PartialEq)] +pub enum PortType { + Mic, + Speaker, + Headphones, + Headset, + Digital, + #[default] + Unknown, +} + +impl FromStr for PortType { + type Err = Infallible; + + fn from_str(s: &str) -> Result { + match s { + "mic" => Ok(PortType::Mic), + "speaker" => Ok(PortType::Speaker), + "headphones" => Ok(PortType::Headphones), + "headset" => Ok(PortType::Headset), + "digital" => Ok(PortType::Digital), + _ => Ok(PortType::Unknown), + } + } +} + +struct Data { + main_loop: RefCell, + default_sink_name: RefCell>, + default_source_name: RefCell>, + sink_volume: Cell>, + sink_mute: Cell>, + source_volume: Cell>, + source_mute: Cell>, + introspector: Introspector, + sender: RefCell>, +} + +impl Data { + fn card_info_cb(self: &Rc, card_info: ListResult<&CardInfo>) { + if let ListResult::Item(card_info) = card_info { + let Some(object_id) = card_info + .proplist + .get_str("object.id") + .and_then(|v| v.parse::().ok()) + else { + return; + }; + + let variant = if let Some(alsa_card) = card_info + .proplist + .get_str("alsa.card") + .and_then(|v| v.parse::().ok()) + { + DeviceVariant::Alsa { alsa_card } + } else if let Some(address) = card_info.proplist.get_str("api.bluez5.address") { + DeviceVariant::Bluez5 { address } + } else { + return; + }; + + let card = Card { + name: card_info + .name + .as_ref() + .map(Cow::to_string) + .unwrap_or_default(), + product_name: card_info + .proplist + .get_str("device.product.name") + .unwrap_or_default(), + object_id, + variant, + ports: card_info + .ports + .iter() + .map(|port| CardPort { + name: port.name.as_ref().map(Cow::to_string).unwrap_or_default(), + description: port + .description + .as_ref() + .map(Cow::to_string) + .unwrap_or_default(), + direction: match port.direction.bits() { + x if x == libpulse_binding::direction::FlagSet::INPUT.bits() => { + Direction::Input + } + x if x == libpulse_binding::direction::FlagSet::OUTPUT.bits() => { + Direction::Output + } + _ => Direction::Both, + }, + port_type: port + .proplist + .get_str("port.type") + .as_deref() + .map(|s| PortType::from_str(s).unwrap()) + .unwrap_or_default(), + profile_port: port + .proplist + .get_str("card.profile.port") + .and_then(|v| v.parse::().ok()) + .unwrap_or(0), + priority: port.priority, + profiles: collect_profiles(&port.profiles), + availability: port.available.into(), + }) + .collect(), + profiles: collect_profiles(&card_info.profiles), + active_profile: card_info.active_profile.as_deref().map(CardProfile::from), + }; + + if block_on(self.sender.borrow_mut().send(Event::CardInfo(card))).is_err() { + self.main_loop.borrow_mut().quit(Retval(0)); + } + } + } + + fn server_info_cb(self: &Rc, server_info: &ServerInfo) { + let new_default_sink_name = server_info + .default_sink_name + .as_ref() + .map(|x| x.clone().into_owned()); + let mut default_sink_name = self.default_sink_name.borrow_mut(); + if new_default_sink_name != *default_sink_name { + if let Some(name) = &new_default_sink_name { + _ = block_on( + self.sender + .borrow_mut() + .send(Event::DefaultSink(name.clone())), + ); + self.get_sink_info_by_name(name); + } + *default_sink_name = new_default_sink_name; + } + + let new_default_source_name = server_info + .default_source_name + .as_ref() + .map(|x| x.clone().into_owned()); + let mut default_source_name = self.default_source_name.borrow_mut(); + if new_default_source_name != *default_source_name { + if let Some(name) = &new_default_source_name { + _ = block_on( + self.sender + .borrow_mut() + .send(Event::DefaultSource(name.clone())), + ); + self.get_source_info_by_name(name); + } + *default_source_name = new_default_source_name; + } + } + + fn get_server_info(self: &Rc) { + let data = self.clone(); + self.introspector + .get_server_info(move |server_info| data.server_info_cb(server_info)); + } + + fn sink_info_cb(&self, sink_info_res: ListResult<&SinkInfo>) { + if let ListResult::Item(sink_info) = sink_info_res { + if sink_info.name.as_deref() != self.default_sink_name.borrow().as_deref() { + return; + } + let balance = (sink_info.channel_map.can_balance() + && sink_info.base_volume.is_normal()) + .then(|| sink_info.volume.get_balance(&sink_info.channel_map)); + + let volume = sink_info.volume.max().0 / (Volume::NORMAL.0 / 100); + if self.sink_mute.get() != Some(sink_info.mute) { + self.sink_mute.set(Some(sink_info.mute)); + if block_on( + self.sender + .borrow_mut() + .send(Event::SinkMute(sink_info.mute)), + ) + .is_err() + { + self.main_loop.borrow_mut().quit(Retval(0)); + } + } + if self.sink_volume.get() != Some(volume) { + self.sink_volume.set(Some(volume)); + if block_on(self.sender.borrow_mut().send(Event::SinkVolume(volume))).is_err() { + self.main_loop.borrow_mut().quit(Retval(0)); + } + } + if block_on(self.sender.borrow_mut().send(Event::Balance(balance))).is_err() { + self.main_loop.borrow_mut().quit(Retval(0)); + } + let mut main_loop = self.main_loop.borrow_mut(); + let api = main_loop.get_api(); + if let Some(mut ctx) = Context::new(&*main_loop, "balance") { + let _ = ctx.connect(None, FlagSet::NOFAIL, None); + + let channels = PulseChannels::new( + sink_info.volume, + sink_info.channel_map, + api, + sink_info.index, + ctx, + ); + + if block_on(self.sender.borrow_mut().send(Event::Channels(channels))).is_err() { + main_loop.quit(Retval(0)); + } + } + } + } + + fn source_info_cb(&self, source_info_res: ListResult<&SourceInfo>) { + if let ListResult::Item(source_info) = source_info_res { + if source_info.name.as_deref() != self.default_source_name.borrow().as_deref() { + return; + } + let volume = source_info.volume.max().0 / (Volume::NORMAL.0 / 100); + if self.source_mute.get() != Some(source_info.mute) { + self.source_mute.set(Some(source_info.mute)); + if block_on( + self.sender + .borrow_mut() + .send(Event::SourceMute(source_info.mute)), + ) + .is_err() + { + self.main_loop.borrow_mut().quit(Retval(0)); + } + } + if self.source_volume.get() != Some(volume) { + self.source_volume.set(Some(volume)); + if block_on(self.sender.borrow_mut().send(Event::SourceVolume(volume))).is_err() { + self.main_loop.borrow_mut().quit(Retval(0)); + } + } + } + } + + fn get_card_info_by_index(self: &Rc, index: u32) { + let data = self.clone(); + self.introspector + .get_card_info_by_index(index, move |card_info_res| { + data.card_info_cb(card_info_res); + }); + } + + fn get_sink_info_by_index(self: &Rc, index: u32) { + let data = self.clone(); + self.introspector.get_sink_info_by_index( + index, + move |sink_info_res: ListResult<&SinkInfo<'_>>| { + if let ListResult::Item(ref info) = sink_info_res { + if let Some(card_index) = info.card { + let data_clone = data.clone(); + data.introspector.get_card_info_by_index( + card_index, + move |card_info_res| { + data_clone.card_info_cb(card_info_res); + }, + ); + } + } + data.sink_info_cb(sink_info_res); + }, + ); + } + + fn get_sink_info_by_name(self: &Rc, name: &str) { + let data = self.clone(); + self.introspector + .get_sink_info_by_name(name, move |sink_info_res| { + if let ListResult::Item(ref info) = sink_info_res { + if let Some(card_index) = info.card { + let data_clone = data.clone(); + data.introspector.get_card_info_by_index( + card_index, + move |card_info_res| { + data_clone.card_info_cb(card_info_res); + }, + ); + } + } + data.sink_info_cb(sink_info_res); + }); + } + + fn get_source_info_by_index(self: &Rc, index: u32) { + let data = self.clone(); + self.introspector + .get_source_info_by_index(index, move |source_info_res| { + if let ListResult::Item(ref info) = source_info_res { + if let Some(card_index) = info.card { + let data_clone = data.clone(); + data.introspector.get_card_info_by_index( + card_index, + move |card_info_res| { + data_clone.card_info_cb(card_info_res); + }, + ); + } + } + data.source_info_cb(source_info_res); + }); + } + + fn get_source_info_by_name(self: &Rc, name: &str) { + let data = self.clone(); + self.introspector + .get_source_info_by_name(name, move |source_info_res| { + if let ListResult::Item(ref info) = source_info_res { + if let Some(card_index) = info.card { + let data_clone = data.clone(); + data.introspector.get_card_info_by_index( + card_index, + move |card_info_res| { + data_clone.card_info_cb(card_info_res); + }, + ); + } + } + data.source_info_cb(source_info_res); + }); + } + + fn subscribe_cb( + self: &Rc, + facility: Facility, + _operation: Option, + index: u32, + ) { + match facility { + Facility::Server => { + self.get_server_info(); + } + Facility::Sink => { + self.get_sink_info_by_index(index); + } + Facility::Source => { + self.get_source_info_by_index(index); + } + Facility::Card => { + self.get_card_info_by_index(index); + } + _ => {} + } + } +} + +fn collect_profiles(profiles: &[CardProfileInfo]) -> Vec { + profiles.iter().map(CardProfile::from).collect() +} + +impl From<&CardProfileInfo<'_>> for CardProfile { + fn from(profile: &CardProfileInfo) -> Self { + CardProfile { + name: profile + .name + .as_ref() + .map(Cow::to_string) + .unwrap_or_default(), + description: profile + .description + .as_ref() + .map(Cow::to_string) + .unwrap_or_default(), + available: profile.available, + n_sinks: profile.n_sinks, + n_sources: profile.n_sources, + priority: profile.priority, + } + } +} diff --git a/subscriptions/settings-daemon/Cargo.toml b/subscriptions/settings-daemon/Cargo.toml index 73d38b4..aa67fbe 100644 --- a/subscriptions/settings-daemon/Cargo.toml +++ b/subscriptions/settings-daemon/Cargo.toml @@ -6,9 +6,9 @@ rust-version.workspace = true publish = true [dependencies] -futures = "0.3.33" +futures = "0.3.32" iced_futures = { git = "https://github.com/pop-os/libcosmic" } -log = "0.4.33" -tokio = "1.53.1" -tokio-stream = "0.1.19" -zbus = "5.18.0" +log = "0.4.29" +tokio = "1.49.0" +tokio-stream = "0.1.18" +zbus = "5.13.2" diff --git a/subscriptions/settings-daemon/src/lib.rs b/subscriptions/settings-daemon/src/lib.rs index db02cc6..313bfb6 100644 --- a/subscriptions/settings-daemon/src/lib.rs +++ b/subscriptions/settings-daemon/src/lib.rs @@ -1,6 +1,8 @@ // Copyright 2024 System76 // SPDX-License-Identifier: MPL-2.0 +// XXX error handling? + use std::hash::Hash; use futures::{FutureExt, StreamExt}; @@ -19,29 +21,6 @@ impl Hash for Wrapper { } } -const DAEMON_NAME: &str = "com.system76.CosmicSettingsDaemon"; - -async fn wait_for_daemon(conn: &zbus::Connection) { - let Ok(dbus) = zbus::fdo::DBusProxy::new(conn).await else { - return; - }; - let name: zbus::names::BusName = DAEMON_NAME.try_into().unwrap(); - if dbus.name_has_owner(name.clone()).await.unwrap_or(false) { - return; - } - log::info!("Waiting for {DAEMON_NAME} to appear on D-Bus..."); - if let Ok(mut stream) = dbus.receive_name_owner_changed().await { - while let Some(signal) = stream.next().await { - if let Ok(args) = signal.args() - && args.name == name - && args.new_owner.as_ref().is_some_and(|n| !n.is_empty()) - { - break; - } - } - } -} - pub fn subscription(connection: zbus::Connection) -> iced_futures::Subscription { Subscription::run_with( Wrapper { @@ -54,13 +33,11 @@ pub fn subscription(connection: zbus::Connection) -> iced_futures::Subscription< }| { let connection = connection.clone(); async move { - wait_for_daemon(&connection).await; - let settings_daemon = match CosmicSettingsDaemonProxy::new(&connection).await { Ok(value) => value, Err(err) => { log::error!("Error connecting to settings daemon: {}", err); - return futures::future::pending().await; + futures::future::pending().await } }; @@ -71,15 +48,9 @@ pub fn subscription(connection: zbus::Connection) -> iced_futures::Subscription< .await; let brightness_stream = settings_daemon.receive_display_brightness_changed().await; - let mut initial = vec![Event::Sender(tx)]; - if let Ok(max) = settings_daemon.max_display_brightness().await { - initial.push(Event::MaxDisplayBrightness(max)); - } - if let Ok(brightness) = settings_daemon.display_brightness().await { - initial.push(Event::DisplayBrightness(brightness)); - } + let initial = futures::stream::iter([Event::Sender(tx)]); - futures::stream::iter(initial).chain(futures::stream_select!( + initial.chain(futures::stream_select!( Box::pin(UnboundedReceiverStream::new(rx).filter_map(move |request| { let settings_daemon = settings_daemon.clone(); async move { @@ -87,17 +58,9 @@ pub fn subscription(connection: zbus::Connection) -> iced_futures::Subscription< Request::SetDisplayBrightness(brightness) => { let _ = settings_daemon.set_display_brightness(brightness).await; - None - } - Request::GetDisplayBrightness => { - let b = settings_daemon.display_brightness().await; - Some(Event::DisplayBrightness(b.ok()?)) - } - Request::GetMaxDisplayBrightness => { - let m = settings_daemon.max_display_brightness().await; - Some(Event::MaxDisplayBrightness(m.ok()?)) } } + None:: } })), Box::pin(max_brightness_stream.filter_map(|evt| async move { @@ -139,6 +102,4 @@ trait CosmicSettingsDaemon { #[derive(Debug, Clone)] pub enum Request { SetDisplayBrightness(i32), - GetDisplayBrightness, - GetMaxDisplayBrightness, } diff --git a/subscriptions/sound/Cargo.toml b/subscriptions/sound/Cargo.toml new file mode 100644 index 0000000..adf5891 --- /dev/null +++ b/subscriptions/sound/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "cosmic-settings-sound-subscription" +version = "1.0.7" +edition = "2024" +rust-version.workspace = true +license = "MPL-2.0" +publish = true + +[dependencies] +cosmic-pipewire = { path = "../../crates/cosmic-pipewire" } +futures = "0.3.32" +intmap = "3.1.3" +libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false } +numtoa = "1.0.0-alpha1" +rustix = "1.1.3" +tokio = { version = "1.49.0", features = ["process", "rt", "time"] } +tracing = { version = "0.1.44", default-features = false } + +[features] +# Set profile on first load +auto-profile-init = [] diff --git a/subscriptions/sound/LICENSE.md b/subscriptions/sound/LICENSE.md new file mode 100644 index 0000000..8dc5b15 --- /dev/null +++ b/subscriptions/sound/LICENSE.md @@ -0,0 +1,359 @@ +Mozilla Public License Version 2.0 +================================== + +## 1. Definitions + +### 1.1. "Contributor" +means each individual or legal entity that creates, contributes to +the creation of, or owns Covered Software. + +### 1.2. "Contributor Version" +means the combination of the Contributions of others (if any) used +by a Contributor and that particular Contributor's Contribution. + +### 1.3. "Contribution" +means Covered Software of a particular Contributor. + +### 1.4. "Covered Software" +means Source Code Form to which the initial Contributor has attached +the notice in Exhibit A, the Executable Form of such Source Code +Form, and Modifications of such Source Code Form, in each case +including portions thereof. + +### 1.5. "Incompatible With Secondary Licenses" +means + ++ (a) that the initial Contributor has attached the notice described +in Exhibit B to the Covered Software; or + ++ (b) that the Covered Software was made available under the terms of +version 1.1 or earlier of the License, but not also under the +terms of a Secondary License. + +### 1.6. "Executable Form" +means any form of the work other than Source Code Form. + +### 1.7. "Larger Work" +means a work that combines Covered Software with other material, in +a separate file or files, that is not Covered Software. + +### 1.8. "License" +means this document. + +### 1.9. "Licensable" +means having the right to grant, to the maximum extent possible, +whether at the time of the initial grant or subsequently, any and +all of the rights conveyed by this License. + +### 1.10. "Modifications" +means any of the following: + ++ (a) any file in Source Code Form that results from an addition to, +deletion from, or modification of the contents of Covered +Software; or + ++ (b) any new file in Source Code Form that contains any Covered +Software. + +### 1.11. "Patent Claims" of a Contributor +means any patent claim(s), including without limitation, method, +process, and apparatus claims, in any patent Licensable by such +Contributor that would be infringed, but for the grant of the +License, by the making, using, selling, offering for sale, having +made, import, or transfer of either its Contributions or its +Contributor Version. + +### 1.12. "Secondary License" +means either the GNU General Public License, Version 2.0, the GNU +Lesser General Public License, Version 2.1, the GNU Affero General +Public License, Version 3.0, or any later versions of those +licenses. + +### 1.13. "Source Code Form" +means the form of the work preferred for making modifications. + +### 1.14. "You" (or "Your") +means an individual or a legal entity exercising rights under this +License. For legal entities, "You" includes any entity that +controls, is controlled by, or is under common control with You. For +purposes of this definition, "control" means (a) the power, direct +or indirect, to cause the direction or management of such entity, +whether by contract or otherwise, or (b) ownership of more than +fifty percent (50%) of the outstanding shares or beneficial +ownership of such entity. + +## 2. License Grants and Conditions + +### 2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + ++ (a) under intellectual property rights (other than patent or trademark) +Licensable by such Contributor to use, reproduce, make available, +modify, display, perform, distribute, and otherwise exploit its +Contributions, either on an unmodified basis, with Modifications, or +as part of a Larger Work; and + ++ (b) under Patent Claims of such Contributor to make, use, sell, offer +for sale, have made, import, and otherwise transfer either its +Contributions or its Contributor Version. + +### 2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +### 2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + ++ (a) for any code that a Contributor has removed from Covered Software; +or + ++ (b) for infringements caused by: (i) Your and any other third party's +modifications of Covered Software, or (ii) the combination of its +Contributions with other software (except as part of its Contributor +Version); or + ++ (c) under Patent Claims infringed by Covered Software in the absence of +its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +### 2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +### 2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +### 2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +### 2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +## 3. Responsibilities + +### 3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +### 3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + ++ (a) such Covered Software must also be made available in Source Code +Form, as described in Section 3.1, and You must inform recipients of +the Executable Form how they can obtain a copy of such Source Code +Form by reasonable means in a timely manner, at a charge no more +than the cost of distribution to the recipient; and + ++ (b) You may distribute such Executable Form under the terms of this +License, or sublicense it under different terms, provided that the +license for the Executable Form does not attempt to limit or alter +the recipients' rights in the Source Code Form under this License. + +### 3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +### 3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +### 3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +## 4. Inability to Comply Due to Statute or Regulation + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +## 5. Termination + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + + +## 6. Disclaimer of Warranty + +**Covered Software is provided under this License on an "as is" +basis, without warranty of any kind, either expressed, implied, or +statutory, including, without limitation, warranties that the +Covered Software is free of defects, merchantable, fit for a +particular purpose or non-infringing. The entire risk as to the +quality and performance of the Covered Software is with You. +Should any Covered Software prove defective in any respect, You +(not any Contributor) assume the cost of any necessary servicing, +repair, or correction. This disclaimer of warranty constitutes an +essential part of this License. No use of any Covered Software is +authorized under this License except under this disclaimer.** + + +#7. Limitation of Liability + +**Under no circumstances and under no legal theory, whether tort +(including negligence), contract, or otherwise, shall any +Contributor, or anyone who distributes Covered Software as +permitted above, be liable to You for any direct, indirect, +special, incidental, or consequential damages of any character +including, without limitation, damages for lost profits, loss of +goodwill, work stoppage, computer failure or malfunction, or any +and all other commercial damages or losses, even if such party +shall have been informed of the possibility of such damages. This +limitation of liability shall not apply to liability for death or +personal injury resulting from such party's negligence to the +extent applicable law prohibits such limitation. Some +jurisdictions do not allow the exclusion or limitation of +incidental or consequential damages, so this exclusion and +limitation may not apply to You.** + + +## 8. Litigation + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +## 9. Miscellaneous + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +## 10. Versions of the License + +### 10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +### 10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +### 10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +### 10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +## Exhibit A - Source Code Form License Notice + + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +## Exhibit B - "Incompatible With Secondary Licenses" Notice + + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. + diff --git a/subscriptions/sound/src/lib.rs b/subscriptions/sound/src/lib.rs new file mode 100644 index 0000000..adac229 --- /dev/null +++ b/subscriptions/sound/src/lib.rs @@ -0,0 +1,958 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: MPL-2.0 + +use cosmic::Task; +use cosmic::iced::stream; +use cosmic_pipewire as pipewire; +use futures::{SinkExt, Stream}; +use intmap::IntMap; +use pipewire::Availability; +use std::{ + process::Stdio, + sync::{Arc, Mutex}, + time::Duration, +}; + +pub type DeviceId = u32; +pub type NodeId = u32; +pub type ProfileId = i32; +pub type RouteId = u32; + +pub fn watch() -> impl Stream + Send + 'static { + stream::channel( + 1, + |mut emitter: futures::channel::mpsc::Sender| async move { + loop { + let (cancel_tx, cancel_rx) = futures::channel::oneshot::channel::<()>(); + let sender = Arc::new((Mutex::new(Vec::new()), tokio::sync::Notify::const_new())); + let receiver = sender.clone(); + + _ = emitter + .send(Message::SubHandle(Arc::new(SubscriptionHandle { + cancel_tx, + pipewire: pipewire::run(move |event| { + sender.0.lock().unwrap().push(event); + sender.1.notify_one(); + }), + }))) + .await; + + let forwarder = Box::pin(async { + loop { + _ = receiver.1.notified().await; + let events = std::mem::take(&mut *receiver.0.lock().unwrap()); + if !events.is_empty() { + _ = emitter.send(Message::Server(Arc::from(events))).await; + tokio::time::sleep(Duration::from_millis(64)).await; + } + } + }); + + futures::future::select(cancel_rx, forwarder).await; + } + }, + ) +} + +#[derive(Default)] +pub struct Model { + subscription_handle: Option, + + pub device_profile_dropdowns: Vec<(DeviceId, String, Option, Vec, Vec)>, + + // Translated text + pub unplugged_text: String, + pub hd_audio_text: String, + pub usb_audio_text: String, + + device_ids: IntMap, + node_names: IntMap, + card_profile_devices: IntMap, + node_route_indexes: IntMap, + + device_names: IntMap, + device_profiles: IntMap>, + active_profiles: IntMap, + device_routes: IntMap>, + + /** Sink devices */ + + /// Description of a sink device and its port + sinks: Vec, + /// Node IDs for sinks + sink_node_ids: Vec, + /// Index of active sink device. + active_sink: Option, + /// Node ID of active sink device. + active_sink_node: Option, + /// Device ID of active sink device. + active_sink_device: Option, + /// Device identifier of the default sink. + active_sink_node_name: String, + + /** Source devices */ + + /// Product names for source devices. + sources: Vec, + /// Node IDs for sources + source_node_ids: Vec, + /// Index of active source device. + active_source: Option, + /// Node ID of active source device. + active_source_node: Option, + /// Device ID of active source device. + active_source_device: Option, + /// Node identifier of the default source. + active_source_node_name: String, + + changing_sink_device: Option, + changing_source_device: Option, + + pub sink_volume_text: String, + pub source_volume_text: String, + pub sink_balance: Option, + + pub sink_volume: u32, + pub source_volume: u32, + + pub sink_mute: bool, + sink_volume_debounce: bool, + pub source_mute: bool, + source_volume_debounce: bool, +} + +impl Model { + pub fn active_sink(&self) -> Option { + self.active_sink + } + + pub fn active_source(&self) -> Option { + self.active_source + } + + pub fn sinks(&self) -> &[String] { + &self.sinks + } + + pub fn sources(&self) -> &[String] { + &self.sources + } + + pub fn clear(&mut self) { + if let Some(handle) = self.subscription_handle.take() { + _ = handle.cancel_tx.send(()); + _ = handle.pipewire.send(pipewire::Request::Quit); + } + } + + /// Send a message to the pipewire-rs thread. + pub fn pipewire_send(&self, request: pipewire::Request) { + if let Some(handle) = self.subscription_handle.as_ref() { + _ = handle.pipewire.send(request); + } + } + + /// Sets and applies a profile to a device with wpctl. + /// + /// Requires using the device ID rather than a node ID. + pub fn set_profile(&mut self, device_id: DeviceId, index: u32, save: bool) { + if save { + self.changing_sink_device = self + .device_ids + .iter() + .find(|(node_id, _device)| self.active_sink_node == Some(*node_id)) + .and_then(|(_node_id, &device)| { + if device == device_id { + Some(device_id) + } else { + None + } + }); + + self.changing_source_device = self + .device_ids + .iter() + .find(|(node_id, _device)| self.active_source_node == Some(*node_id)) + .and_then(|(_node_id, &device)| { + if device == device_id { + Some(device_id) + } else { + None + } + }); + } + + let mut update = false; + + if let Some(profiles) = self.device_profiles.get(device_id) { + for profile in profiles { + if profile.index as u32 == index { + self.active_profiles.insert(device_id, profile.clone()); + self.pipewire_send(pipewire::Request::SetProfile(device_id, index, save)); + update = true; + } + } + + if update { + self.update_ui_profiles(); + } + + // Use pw-cli as a fallback in case it wasn't set correctly. + tokio::spawn(async move { + set_profile(device_id, index, save).await; + }); + } + } + + /// Change the balance of channel volumes on the sink device. + pub fn set_sink_balance(&mut self, balance: u32) -> Task { + self.sink_balance = (balance != 100).then(|| balance as f32 / 100.); + if self.sink_volume_debounce { + return Task::none(); + } + + if let Some(id) = self.active_sink_node { + self.sink_volume_debounce = true; + return cosmic::Task::future(async move { + tokio::time::sleep(Duration::from_millis(128)).await; + Message::SinkVolumeApply(id) + }); + } + + Task::none() + } + + /// Change the default sink device + pub fn set_default_sink(&mut self, pos: usize) -> Task { + if let Some(&node_id) = self.sink_node_ids.get(pos) { + self.set_default_sink_node_id(node_id); + } + + Task::none() + } + + pub fn set_default_sink_node_id(&mut self, node_id: NodeId) { + tracing::debug!(target: "sound", "set default sink node {node_id}"); + self.set_default_sink_id(node_id); + + // Use pactl if the node is not a device node. + let virtual_sink_name: Option = + if let Some(device) = self.device_ids.get(node_id).cloned() { + // Get route index of the selected node and apply it to the device. + if let Some((card_profile_device, route_index)) = self + .card_profile_devices + .get(node_id) + .cloned() + .zip(self.node_route_indexes.get(node_id).cloned()) + { + self.pipewire_send(pipewire::Request::SetRoute( + device, + card_profile_device, + route_index as u32, + )); + } + + None + } else { + self.node_names.get(node_id).cloned() + }; + + tokio::task::spawn(async move { + if let Some(node_name) = virtual_sink_name { + pactl_set_default_sink(&node_name).await + } else { + set_default(node_id).await + } + }); + } + + /// Toggle the mute property of the sink device. + pub fn toggle_sink_mute(&mut self) { + self.sink_mute = !self.sink_mute; + if let Some(node_id) = self.active_sink_node { + let mute = self.sink_mute; + if let Some(handle) = self.subscription_handle.as_mut() { + _ = handle + .pipewire + .send(pipewire::Request::SetNodeMute(node_id, mute)); + } + } + } + + /// Change the sink device's volume. + pub fn set_sink_volume(&mut self, volume: u32) -> Task { + self.sink_volume = volume; + self.sink_volume_text = numtoa::BaseN::<10>::u32(volume).as_str().to_owned(); + if self.sink_volume_debounce { + return Task::none(); + } + + // Wait for the debounce duration before applying the volume change. + if let Some(node_id) = self.active_sink_node { + self.sink_volume_debounce = true; + return cosmic::Task::future(async move { + tokio::time::sleep(Duration::from_millis(128)).await; + Message::SinkVolumeApply(node_id) + }); + } + + Task::none() + } + + /// Change the default source device. + pub fn set_default_source(&mut self, pos: usize) -> Task { + if let Some(&node_id) = self.source_node_ids.get(pos) { + self.set_default_source_node_id(node_id); + } + + Task::none() + } + + pub fn set_default_source_node_id(&mut self, node_id: NodeId) { + tracing::debug!(target: "sound", "set default source node {node_id}"); + self.set_default_source_id(node_id); + + // Use pactl if the node is not a device node. + let virtual_source_name: Option = + if let Some(device) = self.device_ids.get(node_id).cloned() { + // Get route index of the selected node and apply it to the device. + if let Some((card_profile_device, route_index)) = self + .card_profile_devices + .get(node_id) + .cloned() + .zip(self.node_route_indexes.get(node_id).cloned()) + { + self.pipewire_send(pipewire::Request::SetRoute( + device, + card_profile_device, + route_index as u32, + )); + } + + None + } else { + self.node_names.get(node_id).cloned() + }; + + tokio::task::spawn(async move { + if let Some(node_name) = virtual_source_name { + pactl_set_default_source(&node_name).await + } else { + set_default(node_id).await + } + }); + } + + /// Toggle the mute property of the source device. + pub fn toggle_source_mute(&mut self) { + self.source_mute = !self.source_mute; + if let Some(node_id) = self.active_source_node { + let mute = self.source_mute; + if let Some(handle) = self.subscription_handle.as_mut() { + _ = handle + .pipewire + .send(pipewire::Request::SetNodeMute(node_id, mute)); + } + } + } + + /// Change the source device's volume. + pub fn set_source_volume(&mut self, volume: u32) -> Task { + self.source_volume = volume; + self.source_volume_text = numtoa::BaseN::<10>::u32(volume).as_str().to_owned(); + if self.source_volume_debounce { + return Task::none(); + } + + // Wait for the debounce duration before applying the volume change. + if let Some(node_id) = self.active_source_node { + self.source_volume_debounce = true; + return cosmic::Task::future(async move { + tokio::time::sleep(Duration::from_millis(128)).await; + Message::SourceVolumeApply(node_id) + }); + } + + Task::none() + } + + pub fn update(&mut self, message: Message) -> Task { + match message { + Message::Server(events) => { + Arc::into_inner(events) + .into_iter() + .flatten() + .for_each(|event| self.pipewire_update(event)); + } + + Message::SinkVolumeApply(node_id) => { + self.sink_volume_debounce = false; + self.pipewire_send(pipewire::Request::SetNodeVolume( + node_id, + self.sink_volume as f32 / 100.0, + self.sink_balance, + )); + } + + Message::SourceVolumeApply(node_id) => { + self.source_volume_debounce = false; + self.pipewire_send(pipewire::Request::SetNodeVolume( + node_id, + self.source_volume as f32 / 100.0, + None, + )); + } + + Message::SubHandle(handle) => { + if let Some(handle) = Arc::into_inner(handle) { + self.subscription_handle = Some(handle); + } + } + } + + Task::none() + } + + fn pipewire_update(&mut self, event: pipewire::Event) { + match event { + pipewire::Event::NodeProperties(id, props) => { + if self.active_sink_node == Some(id) { + if self.sink_volume_debounce { + return; + } + + if let Some(mute) = props.mute { + self.sink_mute = mute; + } + + if let Some(channel_volumes) = props.channel_volumes { + let (volume, balance) = + pipewire::volume::from_channel_volumes(&channel_volumes); + + self.sink_balance = balance; + self.sink_volume = (volume * 100.0) as u32; + self.sink_volume_text = numtoa::BaseN::<10>::u32(self.sink_volume) + .as_str() + .to_owned(); + } + } else if self.active_source_node == Some(id) { + if self.source_volume_debounce { + return; + } + + if let Some(mute) = props.mute { + self.source_mute = mute; + } + + if let Some(channel_volumes) = props.channel_volumes { + let (volume, _balance) = + pipewire::volume::from_channel_volumes(&channel_volumes); + self.source_volume = (volume * 100.0) as u32; + self.source_volume_text = numtoa::BaseN::<10>::u32(self.source_volume) + .as_str() + .to_owned(); + } + } + } + + pipewire::Event::ActiveProfile(id, profile) => { + tracing::debug!( + target: "sound", + "Device {id} active profile changed to {}: {}", + profile.index, + profile.description + ); + + let prev = self.active_profiles.insert(id, profile.clone()); + self.update_ui_profiles(); + if let Some(prev) = prev { + if prev.index == profile.index { + return; + } + + tracing::debug!( + target: "sound", + "Device {id} profile changed from {} to {}: {}", + prev.index, profile.index, profile.description + ); + } else { + #[cfg(feature = "auto-profile-init")] + if profile.index != 0 { + // Use pw-cli to re-set the profile in case wireplumber has invalid state. + // Profiles set by us do not need to use this. Only sets if profile is not `Off`. + tracing::debug!( + target: "sound", + "Device {id} initialized with profile {}: {}", profile.index, profile.description + ); + + self.set_profile(id, profile.index as u32, false); + } + } + } + + pipewire::Event::ActiveRoute(id, _index, route) => { + tracing::debug!( + target: "sound", + "Device {id} active route changed to {}: {}", + route.index, + route.description + ); + + self.update_device_route_name(&route, id); + + let (active_device, node_ids, set_default_node): ( + Option, + &[NodeId], + fn(&mut Self, NodeId), + ) = match route.direction { + pipewire::Direction::Output => ( + self.active_sink_device, + &self.sink_node_ids, + Self::set_default_sink_id, + ), + pipewire::Direction::Input => ( + self.active_source_device, + &self.source_node_ids, + Self::set_default_source_id, + ), + }; + + if active_device == Some(id) { + for (node_id, &device) in &self.device_ids { + if device == id && node_ids.contains(&node_id) { + set_default_node(self, node_id); + break; + } + } + } + } + + pipewire::Event::AddProfile(id, index, profile) => { + if let Some(p) = self.active_profiles.get_mut(id) + && p.index == profile.index + { + *p = profile.clone(); + } + + let profiles = self.device_profiles.entry(id).or_default(); + if profiles.len() < index as usize + 1 { + let additional = (index as usize + 1) - profiles.capacity(); + profiles.reserve_exact(additional); + profiles.extend(std::iter::repeat_n( + pipewire::Profile::default(), + additional, + )); + } + + profiles[index as usize] = profile; + + self.update_ui_profiles(); + } + + pipewire::Event::AddRoute(id, index, route) => self.add_route(id, index, route), + + pipewire::Event::AddDevice(device) => { + tracing::debug!(target: "sound", "Device {} added: {}", device.id, device.name); + self.device_names + .insert(device.id, self.translate_device_name(&device.name)); + } + + pipewire::Event::AddNode(node) => { + tracing::debug!(target: "sound", "Node {} added: {}", node.object_id, node.node_name); + // Device nodes will have device and card profile device IDs. + // Virtual sinks/sources do not have these. + if let Some(device_id) = node.device_id { + self.device_ids.insert(node.object_id, device_id); + + // This is the device number of the route. This is used with the + // device ID to set properties for a route. + if let Some(card_profile_device) = node.card_profile_device { + self.card_profile_devices + .insert(node.object_id, card_profile_device); + } + } + + let description = self.translate_device_name(&node.description); + + // The default sink/source is defined by a node's name. We use this when setting + // virtual sink/source nodes with pactl; and when pipewire notifies us of a new + // default sink/source. + if self + .node_names + .insert(node.object_id, node.node_name.clone()) + .is_none() + { + // Use the device.profile.description as the route name by default for the UI. + let name = if node.device_profile_description.is_empty() { + description + } else { + [&node.device_profile_description, " - ", &description].concat() + }; + + // Check if the node is a sink or a source, and append it to the relevant collections. + match node.media_class { + pipewire::MediaClass::Sink => { + self.sinks.push(name); + self.sink_node_ids.push(node.object_id); + + // Set the sink as the default if it matches the server. + if self.active_sink_node_name == node.node_name { + tracing::debug!( + target: "sound", + "Node {} ({}) was the default sink", + node.object_id, + node.node_name + ); + self.set_default_sink_node_id(node.object_id); + } else if let Some(device_id) = self.changing_sink_device { + for (node_id, &device) in &self.device_ids { + if device == device_id && self.sink_node_ids.contains(&node_id) + { + self.changing_sink_device = None; + self.set_default_sink_node_id(node_id); + return; + } + } + } + } + + pipewire::MediaClass::Source => { + self.sources.push(name); + self.source_node_ids.push(node.object_id); + + // Set the source as the default if it matches the server. + if self.active_source_node_name == node.node_name { + tracing::debug!( + target: "sound", + "Node {} ({}) was the default source", + node.object_id, + node.node_name + ); + self.set_default_source_node_id(node.object_id); + } else if let Some(device_id) = self.changing_source_device { + for (node_id, &device) in &self.device_ids { + if device == device_id + && self.source_node_ids.contains(&node_id) + { + self.changing_source_device = None; + self.set_default_source_node_id(node_id); + return; + } + } + } + } + } + } + } + + pipewire::Event::DefaultSink(node_name) => { + tracing::debug!(target: "sound", "default sink node changed to {node_name}"); + if self.active_sink_node_name == node_name { + return; + } + + if let Some(id) = self.node_id_from_name(&node_name) { + self.set_default_sink_id(id); + } + + self.active_sink_node_name = node_name; + } + + pipewire::Event::DefaultSource(node_name) => { + tracing::debug!(target: "sound", "default source node changed to {node_name}"); + if self.active_source_node_name == node_name { + return; + } + + if let Some(id) = self.node_id_from_name(&node_name) { + self.set_default_source_id(id); + } + + self.active_source_node_name = node_name; + } + + pipewire::Event::RemoveDevice(id) => self.remove_device(id), + pipewire::Event::RemoveNode(id) => self.remove_node(id), + } + } + + fn add_route(&mut self, id: DeviceId, index: u32, route: pipewire::Route) { + self.update_device_route_name(&route, id); + + tracing::debug!(target: "sound", + "Device {} added route {} ({:?}); {:?}", + id, + route.name, + route.direction, + route.available + ); + + let routes = self.device_routes.entry(id).or_default(); + if routes.len() < index as usize + 1 { + let additional = (index as usize + 1) - routes.capacity(); + routes.reserve_exact(additional); + routes.extend(std::iter::repeat_n(pipewire::Route::default(), additional)); + } + + routes[index as usize] = route; + } + + fn node_id_from_name(&self, name: &str) -> Option { + self.node_names + .iter() + .find(|&(_, n)| *n == name) + .map(|(id, _)| id) + } + + fn remove_device(&mut self, id: DeviceId) { + tracing::debug!(target: "sound", "Device {id} removed"); + _ = self.device_names.remove(id); + _ = self.device_profiles.remove(id); + _ = self.active_profiles.remove(id); + _ = self.device_routes.remove(id); + } + + fn remove_node(&mut self, id: NodeId) { + tracing::debug!(target: "sound", "Node {id} removed"); + if let Some(pos) = self.sink_node_ids.iter().position(|&node_id| node_id == id) { + self.sink_node_ids.remove(pos); + self.sinks.remove(pos); + if let Some(node_id) = self.active_sink_node + && id == node_id + { + self.active_sink = None; + self.active_sink_node = None; + self.active_sink_node_name.clear(); + } + } else if let Some(pos) = self + .source_node_ids + .iter() + .position(|&node_id| node_id == id) + { + self.source_node_ids.remove(pos); + self.sources.remove(pos); + if let Some(node_id) = self.active_source_node + && id == node_id + { + self.active_source = None; + self.active_source_node = None; + self.active_source_node_name.clear(); + } + } + + _ = self.device_ids.remove(id); + _ = self.node_names.remove(id); + _ = self.card_profile_devices.remove(id); + } + + /// Set the default sink device by its the node ID. + fn set_default_sink_id(&mut self, node_id: NodeId) { + self.active_sink = self.sink_node_ids.iter().position(|&id| id == node_id); + self.active_sink_node = Some(node_id); + self.active_sink_node_name = self.node_names.get(node_id).cloned().unwrap_or_default(); + self.active_sink_device = self + .device_ids + .iter() + .find_map(|(nid, did)| if nid == node_id { Some(*did) } else { None }); + } + + /// Set the default source device by its the node ID. + fn set_default_source_id(&mut self, node_id: NodeId) { + self.active_source = self.source_node_ids.iter().position(|&id| id == node_id); + self.active_source_node = Some(node_id); + self.active_source_node_name = self.node_names.get(node_id).cloned().unwrap_or_default(); + self.active_source_device = self + .device_ids + .iter() + .find_map(|(nid, did)| if nid == node_id { Some(*did) } else { None }); + } + + fn update_device_route_name(&mut self, route: &pipewire::Route, id: DeviceId) { + if matches!(route.available, Availability::No) { + return; + } + + let (devices, node_ids) = match route.direction { + pipewire::Direction::Output => (&mut self.sinks, &self.sink_node_ids), + pipewire::Direction::Input => (&mut self.sources, &self.source_node_ids), + }; + + for (pos, &node) in node_ids.iter().enumerate() { + let Some(&device) = self.device_ids.get(node) else { + continue; + }; + + if device != id { + continue; + } + + let Some(profile) = self.active_profiles.get(id) else { + continue; + }; + + if !profile.name.starts_with("pro-audio") { + let Some(&card_profile_device) = self.card_profile_devices.get(node) else { + continue; + }; + + if !route.devices.contains(&(card_profile_device as i32)) { + continue; + } + } + + let Some(device_name) = self.device_names.get(id) else { + continue; + }; + + tracing::debug!(target: "sound", "matched route {} on {}: {}", route.index, id, route.description); + devices[pos] = [&route.description, " - ", device_name].concat(); + self.node_route_indexes.insert(node, route.index); + + break; + } + } + + // Update the cached profiles for the UI. + fn update_ui_profiles(&mut self) { + self.device_profile_dropdowns = self + .device_profiles + .iter() + .filter_map(|(device_id, profiles)| { + let name = self.device_names.get(device_id)?.as_str(); + let (active_profile, indexes, descriptions) = self + .active_profiles + .get(device_id) + .map(|profile| { + let (indexes, descriptions): (Vec<_>, Vec<_>) = profiles + .iter() + .filter(|p| { + p.index == profile.index + || !matches!(p.available, pipewire::Availability::No) + }) + .map(|p| (p.index as u32, p.description.clone())) + .collect(); + + let pos = profiles + .iter() + .filter(|p| { + p.index == profile.index + || !matches!(p.available, pipewire::Availability::No) + }) + .enumerate() + .find(|(_, p)| p.index == profile.index) + .map(|(pos, _)| pos); + + (pos, indexes, descriptions) + }) + .unwrap_or_else(|| { + let (indexes, descriptions): (Vec<_>, Vec<_>) = profiles + .iter() + .filter(|p| !matches!(p.available, pipewire::Availability::No)) + .map(|p| (p.index as u32, p.description.clone())) + .collect(); + + (None, indexes, descriptions) + }); + + Some(( + device_id, + name.to_owned(), + active_profile, + indexes, + descriptions, + )) + }) + .collect::>(); + + self.device_profile_dropdowns.sort_by(|a, b| a.1.cmp(&b.1)); + } + + fn translate_device_name(&self, input: &str) -> String { + input + .replacen(" Controller", "", 1) + .replacen("High Definition Audio", &self.hd_audio_text, 1) + .replacen("HD Audio", &self.hd_audio_text, 1) + .replacen("USB Audio Device", &self.usb_audio_text, 1) + } +} + +#[derive(Clone, Debug)] +pub enum Message { + /// Handle messages from the sound server. + Server(Arc>), + /// Change the output volume. + SinkVolumeApply(NodeId), + /// Change the input volume. + SourceVolumeApply(NodeId), + /// On init of the subscription, channels for closing background threads are given to the app. + SubHandle(Arc), +} + +pub struct SubscriptionHandle { + cancel_tx: futures::channel::oneshot::Sender<()>, + pipewire: pipewire::Sender, +} + +impl std::fmt::Debug for SubscriptionHandle { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("SubscriptionHandle") + } +} + +// TODO: Use pipewire library +pub async fn set_default(id: u32) { + tracing::debug!(target: "sound", "setting default node {id}"); + let id = numtoa::BaseN::<10>::u32(id); + _ = tokio::process::Command::new("wpctl") + .args(["set-default", id.as_str()]) + .stdout(Stdio::null()) + .stderr(Stdio::null()) + .status() + .await; +} + +/// Use this to set a virtual sink as a default. +/// TODO: We should be able to set this with pipewire-rs somehow. +pub async fn pactl_set_default_sink(node_name: &str) { + tracing::debug!(target: "sound", "setting default virtual node {node_name}"); + _ = tokio::process::Command::new("pactl") + .args(["set-default-sink", node_name]) + .stdout(Stdio::null()) + .stderr(Stdio::null()) + .status() + .await; +} + +/// Use this to set a virtual sink as a default. +/// TODO: We should be able to set this with pipewire-rs somehow. +pub async fn pactl_set_default_source(node_name: &str) { + _ = tokio::process::Command::new("pactl") + .args(["set-default-source", node_name]) + .stdout(Stdio::null()) + .stderr(Stdio::null()) + .status() + .await; +} + +// TODO: Use pipewire library +pub async fn set_profile(id: u32, index: u32, save: bool) { + let id = numtoa::BaseN::<10>::u32(id); + let index = numtoa::BaseN::<10>::u32(index); + let value = [ + "{ index: ", + index.as_str(), + if save { + ", save: true }" + } else { + ", save: false }" + }, + ] + .concat(); + + _ = tokio::process::Command::new("pw-cli") + .args(["s", id.as_str(), "Profile", &value]) + .stdout(Stdio::null()) + .stderr(Stdio::null()) + .status() + .await; +} diff --git a/subscriptions/upower/Cargo.toml b/subscriptions/upower/Cargo.toml index 4453dad..4121a10 100644 --- a/subscriptions/upower/Cargo.toml +++ b/subscriptions/upower/Cargo.toml @@ -7,10 +7,10 @@ rust-version.workspace = true publish = true [dependencies] -futures = "0.3.33" +futures = "0.3.32" iced_futures = { git = "https://github.com/pop-os/libcosmic" } -log = "0.4.33" -tokio = "1.53.1" -tokio-stream = "0.1.19" +log = "0.4.29" +tokio = "1.49.0" +tokio-stream = "0.1.18" upower_dbus = { git = "https://github.com/pop-os/dbus-settings-bindings" } -zbus = "5.18.0" +zbus = "5.13.2" diff --git a/subscriptions/upower/src/lib.rs b/subscriptions/upower/src/lib.rs index 6e210f3..e594774 100644 --- a/subscriptions/upower/src/lib.rs +++ b/subscriptions/upower/src/lib.rs @@ -4,8 +4,7 @@ pub mod device { use futures::{FutureExt, Stream, StreamExt}; use iced_futures::Subscription; - use std::fmt::Debug; - use std::hash::Hash; + use std::{fmt::Debug, hash::Hash}; use upower_dbus::{BatteryType, DeviceProxy, UPowerProxy}; pub fn device_subscription( @@ -32,7 +31,7 @@ pub mod device { Ok((upower, device_path)) } - async fn events() -> zbus::Result + Unpin + Send>> { + async fn events() -> zbus::Result> { let (upower, device) = display_device().await?; let devices = upower.enumerate_devices().await?; let mut has_battery = false; @@ -51,11 +50,11 @@ pub mod device { } } - if !has_battery { - return Ok(Box::new(futures::stream::iter(Some( - DeviceDbusEvent::NoBattery, - )))); - }; + let initial = futures::stream::iter(if has_battery { + None + } else { + Some(DeviceDbusEvent::NoBattery) + }); let stream = futures::stream_select!( upower.receive_on_battery_changed().await.map(|_| ()), @@ -63,7 +62,7 @@ pub mod device { device.receive_time_to_empty_changed().await.map(|_| ()), ); - Ok(Box::new(stream.map(move |_| { + Ok(initial.chain(stream.map(move |_| { DeviceDbusEvent::Update { on_battery: upower .cached_on_battery() @@ -98,8 +97,7 @@ pub mod kbdbacklight { use futures::{FutureExt, Stream, StreamExt}; use iced_futures::Subscription; - use std::fmt::Debug; - use std::hash::Hash; + use std::{fmt::Debug, hash::Hash}; use tokio::sync::mpsc::{UnboundedSender, unbounded_channel}; use tokio_stream::wrappers::UnboundedReceiverStream; use upower_dbus::{BrightnessChanged, KbdBacklightProxy};