diff --git a/CHANGELOG.md b/CHANGELOG.md index 4da3e707..9d2a6889 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - CLI parameter `--option`/`-o` to override any configuration field - Escape sequences to report text area size in pixels (`CSI 14 t`) and in characters (`CSI 18 t`) - Support for single line terminals dimensions +- Right clicking on Wayland's client side decorations will show application menu ### Changed @@ -33,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - The user's background color is now used as the foreground for the render timer - Use yellow/red from the config for error and warning messages instead of fixed colors - Existing CLI parameters are now passed to instances spawned using `SpawnNewInstance` +- Wayland's Client side decorations now use the search bar colors ### Fixed @@ -48,6 +50,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Selection expanding over 2 characters when scrolled in history with fullwidth characters in use - Selection scrolling not starting when mouse is over the message bar - Incorrect text width calculation in message bar when the message contains multibyte characters +- Remapped caps lock to escape not triggering escape bindings on Wayland +- Crash when setting overly long title on Wayland +- Switching in and out of various window states, like Fullscreen, not persisting window size on Wayland +- Crash when providing 0 for `XCURSOR_SIZE` on Wayland +- Gap between window and server side decorations on KWIN Wayland +- Wayland's client side decorations not working after tty switch +- `Fullscreen` startup mode not working on Wayland +- Window not being rescaled when changing DPR of the current monitor on Wayland +- Crash in some cases when pointer isn't presented upon startup on Wayland +- IME not working on Wayland +- Crash on startup on GNOME since its 3.37.90 version on Wayland +- Touchpad scrolling scrolled less than it should on macOS/Wayland on scaled outputs +- Incorrect modifiers at startup on X11 +- `Add` and `Subtract` keys are now named `NumpadAdd` and `NumpadSubtract` respectively ## 0.5.0 diff --git a/Cargo.lock b/Cargo.lock index bd29ad13..a77f0ff2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,11 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2692800d602527d2b8fea50036119c37df74ab565b10e285706a3dcec0ec3e16" + [[package]] name = "adler32" version = "1.2.0" @@ -41,7 +47,7 @@ dependencies = [ "time", "unicode-width", "urlocator", - "wayland-client 0.27.0", + "wayland-client", "winapi 0.3.9", "x11-dl", "xdg", @@ -60,7 +66,7 @@ dependencies = [ "mio-extras", "mio-named-pipes", "miow 0.3.5", - "nix 0.17.0", + "nix", "parking_lot", "regex-automata", "serde", @@ -76,13 +82,13 @@ dependencies = [ [[package]] name = "andrew" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7f09f89872c2b6b29e319377b1fbe91c6f5947df19a25596e121cf19a7b35e" +checksum = "5e1ea80a5089cac999ffd4a91888154076a961d27387b0f7a6cd2d4dddb636b9" dependencies = [ "bitflags", "line_drawing", - "rusttype 0.7.9", + "rusttype", "walkdir", "xdg", "xml-rs", @@ -94,12 +100,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" -[[package]] -name = "android_log-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" - [[package]] name = "ansi_term" version = "0.11.0" @@ -109,15 +109,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "approx" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" -dependencies = [ - "num-traits", -] - [[package]] name = "arc-swap" version = "0.4.7" @@ -175,8 +166,8 @@ dependencies = [ "lazycell", "log", "peeking_take_while", - "proc-macro2 1.0.21", - "quote 1.0.7", + "proc-macro2", + "quote", "regex", "rustc-hash", "shlex", @@ -241,20 +232,19 @@ dependencies = [ [[package]] name = "calloop" -version = "0.4.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aa2097be53a00de9e8fc349fea6d76221f398f5c4fa550d420669906962d160" +checksum = "0b036167e76041694579972c28cf4877b4f92da222560ddb49008937b6a6727c" dependencies = [ - "mio", - "mio-extras", - "nix 0.14.1", + "log", + "nix", ] [[package]] name = "cc" -version = "1.0.59" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" +checksum = "ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c" dependencies = [ "jobserver", ] @@ -303,7 +293,7 @@ dependencies = [ "ansi_term", "atty", "bitflags", - "strsim", + "strsim 0.8.0", "textwrap", "unicode-width", "vec_map", @@ -311,18 +301,19 @@ dependencies = [ [[package]] name = "clipboard-win" -version = "2.2.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a093d6fed558e5fe24c3dfc85a68bb68f1c824f440d3ba5aca189e2998786b" +checksum = "9fdf5e01086b6be750428ba4a40619f847eb2e95756eee84b18e06e5f0b50342" dependencies = [ + "lazy-bytes-cast", "winapi 0.3.9", ] [[package]] name = "cloudabi" -version = "0.0.3" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" dependencies = [ "bitflags", ] @@ -344,8 +335,39 @@ checksum = "0c49e86fc36d5704151f5996b7b3795385f50ce09e3be0f47a0cfde869681cf8" dependencies = [ "bitflags", "block", - "core-foundation", - "core-graphics", + "core-foundation 0.7.0", + "core-graphics 0.19.2", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "cocoa" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c54201c07dcf3a5ca33fececb8042aed767ee4bfd5a0235a8ceabcda956044b2" +dependencies = [ + "bitflags", + "block", + "cocoa-foundation", + "core-foundation 0.9.1", + "core-graphics 0.22.1", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" +dependencies = [ + "bitflags", + "block", + "core-foundation 0.9.1", + "core-graphics-types", "foreign-types 0.3.2", "libc", "objc", @@ -359,9 +381,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "copypasta" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc2322d35c17d340f7017e4c1be24c6f0d6e09423adb51d182d7a9c122f2e6c" +checksum = "4423d79fed83ebd9ab81ec21fa97144300a961782158287dc9bf7eddac37ff0b" dependencies = [ "clipboard-win", "objc", @@ -377,7 +399,17 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" dependencies = [ - "core-foundation-sys", + "core-foundation-sys 0.7.0", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +dependencies = [ + "core-foundation-sys 0.8.1", "libc", ] @@ -387,6 +419,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +[[package]] +name = "core-foundation-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0af3b5e4601de3837c9332e29e0aae47a0d46ebfa246d12b82f564bac233393" + [[package]] name = "core-graphics" version = "0.19.2" @@ -394,7 +432,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" dependencies = [ "bitflags", - "core-foundation", + "core-foundation 0.7.0", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc239bba52bab96649441699533a68de294a101533b0270b2d65aa402b29a7f9" +dependencies = [ + "bitflags", + "core-foundation 0.9.1", + "core-graphics-types", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +dependencies = [ + "bitflags", + "core-foundation 0.9.1", "foreign-types 0.3.2", "libc", ] @@ -405,8 +468,8 @@ version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "131b3fd1f8bd5db9f2b398fa4fdb6008c64afc04d447c306ac2c7e98fba2a61d" dependencies = [ - "core-foundation", - "core-graphics", + "core-foundation 0.7.0", + "core-graphics 0.19.2", "foreign-types 0.3.2", "libc", ] @@ -418,8 +481,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" dependencies = [ "cfg-if", - "core-foundation-sys", - "core-graphics", + "core-foundation-sys 0.7.0", + "core-graphics 0.19.2", "libc", "objc", ] @@ -450,10 +513,10 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb710de01349371230ec5f5e65410826682448dfad14d97b473a69d850f686bd" dependencies = [ - "cocoa", - "core-foundation", - "core-foundation-sys", - "core-graphics", + "cocoa 0.20.2", + "core-foundation 0.7.0", + "core-foundation-sys 0.7.0", + "core-graphics 0.19.2", "core-text", "dwrote", "euclid", @@ -465,6 +528,41 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.9.3", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core", + "quote", + "syn", +] + [[package]] name = "deflate" version = "0.8.6" @@ -481,8 +579,8 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" dependencies = [ - "proc-macro2 1.0.21", - "quote 1.0.7", + "proc-macro2", + "quote", "syn", ] @@ -577,7 +675,7 @@ version = "0.20.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bb7ef65b3777a325d1eeefefab5b6d4959da54747e33bd6258e789640f307ad" dependencies = [ - "num-traits", + "num-traits 0.2.12", ] [[package]] @@ -645,8 +743,8 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63f713f8b2aa9e24fec85b0e290c56caee12e3b6ae0aeeda238a75b28251afd6" dependencies = [ - "proc-macro2 1.0.21", - "quote 1.0.7", + "proc-macro2", + "quote", "syn", ] @@ -749,27 +847,27 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "glutin" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9666c8fd9afd008f6559e2468c35e11aad1d110d525bb3b354e4138ec0e20f" +checksum = "ed94c05751b6948879d2b15d49930e16ecc0144e51fcb8cd873686d6c4b5ebed" dependencies = [ "android_glue", "cgl", - "cocoa", - "core-foundation", - "core-graphics", + "cocoa 0.23.0", + "core-foundation 0.9.1", "glutin_egl_sys", "glutin_emscripten_sys", "glutin_gles2_sys", "glutin_glx_sys", "glutin_wgl_sys", "lazy_static", - "libloading 0.5.2", + "libloading 0.6.3", "log", "objc", "osmesa-sys", "parking_lot", - "wayland-client 0.23.6", + "wayland-client", + "wayland-egl", "winapi 0.3.9", "winit", ] @@ -821,9 +919,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" +checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" dependencies = [ "libc", ] @@ -848,16 +946,22 @@ dependencies = [ ] [[package]] -name = "image" -version = "0.23.9" +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "974e194911d1f7efe3cd8a8f9db3b767e43536327e899e8bc9a12ef5711b74d2" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "image" +version = "0.23.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985fc06b1304d19c28d5c562ed78ef5316183f2b0053b46763a0b94862373c34" dependencies = [ "bytemuck", "byteorder", "num-iter", "num-rational", - "num-traits", + "num-traits 0.2.12", "png", ] @@ -883,9 +987,12 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485" +checksum = "63312a18f7ea8760cdd0a7c5aac1a619752a246b833545e3e36d1f81f7cd9e66" +dependencies = [ + "cfg-if", +] [[package]] name = "iovec" @@ -933,6 +1040,12 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" +[[package]] +name = "lazy-bytes-cast" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10257499f089cd156ad82d0a9cd57d9501fa2c989068992a97eb3c27836f206b" + [[package]] name = "lazy_static" version = "1.4.0" @@ -947,9 +1060,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.77" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235" +checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743" [[package]] name = "libloading" @@ -973,11 +1086,11 @@ dependencies = [ [[package]] name = "line_drawing" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc7ad3d82c845bdb5dde34ffdcc7a5fb4d2996e1e1ee0f19c33bc80e15196b9" +checksum = "f81902e542483002b103c6424d23e765c2e5a65f732923299053a601bce50ab2" dependencies = [ - "num-traits", + "num-traits 0.1.43", ] [[package]] @@ -988,9 +1101,9 @@ checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" [[package]] name = "lock_api" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c" dependencies = [ "scopeguard", ] @@ -1141,34 +1254,48 @@ dependencies = [ [[package]] name = "ndk" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a356cafe20aee088789830bfea3a61336e84ded9e545e00d3869ce95dcb80c" +checksum = "94dc511dd67c2cf232264be20fb98ad0ea93666727d3f6f75429d53e696d6366" dependencies = [ "jni-sys", "ndk-sys", "num_enum", + "thiserror", ] [[package]] name = "ndk-glue" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1730ee2e3de41c3321160a6da815f008c4006d71b095880ea50e17cf52332b8" +checksum = "0b6c938c36cd15ea13d0972fdceb3a03982d49967e5fd7508cf129c5300b66cc" dependencies = [ - "android_log-sys", "lazy_static", "libc", "log", "ndk", + "ndk-macro", "ndk-sys", ] [[package]] -name = "ndk-sys" -version = "0.1.0" +name = "ndk-macro" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2820aca934aba5ed91c79acc72b6a44048ceacc5d36c035ed4e051f12d887d" +checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ndk-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de01535c8fca086732bb66c9bc7779d336c44088d42782cd11d5f2a7ace52f7e" [[package]] name = "net2" @@ -1181,32 +1308,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "nix" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" -dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "void", -] - -[[package]] -name = "nix" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" -dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "void", -] - [[package]] name = "nix" version = "0.18.0" @@ -1254,7 +1355,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" dependencies = [ "autocfg", - "num-traits", + "num-traits 0.2.12", ] [[package]] @@ -1265,7 +1366,7 @@ checksum = "7a6e6b7c748f995c4c29c5f5ae0248536e04a5739927c74ec0fa564805094b9f" dependencies = [ "autocfg", "num-integer", - "num-traits", + "num-traits 0.2.12", ] [[package]] @@ -1276,7 +1377,16 @@ checksum = "a5b4d7360f362cfb50dde8143501e6940b22f644be75a4cc90b2d81968908138" dependencies = [ "autocfg", "num-integer", - "num-traits", + "num-traits 0.2.12", +] + +[[package]] +name = "num-traits" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +dependencies = [ + "num-traits 0.2.12", ] [[package]] @@ -1305,8 +1415,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.21", - "quote 1.0.7", + "proc-macro2", + "quote", "syn", ] @@ -1378,15 +1488,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "ordered-float" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3741934be594d77de1c8461ebcbbe866f585ea616a9753aa78f2bdc69f0e4579" -dependencies = [ - "num-traits", -] - [[package]] name = "osmesa-sys" version = "0.1.2" @@ -1397,23 +1498,34 @@ dependencies = [ ] [[package]] -name = "parking_lot" -version = "0.10.2" +name = "owned_ttf_parser" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +checksum = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" dependencies = [ + "ttf-parser", +] + +[[package]] +name = "parking_lot" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" +dependencies = [ + "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" dependencies = [ "cfg-if", "cloudabi", + "instant", "libc", "redox_syscall", "smallvec", @@ -1505,20 +1617,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "0.4.30" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" dependencies = [ - "unicode-xid 0.1.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e28516df94f3dd551a587da5357459d9b36d945a7c37c3557928c1c2ff2a2c" -dependencies = [ - "unicode-xid 0.2.1", + "unicode-xid", ] [[package]] @@ -1527,22 +1630,13 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - [[package]] name = "quote" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ - "proc-macro2 1.0.21", + "proc-macro2", ] [[package]] @@ -1685,22 +1779,12 @@ checksum = "b725dadae9fabc488df69a287f5a99c5eaf5d10853842a8a3dfac52476f544ee" [[package]] name = "rusttype" -version = "0.7.9" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310942406a39981bed7e12b09182a221a29e0990f3e7e0c971f131922ed135d5" +checksum = "dc7c727aded0be18c5b80c1640eae0ac8e396abf6fa8477d96cb37d18ee5ec59" dependencies = [ - "rusttype 0.8.3", -] - -[[package]] -name = "rusttype" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f61411055101f7b60ecf1041d87fb74205fb20b0c7a723f07ef39174cf6b4c0" -dependencies = [ - "approx", - "ordered-float", - "stb_truetype", + "ab_glyph_rasterizer", + "owned_ttf_parser", ] [[package]] @@ -1747,8 +1831,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" dependencies = [ "bitflags", - "core-foundation", - "core-foundation-sys", + "core-foundation 0.7.0", + "core-foundation-sys 0.7.0", "libc", "security-framework-sys", ] @@ -1759,7 +1843,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" dependencies = [ - "core-foundation-sys", + "core-foundation-sys 0.7.0", "libc", ] @@ -1778,16 +1862,16 @@ version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f630a6370fd8e457873b4bd2ffdae75408bc291ba72be773772a4c2a065d9ae8" dependencies = [ - "proc-macro2 1.0.21", - "quote 1.0.7", + "proc-macro2", + "quote", "syn", ] [[package]] name = "serde_json" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" +checksum = "a230ea9107ca2220eea9d46de97eddcb04cd00e92d13dda78e478dd33fa82bd4" dependencies = [ "itoa", "ryu", @@ -1884,46 +1968,32 @@ checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" [[package]] name = "smithay-client-toolkit" -version = "0.6.6" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "421c8dc7acf5cb205b88160f8b4cc2c5cfabe210e43b2f80f009f4c1ef910f1d" +checksum = "2ec5c077def8af49f9b5aeeb5fcf8079c638c6615c3a8f9305e2dea601de57f7" dependencies = [ "andrew", - "bitflags", - "dlib", - "lazy_static", - "memmap", - "nix 0.14.1", - "wayland-client 0.23.6", - "wayland-protocols 0.23.6", -] - -[[package]] -name = "smithay-client-toolkit" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562da6f2f0836e144f2e92118b35add58368280556af94f399666ebfd7d1e731" -dependencies = [ "bitflags", "byteorder", + "calloop", "dlib", "lazy_static", "log", "memmap", - "nix 0.18.0", - "wayland-client 0.27.0", + "nix", + "wayland-client", "wayland-cursor", - "wayland-protocols 0.27.0", + "wayland-protocols", ] [[package]] name = "smithay-clipboard" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e9db50a9b272938b767b731a1291f22f407315def4049db93871e8828034d5" +checksum = "c55200a03f4a52ed12ed66556992631e1aca6de22ad4347493c093325922f333" dependencies = [ - "smithay-client-toolkit 0.11.0", - "wayland-client 0.27.0", + "smithay-client-toolkit", + "wayland-client", ] [[package]] @@ -1944,15 +2014,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be6c3f39c37a4283ee4b43d1311c828f2e1fb0541e76ea0cb1a2abd9ef2f5b3b" -[[package]] -name = "stb_truetype" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" -dependencies = [ - "byteorder", -] - [[package]] name = "strsim" version = "0.8.0" @@ -1960,14 +2021,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] -name = "syn" -version = "1.0.41" +name = "strsim" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6690e3e9f692504b941dc6c3b188fd28df054f7fb8469ab40680df52fdcc842b" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" + +[[package]] +name = "syn" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228" dependencies = [ - "proc-macro2 1.0.21", - "quote 1.0.7", - "unicode-xid 0.2.1", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] @@ -2017,21 +2084,21 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08" +checksum = "318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" +checksum = "cae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0ab" dependencies = [ - "proc-macro2 1.0.21", - "quote 1.0.7", + "proc-macro2", + "quote", "syn", ] @@ -2064,6 +2131,12 @@ dependencies = [ "serde", ] +[[package]] +name = "ttf-parser" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc" + [[package]] name = "unicase" version = "2.6.0" @@ -2079,12 +2152,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode-xid" version = "0.2.1" @@ -2120,12 +2187,6 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - [[package]] name = "vswhom" version = "0.1.0" @@ -2160,8 +2221,8 @@ name = "vte_generate_state_changes" version = "0.1.1" source = "git+https://github.com/alacritty/vte?rev=4f44023dab081f7da74fee14bc53b10ee8f96a1e#4f44023dab081f7da74fee14bc53b10ee8f96a1e" dependencies = [ - "proc-macro2 1.0.21", - "quote 1.0.7", + "proc-macro2", + "quote", ] [[package]] @@ -2189,131 +2250,81 @@ checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wayland-client" -version = "0.23.6" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1080ebe0efabcf12aef2132152f616038f2d7dcbbccf7b2d8c5270fe14bcda" -dependencies = [ - "bitflags", - "calloop", - "downcast-rs", - "libc", - "mio", - "nix 0.14.1", - "wayland-commons 0.23.6", - "wayland-scanner 0.23.6", - "wayland-sys 0.23.6", -] - -[[package]] -name = "wayland-client" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab702fefbcd6d6f67fb5816e3a89a3b5a42a94290abbc015311c9a30d1068ae4" +checksum = "5147ab4114fa29cbfbd3718c933d8a4487035ff589e2650f29135fc2bc165646" dependencies = [ "bitflags", "downcast-rs", "libc", - "nix 0.17.0", + "nix", "scoped-tls", - "wayland-commons 0.27.0", - "wayland-scanner 0.27.0", - "wayland-sys 0.27.0", + "wayland-commons", + "wayland-scanner", + "wayland-sys", ] [[package]] name = "wayland-commons" -version = "0.23.6" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb66b0d1a27c39bbce712b6372131c6e25149f03ffb0cd017cf8f7de8d66dbdb" +checksum = "01868f14a3f272e6cea0e0f573dd0e3a263552ae99dc5ef9016bd0fbf35f9c2d" dependencies = [ - "nix 0.14.1", - "wayland-sys 0.23.6", -] - -[[package]] -name = "wayland-commons" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e972e9336ad5a9dd861b4e21ff35ad71d3e5c6b4803d65c39913612f851b95f1" -dependencies = [ - "nix 0.17.0", + "nix", "once_cell", "smallvec", - "wayland-sys 0.27.0", + "wayland-sys", ] [[package]] name = "wayland-cursor" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539f346e1a3f706f38c8ccbe1196001e2fb1c9b3e6b605c27d665db2f5b60d41" +checksum = "b1380ceb13377afd20b1ef0045334e6a58cc8f1a80cda285b482a21556924d38" dependencies = [ - "nix 0.17.0", - "wayland-client 0.27.0", + "nix", + "wayland-client", "xcursor", ] [[package]] -name = "wayland-protocols" -version = "0.23.6" +name = "wayland-egl" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cc286643656742777d55dc8e70d144fa4699e426ca8e9d4ef454f4bf15ffcf9" +checksum = "bacd89dedd1006507464c418b9b717ff7e90dd2cc78917675c825de3b1645b6f" dependencies = [ - "bitflags", - "wayland-client 0.23.6", - "wayland-commons 0.23.6", - "wayland-scanner 0.23.6", + "wayland-client", + "wayland-sys", ] [[package]] name = "wayland-protocols" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d6fc54b17b98b5083bc21ae3a30e6d75cb4b01647360e4c3a04648bcf8781d" +checksum = "6d5c56e9eea77f3808cfb3c9e676056542eea4a33a7b0b6075f9bc24fb15f779" dependencies = [ "bitflags", - "wayland-client 0.27.0", - "wayland-commons 0.27.0", - "wayland-scanner 0.27.0", + "wayland-client", + "wayland-commons", + "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.23.6" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93b02247366f395b9258054f964fe293ddd019c3237afba9be2ccbe9e1651c3d" +checksum = "525547bf3c058b8736236037aa510a80b2a29b88145ff02a987cc27f8f92f83c" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "xml-rs", -] - -[[package]] -name = "wayland-scanner" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030f56009d932bd9400bb472764fea8109be1b0fc482d9cd75496c943ac30328" -dependencies = [ - "proc-macro2 1.0.21", - "quote 1.0.7", + "proc-macro2", + "quote", "xml-rs", ] [[package]] name = "wayland-sys" -version = "0.23.6" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d94e89a86e6d6d7c7c9b19ebf48a03afaac4af6bc22ae570e9a24124b75358f4" -dependencies = [ - "dlib", - "lazy_static", -] - -[[package]] -name = "wayland-sys" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bdeffbbb474477dfa2acb45ac7479e5fe8f741c64ab032c5d11b94d07edc269" +checksum = "d3dc1723584b6d204bbc3d15e361ee6a20d863ba8d4237842284eb3ff4f1b9a4" dependencies = [ "dlib", "lazy_static", @@ -2374,14 +2385,14 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winit" -version = "0.22.2" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4ccbf7ddb6627828eace16cacde80fc6bf4dbb3469f88487262a02cf8e7862" +checksum = "b5bc559da567d8aa671bbcd08304d49e982c7bf2cb91e10288b9188931c1b772" dependencies = [ "bitflags", - "cocoa", - "core-foundation", - "core-graphics", + "cocoa 0.23.0", + "core-foundation 0.9.1", + "core-graphics 0.22.1", "core-video-sys", "dispatch", "instant", @@ -2398,8 +2409,8 @@ dependencies = [ "percent-encoding", "raw-window-handle", "serde", - "smithay-client-toolkit 0.6.6", - "wayland-client 0.23.6", + "smithay-client-toolkit", + "wayland-client", "winapi 0.3.9", "x11-dl", ] diff --git a/alacritty.yml b/alacritty.yml index fd13c2b9..8398235d 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -691,39 +691,42 @@ #- { key: N, mods: Shift, mode: Vi, action: SearchPrevious } # (Windows, Linux, and BSD only) - #- { key: V, mods: Control|Shift, action: Paste } - #- { key: C, mods: Control|Shift, action: Copy } - #- { key: F, mods: Control|Shift, action: SearchForward } - #- { key: B, mods: Control|Shift, action: SearchBackward } - #- { key: C, mods: Control|Shift, mode: Vi, action: ClearSelection } - #- { key: Insert, mods: Shift, action: PasteSelection } - #- { key: Key0, mods: Control, action: ResetFontSize } - #- { key: Equals, mods: Control, action: IncreaseFontSize } - #- { key: Add, mods: Control, action: IncreaseFontSize } - #- { key: Subtract, mods: Control, action: DecreaseFontSize } - #- { key: Minus, mods: Control, action: DecreaseFontSize } + #- { key: V, mods: Control|Shift, action: Paste } + #- { key: C, mods: Control|Shift, action: Copy } + #- { key: F, mods: Control|Shift, action: SearchForward } + #- { key: B, mods: Control|Shift, action: SearchBackward } + #- { key: C, mods: Control|Shift, mode: Vi, action: ClearSelection } + #- { key: Insert, mods: Shift, action: PasteSelection } + #- { key: Key0, mods: Control, action: ResetFontSize } + #- { key: Equals, mods: Control, action: IncreaseFontSize } + #- { key: Plus, mods: Control, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } # (Windows only) #- { key: Return, mods: Alt, action: ToggleFullscreen } # (macOS only) - #- { key: K, mods: Command, mode: ~Vi, chars: "\x0c" } - #- { key: Key0, mods: Command, action: ResetFontSize } - #- { key: Equals, mods: Command, action: IncreaseFontSize } - #- { key: Add, mods: Command, action: IncreaseFontSize } - #- { key: Minus, mods: Command, action: DecreaseFontSize } - #- { key: K, mods: Command, action: ClearHistory } - #- { key: V, mods: Command, action: Paste } - #- { key: C, mods: Command, action: Copy } - #- { key: C, mods: Command, mode: Vi, action: ClearSelection } - #- { key: H, mods: Command, action: Hide } - #- { key: M, mods: Command, action: Minimize } - #- { key: Q, mods: Command, action: Quit } - #- { key: W, mods: Command, action: Quit } - #- { key: N, mods: Command, action: SpawnNewInstance } - #- { key: F, mods: Command|Control, action: ToggleFullscreen } - #- { key: F, mods: Command, action: SearchForward } - #- { key: B, mods: Command, action: SearchBackward } + #- { key: K, mods: Command, mode: ~Vi, chars: "\x0c" } + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Plus, mods: Command, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } + #- { key: K, mods: Command, action: ClearHistory } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: C, mods: Command, mode: Vi, action: ClearSelection } + #- { key: H, mods: Command, action: Hide } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: N, mods: Command, action: SpawnNewInstance } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + #- { key: F, mods: Command, action: SearchForward } + #- { key: B, mods: Command, action: SearchBackward } #debug: # Display the time it takes to redraw each frame. diff --git a/alacritty/Cargo.toml b/alacritty/Cargo.toml index 74935323..1bacd0cf 100644 --- a/alacritty/Cargo.toml +++ b/alacritty/Cargo.toml @@ -21,9 +21,9 @@ fnv = "1" serde = { version = "1", features = ["derive"] } serde_yaml = "0.8" serde_json = "1" -glutin = { version = "0.24.0", features = ["serde"] } +glutin = { version = "0.25.0", features = ["serde"] } notify = "4" -parking_lot = "0.10.2" +parking_lot = "0.11.0" crossfont = { version = "0.1.0", features = ["force_system_fontconfig"] } urlocator = "0.1.3" copypasta = { version = "0.7.0", default-features = false } @@ -48,7 +48,7 @@ dirs = "2.0.2" [target.'cfg(not(any(target_os="windows", target_os="macos")))'.dependencies] x11-dl = "2" -wayland-client = { version = "0.27.0", features = ["dlopen"] } +wayland-client = { version = "0.28.0", features = ["dlopen"] } [target.'cfg(windows)'.dependencies] winapi = { version = "0.3.7", features = ["impl-default", "wincon"]} diff --git a/alacritty/src/config/bindings.rs b/alacritty/src/config/bindings.rs index 74514a5a..62da0e6c 100644 --- a/alacritty/src/config/bindings.rs +++ b/alacritty/src/config/bindings.rs @@ -494,9 +494,10 @@ fn common_keybindings() -> Vec { Insert, ModifiersState::SHIFT, ~TermMode::VI; Action::PasteSelection; Key0, ModifiersState::CTRL; Action::ResetFontSize; Equals, ModifiersState::CTRL; Action::IncreaseFontSize; - Add, ModifiersState::CTRL; Action::IncreaseFontSize; - Subtract, ModifiersState::CTRL; Action::DecreaseFontSize; - Minus, ModifiersState::CTRL; Action::DecreaseFontSize; + Plus, ModifiersState::CTRL; Action::IncreaseFontSize; + NumpadAdd, ModifiersState::CTRL; Action::IncreaseFontSize; + Minus, ModifiersState::CTRL; Action::DecreaseFontSize; + NumpadSubtract, ModifiersState::CTRL; Action::DecreaseFontSize; ) } @@ -521,8 +522,10 @@ pub fn platform_key_bindings() -> Vec { KeyBinding; Key0, ModifiersState::LOGO; Action::ResetFontSize; Equals, ModifiersState::LOGO; Action::IncreaseFontSize; - Add, ModifiersState::LOGO; Action::IncreaseFontSize; - Minus, ModifiersState::LOGO; Action::DecreaseFontSize; + Plus, ModifiersState::LOGO; Action::IncreaseFontSize; + NumpadAdd, ModifiersState::LOGO; Action::IncreaseFontSize; + Minus, ModifiersState::LOGO; Action::DecreaseFontSize; + NumpadSubtract, ModifiersState::LOGO; Action::DecreaseFontSize; Insert, ModifiersState::SHIFT, ~TermMode::VI; Action::Esc("\x1b[2;2~".into()); K, ModifiersState::LOGO, ~TermMode::VI; Action::Esc("\x0c".into()); V, ModifiersState::LOGO, ~TermMode::VI; Action::Paste; diff --git a/alacritty/src/config/window.rs b/alacritty/src/config/window.rs index d2e5da68..17c9de5c 100644 --- a/alacritty/src/config/window.rs +++ b/alacritty/src/config/window.rs @@ -1,5 +1,6 @@ use std::os::raw::c_ulong; +use glutin::window::Fullscreen; use log::error; use serde::{Deserialize, Deserializer}; use serde_yaml::Value; @@ -98,6 +99,20 @@ impl WindowConfig { let padding_y = (f32::from(self.padding.y) * dpr as f32).floor(); (padding_x, padding_y) } + + #[inline] + pub fn fullscreen(&self) -> Option { + if self.startup_mode == StartupMode::Fullscreen { + Some(Fullscreen::Borderless(None)) + } else { + None + } + } + + #[inline] + pub fn maximized(&self) -> bool { + self.startup_mode == StartupMode::Maximized + } } impl Default for WindowConfig { diff --git a/alacritty/src/display.rs b/alacritty/src/display.rs index 0b493936..a30d7ad2 100644 --- a/alacritty/src/display.rs +++ b/alacritty/src/display.rs @@ -31,7 +31,9 @@ use alacritty_terminal::term::{RenderableCell, SizeInfo, Term, TermMode}; use alacritty_terminal::term::{MIN_COLS, MIN_SCREEN_LINES}; use crate::config::font::Font; -use crate::config::window::{Dimensions, StartupMode}; +use crate::config::window::Dimensions; +#[cfg(not(windows))] +use crate::config::window::StartupMode; use crate::config::Config; use crate::event::{Mouse, SearchState}; use crate::message_bar::{MessageBuffer, MessageType}; @@ -275,12 +277,12 @@ impl Display { } #[allow(clippy::single_match)] + #[cfg(not(windows))] match config.ui_config.window.startup_mode { - StartupMode::Fullscreen => window.set_fullscreen(true), #[cfg(target_os = "macos")] StartupMode::SimpleFullscreen => window.set_simple_fullscreen(true), - #[cfg(not(any(target_os = "macos", windows)))] - StartupMode::Maximized => window.set_maximized(true), + #[cfg(not(target_os = "macos"))] + StartupMode::Maximized if is_x11 => window.set_maximized(true), _ => (), } diff --git a/alacritty/src/wayland_theme.rs b/alacritty/src/wayland_theme.rs index b1d4b44c..b9c4381e 100644 --- a/alacritty/src/wayland_theme.rs +++ b/alacritty/src/wayland_theme.rs @@ -1,26 +1,30 @@ -use glutin::platform::unix::{ButtonState, Theme as WaylandTheme}; +use glutin::platform::unix::{ARGBColor, Button, ButtonState, Element, Theme as WaylandTheme}; use alacritty_terminal::config::Colors; -use alacritty_terminal::term::color::{Rgb, DIM_FACTOR}; +use alacritty_terminal::term::color::Rgb; + +const INACTIVE_OPACITY: u8 = 127; #[derive(Debug, Clone)] pub struct AlacrittyWaylandTheme { - pub background: Rgb, - pub foreground: Rgb, - pub dim_foreground: Rgb, - pub hovered_close_icon: Rgb, - pub hovered_maximize_icon: Rgb, - pub hovered_minimize_icon: Rgb, + pub background: ARGBColor, + pub foreground: ARGBColor, + pub dim_foreground: ARGBColor, + pub hovered_close_icon: ARGBColor, + pub hovered_maximize_icon: ARGBColor, + pub hovered_minimize_icon: ARGBColor, } impl AlacrittyWaylandTheme { pub fn new(colors: &Colors) -> Self { - let hovered_close_icon = colors.normal().red; - let hovered_maximize_icon = colors.normal().green; - let hovered_minimize_icon = colors.normal().yellow; - let foreground = colors.primary.foreground; - let background = colors.primary.background; - let dim_foreground = colors.primary.dim_foreground.unwrap_or(foreground * DIM_FACTOR); + let hovered_close_icon = colors.normal().red.into_rgba(); + let hovered_maximize_icon = colors.normal().green.into_rgba(); + let hovered_minimize_icon = colors.normal().yellow.into_rgba(); + let foreground = colors.search_bar_foreground().into_rgba(); + let background = colors.search_bar_background().into_rgba(); + + let mut dim_foreground = foreground; + dim_foreground.a = INACTIVE_OPACITY; Self { foreground, @@ -31,52 +35,46 @@ impl AlacrittyWaylandTheme { hovered_maximize_icon, } } - - fn color_icon_color(&self, color: Rgb, status: ButtonState) -> [u8; 4] { - match status { - ButtonState::Hovered => [0xff, color.r, color.g, color.b], - ButtonState::Idle => [0xff, self.foreground.r, self.foreground.g, self.foreground.b], - ButtonState::Disabled => { - [0xff, self.dim_foreground.r, self.dim_foreground.g, self.dim_foreground.b] - }, - } - } } impl WaylandTheme for AlacrittyWaylandTheme { - fn primary_color(&self, _window_active: bool) -> [u8; 4] { - [0xff, self.background.r, self.background.g, self.background.b] - } - - fn secondary_color(&self, window_active: bool) -> [u8; 4] { - if window_active { - [0xff, self.foreground.r, self.foreground.g, self.foreground.b] - } else { - [0xff, self.dim_foreground.r, self.dim_foreground.g, self.dim_foreground.b] + fn element_color(&self, element: Element, window_active: bool) -> ARGBColor { + match element { + Element::Bar | Element::Separator => self.background, + Element::Text if window_active => self.foreground, + Element::Text => self.dim_foreground, } } - fn close_button_color(&self, _status: ButtonState) -> [u8; 4] { - [0x00, self.background.r, self.background.g, self.background.b] - } + fn button_color( + &self, + button: Button, + state: ButtonState, + foreground: bool, + window_active: bool, + ) -> ARGBColor { + if !foreground { + return ARGBColor { a: 0, r: 0, g: 0, b: 0 }; + } else if !window_active { + return self.dim_foreground; + } - fn close_button_icon_color(&self, status: ButtonState) -> [u8; 4] { - self.color_icon_color(self.hovered_close_icon, status) - } - - fn maximize_button_color(&self, _status: ButtonState) -> [u8; 4] { - [0x00, self.background.r, self.background.g, self.background.b] - } - - fn maximize_button_icon_color(&self, status: ButtonState) -> [u8; 4] { - self.color_icon_color(self.hovered_maximize_icon, status) - } - - fn minimize_button_color(&self, _status: ButtonState) -> [u8; 4] { - [0x00, self.background.r, self.background.g, self.background.b] - } - - fn minimize_button_icon_color(&self, status: ButtonState) -> [u8; 4] { - self.color_icon_color(self.hovered_minimize_icon, status) + match (state, button) { + (ButtonState::Idle, _) => self.foreground, + (ButtonState::Disabled, _) => self.dim_foreground, + (_, Button::Minimize) => self.hovered_minimize_icon, + (_, Button::Maximize) => self.hovered_maximize_icon, + (_, Button::Close) => self.hovered_close_icon, + } + } +} + +trait IntoARGBColor { + fn into_rgba(self) -> ARGBColor; +} + +impl IntoARGBColor for Rgb { + fn into_rgba(self) -> ARGBColor { + ARGBColor { a: 0xff, r: self.r, g: self.g, b: self.b } } } diff --git a/alacritty/src/window.rs b/alacritty/src/window.rs index 92fedc86..1d3b0774 100644 --- a/alacritty/src/window.rs +++ b/alacritty/src/window.rs @@ -36,7 +36,7 @@ use winapi::shared::minwindef::WORD; use alacritty_terminal::index::Point; use alacritty_terminal::term::SizeInfo; -use crate::config::window::{Decorations, StartupMode, WindowConfig}; +use crate::config::window::{Decorations, WindowConfig}; use crate::config::Config; use crate::gl; @@ -259,7 +259,8 @@ impl Window { .with_visible(false) .with_transparent(true) .with_decorations(window_config.decorations != Decorations::None) - .with_maximized(window_config.startup_mode == StartupMode::Maximized) + .with_maximized(window_config.maximized()) + .with_fullscreen(window_config.fullscreen()) .with_window_icon(icon.ok()) // X11. .with_class(class.instance.clone(), class.general.clone()) @@ -282,7 +283,8 @@ impl Window { .with_visible(false) .with_decorations(window_config.decorations != Decorations::None) .with_transparent(true) - .with_maximized(window_config.startup_mode == StartupMode::Maximized) + .with_maximized(window_config.maximized()) + .with_fullscreen(window_config.fullscreen()) .with_window_icon(icon.ok()) } @@ -292,7 +294,8 @@ impl Window { .with_title(title) .with_visible(false) .with_transparent(true) - .with_maximized(window_config.startup_mode == StartupMode::Maximized); + .with_maximized(window_config.maximized()) + .with_fullscreen(window_config.fullscreen()); match window_config.decorations { Decorations::Full => window, @@ -360,8 +363,7 @@ impl Window { pub fn set_fullscreen(&mut self, fullscreen: bool) { if fullscreen { - let current_monitor = self.window().current_monitor(); - self.window().set_fullscreen(Some(Fullscreen::Borderless(current_monitor))); + self.window().set_fullscreen(Some(Fullscreen::Borderless(None))); } else { self.window().set_fullscreen(None); } diff --git a/alacritty_terminal/Cargo.toml b/alacritty_terminal/Cargo.toml index 7dfa5b09..83c5b416 100644 --- a/alacritty_terminal/Cargo.toml +++ b/alacritty_terminal/Cargo.toml @@ -11,7 +11,7 @@ edition = "2018" [dependencies] libc = "0.2" bitflags = "1" -parking_lot = "0.10.2" +parking_lot = "0.11.0" serde = { version = "1", features = ["derive"] } serde_yaml = "0.8" vte = { git = "https://github.com/alacritty/vte", rev = "4f44023dab081f7da74fee14bc53b10ee8f96a1e", default-features = false } @@ -24,7 +24,7 @@ terminfo = "0.7.1" regex-automata = "0.1.9" [target.'cfg(unix)'.dependencies] -nix = "0.17.0" +nix = "0.18.0" signal-hook = { version = "0.1", features = ["mio-support"] } [target.'cfg(windows)'.dependencies] diff --git a/alacritty_terminal/src/term/color.rs b/alacritty_terminal/src/term/color.rs index 104fcfe5..8626cda5 100644 --- a/alacritty_terminal/src/term/color.rs +++ b/alacritty_terminal/src/term/color.rs @@ -1,5 +1,5 @@ use std::fmt::{self, Display, Formatter}; -use std::ops::{Index, IndexMut, Mul}; +use std::ops::{Add, Index, IndexMut, Mul}; use std::str::FromStr; use log::trace; @@ -75,6 +75,18 @@ impl Mul for Rgb { } } +impl Add for Rgb { + type Output = Rgb; + + fn add(self, rhs: Rgb) -> Rgb { + Rgb { + r: self.r.saturating_add(rhs.r), + g: self.g.saturating_add(rhs.g), + b: self.b.saturating_add(rhs.b), + } + } +} + /// Deserialize an Rgb from a hex string. /// /// This is *not* the deserialize impl for Rgb since we want a symmetric