diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-07-29 17:08:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-29 17:08:08 +0200 |
| commit | cab75c58fec089d7ee97c0e7ca1abafa9ef5e33f (patch) | |
| tree | 38b32141c6f27efd4eb2e19b6fd70834ce98ac4e | |
| parent | Dep upgrades for debian (#5420) (diff) | |
| download | sl0ppij-cab75c58fec089d7ee97c0e7ca1abafa9ef5e33f.tar.gz sl0ppij-cab75c58fec089d7ee97c0e7ca1abafa9ef5e33f.tar.xz sl0ppij-cab75c58fec089d7ee97c0e7ca1abafa9ef5e33f.zip | |
More dependency upgrades for debian (#5421)
* upgrade insta, rand, sha2, strum, thiserror, tokio-tungstenite, toml, which; drop unused semver and typetag
* upgrade sysinfo to 0.39.5, bump toolchain (msrv) to 1.95.0
* remote legacy yaml config converter and thus drop serde_yaml
* upgrade unicode-width to 0.2.2
* fix(tests): run ipc roundtrip test on a larger stack
75 files changed, 358 insertions, 12031 deletions
@@ -6,7 +6,7 @@ version = 4 name = "about" version = "0.1.0" dependencies = [ - "rand 0.9.0", + "rand 0.10.2", "zellij-tile", ] @@ -118,7 +118,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -129,7 +129,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -334,7 +334,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -374,6 +374,15 @@ dependencies = [ ] [[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 = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -488,6 +497,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] +name = "chacha20" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + +[[package]] name = "chrono" version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -582,7 +602,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -596,7 +616,7 @@ name = "compact-bar" version = "0.1.0" dependencies = [ "ansi_term", - "unicode-width 0.1.14", + "unicode-width 0.2.2", "zellij-tile", "zellij-tile-utils", ] @@ -623,7 +643,7 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31" dependencies = [ - "encode_unicode", + "encode_unicode 0.3.6", "libc", "once_cell", "regex", @@ -633,6 +653,17 @@ dependencies = [ ] [[package]] +name = "console" +version = "0.16.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fe5f465a4f6fee88fad41b85d990f84c835335e85b5d9e6e63e0d06d28cba7c" +dependencies = [ + "encode_unicode 1.0.0", + "libc", + "windows-sys 0.61.2", +] + +[[package]] name = "cookie" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -669,6 +700,15 @@ dependencies = [ ] [[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + +[[package]] name = "crossbeam" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -773,13 +813,12 @@ dependencies = [ ] [[package]] -name = "ctor" -version = "0.1.22" +name = "crypto-common" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" dependencies = [ - "quote", - "syn 1.0.96", + "hybrid-array", ] [[package]] @@ -854,7 +893,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" dependencies = [ - "console", + "console 0.15.0", "shell-words", "thiserror 1.0.61", "zeroize", @@ -866,8 +905,18 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", - "crypto-common", + "block-buffer 0.10.4", + "crypto-common 0.1.6", +] + +[[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", + "crypto-common 0.2.2", ] [[package]] @@ -908,7 +957,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.2", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -976,6 +1025,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + +[[package]] name = "encoding_rs" version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -991,15 +1046,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "erased-serde" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad132dd8d0d0b546348d7d86cb3191aad14b34e5f979781fc005c80d4ac67ffd" -dependencies = [ - "serde", -] - -[[package]] name = "errno" version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1311,14 +1357,15 @@ dependencies = [ ] [[package]] -name = "ghost" -version = "0.1.4" +name = "getrandom" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c813ffb63e8fd3df6f1ac3cc1ea392c7612ac2de4d0b44dcbfe03e5c4bf94a" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.96", + "cfg-if", + "libc", + "r-efi", + "rand_core 0.10.1", ] [[package]] @@ -1339,7 +1386,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.7.1", + "indexmap 2.14.0", "slab", "tokio", "tokio-util", @@ -1383,6 +1430,12 @@ dependencies = [ ] [[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] name = "hashlink" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1482,6 +1535,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] +name = "hybrid-array" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "818356c5132c1fede50f837ca96afbe78ff42413047f4abb886217845e1b6c8c" +dependencies = [ + "typenum", +] + +[[package]] name = "hyper" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1673,12 +1735,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown 0.17.1", ] [[package]] @@ -1703,16 +1765,14 @@ dependencies = [ [[package]] name = "insta" -version = "1.14.0" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "689960f187c43c01650c805fb6bc6f55ab944499d86d4ffe9474ad78991d8e94" +checksum = "86f0f8fee8c926415c58d6ae43a08523a26faccb2323f5e6b644fe7dd4ef6b82" dependencies = [ - "console", + "console 0.16.4", "once_cell", - "serde", - "serde_json", - "serde_yaml", "similar", + "tempfile", ] [[package]] @@ -1740,16 +1800,6 @@ dependencies = [ ] [[package]] -name = "inventory" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84344c6e0b90a9e2b6f3f9abe5cc74402684e348df7b32adca28747e0cef091a" -dependencies = [ - "ctor", - "ghost", -] - -[[package]] name = "io-extras" version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1850,7 +1900,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" dependencies = [ "hashbrown 0.16.1", - "thiserror 2.0.12", + "thiserror 2.0.19", ] [[package]] @@ -1891,7 +1941,7 @@ dependencies = [ "fuzzy-matcher", "miette 7.6.0", "strip-ansi-escapes", - "unicode-width 0.1.14", + "unicode-width 0.2.2", "zellij-tile", ] @@ -1996,12 +2046,6 @@ dependencies = [ ] [[package]] -name = "linked-hash-map" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" - -[[package]] name = "linux-raw-sys" version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2183,7 +2227,7 @@ name = "mobile" version = "0.1.0" dependencies = [ "fuzzy-matcher", - "unicode-width 0.1.14", + "unicode-width 0.2.2", "zellij-tile", ] @@ -2462,17 +2506,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] -name = "pest" -version = "2.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" -dependencies = [ - "memchr", - "thiserror 2.0.12", - "ucd-trie", -] - -[[package]] name = "petgraph" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2643,6 +2676,12 @@ dependencies = [ ] [[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] name = "rand" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2665,6 +2704,17 @@ dependencies = [ ] [[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + +[[package]] name = "rand_chacha" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2704,6 +2754,12 @@ dependencies = [ ] [[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] name = "rcgen" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2759,7 +2815,7 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.10", "libredox", - "thiserror 2.0.12", + "thiserror 2.0.19", ] [[package]] @@ -2819,7 +2875,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.27", + "semver", ] [[package]] @@ -2845,7 +2901,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -2991,29 +3047,11 @@ dependencies = [ [[package]] name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] name = "serde" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3067,9 +3105,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ "serde_core", ] @@ -3087,18 +3125,6 @@ dependencies = [ ] [[package]] -name = "serde_yaml" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707d15895415db6628332b737c838b88c598522e4dc70647e59b72312924aebc" -dependencies = [ - "indexmap 1.8.2", - "ryu", - "serde", - "yaml-rust", -] - -[[package]] name = "serial_test" version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3129,7 +3155,7 @@ version = "0.1.0" dependencies = [ "fuzzy-matcher", "humantime", - "unicode-width 0.1.14", + "unicode-width 0.2.2", "uuid", "zellij-tile", ] @@ -3141,19 +3167,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.2.2", + "digest 0.10.7", ] [[package]] name = "sha2" -version = "0.10.8" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.3.0", + "digest 0.11.3", ] [[package]] @@ -3313,12 +3339,12 @@ version = "0.1.0" dependencies = [ "ansi_term", "lazy_static", - "rand 0.9.0", + "rand 0.10.2", "regex", "serde", "serde_json", - "thiserror 1.0.61", - "unicode-width 0.1.14", + "thiserror 2.0.19", + "unicode-width 0.2.2", "zellij-tile", "zellij-tile-utils", ] @@ -3329,7 +3355,7 @@ version = "0.2.0" dependencies = [ "fuzzy-matcher", "pretty-bytes", - "unicode-width 0.1.14", + "unicode-width 0.2.2", "zellij-tile", ] @@ -3360,15 +3386,15 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" [[package]] name = "strum_macros" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" dependencies = [ "heck", "proc-macro2", @@ -3464,9 +3490,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.37.2" +version = "0.39.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16607d5caffd1c07ce073528f9ed972d88db15dd44023fa57142963be3feb11f" +checksum = "d2071df9448915b71c4fe6d25deaf1c22f12bd234f01540b77312bb8e41361e6" dependencies = [ "libc", "memchr", @@ -3497,7 +3523,7 @@ name = "tab-bar" version = "0.1.0" dependencies = [ "ansi_term", - "unicode-width 0.1.14", + "unicode-width 0.2.2", "zellij-tile", "zellij-tile-utils", ] @@ -3531,7 +3557,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874" dependencies = [ "rustix 1.1.2", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3541,7 +3567,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" dependencies = [ "unicode-linebreak", - "unicode-width 0.2.1", + "unicode-width 0.2.2", ] [[package]] @@ -3555,11 +3581,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.19", ] [[package]] @@ -3575,13 +3601,13 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 3.0.3", ] [[package]] @@ -3697,26 +3723,26 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" dependencies = [ "futures-util", "log", "tokio", - "tungstenite 0.20.1", + "tungstenite 0.26.2", ] [[package]] name = "tokio-tungstenite" -version = "0.26.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" +checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" dependencies = [ "futures-util", "log", "tokio", - "tungstenite 0.26.2", + "tungstenite 0.28.0", ] [[package]] @@ -3735,26 +3761,32 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.10" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "ae2a4cf385da23d1d53bc15cdfa5c2109e93d8d362393c801e87da2f72f0e201" dependencies = [ - "serde", + "indexmap 2.14.0", + "serde_core", + "serde_spanned", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.15", ] [[package]] name = "toml" -version = "0.9.6" +version = "1.1.4+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae2a4cf385da23d1d53bc15cdfa5c2109e93d8d362393c801e87da2f72f0e201" +checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.14.0", "serde_core", "serde_spanned", - "toml_datetime", + "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", "toml_writer", - "winnow", + "winnow 1.0.4", ] [[package]] @@ -3767,19 +3799,28 @@ dependencies = [ ] [[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] name = "toml_parser" -version = "1.0.9+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" dependencies = [ - "winnow", + "winnow 1.0.4", ] [[package]] name = "toml_writer" -version = "1.0.6+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" [[package]] name = "tower" @@ -3867,28 +3908,26 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" dependencies = [ - "byteorder", "bytes", "data-encoding", - "http 0.2.9", + "http 1.3.1", "httparse", "log", - "rand 0.8.5", + "rand 0.9.0", "sha1", - "thiserror 1.0.61", - "url", + "thiserror 2.0.19", "utf-8", ] [[package]] name = "tungstenite" -version = "0.26.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" +checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" dependencies = [ "bytes", "data-encoding", @@ -3897,45 +3936,15 @@ dependencies = [ "log", "rand 0.9.0", "sha1", - "thiserror 2.0.12", + "thiserror 2.0.19", "utf-8", ] [[package]] name = "typenum" -version = "1.15.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" - -[[package]] -name = "typetag" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4080564c5b2241b5bff53ab610082234e0c57b0417f4bd10596f183001505b8a" -dependencies = [ - "erased-serde", - "inventory", - "once_cell", - "serde", - "typetag-impl", -] - -[[package]] -name = "typetag-impl" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e60147782cc30833c05fba3bab1d9b5771b2685a2557672ac96fa5d154099c0e" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.96", -] - -[[package]] -name = "ucd-trie" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "unicode-ident" @@ -3957,9 +3966,9 @@ checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-width" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "untrusted" @@ -4113,7 +4122,7 @@ dependencies = [ "log", "rustix 1.1.2", "system-interface", - "thiserror 2.0.12", + "thiserror 2.0.19", "tracing", "wiggle", "windows-sys 0.60.2", @@ -4242,7 +4251,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9d90bb93e764f6beabf1d02028c70a2156a6583e63ac4218dd07ef733368b0" dependencies = [ "bitflags 2.11.0", - "indexmap 2.7.1", + "indexmap 2.14.0", ] [[package]] @@ -4263,7 +4272,7 @@ dependencies = [ "bumpalo", "leb128fmt", "memchr", - "unicode-width 0.2.1", + "unicode-width 0.2.2", "wasm-encoder", ] @@ -4287,12 +4296,10 @@ dependencies = [ [[package]] name = "which" -version = "4.2.5" +version = "8.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" +checksum = "8f3ef584124b911bcc3875c2f1472e80f24361ceb789bd1c62b3e9a3df9ff43c" dependencies = [ - "either", - "lazy_static", "libc", ] @@ -4311,7 +4318,7 @@ dependencies = [ "anyhow", "async-trait", "bitflags 2.11.0", - "thiserror 2.0.12", + "thiserror 2.0.19", "tracing", "wiggle-macro", ] @@ -4375,24 +4382,23 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.61.3" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ "windows-collections", - "windows-core 0.61.2", + "windows-core 0.62.2", "windows-future", - "windows-link 0.1.3", "windows-numerics", ] [[package]] name = "windows-collections" -version = "0.2.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ - "windows-core 0.61.2", + "windows-core 0.62.2", ] [[package]] @@ -4406,25 +4412,25 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", - "windows-link 0.1.3", + "windows-link", "windows-result", "windows-strings", ] [[package]] name = "windows-future" -version = "0.2.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", + "windows-core 0.62.2", + "windows-link", "windows-threading", ] @@ -4452,42 +4458,36 @@ dependencies = [ [[package]] name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-numerics" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", + "windows-core 0.62.2", + "windows-link", ] [[package]] name = "windows-result" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link 0.1.3", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-link 0.1.3", + "windows-link", ] [[package]] @@ -4527,6 +4527,15 @@ dependencies = [ ] [[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] name = "windows-targets" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4563,7 +4572,7 @@ version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link 0.2.1", + "windows-link", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", @@ -4576,11 +4585,11 @@ dependencies = [ [[package]] name = "windows-threading" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" dependencies = [ - "windows-link 0.1.3", + "windows-link", ] [[package]] @@ -4728,6 +4737,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" [[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" + +[[package]] name = "winreg" version = "0.55.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4811,22 +4826,13 @@ dependencies = [ "anyhow", "prost-build", "serde_json", - "toml 0.5.10", + "toml 1.1.4+spec-1.1.0", "which", "xflags", "xshell", ] [[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - -[[package]] name = "yasna" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4873,11 +4879,11 @@ dependencies = [ "log", "miette 7.6.0", "names", - "rand 0.9.0", + "rand 0.10.2", "regex", "ssh2", "suggest", - "thiserror 1.0.61", + "thiserror 2.0.19", "vte 0.15.0", "zellij-client", "zellij-server", @@ -4914,14 +4920,13 @@ dependencies = [ "rustls-pki-types", "serde", "serde_json", - "serde_yaml", "serial_test", "signal-hook", "tempfile", "time", "tokio", "tokio-rustls", - "tokio-tungstenite 0.20.1", + "tokio-tungstenite 0.28.0", "tokio-util", "tower-http", "url", @@ -4979,7 +4984,6 @@ dependencies = [ "once_cell", "prost", "regex", - "semver 0.11.0", "serde", "serde_json", "signal-hook", @@ -4988,8 +4992,7 @@ dependencies = [ "sysinfo", "tempfile", "tokio", - "typetag", - "unicode-width 0.1.14", + "unicode-width 0.2.2", "url", "uuid", "vte 0.15.0", @@ -5063,11 +5066,11 @@ dependencies = [ "strum_macros", "suggest", "tempfile", - "thiserror 1.0.61", + "thiserror 2.0.19", "tokio", "tokio-stream", "tokio-util", - "unicode-width 0.1.14", + "unicode-width 0.2.2", "url", "uuid", "winapi", @@ -34,7 +34,7 @@ isahc = { workspace = true } embed-resource = "3" [dev-dependencies] -insta = { version = "1.6.0", features = ["backtrace"] } +insta = "1.48" ssh2 = "0.9.1" rand = { workspace = true } regex = { workspace = true } @@ -72,7 +72,7 @@ license = "MIT" repository = "https://github.com/zellij-org/zellij" version = "0.45.0" # NOTE: When updating this, modify `channel` in `rust-toolchain.toml` accordingly -rust-version = "1.92" +rust-version = "1.95" [workspace.dependencies] ansi_term = { version = "0.12.1", default-features = false } @@ -98,27 +98,27 @@ notify = { version = "8.2", default-features = false, features = ["macos_kqueue" num_cpus = { version = "1.16", default-features = false } pretty-bytes = { version = "0.2.2", default-features = false } prost = { version = "0.12.6", default-features = false, features = ["std", "prost-derive"] } -rand = { version = "0.9", default-features = false, features = ["std", "std_rng", "thread_rng"] } +rand = { version = "0.10.2", default-features = false, features = ["std", "std_rng", "thread_rng"] } regex = { version = "1.5.5", default-features = false, features = ["perf", "std", "unicode-perl"] } serde = { version = "1.0", default-features = false, features = ["derive", "std"] } serde_json = { version = "1.0", default-features = false, features = ["std"] } signal-hook = { version = "0.3", default-features = false, features = ["iterator"] } strip-ansi-escapes = { version = "0.2.1", default-features = false } -strum = { version = "0.27.2", default-features = false, features = ["std"] } -strum_macros = { version = "0.27.2", default-features = false } +strum = { version = "0.28.0", default-features = false, features = ["std"] } +strum_macros = { version = "0.28.0", default-features = false } suggest = { version = "0.5.1", default-features = false } tempfile = { version = "3.2.0", default-features = false } tokio = { version = "1.40", default-features = false, features = ["fs", "rt-multi-thread", "macros", "time", "process", "signal", "io-util", "io-std", "net"] } -thiserror = { version = "1.0.40", default-features = false } +thiserror = { version = "2.0.18", default-features = false, features = ["std"] } tokio-util = { version = "0.7.15" } -unicode-width = { version = "0.1.8", default-features = false } +unicode-width = { version = "0.2.2", default-features = false } url = { version = "2.2.2", default-features = false, features = ["serde"] } uuid = { version = "1.4.1", default-features = false, features = ["serde", "v4", "std"] } vte = { version = "0.15", default-features = false, features = ["std"] } windows-sys = { version = "0.59", default-features = false } names = { version = "0.14.0", default-features = false } include_dir = { version = "0.7.3", default-features = false } -sha2 = { version = "0.10", default-features = false } +sha2 = { version = "0.11", default-features = false } zellij-utils = { path = "zellij-utils/", version = "0.45.0" } [profile.dev] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 2fff3a35..b628ec29 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,7 +1,7 @@ # This file is updated by `update-toolchain.sh` [toolchain] # NOTE: When updating this, modify `rust-version` in `Cargo.toml` accordingly -channel = "1.92.0" +channel = "1.95.0" components = ["rustfmt", "clippy"] # NOTE: Change this with care, this is also used by the CI pipeline targets = ["wasm32-wasip1", "x86_64-unknown-linux-musl"] diff --git a/src/commands.rs b/src/commands.rs index bc561a75..fb53ad93 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1,16 +1,12 @@ use dialoguer::Confirm; use std::net::IpAddr; -use std::{fs::File, io::prelude::*, path::PathBuf, process, time::Duration}; +use std::{path::PathBuf, process, time::Duration}; #[cfg(feature = "web_server_capability")] use isahc::{config::RedirectPolicy, prelude::*, HttpClient, Request}; use zellij_client::{ - old_config_converter::{ - config_yaml_to_config_kdl, convert_old_yaml_files, layout_yaml_to_layout_kdl, - }, - os_input_output::get_client_os_input, - start_client as start_client_impl, ClientInfo, + os_input_output::get_client_os_input, start_client as start_client_impl, ClientInfo, }; use zellij_utils::sessions::{ @@ -511,75 +507,6 @@ pub(crate) fn subscribe_to_session( ); } -pub(crate) fn convert_old_config_file(old_config_file: PathBuf) { - match File::open(&old_config_file) { - Ok(mut handle) => { - let mut raw_config_file = String::new(); - let _ = handle.read_to_string(&mut raw_config_file); - match config_yaml_to_config_kdl(&raw_config_file, false) { - Ok(kdl_config) => { - println!("{}", kdl_config); - process::exit(0); - }, - Err(e) => { - eprintln!("Failed to convert config: {}", e); - process::exit(1); - }, - } - }, - Err(e) => { - eprintln!("Failed to open file: {}", e); - process::exit(1); - }, - } -} - -pub(crate) fn convert_old_layout_file(old_layout_file: PathBuf) { - match File::open(&old_layout_file) { - Ok(mut handle) => { - let mut raw_layout_file = String::new(); - let _ = handle.read_to_string(&mut raw_layout_file); - match layout_yaml_to_layout_kdl(&raw_layout_file) { - Ok(kdl_layout) => { - println!("{}", kdl_layout); - process::exit(0); - }, - Err(e) => { - eprintln!("Failed to convert layout: {}", e); - process::exit(1); - }, - } - }, - Err(e) => { - eprintln!("Failed to open file: {}", e); - process::exit(1); - }, - } -} - -pub(crate) fn convert_old_theme_file(old_theme_file: PathBuf) { - match File::open(&old_theme_file) { - Ok(mut handle) => { - let mut raw_config_file = String::new(); - let _ = handle.read_to_string(&mut raw_config_file); - match config_yaml_to_config_kdl(&raw_config_file, true) { - Ok(kdl_config) => { - println!("{}", kdl_config); - process::exit(0); - }, - Err(e) => { - eprintln!("Failed to convert config: {}", e); - process::exit(1); - }, - } - }, - Err(e) => { - eprintln!("Failed to open file: {}", e); - process::exit(1); - }, - } -} - fn attach_with_cli_client( cli_action: zellij_utils::cli::CliAction, session_name: &str, @@ -683,8 +610,6 @@ fn attach_with_session_name( } pub(crate) fn start_client(opts: CliArgs) { - // look for old YAML config/layout/theme files and convert them to KDL - convert_old_yaml_files(&opts); let ( config, client_layout_info, diff --git a/src/main.rs b/src/main.rs index 30c9a00e..15ed027a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -203,18 +203,6 @@ fn main() { commands::send_action_to_session(command_cli_action, opts.session, config); std::process::exit(0); } - if let Some(Command::Sessions(Sessions::ConvertConfig { old_config_file })) = opts.command { - commands::convert_old_config_file(old_config_file); - std::process::exit(0); - } - if let Some(Command::Sessions(Sessions::ConvertLayout { old_layout_file })) = opts.command { - commands::convert_old_layout_file(old_layout_file); - std::process::exit(0); - } - if let Some(Command::Sessions(Sessions::ConvertTheme { old_theme_file })) = opts.command { - commands::convert_old_theme_file(old_theme_file); - std::process::exit(0); - } if let Some(Command::Sessions(Sessions::Pipe { name, payload, diff --git a/src/tests/e2e/cases.rs b/src/tests/e2e/cases.rs index f7d36999..f346050d 100644 --- a/src/tests/e2e/cases.rs +++ b/src/tests/e2e/cases.rs @@ -13,7 +13,7 @@ use zellij_utils::{ position::{Column, Line, Position}, }; -use rand::Rng; +use rand::RngExt; use regex::Regex; use std::fmt::Write; diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index cb4f4d6e..6c7601b8 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -8,8 +8,8 @@ edition.workspace = true anyhow = { workspace = true } serde_json = { workspace = true } prost-build = { version = "0.12.6", default-features = false } -toml = { version = "0.5", default-features = false } -which = { version = "4.2", default-features = false } +toml = { version = "1.1.2", default-features = false, features = ["parse", "serde", "std"] } +which = "8" xflags = { version = "0.3.2", default-features = false } # TODO(hartan): Update this once we get a new release. See: # <https://github.com/matklad/xshell/issues/63> diff --git a/xtask/src/pipelines.rs b/xtask/src/pipelines.rs index 1c4a477e..3c81a3f4 100644 --- a/xtask/src/pipelines.rs +++ b/xtask/src/pipelines.rs @@ -268,7 +268,7 @@ pub fn publish(sh: &Shell, flags: flags::Publish) -> anyhow::Result<()> { let manifest = sh .read_file(project_dir.join("Cargo.toml")) .context(err_context)? - .parse::<toml::Value>() + .parse::<toml::Table>() .context(err_context)?; // Version of the core crate let version = manifest diff --git a/zellij-client/Cargo.toml b/zellij-client/Cargo.toml index 3665ad3e..c22f8366 100644 --- a/zellij-client/Cargo.toml +++ b/zellij-client/Cargo.toml @@ -30,7 +30,6 @@ num_cpus = { workspace = true } regex = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } -serde_yaml = { version = "0.8", default-features = false } url = { workspace = true } uuid = { workspace = true } include_dir = { workspace = true } @@ -38,7 +37,7 @@ zellij-utils = { workspace = true } tokio = { workspace = true } tokio-util = { workspace = true } isahc = { workspace = true } -tokio-tungstenite = "0.20" +tokio-tungstenite = "0.28" rustls = { version = "0.23", default-features = false, features = ["std"] } tokio-rustls = "0.26" rustls-pemfile = "2" @@ -63,7 +62,7 @@ windows-sys = { workspace = true, features = [ ] } [dev-dependencies] -insta = "1.6.0" +insta = "1.48" rcgen = "0.13" serde_json = "1.0" serial_test = "3.0" diff --git a/zellij-client/src/lib.rs b/zellij-client/src/lib.rs index 1df213a2..28860dbd 100644 --- a/zellij-client/src/lib.rs +++ b/zellij-client/src/lib.rs @@ -12,7 +12,6 @@ mod command_is_executing; mod input_handler; mod keyboard_parser; mod nested_reannounce; -pub mod old_config_converter; #[cfg(feature = "web_server_capability")] pub mod remote_attach; mod stdin_ansi_parser; @@ -558,7 +557,8 @@ pub async fn run_remote_client_terminal_loop( web_client_id: connections.web_client_id.clone(), payload: WebClientToWebServerControlMessagePayload::TerminalResize(size), }) - .unwrap(), + .unwrap() + .into(), ) }; @@ -604,7 +604,8 @@ pub async fn run_remote_client_terminal_loop( payload_bytes, }, }) - .unwrap(), + .unwrap() + .into(), ); if let Err(e) = connections.control_ws.send(control_msg).await { log::error!("Failed to forward nested session frame over control WebSocket: {}", e); @@ -614,7 +615,7 @@ pub async fn run_remote_client_terminal_loop( } } if !cleaned.is_empty() { - if let Err(e) = connections.terminal_ws.send(Message::Binary(cleaned)).await { + if let Err(e) = connections.terminal_ws.send(Message::Binary(cleaned.into())).await { log::error!("Failed to send stdin to terminal WebSocket: {}", e); break; } diff --git a/zellij-client/src/old_config_converter/convert_old_yaml_files.rs b/zellij-client/src/old_config_converter/convert_old_yaml_files.rs deleted file mode 100644 index dde73089..00000000 --- a/zellij-client/src/old_config_converter/convert_old_yaml_files.rs +++ /dev/null @@ -1,354 +0,0 @@ -use super::{config_yaml_to_config_kdl, layout_yaml_to_layout_kdl}; -use std::path::PathBuf; -use zellij_utils::{ - cli::CliArgs, - home::{find_default_config_dir, get_layout_dir, get_theme_dir}, -}; - -const OLD_CONFIG_NAME: &str = "config.yaml"; - -pub fn convert_old_yaml_files(opts: &CliArgs) { - let config_dir = opts.config_dir.clone().or_else(find_default_config_dir); - let layout_dir = get_layout_dir(config_dir.clone()); - let theme_dir = get_theme_dir(find_default_config_dir()); - let specified_config_location = opts.config.as_ref(); - - let mut layout_files_to_convert = vec![]; - let mut theme_files_to_convert = vec![]; - if let Some(layout) = opts.layout.as_ref() { - if layout.extension().map(|s| s.to_string_lossy().to_string()) == Some("yaml".into()) { - if layout.exists() { - layout_files_to_convert.push((layout.clone(), true)); - } - } - } - layout_files_to_convert.dedup(); - if let Some(layout_dir) = layout_dir { - if let Ok(files) = std::fs::read_dir(layout_dir) { - for file in files { - if let Ok(file) = file { - if file - .path() - .extension() - .map(|s| s.to_string_lossy().to_string()) - == Some("yaml".into()) - { - let mut new_file_path = file.path().clone(); - new_file_path.set_extension("kdl"); - if !new_file_path.exists() { - layout_files_to_convert.push((file.path().clone(), false)); - } - } - } - } - } - } - - if let Some(theme_dir) = theme_dir { - if theme_dir.is_dir() { - if let Ok(files) = std::fs::read_dir(theme_dir) { - for entry in files.flatten() { - if let Some(extension) = entry.path().extension() { - if extension == "yaml" { - let mut new_file_path = entry.path().clone(); - new_file_path.set_extension("kdl"); - if !new_file_path.exists() { - theme_files_to_convert.push(entry.path()) - } - } - } - } - } - } - } - - if let Some(config_dir) = config_dir { - let yaml_config_location = specified_config_location.cloned().filter(|c| { - c.extension().map(|s| s.to_string_lossy().to_string()) == Some("yaml".into()) - }); - let specified_yaml_config_location = yaml_config_location.is_some(); - let config_location = - yaml_config_location.unwrap_or_else(|| config_dir.join(OLD_CONFIG_NAME)); - match convert_yaml( - config_location, - layout_files_to_convert, - theme_files_to_convert, - specified_yaml_config_location, - ) { - Ok(should_exit) => { - if should_exit { - std::process::exit(0); - } - }, - Err(e) => { - eprintln!(""); - eprintln!("\u{1b}[1;31mFailed to convert yaml config\u{1b}[m: {}", e); - eprintln!(""); - std::process::exit(1); - }, - } - } -} - -fn print_conversion_title_message() { - println!(""); - println!("\u{1b}[1mZellij has moved to a new configuration format (KDL - https://kdl.dev) and has now been run with an old YAML configuration/layout/theme file.\u{1b}[m"); -} - -fn print_converting_config_message(old_file_name: String, new_file_name: String) { - println!( - "- Converting configuration file: \u{1b}[1;36m{}\u{1b}[m to the new configuration format at the same location: \u{1b}[1;36m{}\u{1b}[m", - old_file_name, - new_file_name - ); -} - -fn print_conversion_layouts_message(layout_files_to_convert: Vec<(PathBuf, bool)>) { - println!("- Converting the following layout YAML files to KDL files in the same location:"); - for (layout_file, _was_explicitly_set) in layout_files_to_convert.iter() { - let mut new_layout_file_name = layout_file.clone(); - new_layout_file_name.set_extension("kdl"); - println!( - "\u{1b}[1;36m{}\u{1b}[m => \u{1b}[1;36m{}\u{1b}[m", - layout_file.as_path().as_os_str().to_string_lossy(), - new_layout_file_name.as_path().as_os_str().to_string_lossy() - ); - } -} - -fn print_conversion_themes_message(theme_files_to_convert: Vec<PathBuf>) { - println!("- Converting the following theme YAML files to KDL files in the same location:"); - for theme_file in theme_files_to_convert.iter() { - let mut new_theme_file_name = theme_file.clone(); - new_theme_file_name.set_extension("kdl"); - println!( - "\u{1b}[1;36m{}\u{1b}[m => \u{1b}[1;36m{}\u{1b}[m", - theme_file.as_path().as_os_str().to_string_lossy(), - new_theme_file_name.as_path().as_os_str().to_string_lossy() - ); - } -} - -fn print_no_actions_and_wait_for_user_input() -> Result<(), String> { - println!("\u{1b}[1;32mNo actions are required of you. Press ENTER to continue.\u{1b}[m"); - std::io::stdin() - .read_line(&mut String::new()) - .map_err(|e| format!("Failed to read from STDIN: {:?}", e))?; - Ok(()) -} - -fn print_remain_unmodified_message(will_exit: bool) { - println!("The original file(s) will remain unmodified."); - if !will_exit { - println!("Will then use the new converted file(s) for this and the next runs."); - } - println!(""); -} - -fn print_flag_help_message( - layout_files_to_convert: Vec<(PathBuf, bool)>, - yaml_config_file: &PathBuf, - yaml_config_was_explicitly_set: bool, -) -> Result<(), String> { - println!("\u{1b}[1;32mWhat do you need to do?\u{1b}[m"); - match layout_files_to_convert - .iter() - .find(|(_f, explicit)| *explicit) - { - Some((explicitly_specified_layout, _)) => { - let mut kdl_config_file_path = yaml_config_file.clone(); - let mut kdl_explicitly_specified_layout = explicitly_specified_layout.clone(); - kdl_config_file_path.set_extension("kdl"); - kdl_explicitly_specified_layout.set_extension("kdl"); - if yaml_config_was_explicitly_set { - println!("Since both the YAML config and a YAML layout file were explicitly specified, you'll need to re-run Zellij and point it to the new files:"); - println!( - "\u{1b}[1;33mzellij --config {} --layout {}\u{1b}[m", - kdl_config_file_path - .as_path() - .as_os_str() - .to_string_lossy() - .to_string(), - kdl_explicitly_specified_layout - .as_path() - .as_os_str() - .to_string_lossy() - .to_string(), - ); - } else { - println!("Since a YAML layout was explicitly specified, you'll need to re-run Zellij and point it to the new layout:"); - println!( - "\u{1b}[1;33mzellij --layout {}\u{1b}[m", - kdl_explicitly_specified_layout - .as_path() - .as_os_str() - .to_string_lossy() - .to_string(), - ); - } - }, - None => { - if yaml_config_was_explicitly_set { - let mut kdl_config_file_path = yaml_config_file.clone(); - kdl_config_file_path.set_extension("kdl"); - println!("Since the YAML config was explicitly specified, you'll need to re-run Zellij and point it to the new config:"); - println!( - "\u{1b}[1;33mzellij --config {}\u{1b}[m", - kdl_config_file_path - .as_path() - .as_os_str() - .to_string_lossy() - .to_string(), - ); - } - }, - } - println!(""); - println!("\u{1b}[1;32mPress ENTER to continue.\u{1b}[m"); - std::io::stdin() - .read_line(&mut String::new()) - .map_err(|e| format!("Failed to read from STDIN: {:?}", e))?; - Ok(()) -} - -fn convert_layouts(layout_files_to_convert: Vec<(PathBuf, bool)>) -> Result<(), String> { - for (layout_file, _was_explicitly_set) in layout_files_to_convert { - let raw_layout_file = std::fs::read_to_string(&layout_file) - .map_err(|e| format!("Failed to read layout file {:?}: {:?}", layout_file, e))?; - let kdl_layout = layout_yaml_to_layout_kdl(&raw_layout_file)?; - let mut new_layout_file = layout_file.clone(); - new_layout_file.set_extension("kdl"); - std::fs::write(&new_layout_file, kdl_layout).map_err(|e| { - format!( - "Failed to write new layout file to {:?}: {:?}", - new_layout_file, e - ) - })?; - } - Ok(()) -} - -fn convert_themes(theme_files_to_convert: Vec<PathBuf>) -> Result<(), String> { - for theme_file in theme_files_to_convert { - let raw_theme_file = std::fs::read_to_string(&theme_file) - .map_err(|e| format!("Failed to read theme file {:?}: {:?}", theme_file, e))?; - let kdl_theme = config_yaml_to_config_kdl(&raw_theme_file, true)?; - let mut new_theme_file = theme_file.clone(); - new_theme_file.set_extension("kdl"); - std::fs::write(&new_theme_file, kdl_theme).map_err(|e| { - format!( - "Failed to write new theme file to {:?}: {:?}", - new_theme_file, e - ) - })?; - } - Ok(()) -} - -fn convert_config(yaml_config_file: PathBuf, new_config_file: PathBuf) -> Result<(), String> { - if yaml_config_file.exists() && !new_config_file.exists() { - let raw_config_file = std::fs::read_to_string(&yaml_config_file) - .map_err(|e| format!("Failed to read config file {:?}: {:?}", yaml_config_file, e))?; - let kdl_config = config_yaml_to_config_kdl(&raw_config_file, false)?; - std::fs::write(&new_config_file, kdl_config).map_err(|e| { - format!( - "Failed to write new config file to {:?}: {:?}", - new_config_file, e - ) - })?; - } - Ok(()) -} - -fn convert_yaml( - yaml_config_file: PathBuf, - layout_files_to_convert: Vec<(PathBuf, bool)>, - theme_files_to_convert: Vec<PathBuf>, - yaml_config_was_explicitly_set: bool, -) -> Result<bool, String> { - let mut should_exit = false; - let mut new_config_file = yaml_config_file.clone(); - new_config_file.set_extension("kdl"); - let yaml_config_file_exists = yaml_config_file.exists(); - let explicitly_set_layout_file = layout_files_to_convert - .iter() - .find(|(_l, was_explicitly_set)| *was_explicitly_set); - let layout_was_explicitly_set = explicitly_set_layout_file.is_some(); - let explicitly_set_layout_files_kdl_equivalent_exists = explicitly_set_layout_file - .map(|(layout_file, _)| { - let mut layout_file = layout_file.clone(); - layout_file.set_extension("kdl"); - if layout_file.exists() { - Some(true) - } else { - None - } - }) - .is_some(); - let new_config_file_exists = new_config_file.exists(); - let no_need_to_convert_config = - (new_config_file_exists && !yaml_config_was_explicitly_set) || !yaml_config_file_exists; - if no_need_to_convert_config - && layout_files_to_convert.is_empty() - && theme_files_to_convert.is_empty() - && !layout_was_explicitly_set - { - // Nothing to do... - return Ok(should_exit); - } - print_conversion_title_message(); - if yaml_config_file_exists && !new_config_file_exists { - print_converting_config_message( - yaml_config_file - .as_path() - .as_os_str() - .to_string_lossy() - .to_string(), - new_config_file - .as_path() - .as_os_str() - .to_string_lossy() - .to_string(), - ); - } else if yaml_config_file_exists && new_config_file_exists && yaml_config_was_explicitly_set { - return Err( - format!( - "Specified old YAML format config (--config {}) but a new KDL file exists in that location. To fix, point to it the new file instead: zellij --config {}", - yaml_config_file.as_path().as_os_str().to_string_lossy().to_string(), - new_config_file.as_path().as_os_str().to_string_lossy().to_string() - ) - ); - } else if layout_was_explicitly_set && explicitly_set_layout_files_kdl_equivalent_exists { - let explicitly_set_layout_file = explicitly_set_layout_file.unwrap().0.clone(); - let mut explicitly_set_layout_file_kdl_equivalent = explicitly_set_layout_file.clone(); - explicitly_set_layout_file_kdl_equivalent.set_extension("kdl"); - return Err( - format!( - "Specified old YAML format layout (--layout {}) but a new KDL file exists in that location. To fix, point to it the new file instead: zellij --layout {}", - explicitly_set_layout_file.display(), - explicitly_set_layout_file_kdl_equivalent.display() - ) - ); - } - if !layout_files_to_convert.is_empty() { - print_conversion_layouts_message(layout_files_to_convert.clone()); - } - if !theme_files_to_convert.is_empty() { - print_conversion_themes_message(theme_files_to_convert.clone()); - } - print_remain_unmodified_message(layout_was_explicitly_set || yaml_config_was_explicitly_set); - if layout_was_explicitly_set || yaml_config_was_explicitly_set { - print_flag_help_message( - layout_files_to_convert.clone(), - &yaml_config_file, - yaml_config_was_explicitly_set, - )?; - should_exit = true; - } else { - print_no_actions_and_wait_for_user_input()?; - } - convert_layouts(layout_files_to_convert)?; - convert_themes(theme_files_to_convert)?; - convert_config(yaml_config_file, new_config_file)?; - Ok(should_exit) -} diff --git a/zellij-client/src/old_config_converter/mod.rs b/zellij-client/src/old_config_converter/mod.rs deleted file mode 100644 index ac6d7676..00000000 --- a/zellij-client/src/old_config_converter/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -mod convert_old_yaml_files; -mod old_config; -mod old_layout; -pub use convert_old_yaml_files::convert_old_yaml_files; -pub use old_config::config_yaml_to_config_kdl; -pub use old_layout::layout_yaml_to_layout_kdl; diff --git a/zellij-client/src/old_config_converter/old_config.rs b/zellij-client/src/old_config_converter/old_config.rs deleted file mode 100644 index dc43debb..00000000 --- a/zellij-client/src/old_config_converter/old_config.rs +++ /dev/null @@ -1,1253 +0,0 @@ -// This is a converter from the old yaml config to the new KDL config. -// -// It is supposed to be mostly self containing - please refrain from adding to it, importing -// from it or changing it -use std::fmt; -use std::path::PathBuf; - -use serde::de::{Error, Visitor}; -use serde::{Deserialize, Deserializer, Serialize}; -use std::collections::HashMap; -use url::Url; - -const ON_FORCE_CLOSE_DESCRIPTION: &'static str = " -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// Options: -// - detach (Default) -// - quit -// -"; - -const SIMPLIFIED_UI_DESCRIPTION: &'static str = " -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -"; - -const DEFAULT_SHELL_DESCRIPTION: &'static str = " -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -"; - -const PANE_FRAMES_DESCRIPTION: &'static str = " -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -"; - -const DEFAULT_THEME_DESCRIPTION: &'static str = " -// Choose the theme that is specified in the themes section. -// Default: default -// -"; - -const DEFAULT_MODE_DESCRIPTION: &'static str = " -// Choose the mode that zellij uses when starting up. -// Default: normal -// -"; - -const MOUSE_MODE_DESCRIPTION: &'static str = " -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// Options: -// - true (default) -// - false -// -"; - -const SCROLL_BUFFER_SIZE_DESCRIPTION: &'static str = " -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// Valid values: positive integers -// Default value: 10000 -// -"; - -const COPY_COMMAND_DESCRIPTION: &'static str = " -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command \"xclip -selection clipboard\" // x11 -// copy_command \"wl-copy\" // wayland -// copy_command \"pbcopy\" // osx -"; - -const COPY_CLIPBOARD_DESCRIPTION: &'static str = " -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -"; - -const COPY_ON_SELECT_DESCRIPTION: &'static str = " -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -"; - -const SCROLLBACK_EDITOR_DESCRIPTION: &'static str = " -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -"; - -const MIRROR_SESSION_DESCRIPTION: &'static str = " -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// Default: false -// -"; - -const DEFAULT_LAYOUT_DESCRIPTION: &'static str = " -// The name of the default layout to load on startup -// Default: \"default\" -// -"; - -const LAYOUT_DIR_DESCRIPTION: &'static str = " -// The folder in which Zellij will look for layouts -// -"; - -const THEME_DIR_DESCRIPTION: &'static str = " -// The folder in which Zellij will look for themes -// -"; - -fn options_yaml_to_options_kdl(options_yaml: &OldOptions, no_comments: bool) -> String { - let mut options_kdl = String::new(); - - macro_rules! push_option { - ($attribute_name:ident, $description_text:ident, $present_pattern:expr) => { - if !no_comments { - options_kdl.push_str($description_text); - } - if let Some($attribute_name) = &options_yaml.$attribute_name { - options_kdl.push_str(&format!($present_pattern, $attribute_name)); - options_kdl.push('\n'); - }; - }; - ($attribute_name:ident, $description_text:ident, $present_pattern:expr, $absent_pattern:expr) => { - if !no_comments { - options_kdl.push_str($description_text); - } - match &options_yaml.$attribute_name { - Some($attribute_name) => { - options_kdl.push_str(&format!($present_pattern, $attribute_name)); - }, - None => { - if !no_comments { - options_kdl.push_str(&format!($absent_pattern)); - } - }, - }; - if !no_comments || options_yaml.$attribute_name.is_some() { - options_kdl.push('\n'); - } - }; - } - - push_option!( - on_force_close, - ON_FORCE_CLOSE_DESCRIPTION, - "on_force_close \"{}\"", - "// on_force_close \"quit\"" - ); - push_option!( - simplified_ui, - SIMPLIFIED_UI_DESCRIPTION, - "simplified_ui {}", - "// simplified_ui true" - ); - push_option!( - default_shell, - DEFAULT_SHELL_DESCRIPTION, - "default_shell {:?}", - "// default_shell \"fish\"" - ); - push_option!( - pane_frames, - PANE_FRAMES_DESCRIPTION, - "pane_frames {}", - "// pane_frames true" - ); - push_option!( - theme, - DEFAULT_THEME_DESCRIPTION, - "theme {:?} ", - "// theme \"default\"" - ); - push_option!( - default_layout, - DEFAULT_LAYOUT_DESCRIPTION, - "default_layout {:?}", - "// default_layout \"compact\"" - ); - push_option!( - default_mode, - DEFAULT_MODE_DESCRIPTION, - "default_mode \"{}\"", - "// default_mode \"locked\"" - ); - push_option!( - mouse_mode, - MOUSE_MODE_DESCRIPTION, - "mouse_mode {}", - "// mouse_mode false" - ); - push_option!( - scroll_buffer_size, - SCROLL_BUFFER_SIZE_DESCRIPTION, - "scroll_buffer_size {}", - "// scroll_buffer_size 10000" - ); - push_option!(copy_command, COPY_COMMAND_DESCRIPTION, "copy_command {:?}"); - push_option!( - copy_clipboard, - COPY_CLIPBOARD_DESCRIPTION, - "copy_clipboard \"{}\"", - "// copy_clipboard \"primary\"" - ); - push_option!( - copy_on_select, - COPY_ON_SELECT_DESCRIPTION, - "copy_on_select {}", - "// copy_on_select false" - ); - push_option!( - scrollback_editor, - SCROLLBACK_EDITOR_DESCRIPTION, - "scrollback_editor {:?}", - "// scrollback_editor \"/usr/bin/vim\"" - ); - push_option!( - mirror_session, - MIRROR_SESSION_DESCRIPTION, - "mirror_session {}", - "// mirror_session true" - ); - push_option!( - layout_dir, - LAYOUT_DIR_DESCRIPTION, - "layout_dir {:?}", - "// layout_dir /path/to/my/layout_dir" - ); - push_option!( - theme_dir, - THEME_DIR_DESCRIPTION, - "theme_dir {:?}", - "// theme_dir \"/path/to/my/theme_dir\"" - ); - - options_kdl -} - -fn env_yaml_to_env_kdl(env_yaml: &OldEnvironmentVariablesFromYaml) -> String { - let mut env_kdl = String::new(); - let mut env_vars: Vec<(String, String)> = env_yaml - .env - .iter() - .map(|(name, val)| (name.clone(), val.clone())) - .collect(); - env_vars.sort_unstable(); - env_kdl.push_str("env {\n"); - for (name, val) in env_vars { - env_kdl.push_str(&format!(" {} \"{}\"\n", name, val)); - } - env_kdl.push_str("}\n"); - env_kdl -} - -fn plugins_yaml_to_plugins_kdl(plugins_yaml_to_plugins_kdl: &OldPluginsConfigFromYaml) -> String { - let mut plugins_kdl = String::new(); - if !&plugins_yaml_to_plugins_kdl.0.is_empty() { - plugins_kdl.push_str("\n"); - plugins_kdl.push_str("plugins {\n") - } - for plugin_config in &plugins_yaml_to_plugins_kdl.0 { - if plugin_config._allow_exec_host_cmd { - plugins_kdl.push_str(&format!( - " {} {{ path {:?}; _allow_exec_host_cmd true; }}\n", - plugin_config.tag.0, plugin_config.path - )); - } else { - plugins_kdl.push_str(&format!( - " {} {{ path {:?}; }}\n", - plugin_config.tag.0, plugin_config.path - )); - } - } - if !&plugins_yaml_to_plugins_kdl.0.is_empty() { - plugins_kdl.push_str("}\n") - } - plugins_kdl -} - -fn ui_config_yaml_to_ui_config_kdl(ui_config_yaml: &OldUiConfigFromYaml) -> String { - let mut kdl_ui_config = String::new(); - if ui_config_yaml.pane_frames.rounded_corners { - kdl_ui_config.push_str("\n"); - kdl_ui_config.push_str("ui {\n"); - kdl_ui_config.push_str(" pane_frames {\n"); - kdl_ui_config.push_str(" rounded_corners true\n"); - kdl_ui_config.push_str(" }\n"); - kdl_ui_config.push_str("}\n"); - } else { - // I'm not sure this is a thing, but since it's possible, why not? - kdl_ui_config.push_str("\n"); - kdl_ui_config.push_str("ui {\n"); - kdl_ui_config.push_str(" pane_frames {\n"); - kdl_ui_config.push_str(" rounded_corners false\n"); - kdl_ui_config.push_str(" }\n"); - kdl_ui_config.push_str("}\n"); - } - kdl_ui_config -} - -fn theme_config_yaml_to_theme_config_kdl( - theme_config_yaml: &OldThemesFromYamlIntermediate, -) -> String { - macro_rules! theme_color { - ($theme:ident, $color:ident, $color_name:expr, $kdl_theme_config:expr) => { - match $theme.palette.$color { - OldPaletteColorFromYaml::Rgb((r, g, b)) => { - $kdl_theme_config - .push_str(&format!(" {} {} {} {}\n", $color_name, r, g, b)); - }, - OldPaletteColorFromYaml::EightBit(eight_bit_color) => { - $kdl_theme_config - .push_str(&format!(" {} {}\n", $color_name, eight_bit_color)); - }, - OldPaletteColorFromYaml::Hex(OldHexColor(r, g, b)) => { - $kdl_theme_config - .push_str(&format!(" {} {} {} {}\n", $color_name, r, g, b)); - }, - } - }; - } - - let mut kdl_theme_config = String::new(); - if !theme_config_yaml.0.is_empty() { - kdl_theme_config.push_str("themes {\n") - } - let mut themes: Vec<(String, OldTheme)> = theme_config_yaml - .0 - .iter() - .map(|(theme_name, theme)| (theme_name.clone(), theme.clone())) - .collect(); - themes.sort_by(|a, b| a.0.partial_cmp(&b.0).unwrap()); - for (theme_name, theme) in themes { - kdl_theme_config.push_str(&format!(" {} {{\n", theme_name)); - theme_color!(theme, fg, "fg", kdl_theme_config); - theme_color!(theme, bg, "bg", kdl_theme_config); - theme_color!(theme, black, "black", kdl_theme_config); - theme_color!(theme, red, "red", kdl_theme_config); - theme_color!(theme, green, "green", kdl_theme_config); - theme_color!(theme, yellow, "yellow", kdl_theme_config); - theme_color!(theme, blue, "blue", kdl_theme_config); - theme_color!(theme, magenta, "magenta", kdl_theme_config); - theme_color!(theme, cyan, "cyan", kdl_theme_config); - theme_color!(theme, white, "white", kdl_theme_config); - theme_color!(theme, orange, "orange", kdl_theme_config); - kdl_theme_config.push_str(" }\n"); - } - if !theme_config_yaml.0.is_empty() { - kdl_theme_config.push_str("}\n") - } - kdl_theme_config -} - -fn keybinds_yaml_to_keybinds_kdl(keybinds_yaml: &OldKeybindsFromYaml) -> String { - let mut kdl_keybinds = String::new(); - let modes = vec![ - // mode sort order - OldInputMode::Normal, - OldInputMode::Locked, - OldInputMode::Pane, - OldInputMode::Tab, - OldInputMode::Resize, - OldInputMode::Move, - OldInputMode::Scroll, - OldInputMode::Session, - OldInputMode::Search, - OldInputMode::EnterSearch, - OldInputMode::RenameTab, - OldInputMode::RenamePane, - OldInputMode::Prompt, - OldInputMode::Tmux, - ]; - - // title and global unbinds / clear-defaults - match &keybinds_yaml.unbind { - OldUnbind::Keys(keys_to_unbind) => { - kdl_keybinds.push_str("keybinds {\n"); - let key_string: String = keys_to_unbind - .iter() - .map(|k| format!("\"{}\"", k)) - .collect::<Vec<String>>() - .join(" "); - kdl_keybinds.push_str(&format!(" unbind {}\n", key_string)); - }, - OldUnbind::All(should_unbind_all_defaults) => { - if *should_unbind_all_defaults { - kdl_keybinds.push_str("keybinds clear-defaults=true {\n"); - } else { - kdl_keybinds.push_str("keybinds {\n"); - } - }, - } - - for mode in modes { - if let Some(mode_keybinds) = keybinds_yaml.keybinds.get(&mode) { - let mut should_clear_mode_defaults = false; - let mut kdl_mode_keybinds = String::new(); - for key_action_unbind in mode_keybinds { - match key_action_unbind { - OldKeyActionUnbind::KeyAction(key_action) => { - let keys = &key_action.key; - let actions = &key_action.action; - let key_string: String = keys - .iter() - .map(|k| { - if k == &OldKey::Char('\\') { - format!("r\"{}\"", k) - } else { - format!("\"{}\"", k) - } - }) - .collect::<Vec<String>>() - .join(" "); - let actions_string: String = actions - .iter() - .map(|a| format!("{};", a)) - .collect::<Vec<String>>() - .join(" "); - kdl_mode_keybinds.push_str(&format!( - " bind {} {{ {} }}\n", - key_string, actions_string - )); - }, - OldKeyActionUnbind::Unbind(unbind) => match &unbind.unbind { - OldUnbind::Keys(keys_to_unbind) => { - let key_string: String = keys_to_unbind - .iter() - .map(|k| format!("\"{}\"", k)) - .collect::<Vec<String>>() - .join(" "); - kdl_mode_keybinds.push_str(&format!(" unbind {}\n", key_string)); - }, - OldUnbind::All(unbind_all) => { - if *unbind_all { - should_clear_mode_defaults = true; - } - }, - }, - } - } - if should_clear_mode_defaults { - kdl_keybinds.push_str(&format!(" {} clear-defaults=true {{\n", mode)); - } else { - kdl_keybinds.push_str(&format!(" {} {{\n", mode)); - } - kdl_keybinds.push_str(&kdl_mode_keybinds); - kdl_keybinds.push_str(" }\n"); - } - } - kdl_keybinds.push_str("}\n"); - kdl_keybinds -} - -pub fn config_yaml_to_config_kdl( - raw_yaml_config: &str, - no_comments: bool, -) -> Result<String, String> { - // returns the raw kdl config - let config_from_yaml: OldConfigFromYaml = serde_yaml::from_str(raw_yaml_config) - .map_err(|e| format!("Failed to parse yaml: {:?}", e))?; - let mut kdl_config = String::new(); - if let Some(old_config_keybinds) = config_from_yaml.keybinds.as_ref() { - kdl_config.push_str(&keybinds_yaml_to_keybinds_kdl(old_config_keybinds)); - } - if let Some(old_config_options) = config_from_yaml.options.as_ref() { - kdl_config.push_str(&options_yaml_to_options_kdl( - old_config_options, - no_comments, - )); - } - if let Some(old_config_env_variables) = config_from_yaml.env.as_ref() { - kdl_config.push_str(&env_yaml_to_env_kdl(old_config_env_variables)); - } - kdl_config.push_str(&plugins_yaml_to_plugins_kdl(&config_from_yaml.plugins)); - if let Some(old_ui_config) = config_from_yaml.ui.as_ref() { - kdl_config.push_str(&ui_config_yaml_to_ui_config_kdl(old_ui_config)); - } - if let Some(old_themes_config) = config_from_yaml.themes.as_ref() { - kdl_config.push_str(&theme_config_yaml_to_theme_config_kdl(old_themes_config)); - } - Ok(kdl_config) -} - -#[derive(Clone, Default, Debug, Deserialize, Serialize, PartialEq)] -pub struct OldConfigFromYaml { - #[serde(flatten)] - pub options: Option<OldOptions>, - pub keybinds: Option<OldKeybindsFromYaml>, - pub themes: Option<OldThemesFromYamlIntermediate>, - #[serde(flatten)] - pub env: Option<OldEnvironmentVariablesFromYaml>, - #[serde(default)] - pub plugins: OldPluginsConfigFromYaml, - pub ui: Option<OldUiConfigFromYaml>, -} - -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -pub struct OldKeybindsFromYaml { - #[serde(flatten)] - keybinds: HashMap<OldInputMode, Vec<OldKeyActionUnbind>>, - #[serde(default)] - unbind: OldUnbind, -} - -#[derive(Clone, Debug, PartialEq, Eq, Hash, Deserialize, Serialize)] -#[serde(untagged)] -enum OldUnbind { - // This is the correct order, don't rearrange! - // Suspected Bug in the untagged macro. - // 1. Keys - Keys(Vec<OldKey>), - // 2. All - All(bool), -} - -impl Default for OldUnbind { - fn default() -> OldUnbind { - OldUnbind::All(false) - } -} - -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(untagged)] -enum OldKeyActionUnbind { - KeyAction(OldKeyActionFromYaml), - Unbind(OldUnbindFromYaml), -} - -/// Intermediate struct used for deserialisation -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -struct OldKeyActionFromYaml { - action: Vec<OldAction>, - key: Vec<OldKey>, -} - -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -struct OldUnbindFromYaml { - unbind: OldUnbind, -} - -#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] -pub struct OldThemesFromYamlIntermediate(HashMap<String, OldTheme>); - -#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, Hash, Default)] -struct OldPaletteFromYaml { - pub fg: OldPaletteColorFromYaml, - pub bg: OldPaletteColorFromYaml, - pub black: OldPaletteColorFromYaml, - pub red: OldPaletteColorFromYaml, - pub green: OldPaletteColorFromYaml, - pub yellow: OldPaletteColorFromYaml, - pub blue: OldPaletteColorFromYaml, - pub magenta: OldPaletteColorFromYaml, - pub cyan: OldPaletteColorFromYaml, - pub white: OldPaletteColorFromYaml, - pub orange: OldPaletteColorFromYaml, -} - -/// Intermediate deserialization enum -// This is here in order to make the untagged enum work -#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)] -#[serde(untagged)] -enum OldPaletteColorFromYaml { - Rgb((u8, u8, u8)), - EightBit(u8), - Hex(OldHexColor), -} - -impl From<OldHexColor> for (u8, u8, u8) { - fn from(e: OldHexColor) -> (u8, u8, u8) { - let OldHexColor(r, g, b) = e; - (r, g, b) - } -} - -struct OldHexColorVisitor(); - -impl<'de> Visitor<'de> for OldHexColorVisitor { - type Value = OldHexColor; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - write!(formatter, "a hex color in the format #RGB or #RRGGBB") - } - - fn visit_str<E>(self, s: &str) -> Result<Self::Value, E> - where - E: Error, - { - if let Some(stripped) = s.strip_prefix('#') { - return self.visit_str(stripped); - } - - if s.len() == 3 { - Ok(OldHexColor( - u8::from_str_radix(&s[0..1], 16).map_err(E::custom)? * 0x11, - u8::from_str_radix(&s[1..2], 16).map_err(E::custom)? * 0x11, - u8::from_str_radix(&s[2..3], 16).map_err(E::custom)? * 0x11, - )) - } else if s.len() == 6 { - Ok(OldHexColor( - u8::from_str_radix(&s[0..2], 16).map_err(E::custom)?, - u8::from_str_radix(&s[2..4], 16).map_err(E::custom)?, - u8::from_str_radix(&s[4..6], 16).map_err(E::custom)?, - )) - } else { - Err(Error::custom( - "Hex color must be of form \"#RGB\" or \"#RRGGBB\"", - )) - } - } -} - -impl<'de> Deserialize<'de> for OldHexColor { - fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> - where - D: Deserializer<'de>, - { - deserializer.deserialize_str(OldHexColorVisitor()) - } -} - -impl Default for OldPaletteColorFromYaml { - fn default() -> Self { - OldPaletteColorFromYaml::EightBit(0) - } -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize)] -struct OldHexColor(u8, u8, u8); - -#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] -struct OldTheme { - #[serde(flatten)] - palette: OldPaletteFromYaml, -} - -#[derive(Debug, Default, Clone, Copy, PartialEq, Deserialize, Serialize)] -pub struct OldUiConfigFromYaml { - pub pane_frames: OldFrameConfigFromYaml, -} - -#[derive(Debug, Default, Clone, Copy, PartialEq, Deserialize, Serialize)] -pub struct OldFrameConfigFromYaml { - pub rounded_corners: bool, -} - -#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)] -pub struct OldEnvironmentVariablesFromYaml { - env: HashMap<String, String>, -} - -#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] -pub struct OldPluginsConfigFromYaml(Vec<OldPluginConfigFromYaml>); - -#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] -struct OldPluginConfigFromYaml { - pub path: PathBuf, - pub tag: OldPluginTag, - #[serde(default)] - pub run: OldPluginTypeFromYaml, - #[serde(default)] - pub config: serde_yaml::Value, - #[serde(default)] - pub _allow_exec_host_cmd: bool, -} - -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(rename_all = "kebab-case")] -enum OldPluginTypeFromYaml { - Headless, - Pane, -} - -impl Default for OldPluginTypeFromYaml { - fn default() -> Self { - Self::Pane - } -} - -/// Tag used to identify the plugin in layout and config yaml files -#[derive(Debug, Default, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)] -struct OldPluginTag(String); - -#[derive(Copy, Clone, Debug, PartialEq, Deserialize, Serialize)] -pub enum OldOnForceClose { - #[serde(alias = "quit")] - Quit, - #[serde(alias = "detach")] - Detach, -} - -impl std::fmt::Display for OldOnForceClose { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match self { - Self::Quit => write!(f, "quit"), - Self::Detach => write!(f, "detach"), - } - } -} - -impl Default for OldOnForceClose { - fn default() -> Self { - Self::Detach - } -} - -#[derive(Deserialize, Serialize, Debug, Clone, Copy, PartialEq)] -pub enum OldClipboard { - #[serde(alias = "system")] - System, - #[serde(alias = "primary")] - Primary, -} - -impl std::fmt::Display for OldClipboard { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match self { - Self::System => write!(f, "system"), - Self::Primary => write!(f, "primary"), - } - } -} - -impl Default for OldClipboard { - fn default() -> Self { - Self::System - } -} - -#[derive(Clone, Default, Debug, PartialEq, Deserialize, Serialize)] -pub struct OldOptions { - #[serde(default)] - pub simplified_ui: Option<bool>, - pub theme: Option<String>, - pub default_mode: Option<OldInputMode>, - pub default_shell: Option<PathBuf>, - pub default_layout: Option<PathBuf>, - pub layout_dir: Option<PathBuf>, - pub theme_dir: Option<PathBuf>, - #[serde(default)] - pub mouse_mode: Option<bool>, - #[serde(default)] - pub pane_frames: Option<bool>, - #[serde(default)] - pub mirror_session: Option<bool>, - pub on_force_close: Option<OldOnForceClose>, - pub scroll_buffer_size: Option<usize>, - #[serde(default)] - pub copy_command: Option<String>, - #[serde(default)] - pub copy_clipboard: Option<OldClipboard>, - #[serde(default)] - pub copy_on_select: Option<bool>, - pub scrollback_editor: Option<PathBuf>, -} - -/// Describes the different input modes, which change the way that keystrokes will be interpreted. -#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, Serialize, Deserialize)] -pub enum OldInputMode { - /// In `Normal` mode, input is always written to the terminal, except for the shortcuts leading - /// to other modes - #[serde(alias = "normal")] - Normal, - /// In `Locked` mode, input is always written to the terminal and all shortcuts are disabled - /// except the one leading back to normal mode - #[serde(alias = "locked")] - Locked, - /// `Resize` mode allows resizing the different existing panes. - #[serde(alias = "resize")] - Resize, - /// `Pane` mode allows creating and closing panes, as well as moving between them. - #[serde(alias = "pane")] - Pane, - /// `Tab` mode allows creating and closing tabs, as well as moving between them. - #[serde(alias = "tab")] - Tab, - /// `Scroll` mode allows scrolling up and down within a pane. - #[serde(alias = "scroll")] - Scroll, - /// `EnterSearch` mode allows for typing in the needle for a search in the scroll buffer of a pane. - #[serde(alias = "entersearch")] - EnterSearch, - /// `Search` mode allows for searching a term in a pane (superset of `Scroll`). - #[serde(alias = "search")] - Search, - /// `RenameTab` mode allows assigning a new name to a tab. - #[serde(alias = "renametab")] - RenameTab, - /// `RenamePane` mode allows assigning a new name to a pane. - #[serde(alias = "renamepane")] - RenamePane, - /// `Session` mode allows detaching sessions - #[serde(alias = "session")] - Session, - /// `Move` mode allows moving the different existing panes within a tab - #[serde(alias = "move")] - Move, - /// `Prompt` mode allows interacting with active prompts. - #[serde(alias = "prompt")] - Prompt, - /// `Tmux` mode allows for basic tmux keybindings functionality - #[serde(alias = "tmux")] - Tmux, -} - -impl std::fmt::Display for OldInputMode { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match self { - Self::Normal => write!(f, "normal"), - Self::Locked => write!(f, "locked"), - Self::Resize => write!(f, "resize"), - Self::Pane => write!(f, "pane"), - Self::Tab => write!(f, "tab"), - Self::Scroll => write!(f, "scroll"), - Self::EnterSearch => write!(f, "entersearch"), - Self::Search => write!(f, "search"), - Self::RenameTab => write!(f, "RenameTab"), - Self::RenamePane => write!(f, "RenamePane"), - Self::Session => write!(f, "session"), - Self::Move => write!(f, "move"), - Self::Prompt => write!(f, "prompt"), - Self::Tmux => write!(f, "tmux"), - } - } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, PartialOrd, Ord)] -enum OldKey { - PageDown, - PageUp, - Left, - Down, - Up, - Right, - Home, - End, - Backspace, - Delete, - Insert, - F(u8), - Char(char), - Alt(OldCharOrArrow), - Ctrl(char), - BackTab, - Null, - Esc, -} - -impl std::fmt::Display for OldKey { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match self { - Self::PageDown => write!(f, "PageDown"), - Self::PageUp => write!(f, "PageUp"), - Self::Left => write!(f, "Left"), - Self::Down => write!(f, "Down"), - Self::Up => write!(f, "Up"), - Self::Right => write!(f, "Right"), - Self::Home => write!(f, "Home"), - Self::End => write!(f, "End"), - Self::Backspace => write!(f, "Backspace"), - Self::Delete => write!(f, "Delete"), - Self::Insert => write!(f, "Insert"), - Self::F(index) => write!(f, "F{}", index), - Self::Char(c) => match c { - '\n' => write!(f, "Enter"), - '\t' => write!(f, "Tab"), - '\"' => write!(f, "\\\""), // make sure it is escaped because otherwise it will be - // seen as a KDL string starter/terminator - ' ' => write!(f, "Space"), - _ => write!(f, "{}", c), - }, - Self::Alt(char_or_arrow) => match char_or_arrow { - OldCharOrArrow::Char(c) => write!(f, "Alt {}", c), - OldCharOrArrow::Direction(direction) => match direction { - OldDirection::Left => write!(f, "Alt Left"), - OldDirection::Right => write!(f, "Alt Right"), - OldDirection::Up => write!(f, "Alt Up"), - OldDirection::Down => write!(f, "Alt Down"), - }, - }, - Self::Ctrl(c) => write!(f, "Ctrl {}", c), - Self::BackTab => write!(f, "Tab"), - Self::Null => write!(f, "Null"), - Self::Esc => write!(f, "Esc"), - } - } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, PartialOrd, Ord)] -#[serde(untagged)] -enum OldCharOrArrow { - Char(char), - Direction(OldDirection), -} - -/// The four directions (left, right, up, down). -#[derive(Eq, Clone, Copy, Debug, PartialEq, Hash, Deserialize, Serialize, PartialOrd, Ord)] -enum OldDirection { - Left, - Right, - Up, - Down, -} - -impl std::fmt::Display for OldDirection { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match self { - Self::Left => write!(f, "Left"), - Self::Right => write!(f, "Right"), - Self::Up => write!(f, "Up"), - Self::Down => write!(f, "Down"), - } - } -} - -impl Default for OldDirection { - fn default() -> Self { - OldDirection::Left - } -} - -#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -enum OldAction { - Quit, - Write(Vec<u8>), - WriteChars(String), - SwitchToMode(OldInputMode), - Resize(OldResizeDirection), - FocusNextPane, - FocusPreviousPane, - FocusLastPane, - SwitchFocus, - MoveFocus(OldDirection), - MoveFocusOrTab(OldDirection), - MovePane(Option<OldDirection>), - DumpScreen(String), - EditScrollback, - ScrollUp, - ScrollUpAt(OldPosition), - ScrollDown, - ScrollDownAt(OldPosition), - ScrollToBottom, - PageScrollUp, - PageScrollDown, - HalfPageScrollUp, - HalfPageScrollDown, - ToggleFocusFullscreen, - TogglePaneFrames, - ToggleActiveSyncTab, - NewPane(Option<OldDirection>), - TogglePaneEmbedOrFloating, - ToggleFloatingPanes, - CloseFocus, - PaneNameInput(Vec<u8>), - UndoRenamePane, - NewTab(Option<OldTabLayout>), - NoOp, - GoToNextTab, - GoToPreviousTab, - CloseTab, - GoToTab(u32), - ToggleTab, - TabNameInput(Vec<u8>), - UndoRenameTab, - Run(OldRunCommandAction), - Detach, - LeftClick(OldPosition), - RightClick(OldPosition), - MiddleClick(OldPosition), - LeftMouseRelease(OldPosition), - RightMouseRelease(OldPosition), - MiddleMouseRelease(OldPosition), - MouseHoldLeft(OldPosition), - MouseHoldRight(OldPosition), - MouseHoldMiddle(OldPosition), - Copy, - Confirm, - Deny, - SkipConfirm(Box<OldAction>), - SearchInput(Vec<u8>), - Search(OldSearchDirection), - SearchToggleOption(OldSearchOption), -} - -impl std::fmt::Display for OldAction { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match self { - Self::Quit => write!(f, "Quit"), - Self::Write(bytes) => write!( - f, - "Write {}", - bytes - .iter() - .map(|c| format!("{}", *c)) - .collect::<Vec<String>>() - .join(" ") - ), - Self::WriteChars(chars) => write!(f, "WriteChars \"{}\"", chars), - Self::SwitchToMode(input_mode) => write!(f, "SwitchToMode \"{}\"", input_mode), - Self::Resize(resize_direction) => write!(f, "Resize \"{}\"", resize_direction), - Self::FocusNextPane => write!(f, "FocusNextPane"), - Self::FocusPreviousPane => write!(f, "FocusPreviousPane"), - Self::FocusLastPane => write!(f, "FocusLastPane"), - Self::SwitchFocus => write!(f, "SwitchFocus"), - Self::MoveFocus(direction) => write!(f, "MoveFocus \"{}\"", direction), - Self::MoveFocusOrTab(direction) => write!(f, "MoveFocusOrTab \"{}\"", direction), - Self::MovePane(direction) => match direction { - Some(direction) => write!(f, "MovePane \"{}\"", direction), - None => write!(f, "MovePane"), - }, - Self::DumpScreen(file) => write!(f, "DumpScreen \"{}\"", file), - Self::EditScrollback => write!(f, "EditScrollback"), - Self::ScrollUp => write!(f, "ScrollUp"), - Self::ScrollDown => write!(f, "ScrollDown"), - Self::ScrollToBottom => write!(f, "ScrollToBottom"), - Self::PageScrollUp => write!(f, "PageScrollUp"), - Self::PageScrollDown => write!(f, "PageScrollDown"), - Self::HalfPageScrollUp => write!(f, "HalfPageScrollUp"), - Self::HalfPageScrollDown => write!(f, "HalfPageScrollDown"), - Self::ToggleFocusFullscreen => write!(f, "ToggleFocusFullscreen"), - Self::TogglePaneFrames => write!(f, "TogglePaneFrames"), - Self::ToggleActiveSyncTab => write!(f, "ToggleActiveSyncTab"), - Self::NewPane(direction) => match direction { - Some(direction) => write!(f, "NewPane \"{}\"", direction), - None => write!(f, "NewPane"), - }, - Self::TogglePaneEmbedOrFloating => write!(f, "TogglePaneEmbedOrFloating"), - Self::ToggleFloatingPanes => write!(f, "ToggleFloatingPanes"), - Self::CloseFocus => write!(f, "CloseFocus"), - Self::PaneNameInput(bytes) => write!( - f, - "PaneNameInput {}", - bytes - .iter() - .map(|c| format!("{}", *c)) - .collect::<Vec<String>>() - .join(" ") - ), - Self::UndoRenamePane => write!(f, "UndoRenamePane"), - Self::NewTab(_) => write!(f, "NewTab"), - Self::NoOp => write!(f, "NoOp"), - Self::GoToNextTab => write!(f, "GoToNextTab"), - Self::GoToPreviousTab => write!(f, "GoToPreviousTab"), - Self::CloseTab => write!(f, "CloseTab"), - Self::GoToTab(index) => write!(f, "GoToTab {}", index), - Self::ToggleTab => write!(f, "ToggleTab"), - // Self::TabNameInput(bytes) => write!(f, "TabNameInput {}", format!("{}", bytes.iter().map(|c| format!("{}", *c)).collect::<Vec<String>>().join(" "))), - Self::TabNameInput(bytes) => write!( - f, - "TabNameInput {}", - bytes - .iter() - .map(|c| format!("{}", *c)) - .collect::<Vec<String>>() - .join(" ") - ), - Self::UndoRenameTab => write!(f, "UndoRenameTab"), - Self::Run(run_command_action) => { - let mut run_block_serialized = format!("Run {:?}", run_command_action.command); - for arg in &run_command_action.args { - run_block_serialized.push_str(&format!(" \"{}\"", arg)); - } - match (&run_command_action.cwd, run_command_action.direction) { - (Some(cwd), Some(direction)) => { - run_block_serialized.push_str(&format!( - "{{ cwd {:?}; direction \"{}\"; }}", - cwd, direction - )); - }, - (None, Some(direction)) => { - run_block_serialized - .push_str(&format!("{{ direction \"{}\"; }}", direction)); - }, - (Some(cwd), None) => { - run_block_serialized.push_str(&format!("{{ cwd {:?}; }}", cwd)); - }, - (None, None) => {}, - } - write!(f, "{}", run_block_serialized) - }, - Self::Detach => write!(f, "Detach"), - Self::Copy => write!(f, "Copy"), - Self::Confirm => write!(f, "Confirm"), - Self::Deny => write!(f, "Deny"), - Self::SearchInput(bytes) => write!( - f, - "SearchInput {}", - bytes - .iter() - .map(|c| format!("{}", *c)) - .collect::<Vec<String>>() - .join(" ") - ), - Self::Search(direction) => write!(f, "Search \"{}\"", direction), - Self::SearchToggleOption(option) => write!(f, "SearchToggleOption \"{}\"", option), - _ => Err(std::fmt::Error), - } - } -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)] -enum OldSearchDirection { - Down, - Up, -} - -impl std::fmt::Display for OldSearchDirection { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match self { - Self::Down => write!(f, "Down"), - Self::Up => write!(f, "Up"), - } - } -} - -#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -enum OldSearchOption { - CaseSensitivity, - WholeWord, - Wrap, -} - -impl std::fmt::Display for OldSearchOption { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match self { - Self::CaseSensitivity => write!(f, "CaseSensitivity"), - Self::WholeWord => write!(f, "WholeWord"), - Self::Wrap => write!(f, "Wrap"), - } - } -} - -#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -enum OldResizeDirection { - Left, - Right, - Up, - Down, - Increase, - Decrease, -} - -impl std::fmt::Display for OldResizeDirection { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match self { - Self::Left => write!(f, "Left"), - Self::Right => write!(f, "Right"), - Self::Up => write!(f, "Up"), - Self::Down => write!(f, "Down"), - Self::Increase => write!(f, "Increase"), - Self::Decrease => write!(f, "Decrease"), - } - } -} - -#[derive(Debug, Hash, Copy, Clone, PartialEq, Eq, PartialOrd, Deserialize, Serialize)] -struct OldPosition { - pub line: OldLine, - pub column: OldColumn, -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Deserialize, Serialize, PartialOrd)] -struct OldLine(pub isize); -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Deserialize, Serialize, PartialOrd)] -struct OldColumn(pub usize); - -#[derive(Clone, Debug, Deserialize, Default, Serialize, PartialEq, Eq)] -struct OldRunCommandAction { - #[serde(rename = "cmd")] - pub command: PathBuf, - #[serde(default)] - pub args: Vec<String>, - #[serde(default)] - pub cwd: Option<PathBuf>, - #[serde(default)] - pub direction: Option<OldDirection>, -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] -struct OldTabLayout { - #[serde(default)] - pub direction: OldDirection, - pub pane_name: Option<String>, - #[serde(default)] - pub borderless: bool, - #[serde(default)] - pub parts: Vec<OldTabLayout>, - pub split_size: Option<OldSplitSize>, - #[serde(default)] - pub name: String, - pub focus: Option<bool>, - pub run: Option<OldRunFromYaml>, -} - -#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)] -enum OldSplitSize { - #[serde(alias = "percent")] - Percent(u64), // 1 to 100 - #[serde(alias = "fixed")] - Fixed(usize), // An absolute number of columns or rows -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] -enum OldRunFromYaml { - #[serde(rename = "plugin")] - Plugin(OldRunPluginFromYaml), - #[serde(rename = "command")] - Command(OldRunCommand), -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] -struct OldRunPluginFromYaml { - #[serde(default)] - pub _allow_exec_host_cmd: bool, - pub location: Url, -} - -#[derive(Clone, Debug, Deserialize, Default, Serialize, PartialEq, Eq)] -pub struct OldRunCommand { - #[serde(alias = "cmd")] - pub command: PathBuf, - #[serde(default)] - pub args: Vec<String>, - #[serde(default)] - pub cwd: Option<PathBuf>, -} - -// The unit test location. -#[path = "./unit/convert_config_tests.rs"] -#[cfg(test)] -mod convert_config_test; diff --git a/zellij-client/src/old_config_converter/old_layout.rs b/zellij-client/src/old_config_converter/old_layout.rs deleted file mode 100644 index 8cadd795..00000000 --- a/zellij-client/src/old_config_converter/old_layout.rs +++ /dev/null @@ -1,565 +0,0 @@ -// This is a converter from the old yaml layout to the new KDL layout. -// -// It is supposed to be mostly self containing - please refrain from adding to it, importing -// from it or changing it -use super::old_config::{config_yaml_to_config_kdl, OldConfigFromYaml, OldRunCommand}; -use serde::{Deserialize, Serialize}; -use std::vec::Vec; -use std::{fmt, path::PathBuf}; -use url::Url; - -fn pane_line( - pane_name: Option<&String>, - split_size: Option<OldSplitSize>, - focus: Option<bool>, - borderless: bool, -) -> String { - let mut pane_line = format!("pane"); - if let Some(pane_name) = pane_name { - // we use debug print here so that quotes and backslashes will be escaped - pane_line.push_str(&format!(" name={:?}", pane_name)); - } - if let Some(split_size) = split_size { - pane_line.push_str(&format!(" size={}", split_size)); - } - if let Some(focus) = focus { - pane_line.push_str(&format!(" focus={}", focus)); - } - if borderless { - pane_line.push_str(" borderless=true"); - } - pane_line -} - -fn tab_line( - pane_name: Option<&String>, - split_size: Option<OldSplitSize>, - focus: Option<bool>, - borderless: bool, -) -> String { - let mut pane_line = format!("tab"); - if let Some(pane_name) = pane_name { - // we use debug print here so that quotes and backslashes will be escaped - pane_line.push_str(&format!(" name={:?}", pane_name)); - } - if let Some(split_size) = split_size { - pane_line.push_str(&format!(" size={}", split_size)); - } - if let Some(focus) = focus { - pane_line.push_str(&format!(" focus={}", focus)); - } - if borderless { - pane_line.push_str(" borderless=true"); - } - pane_line -} - -fn pane_line_with_children( - pane_name: Option<&String>, - split_size: Option<OldSplitSize>, - focus: Option<bool>, - borderless: bool, - split_direction: OldDirection, -) -> String { - let mut pane_line = format!("pane"); - if let Some(pane_name) = pane_name { - // we use debug print here so that quotes and backslashes will be escaped - pane_line.push_str(&format!(" name={:?}", pane_name)); - } - if let Some(split_size) = split_size { - pane_line.push_str(&format!(" size={}", split_size)); - } - if let Some(focus) = focus { - pane_line.push_str(&format!(" focus={}", focus)); - } - pane_line.push_str(&format!(" split_direction=\"{}\"", split_direction)); - if borderless { - pane_line.push_str(" borderless=true"); - } - pane_line -} - -fn pane_command_line( - pane_name: Option<&String>, - split_size: Option<OldSplitSize>, - focus: Option<bool>, - borderless: bool, - command: &PathBuf, -) -> String { - let mut pane_line = format!("pane command={:?}", command); - if let Some(pane_name) = pane_name { - // we use debug print here so that quotes and backslashes will be escaped - pane_line.push_str(&format!(" name={:?}", pane_name)); - } - if let Some(split_size) = split_size { - pane_line.push_str(&format!(" size={}", split_size)); - } - if let Some(focus) = focus { - pane_line.push_str(&format!(" focus={}", focus)); - } - if borderless { - pane_line.push_str(" borderless=true"); - } - pane_line -} - -fn tab_line_with_children( - pane_name: Option<&String>, - split_size: Option<OldSplitSize>, - focus: Option<bool>, - borderless: bool, - split_direction: OldDirection, -) -> String { - let mut pane_line = format!("tab"); - if let Some(pane_name) = pane_name { - // we use debug print here so that quotes and backslashes will be escaped - pane_line.push_str(&format!(" name={:?}", pane_name)); - } - if let Some(split_size) = split_size { - pane_line.push_str(&format!(" size={}", split_size)); - } - if let Some(focus) = focus { - pane_line.push_str(&format!(" focus={}", focus)); - } - pane_line.push_str(&format!(" split_direction=\"{}\"", split_direction)); - if borderless { - pane_line.push_str(" borderless=true"); - } - pane_line -} - -fn stringify_template( - template: &OldLayoutTemplate, - indentation: String, - has_no_tabs: bool, - is_base: bool, -) -> String { - let mut stringified = if is_base { - String::new() - } else { - String::from("\n") - }; - if is_base && !template.parts.is_empty() && template.direction == OldDirection::Vertical { - // we don't support specifying the split direction in the layout node - // eg. layout split_direction="Vertical" { .. } <== this is not supported!! - // so we need to add a child wrapper with the split direction instead: - // layout { - // pane split_direction="Vertical" { .. } - // } - let child_indentation = format!("{} ", &indentation); - stringified.push_str(&stringify_template( - template, - child_indentation, - has_no_tabs, - false, - )); - } else if !template.parts.is_empty() { - if !is_base { - stringified.push_str(&format!( - "{}{} {{", - indentation, - pane_line_with_children( - template.pane_name.as_ref(), - template.split_size, - template.focus, - template.borderless, - template.direction - ) - )); - } - for part in &template.parts { - let child_indentation = format!("{} ", &indentation); - stringified.push_str(&stringify_template( - &part, - child_indentation, - has_no_tabs, - false, - )); - } - if !is_base { - stringified.push_str(&format!("\n{}}}", indentation)); - } - } else if template.body && !has_no_tabs { - stringified.push_str(&format!("{}children", indentation)); - } else { - match template.run.as_ref() { - Some(OldRunFromYaml::Plugin(plugin_from_yaml)) => { - stringified.push_str(&format!( - "{}{} {{\n", - &indentation, - pane_line( - template.pane_name.as_ref(), - template.split_size, - template.focus, - template.borderless - ) - )); - stringified.push_str(&format!( - "{} plugin location=\"{}\"\n", - &indentation, plugin_from_yaml.location - )); - stringified.push_str(&format!("{}}}", &indentation)); - }, - Some(OldRunFromYaml::Command(command_from_yaml)) => { - stringified.push_str(&format!( - "{}{}", - &indentation, - &pane_command_line( - template.pane_name.as_ref(), - template.split_size, - template.focus, - template.borderless, - &command_from_yaml.command - ) - )); - if let Some(cwd) = command_from_yaml.cwd.as_ref() { - stringified.push_str(&format!(" cwd={:?}", cwd)); - } - if !command_from_yaml.args.is_empty() { - stringified.push_str(" {\n"); - stringified.push_str(&format!( - "{} args {}\n", - &indentation, - command_from_yaml - .args - .iter() - // we use debug print here so that quotes and backslashes will be - // escaped - .map(|s| format!("{:?}", s)) - .collect::<Vec<String>>() - .join(" ") - )); - stringified.push_str(&format!("{}}}", &indentation)); - } - }, - None => { - stringified.push_str(&format!( - "{}{}", - &indentation, - pane_line( - template.pane_name.as_ref(), - template.split_size, - template.focus, - template.borderless - ) - )); - }, - }; - } - stringified -} - -fn stringify_tabs(tabs: Vec<OldTabLayout>) -> String { - let mut stringified = String::new(); - for tab in tabs { - let child_indentation = String::from(" "); - if !tab.parts.is_empty() { - stringified.push_str(&format!( - "\n{}{} {{", - child_indentation, - tab_line_with_children( - tab.pane_name.as_ref(), - tab.split_size, - tab.focus, - tab.borderless, - tab.direction - ) - )); - let tab_template = OldLayoutTemplate::from(tab); - stringified.push_str(&stringify_template( - &tab_template, - child_indentation.clone(), - true, - true, - )); - stringified.push_str(&format!("\n{}}}", child_indentation)); - } else { - stringified.push_str(&format!( - "\n{}{}", - child_indentation, - tab_line( - tab.pane_name.as_ref(), - tab.split_size, - tab.focus, - tab.borderless - ) - )); - } - } - stringified -} - -pub fn layout_yaml_to_layout_kdl(raw_yaml_layout: &str) -> Result<String, String> { - // returns the raw kdl config - let layout_from_yaml: OldLayoutFromYamlIntermediate = serde_yaml::from_str(raw_yaml_layout) - .map_err(|e| format!("Failed to parse yaml: {:?}", e))?; - let mut kdl_layout = String::new(); - kdl_layout.push_str("layout {"); - let template = layout_from_yaml.template; - let tabs = layout_from_yaml.tabs; - let has_no_tabs = tabs.is_empty() - || tabs.len() == 1 && tabs.get(0).map(|t| t.parts.is_empty()).unwrap_or(false); - if has_no_tabs { - let indentation = String::from(""); - kdl_layout.push_str(&stringify_template( - &template, - indentation, - has_no_tabs, - true, - )); - } else { - kdl_layout.push_str("\n default_tab_template {"); - let indentation = String::from(" "); - kdl_layout.push_str(&stringify_template( - &template, - indentation, - has_no_tabs, - true, - )); - kdl_layout.push_str("\n }"); - kdl_layout.push_str(&stringify_tabs(tabs)); - } - kdl_layout.push_str("\n}"); - let layout_config = config_yaml_to_config_kdl(raw_yaml_layout, true)?; - if let Some(session_name) = layout_from_yaml.session.name { - // we use debug print here so that quotes and backslashes will be escaped - kdl_layout.push_str(&format!("\nsession_name {:?}", session_name)); - if let Some(attach_to_session) = layout_from_yaml.session.attach { - kdl_layout.push_str(&format!("\nattach_to_session {}", attach_to_session)); - } - } - if !layout_config.is_empty() { - kdl_layout.push('\n'); - } - kdl_layout.push_str(&layout_config); - Ok(kdl_layout) -} - -#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone, Copy)] -pub enum OldDirection { - #[serde(alias = "horizontal")] - Horizontal, - #[serde(alias = "vertical")] - Vertical, -} - -impl fmt::Display for OldDirection { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { - match self { - Self::Horizontal => write!(f, "Horizontal"), - Self::Vertical => write!(f, "Vertical"), - } - } -} - -#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)] -pub enum OldSplitSize { - #[serde(alias = "percent")] - Percent(u64), // 1 to 100 - #[serde(alias = "fixed")] - Fixed(usize), // An absolute number of columns or rows -} - -impl fmt::Display for OldSplitSize { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { - match self { - Self::Percent(percent) => write!(f, "\"{}%\"", percent), - Self::Fixed(fixed_size) => write!(f, "{}", fixed_size), - } - } -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] -pub enum OldRunFromYaml { - #[serde(rename = "plugin")] - Plugin(OldRunPluginFromYaml), - #[serde(rename = "command")] - Command(OldRunCommand), -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] -pub struct OldRunPluginFromYaml { - #[serde(default)] - pub _allow_exec_host_cmd: bool, - pub location: Url, -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -#[serde(default)] -pub struct OldLayoutFromYamlIntermediate { - #[serde(default)] - pub template: OldLayoutTemplate, - #[serde(default)] - pub borderless: bool, - #[serde(default)] - pub tabs: Vec<OldTabLayout>, - #[serde(default)] - pub session: OldSessionFromYaml, - #[serde(flatten)] - pub config: Option<OldConfigFromYaml>, -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)] -#[serde(default)] -pub struct OldLayoutFromYaml { - #[serde(default)] - pub session: OldSessionFromYaml, - #[serde(default)] - pub template: OldLayoutTemplate, - #[serde(default)] - pub borderless: bool, - #[serde(default)] - pub tabs: Vec<OldTabLayout>, -} - -#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)] -pub struct OldSessionFromYaml { - pub name: Option<String>, - #[serde(default = "default_as_some_true")] - pub attach: Option<bool>, -} - -fn default_as_some_true() -> Option<bool> { - Some(true) -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -pub struct OldLayoutTemplate { - pub direction: OldDirection, - #[serde(default)] - pub pane_name: Option<String>, - #[serde(default)] - pub borderless: bool, - #[serde(default)] - pub parts: Vec<OldLayoutTemplate>, - #[serde(default)] - pub body: bool, - pub split_size: Option<OldSplitSize>, - pub focus: Option<bool>, - pub run: Option<OldRunFromYaml>, -} - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] -pub struct OldTabLayout { - #[serde(default)] - pub direction: OldDirection, - pub pane_name: Option<String>, - #[serde(default)] - pub borderless: bool, - #[serde(default)] - pub parts: Vec<OldTabLayout>, - pub split_size: Option<OldSplitSize>, - #[serde(default)] - pub name: String, - pub focus: Option<bool>, - pub run: Option<OldRunFromYaml>, -} - -impl From<OldTabLayout> for OldLayoutTemplate { - fn from(old_tab_layout: OldTabLayout) -> Self { - OldLayoutTemplate { - direction: old_tab_layout.direction, - pane_name: old_tab_layout.pane_name.clone(), - borderless: old_tab_layout.borderless, - parts: old_tab_layout.parts.iter().map(|o| o.into()).collect(), - split_size: old_tab_layout.split_size, - focus: old_tab_layout.focus, - run: old_tab_layout.run.clone(), - body: false, - } - } -} - -impl From<&OldTabLayout> for OldLayoutTemplate { - fn from(old_tab_layout: &OldTabLayout) -> Self { - OldLayoutTemplate { - direction: old_tab_layout.direction, - pane_name: old_tab_layout.pane_name.clone(), - borderless: old_tab_layout.borderless, - parts: old_tab_layout.parts.iter().map(|o| o.into()).collect(), - split_size: old_tab_layout.split_size, - focus: old_tab_layout.focus, - run: old_tab_layout.run.clone(), - body: false, - } - } -} - -impl From<&mut OldTabLayout> for OldLayoutTemplate { - fn from(old_tab_layout: &mut OldTabLayout) -> Self { - OldLayoutTemplate { - direction: old_tab_layout.direction, - pane_name: old_tab_layout.pane_name.clone(), - borderless: old_tab_layout.borderless, - parts: old_tab_layout.parts.iter().map(|o| o.into()).collect(), - split_size: old_tab_layout.split_size, - focus: old_tab_layout.focus, - run: old_tab_layout.run.clone(), - body: false, - } - } -} - -impl From<OldLayoutFromYamlIntermediate> for OldLayoutFromYaml { - fn from(layout_from_yaml_intermediate: OldLayoutFromYamlIntermediate) -> Self { - Self { - template: layout_from_yaml_intermediate.template, - borderless: layout_from_yaml_intermediate.borderless, - tabs: layout_from_yaml_intermediate.tabs, - session: layout_from_yaml_intermediate.session, - } - } -} - -impl From<OldLayoutFromYaml> for OldLayoutFromYamlIntermediate { - fn from(layout_from_yaml: OldLayoutFromYaml) -> Self { - Self { - template: layout_from_yaml.template, - borderless: layout_from_yaml.borderless, - tabs: layout_from_yaml.tabs, - config: None, - session: layout_from_yaml.session, - } - } -} - -impl Default for OldLayoutFromYamlIntermediate { - fn default() -> Self { - OldLayoutFromYaml::default().into() - } -} - -impl Default for OldLayoutTemplate { - fn default() -> Self { - Self { - direction: OldDirection::Horizontal, - pane_name: None, - body: false, - borderless: false, - parts: vec![OldLayoutTemplate { - direction: OldDirection::Horizontal, - pane_name: None, - body: true, - borderless: false, - split_size: None, - focus: None, - run: None, - parts: vec![], - }], - split_size: None, - focus: None, - run: None, - } - } -} - -impl Default for OldDirection { - fn default() -> Self { - OldDirection::Horizontal - } -} - -// The unit test location. -#[path = "./unit/convert_layout_tests.rs"] -#[cfg(test)] -mod convert_layout_test; diff --git a/zellij-client/src/old_config_converter/unit/convert_config_tests.rs b/zellij-client/src/old_config_converter/unit/convert_config_tests.rs deleted file mode 100644 index 444d8775..00000000 --- a/zellij-client/src/old_config_converter/unit/convert_config_tests.rs +++ /dev/null @@ -1,126 +0,0 @@ -use crate::old_config_converter::config_yaml_to_config_kdl; -use insta::assert_snapshot; -use std::path::PathBuf; -use std::{fs::File, io::prelude::*}; - -#[test] -fn properly_convert_default_config() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/old_default_yaml_config.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = config_yaml_to_config_kdl(&raw_config_file, false)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn convert_config_with_custom_options() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/old_yaml_config_with_custom_options.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = config_yaml_to_config_kdl(&raw_config_file, false)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn convert_config_with_keybind_unbinds_in_mode() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/old_yaml_config_with_unbinds_in_mode.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = config_yaml_to_config_kdl(&raw_config_file, false)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn convert_config_with_global_keybind_unbinds() -> Result<(), String> { - let fixture = PathBuf::from(format!("{}/src/old_config_converter/unit/fixtures/old_yaml_config_with_global_keybind_unbinds.yaml", env!("CARGO_MANIFEST_DIR"))); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = config_yaml_to_config_kdl(&raw_config_file, false)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn convert_config_with_unbind_all_keys_per_mode() -> Result<(), String> { - let fixture = PathBuf::from(format!("{}/src/old_config_converter/unit/fixtures/old_yaml_config_with_unbind_all_keys_per_mode.yaml", env!("CARGO_MANIFEST_DIR"))); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = config_yaml_to_config_kdl(&raw_config_file, false)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn convert_config_with_env_variables() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/old_yaml_config_with_env_variables.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = config_yaml_to_config_kdl(&raw_config_file, false)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn convert_config_with_ui_config() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/old_yaml_config_with_ui.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = config_yaml_to_config_kdl(&raw_config_file, false)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn convert_config_with_themes_config() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/old_yaml_config_with_themes.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = config_yaml_to_config_kdl(&raw_config_file, false)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} diff --git a/zellij-client/src/old_config_converter/unit/convert_layout_tests.rs b/zellij-client/src/old_config_converter/unit/convert_layout_tests.rs deleted file mode 100644 index 1915da2a..00000000 --- a/zellij-client/src/old_config_converter/unit/convert_layout_tests.rs +++ /dev/null @@ -1,158 +0,0 @@ -use crate::old_config_converter::layout_yaml_to_layout_kdl; -use insta::assert_snapshot; -use std::path::PathBuf; -use std::{fs::File, io::prelude::*}; - -#[test] -fn properly_convert_default_layout() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/old_default_yaml_layout.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = layout_yaml_to_layout_kdl(&raw_config_file)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn properly_convert_layout_with_session_name() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/old_yaml_layout_with_session_name.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = layout_yaml_to_layout_kdl(&raw_config_file)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn properly_convert_layout_with_session_name_and_attach_false() -> Result<(), String> { - let fixture = PathBuf::from(format!("{}/src/old_config_converter/unit/fixtures/old_yaml_layout_with_session_name_and_attach_false.yaml", env!("CARGO_MANIFEST_DIR"))); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = layout_yaml_to_layout_kdl(&raw_config_file)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn properly_convert_layout_with_config() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/old_yaml_layout_with_config.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = layout_yaml_to_layout_kdl(&raw_config_file)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn properly_convert_layout_with_config_and_session_name() -> Result<(), String> { - let fixture = PathBuf::from(format!("{}/src/old_config_converter/unit/fixtures/old_yaml_layout_with_config_and_session_name.yaml", env!("CARGO_MANIFEST_DIR"))); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = layout_yaml_to_layout_kdl(&raw_config_file)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn properly_convert_layout_example_1() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/multiple_tabs_layout.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = layout_yaml_to_layout_kdl(&raw_config_file)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn properly_convert_layout_example_2() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/multiple_tabs_layout_htop_command.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = layout_yaml_to_layout_kdl(&raw_config_file)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn properly_convert_layout_example_3() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/run_htop_layout.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = layout_yaml_to_layout_kdl(&raw_config_file)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn properly_convert_layout_example_4() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/run_htop_layout_with_plugins.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = layout_yaml_to_layout_kdl(&raw_config_file)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} - -#[test] -fn properly_convert_layout_with_command_quoted_args() -> Result<(), String> { - let fixture = PathBuf::from(format!( - "{}/src/old_config_converter/unit/fixtures/old_yaml_layout_with_quoted_args.yaml", - env!("CARGO_MANIFEST_DIR") - )); - let mut handle = File::open(&fixture).map_err(|e| format!("{}", e))?; - let mut raw_config_file = String::new(); - handle - .read_to_string(&mut raw_config_file) - .map_err(|e| format!("{}", e))?; - let kdl_config = layout_yaml_to_layout_kdl(&raw_config_file)?; - assert_snapshot!(format!("{}", kdl_config)); - Ok(()) -} diff --git a/zellij-client/src/old_config_converter/unit/fixtures/multiple_tabs_layout.yaml b/zellij-client/src/old_config_converter/unit/fixtures/multiple_tabs_layout.yaml deleted file mode 100644 index 04fca4a5..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/multiple_tabs_layout.yaml +++ /dev/null @@ -1,90 +0,0 @@ ---- -template: - direction: Horizontal - parts: - - direction: Vertical - split_size: - Fixed: 1 - run: - plugin: - location: "zellij:tab-bar" - borderless: true - - direction: Vertical - body: true - - direction: Vertical - split_size: - Fixed: 2 - run: - plugin: - location: "zellij:status-bar" - borderless: true - -tabs: -- direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Vertical - split_size: - Percent: 50 -- direction: Vertical -- direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Vertical - split_size: - Percent: 50 -- direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Horizontal - split_size: - Percent: 50 - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Vertical - split_size: - Percent: 50 -- direction: Vertical -- direction: Vertical -- direction: Vertical -- direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 20 - run: - plugin: - location: "zellij:strider" - - direction: Horizontal - split_size: - Percent: 80 - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Vertical - split_size: - Percent: 50 -- direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 40 - - direction: Horizontal - split_size: - Percent: 60 - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Vertical - split_size: - Percent: 50 diff --git a/zellij-client/src/old_config_converter/unit/fixtures/multiple_tabs_layout_htop_command.yaml b/zellij-client/src/old_config_converter/unit/fixtures/multiple_tabs_layout_htop_command.yaml deleted file mode 100644 index 1449aa71..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/multiple_tabs_layout_htop_command.yaml +++ /dev/null @@ -1,93 +0,0 @@ ---- -template: - direction: Horizontal - parts: - - direction: Vertical - split_size: - Fixed: 1 - run: - plugin: - location: "zellij:tab-bar" - borderless: true - - direction: Vertical - body: true - - direction: Vertical - split_size: - Fixed: 2 - run: - plugin: - location: "zellij:status-bar" - borderless: true - -tabs: -- direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 50 - run: - command: {cmd: htop} - - direction: Vertical - split_size: - Percent: 50 -- direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Vertical - split_size: - Percent: 50 -- direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Horizontal - split_size: - Percent: 50 - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Vertical - split_size: - Percent: 50 -- direction: Vertical -- direction: Vertical - run: - command: {cmd: htop, args: ["-C"]} -- direction: Vertical -- direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 20 - run: - plugin: - location: "zellij:strider" - - direction: Horizontal - split_size: - Percent: 80 - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Vertical - split_size: - Percent: 50 -- direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 40 - - direction: Horizontal - split_size: - Percent: 60 - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Vertical - split_size: - Percent: 50 diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_default_yaml_config.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_default_yaml_config.yaml deleted file mode 100644 index cf0e5150..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_default_yaml_config.yaml +++ /dev/null @@ -1,639 +0,0 @@ ---- -# Configuration for zellij. - -# In order to troubleshoot your configuration try using the following command: -# `zellij setup --check` -# It should show current config locations and features that are enabled. - -keybinds: - unbind: true - normal: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [NewPane: ] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right ] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up, ] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - locked: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'g',] - resize: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'n', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [Resize: Left,] - key: [Char: 'h', Left,] - - action: [Resize: Down,] - key: [Char: 'j', Down,] - - action: [Resize: Up,] - key: [Char: 'k', Up, ] - - action: [Resize: Right,] - key: [Char: 'l', Right,] - - action: [Resize: Increase,] - key: [Char: '='] - - action: [Resize: Increase,] - key: [ Char: '+'] - - action: [Resize: Decrease,] - key: [Char: '-'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - pane: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'p', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [MoveFocus: Left,] - key: [ Char: 'h', Left,] - - action: [MoveFocus: Right,] - key: [ Char: 'l', Right,] - - action: [MoveFocus: Down,] - key: [ Char: 'j', Down,] - - action: [MoveFocus: Up,] - key: [ Char: 'k', Up,] - - action: [SwitchFocus,] - key: [Char: 'p'] - - action: [NewPane: , SwitchToMode: Normal,] - key: [Char: 'n',] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: 'd',] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: 'r',] - - action: [CloseFocus, SwitchToMode: Normal,] - key: [Char: 'x',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'f',] - - action: [TogglePaneFrames, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [ToggleFloatingPanes, SwitchToMode: Normal,] - key: [Char: 'w'] - - action: [TogglePaneEmbedOrFloating, SwitchToMode: Normal,] - key: [Char: 'e'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: RenamePane, PaneNameInput: [0],] - key: [Char: 'c'] - move: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'h', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [MovePane: ,] - key: [Char: 'n', Char: "\t",] - - action: [MovePane: Left,] - key: [Char: 'h', Left,] - - action: [MovePane: Down,] - key: [Char: 'j', Down,] - - action: [MovePane: Up,] - key: [Char: 'k', Up, ] - - action: [MovePane: Right,] - key: [Char: 'l', Right,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tab: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 't', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: 'r'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [GoToPreviousTab,] - key: [ Char: 'h', Left, Up, Char: 'k',] - - action: [GoToNextTab,] - key: [ Char: 'l', Right,Down, Char: 'j'] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'n',] - - action: [CloseTab, SwitchToMode: Normal,] - key: [ Char: 'x',] - - action: [ToggleActiveSyncTab, SwitchToMode: Normal,] - key: [Char: 's'] - - action: [GoToTab: 1, SwitchToMode: Normal,] - key: [ Char: '1',] - - action: [GoToTab: 2, SwitchToMode: Normal,] - key: [ Char: '2',] - - action: [GoToTab: 3, SwitchToMode: Normal,] - key: [ Char: '3',] - - action: [GoToTab: 4, SwitchToMode: Normal,] - key: [ Char: '4',] - - action: [GoToTab: 5, SwitchToMode: Normal,] - key: [ Char: '5',] - - action: [GoToTab: 6, SwitchToMode: Normal,] - key: [ Char: '6',] - - action: [GoToTab: 7, SwitchToMode: Normal,] - key: [ Char: '7',] - - action: [GoToTab: 8, SwitchToMode: Normal,] - key: [ Char: '8',] - - action: [GoToTab: 9, SwitchToMode: Normal,] - key: [ Char: '9',] - - action: [ToggleTab] - key: [ Char: "\t" ] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - scroll: - - action: [EditScrollback, SwitchToMode: Normal] - key: [Char: 'e'] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - entersearch: - - action: [SwitchToMode: Search,] - key: [Char: "\n"] - - action: [SearchInput: [27], SwitchToMode: Scroll,] - key: [Ctrl: 'c', Esc] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - search: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - - action: [Search: Down] - key: [Char: 'n'] - - action: [Search: Up] - key: [Char: 'p'] - - action: [SearchToggleOption: CaseSensitivity] - key: [Char: 'c'] - - action: [SearchToggleOption: Wrap] - key: [Char: 'w'] - - action: [SearchToggleOption: WholeWord] - key: [Char: 'o'] - renametab: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenameTab , SwitchToMode: Tab,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - renamepane: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenamePane , SwitchToMode: Pane,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - session: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Detach,] - key: [Char: 'd',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tmux: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Scroll,] - key: [ Char: '['] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Write: [2,], SwitchToMode: Normal] - key: [Ctrl: 'b'] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: "\"",] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: '%',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'c',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: ','] - - action: [GoToPreviousTab, SwitchToMode: Normal,] - key: [ Char: 'p'] - - action: [GoToNextTab, SwitchToMode: Normal,] - key: [ Char: 'n'] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Left,] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Right,] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Down,] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Up,] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Char: 'h'] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Char: 'l'] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Char: 'j'] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Char: 'k'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [FocusNextPane,] - key: [ Char: 'o'] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [Detach,] - key: [Char: 'd',] -plugins: - - path: tab-bar - tag: tab-bar - - path: status-bar - tag: status-bar - - path: strider - tag: strider - - path: compact-bar - tag: compact-bar - -# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -# eg. when terminal window with an active zellij session is closed -# Options: -# - detach (Default) -# - quit -# on_force_close: quit - -# Send a request for a simplified ui (without arrow fonts) to plugins -# Options: -# - true -# - false (Default) -# simplified_ui: true - -# Choose the path to the default shell that zellij will use for opening new panes -# Default: $SHELL -# default_shell: fish - -# Toggle between having pane frames around the panes -# Options: -# - true (default) -# - false -#pane_frames: true - -# Choose the theme that is specified in the themes section. -# For some examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes -# Default: default -#theme: default - -# Choose the mode that zellij uses when starting up. -# Default: normal -#default_mode: locked - -# Toggle enabling the mouse mode. -# On certain configurations, or terminals this could -# potentially interfere with copying text. -# Options: -# - true (default) -# - false -#mouse_mode: false - -# Configure the scroll back buffer size -# This is the number of lines zellij stores for each pane in the scroll back -# buffer. Excess number of lines are discarded in a FIFO fashion. -# Valid values: positive integers -# Default value: 10000 -#scroll_buffer_size: 10000 - -# Provide a command to execute when copying text. The text will be piped to -# the stdin of the program to perform the copy. This can be used with -# terminal emulators which do not support the OSC 52 ANSI control sequence -# that will be used by default if this option is not set. -# Examples: -#copy_command: "xclip -selection clipboard" # x11 -#copy_command: "wl-copy" # wayland -#copy_command: "pbcopy" # osx - -# Choose the destination for copied text -# Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -# Does not apply when using copy_command. -# Options: -# - system (default) -# - primary -#copy_clipboard: primary - -# Enable or disable automatic copy (and clear) of selection when releasing mouse -#copy_on_select: true - -# Path to the default editor to use to edit pane scrollbuffer -# scrollback_editor: /usr/bin/nano diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_default_yaml_layout.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_default_yaml_layout.yaml deleted file mode 100644 index 0688e54b..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_default_yaml_layout.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -template: - direction: Horizontal - parts: - - direction: Vertical - borderless: true - split_size: - Fixed: 1 - run: - plugin: - location: "zellij:tab-bar" - - direction: Vertical - body: true - - direction: Vertical - borderless: true - split_size: - Fixed: 2 - run: - plugin: - location: "zellij:status-bar" -tabs: - - direction: Vertical diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_custom_options.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_custom_options.yaml deleted file mode 100644 index 797a3f22..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_custom_options.yaml +++ /dev/null @@ -1,639 +0,0 @@ ---- -# Configuration for zellij. - -# In order to troubleshoot your configuration try using the following command: -# `zellij setup --check` -# It should show current config locations and features that are enabled. - -keybinds: - unbind: true - normal: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [NewPane: ] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right ] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up, ] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - locked: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'g',] - resize: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'n', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [Resize: Left,] - key: [Char: 'h', Left,] - - action: [Resize: Down,] - key: [Char: 'j', Down,] - - action: [Resize: Up,] - key: [Char: 'k', Up, ] - - action: [Resize: Right,] - key: [Char: 'l', Right,] - - action: [Resize: Increase,] - key: [Char: '='] - - action: [Resize: Increase,] - key: [ Char: '+'] - - action: [Resize: Decrease,] - key: [Char: '-'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - pane: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'p', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [MoveFocus: Left,] - key: [ Char: 'h', Left,] - - action: [MoveFocus: Right,] - key: [ Char: 'l', Right,] - - action: [MoveFocus: Down,] - key: [ Char: 'j', Down,] - - action: [MoveFocus: Up,] - key: [ Char: 'k', Up,] - - action: [SwitchFocus,] - key: [Char: 'p'] - - action: [NewPane: , SwitchToMode: Normal,] - key: [Char: 'n',] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: 'd',] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: 'r',] - - action: [CloseFocus, SwitchToMode: Normal,] - key: [Char: 'x',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'f',] - - action: [TogglePaneFrames, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [ToggleFloatingPanes, SwitchToMode: Normal,] - key: [Char: 'w'] - - action: [TogglePaneEmbedOrFloating, SwitchToMode: Normal,] - key: [Char: 'e'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: RenamePane, PaneNameInput: [0],] - key: [Char: 'c'] - move: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'h', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [MovePane: ,] - key: [Char: 'n', Char: "\t",] - - action: [MovePane: Left,] - key: [Char: 'h', Left,] - - action: [MovePane: Down,] - key: [Char: 'j', Down,] - - action: [MovePane: Up,] - key: [Char: 'k', Up, ] - - action: [MovePane: Right,] - key: [Char: 'l', Right,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tab: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 't', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: 'r'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [GoToPreviousTab,] - key: [ Char: 'h', Left, Up, Char: 'k',] - - action: [GoToNextTab,] - key: [ Char: 'l', Right,Down, Char: 'j'] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'n',] - - action: [CloseTab, SwitchToMode: Normal,] - key: [ Char: 'x',] - - action: [ToggleActiveSyncTab, SwitchToMode: Normal,] - key: [Char: 's'] - - action: [GoToTab: 1, SwitchToMode: Normal,] - key: [ Char: '1',] - - action: [GoToTab: 2, SwitchToMode: Normal,] - key: [ Char: '2',] - - action: [GoToTab: 3, SwitchToMode: Normal,] - key: [ Char: '3',] - - action: [GoToTab: 4, SwitchToMode: Normal,] - key: [ Char: '4',] - - action: [GoToTab: 5, SwitchToMode: Normal,] - key: [ Char: '5',] - - action: [GoToTab: 6, SwitchToMode: Normal,] - key: [ Char: '6',] - - action: [GoToTab: 7, SwitchToMode: Normal,] - key: [ Char: '7',] - - action: [GoToTab: 8, SwitchToMode: Normal,] - key: [ Char: '8',] - - action: [GoToTab: 9, SwitchToMode: Normal,] - key: [ Char: '9',] - - action: [ToggleTab] - key: [ Char: "\t" ] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - scroll: - - action: [EditScrollback, SwitchToMode: Normal] - key: [Char: 'e'] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - entersearch: - - action: [SwitchToMode: Search,] - key: [Char: "\n"] - - action: [SearchInput: [27], SwitchToMode: Scroll,] - key: [Ctrl: 'c', Esc] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - search: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - - action: [Search: Down] - key: [Char: 'n'] - - action: [Search: Up] - key: [Char: 'p'] - - action: [SearchToggleOption: CaseSensitivity] - key: [Char: 'c'] - - action: [SearchToggleOption: Wrap] - key: [Char: 'w'] - - action: [SearchToggleOption: WholeWord] - key: [Char: 'o'] - renametab: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenameTab , SwitchToMode: Tab,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - renamepane: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenamePane , SwitchToMode: Pane,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - session: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Detach,] - key: [Char: 'd',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tmux: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Scroll,] - key: [ Char: '['] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Write: [2,], SwitchToMode: Normal] - key: [Ctrl: 'b'] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: "\"",] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: '%',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'c',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: ','] - - action: [GoToPreviousTab, SwitchToMode: Normal,] - key: [ Char: 'p'] - - action: [GoToNextTab, SwitchToMode: Normal,] - key: [ Char: 'n'] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Left,] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Right,] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Down,] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Up,] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Char: 'h'] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Char: 'l'] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Char: 'j'] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Char: 'k'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [FocusNextPane,] - key: [ Char: 'o'] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [Detach,] - key: [Char: 'd',] -plugins: - - path: tab-bar - tag: tab-bar - - path: status-bar - tag: status-bar - - path: strider - tag: strider - - path: compact-bar - tag: compact-bar - -# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -# eg. when terminal window with an active zellij session is closed -# Options: -# - detach (Default) -# - quit -on_force_close: quit - -# Send a request for a simplified ui (without arrow fonts) to plugins -# Options: -# - true -# - false (Default) -simplified_ui: true - -# Choose the path to the default shell that zellij will use for opening new panes -# Default: $SHELL -default_shell: fish - -# Toggle between having pane frames around the panes -# Options: -# - true (default) -# - false -pane_frames: true - -# Choose the theme that is specified in the themes section. -# For some examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes -# Default: default -theme: default - -# Choose the mode that zellij uses when starting up. -# Default: normal -default_mode: locked - -# Toggle enabling the mouse mode. -# On certain configurations, or terminals this could -# potentially interfere with copying text. -# Options: -# - true (default) -# - false -mouse_mode: false - -# Configure the scroll back buffer size -# This is the number of lines zellij stores for each pane in the scroll back -# buffer. Excess number of lines are discarded in a FIFO fashion. -# Valid values: positive integers -# Default value: 10000 -scroll_buffer_size: 10000 - -# Provide a command to execute when copying text. The text will be piped to -# the stdin of the program to perform the copy. This can be used with -# terminal emulators which do not support the OSC 52 ANSI control sequence -# that will be used by default if this option is not set. -# Examples: -#copy_command: "xclip -selection clipboard" # x11 -#copy_command: "wl-copy" # wayland -copy_command: "pbcopy" # osx - -# Choose the destination for copied text -# Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -# Does not apply when using copy_command. -# Options: -# - system (default) -# - primary -copy_clipboard: primary - -# Enable or disable automatic copy (and clear) of selection when releasing mouse -copy_on_select: true - -# Path to the default editor to use to edit pane scrollbuffer -scrollback_editor: /usr/bin/nano diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_env_variables.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_env_variables.yaml deleted file mode 100644 index 26006ba3..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_env_variables.yaml +++ /dev/null @@ -1,644 +0,0 @@ ---- -# Configuration for zellij. - -# In order to troubleshoot your configuration try using the following command: -# `zellij setup --check` -# It should show current config locations and features that are enabled. - -keybinds: - unbind: true - normal: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [NewPane: ] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right ] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up, ] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - locked: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'g',] - resize: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'n', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [Resize: Left,] - key: [Char: 'h', Left,] - - action: [Resize: Down,] - key: [Char: 'j', Down,] - - action: [Resize: Up,] - key: [Char: 'k', Up, ] - - action: [Resize: Right,] - key: [Char: 'l', Right,] - - action: [Resize: Increase,] - key: [Char: '='] - - action: [Resize: Increase,] - key: [ Char: '+'] - - action: [Resize: Decrease,] - key: [Char: '-'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - pane: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'p', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [MoveFocus: Left,] - key: [ Char: 'h', Left,] - - action: [MoveFocus: Right,] - key: [ Char: 'l', Right,] - - action: [MoveFocus: Down,] - key: [ Char: 'j', Down,] - - action: [MoveFocus: Up,] - key: [ Char: 'k', Up,] - - action: [SwitchFocus,] - key: [Char: 'p'] - - action: [NewPane: , SwitchToMode: Normal,] - key: [Char: 'n',] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: 'd',] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: 'r',] - - action: [CloseFocus, SwitchToMode: Normal,] - key: [Char: 'x',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'f',] - - action: [TogglePaneFrames, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [ToggleFloatingPanes, SwitchToMode: Normal,] - key: [Char: 'w'] - - action: [TogglePaneEmbedOrFloating, SwitchToMode: Normal,] - key: [Char: 'e'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: RenamePane, PaneNameInput: [0],] - key: [Char: 'c'] - move: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'h', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [MovePane: ,] - key: [Char: 'n', Char: "\t",] - - action: [MovePane: Left,] - key: [Char: 'h', Left,] - - action: [MovePane: Down,] - key: [Char: 'j', Down,] - - action: [MovePane: Up,] - key: [Char: 'k', Up, ] - - action: [MovePane: Right,] - key: [Char: 'l', Right,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tab: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 't', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: 'r'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [GoToPreviousTab,] - key: [ Char: 'h', Left, Up, Char: 'k',] - - action: [GoToNextTab,] - key: [ Char: 'l', Right,Down, Char: 'j'] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'n',] - - action: [CloseTab, SwitchToMode: Normal,] - key: [ Char: 'x',] - - action: [ToggleActiveSyncTab, SwitchToMode: Normal,] - key: [Char: 's'] - - action: [GoToTab: 1, SwitchToMode: Normal,] - key: [ Char: '1',] - - action: [GoToTab: 2, SwitchToMode: Normal,] - key: [ Char: '2',] - - action: [GoToTab: 3, SwitchToMode: Normal,] - key: [ Char: '3',] - - action: [GoToTab: 4, SwitchToMode: Normal,] - key: [ Char: '4',] - - action: [GoToTab: 5, SwitchToMode: Normal,] - key: [ Char: '5',] - - action: [GoToTab: 6, SwitchToMode: Normal,] - key: [ Char: '6',] - - action: [GoToTab: 7, SwitchToMode: Normal,] - key: [ Char: '7',] - - action: [GoToTab: 8, SwitchToMode: Normal,] - key: [ Char: '8',] - - action: [GoToTab: 9, SwitchToMode: Normal,] - key: [ Char: '9',] - - action: [ToggleTab] - key: [ Char: "\t" ] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - scroll: - - action: [EditScrollback, SwitchToMode: Normal] - key: [Char: 'e'] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - entersearch: - - action: [SwitchToMode: Search,] - key: [Char: "\n"] - - action: [SearchInput: [27], SwitchToMode: Scroll,] - key: [Ctrl: 'c', Esc] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - search: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - - action: [Search: Down] - key: [Char: 'n'] - - action: [Search: Up] - key: [Char: 'p'] - - action: [SearchToggleOption: CaseSensitivity] - key: [Char: 'c'] - - action: [SearchToggleOption: Wrap] - key: [Char: 'w'] - - action: [SearchToggleOption: WholeWord] - key: [Char: 'o'] - renametab: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenameTab , SwitchToMode: Tab,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - renamepane: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenamePane , SwitchToMode: Pane,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - session: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Detach,] - key: [Char: 'd',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tmux: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Scroll,] - key: [ Char: '['] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Write: [2,], SwitchToMode: Normal] - key: [Ctrl: 'b'] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: "\"",] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: '%',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'c',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: ','] - - action: [GoToPreviousTab, SwitchToMode: Normal,] - key: [ Char: 'p'] - - action: [GoToNextTab, SwitchToMode: Normal,] - key: [ Char: 'n'] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Left,] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Right,] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Down,] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Up,] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Char: 'h'] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Char: 'l'] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Char: 'j'] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Char: 'k'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [FocusNextPane,] - key: [ Char: 'o'] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [Detach,] - key: [Char: 'd',] -plugins: - - path: tab-bar - tag: tab-bar - - path: status-bar - tag: status-bar - - path: strider - tag: strider - - path: compact-bar - tag: compact-bar - -env: - foo: bar - bar: baz - RUST_BACKTRACE: "1" - -# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -# eg. when terminal window with an active zellij session is closed -# Options: -# - detach (Default) -# - quit -# on_force_close: quit - -# Send a request for a simplified ui (without arrow fonts) to plugins -# Options: -# - true -# - false (Default) -# simplified_ui: true - -# Choose the path to the default shell that zellij will use for opening new panes -# Default: $SHELL -# default_shell: fish - -# Toggle between having pane frames around the panes -# Options: -# - true (default) -# - false -#pane_frames: true - -# Choose the theme that is specified in the themes section. -# For some examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes -# Default: default -#theme: default - -# Choose the mode that zellij uses when starting up. -# Default: normal -#default_mode: locked - -# Toggle enabling the mouse mode. -# On certain configurations, or terminals this could -# potentially interfere with copying text. -# Options: -# - true (default) -# - false -#mouse_mode: false - -# Configure the scroll back buffer size -# This is the number of lines zellij stores for each pane in the scroll back -# buffer. Excess number of lines are discarded in a FIFO fashion. -# Valid values: positive integers -# Default value: 10000 -#scroll_buffer_size: 10000 - -# Provide a command to execute when copying text. The text will be piped to -# the stdin of the program to perform the copy. This can be used with -# terminal emulators which do not support the OSC 52 ANSI control sequence -# that will be used by default if this option is not set. -# Examples: -#copy_command: "xclip -selection clipboard" # x11 -#copy_command: "wl-copy" # wayland -#copy_command: "pbcopy" # osx - -# Choose the destination for copied text -# Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -# Does not apply when using copy_command. -# Options: -# - system (default) -# - primary -#copy_clipboard: primary - -# Enable or disable automatic copy (and clear) of selection when releasing mouse -#copy_on_select: true - -# Path to the default editor to use to edit pane scrollbuffer -# scrollback_editor: /usr/bin/nano diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_global_keybind_unbinds.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_global_keybind_unbinds.yaml deleted file mode 100644 index 819764cb..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_global_keybind_unbinds.yaml +++ /dev/null @@ -1,639 +0,0 @@ ---- -# Configuration for zellij. - -# In order to troubleshoot your configuration try using the following command: -# `zellij setup --check` -# It should show current config locations and features that are enabled. - -keybinds: - unbind: [Ctrl: 'g', Char: ' '] - normal: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [NewPane: ] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right ] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up, ] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - locked: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'g',] - resize: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'n', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [Resize: Left,] - key: [Char: 'h', Left,] - - action: [Resize: Down,] - key: [Char: 'j', Down,] - - action: [Resize: Up,] - key: [Char: 'k', Up, ] - - action: [Resize: Right,] - key: [Char: 'l', Right,] - - action: [Resize: Increase,] - key: [Char: '='] - - action: [Resize: Increase,] - key: [ Char: '+'] - - action: [Resize: Decrease,] - key: [Char: '-'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - pane: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'p', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [MoveFocus: Left,] - key: [ Char: 'h', Left,] - - action: [MoveFocus: Right,] - key: [ Char: 'l', Right,] - - action: [MoveFocus: Down,] - key: [ Char: 'j', Down,] - - action: [MoveFocus: Up,] - key: [ Char: 'k', Up,] - - action: [SwitchFocus,] - key: [Char: 'p'] - - action: [NewPane: , SwitchToMode: Normal,] - key: [Char: 'n',] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: 'd',] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: 'r',] - - action: [CloseFocus, SwitchToMode: Normal,] - key: [Char: 'x',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'f',] - - action: [TogglePaneFrames, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [ToggleFloatingPanes, SwitchToMode: Normal,] - key: [Char: 'w'] - - action: [TogglePaneEmbedOrFloating, SwitchToMode: Normal,] - key: [Char: 'e'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: RenamePane, PaneNameInput: [0],] - key: [Char: 'c'] - move: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'h', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [MovePane: ,] - key: [Char: 'n', Char: "\t",] - - action: [MovePane: Left,] - key: [Char: 'h', Left,] - - action: [MovePane: Down,] - key: [Char: 'j', Down,] - - action: [MovePane: Up,] - key: [Char: 'k', Up, ] - - action: [MovePane: Right,] - key: [Char: 'l', Right,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tab: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 't', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: 'r'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [GoToPreviousTab,] - key: [ Char: 'h', Left, Up, Char: 'k',] - - action: [GoToNextTab,] - key: [ Char: 'l', Right,Down, Char: 'j'] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'n',] - - action: [CloseTab, SwitchToMode: Normal,] - key: [ Char: 'x',] - - action: [ToggleActiveSyncTab, SwitchToMode: Normal,] - key: [Char: 's'] - - action: [GoToTab: 1, SwitchToMode: Normal,] - key: [ Char: '1',] - - action: [GoToTab: 2, SwitchToMode: Normal,] - key: [ Char: '2',] - - action: [GoToTab: 3, SwitchToMode: Normal,] - key: [ Char: '3',] - - action: [GoToTab: 4, SwitchToMode: Normal,] - key: [ Char: '4',] - - action: [GoToTab: 5, SwitchToMode: Normal,] - key: [ Char: '5',] - - action: [GoToTab: 6, SwitchToMode: Normal,] - key: [ Char: '6',] - - action: [GoToTab: 7, SwitchToMode: Normal,] - key: [ Char: '7',] - - action: [GoToTab: 8, SwitchToMode: Normal,] - key: [ Char: '8',] - - action: [GoToTab: 9, SwitchToMode: Normal,] - key: [ Char: '9',] - - action: [ToggleTab] - key: [ Char: "\t" ] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - scroll: - - action: [EditScrollback, SwitchToMode: Normal] - key: [Char: 'e'] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - entersearch: - - action: [SwitchToMode: Search,] - key: [Char: "\n"] - - action: [SearchInput: [27], SwitchToMode: Scroll,] - key: [Ctrl: 'c', Esc] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - search: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - - action: [Search: Down] - key: [Char: 'n'] - - action: [Search: Up] - key: [Char: 'p'] - - action: [SearchToggleOption: CaseSensitivity] - key: [Char: 'c'] - - action: [SearchToggleOption: Wrap] - key: [Char: 'w'] - - action: [SearchToggleOption: WholeWord] - key: [Char: 'o'] - renametab: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenameTab , SwitchToMode: Tab,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - renamepane: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenamePane , SwitchToMode: Pane,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - session: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Detach,] - key: [Char: 'd',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tmux: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Scroll,] - key: [ Char: '['] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Write: [2,], SwitchToMode: Normal] - key: [Ctrl: 'b'] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: "\"",] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: '%',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'c',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: ','] - - action: [GoToPreviousTab, SwitchToMode: Normal,] - key: [ Char: 'p'] - - action: [GoToNextTab, SwitchToMode: Normal,] - key: [ Char: 'n'] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Left,] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Right,] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Down,] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Up,] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Char: 'h'] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Char: 'l'] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Char: 'j'] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Char: 'k'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [FocusNextPane,] - key: [ Char: 'o'] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [Detach,] - key: [Char: 'd',] -plugins: - - path: tab-bar - tag: tab-bar - - path: status-bar - tag: status-bar - - path: strider - tag: strider - - path: compact-bar - tag: compact-bar - -# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -# eg. when terminal window with an active zellij session is closed -# Options: -# - detach (Default) -# - quit -# on_force_close: quit - -# Send a request for a simplified ui (without arrow fonts) to plugins -# Options: -# - true -# - false (Default) -# simplified_ui: true - -# Choose the path to the default shell that zellij will use for opening new panes -# Default: $SHELL -# default_shell: fish - -# Toggle between having pane frames around the panes -# Options: -# - true (default) -# - false -#pane_frames: true - -# Choose the theme that is specified in the themes section. -# For some examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes -# Default: default -#theme: default - -# Choose the mode that zellij uses when starting up. -# Default: normal -#default_mode: locked - -# Toggle enabling the mouse mode. -# On certain configurations, or terminals this could -# potentially interfere with copying text. -# Options: -# - true (default) -# - false -#mouse_mode: false - -# Configure the scroll back buffer size -# This is the number of lines zellij stores for each pane in the scroll back -# buffer. Excess number of lines are discarded in a FIFO fashion. -# Valid values: positive integers -# Default value: 10000 -#scroll_buffer_size: 10000 - -# Provide a command to execute when copying text. The text will be piped to -# the stdin of the program to perform the copy. This can be used with -# terminal emulators which do not support the OSC 52 ANSI control sequence -# that will be used by default if this option is not set. -# Examples: -#copy_command: "xclip -selection clipboard" # x11 -#copy_command: "wl-copy" # wayland -#copy_command: "pbcopy" # osx - -# Choose the destination for copied text -# Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -# Does not apply when using copy_command. -# Options: -# - system (default) -# - primary -#copy_clipboard: primary - -# Enable or disable automatic copy (and clear) of selection when releasing mouse -#copy_on_select: true - -# Path to the default editor to use to edit pane scrollbuffer -# scrollback_editor: /usr/bin/nano diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_themes.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_themes.yaml deleted file mode 100644 index d2839a64..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_themes.yaml +++ /dev/null @@ -1,677 +0,0 @@ ---- -# Configuration for zellij. - -# In order to troubleshoot your configuration try using the following command: -# `zellij setup --check` -# It should show current config locations and features that are enabled. - -keybinds: - unbind: true - normal: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [NewPane: ] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right ] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up, ] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - locked: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'g',] - resize: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'n', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [Resize: Left,] - key: [Char: 'h', Left,] - - action: [Resize: Down,] - key: [Char: 'j', Down,] - - action: [Resize: Up,] - key: [Char: 'k', Up, ] - - action: [Resize: Right,] - key: [Char: 'l', Right,] - - action: [Resize: Increase,] - key: [Char: '='] - - action: [Resize: Increase,] - key: [ Char: '+'] - - action: [Resize: Decrease,] - key: [Char: '-'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - pane: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'p', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [MoveFocus: Left,] - key: [ Char: 'h', Left,] - - action: [MoveFocus: Right,] - key: [ Char: 'l', Right,] - - action: [MoveFocus: Down,] - key: [ Char: 'j', Down,] - - action: [MoveFocus: Up,] - key: [ Char: 'k', Up,] - - action: [SwitchFocus,] - key: [Char: 'p'] - - action: [NewPane: , SwitchToMode: Normal,] - key: [Char: 'n',] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: 'd',] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: 'r',] - - action: [CloseFocus, SwitchToMode: Normal,] - key: [Char: 'x',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'f',] - - action: [TogglePaneFrames, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [ToggleFloatingPanes, SwitchToMode: Normal,] - key: [Char: 'w'] - - action: [TogglePaneEmbedOrFloating, SwitchToMode: Normal,] - key: [Char: 'e'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: RenamePane, PaneNameInput: [0],] - key: [Char: 'c'] - move: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'h', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [MovePane: ,] - key: [Char: 'n', Char: "\t",] - - action: [MovePane: Left,] - key: [Char: 'h', Left,] - - action: [MovePane: Down,] - key: [Char: 'j', Down,] - - action: [MovePane: Up,] - key: [Char: 'k', Up, ] - - action: [MovePane: Right,] - key: [Char: 'l', Right,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tab: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 't', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: 'r'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [GoToPreviousTab,] - key: [ Char: 'h', Left, Up, Char: 'k',] - - action: [GoToNextTab,] - key: [ Char: 'l', Right,Down, Char: 'j'] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'n',] - - action: [CloseTab, SwitchToMode: Normal,] - key: [ Char: 'x',] - - action: [ToggleActiveSyncTab, SwitchToMode: Normal,] - key: [Char: 's'] - - action: [GoToTab: 1, SwitchToMode: Normal,] - key: [ Char: '1',] - - action: [GoToTab: 2, SwitchToMode: Normal,] - key: [ Char: '2',] - - action: [GoToTab: 3, SwitchToMode: Normal,] - key: [ Char: '3',] - - action: [GoToTab: 4, SwitchToMode: Normal,] - key: [ Char: '4',] - - action: [GoToTab: 5, SwitchToMode: Normal,] - key: [ Char: '5',] - - action: [GoToTab: 6, SwitchToMode: Normal,] - key: [ Char: '6',] - - action: [GoToTab: 7, SwitchToMode: Normal,] - key: [ Char: '7',] - - action: [GoToTab: 8, SwitchToMode: Normal,] - key: [ Char: '8',] - - action: [GoToTab: 9, SwitchToMode: Normal,] - key: [ Char: '9',] - - action: [ToggleTab] - key: [ Char: "\t" ] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - scroll: - - action: [EditScrollback, SwitchToMode: Normal] - key: [Char: 'e'] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - entersearch: - - action: [SwitchToMode: Search,] - key: [Char: "\n"] - - action: [SearchInput: [27], SwitchToMode: Scroll,] - key: [Ctrl: 'c', Esc] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - search: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - - action: [Search: Down] - key: [Char: 'n'] - - action: [Search: Up] - key: [Char: 'p'] - - action: [SearchToggleOption: CaseSensitivity] - key: [Char: 'c'] - - action: [SearchToggleOption: Wrap] - key: [Char: 'w'] - - action: [SearchToggleOption: WholeWord] - key: [Char: 'o'] - renametab: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenameTab , SwitchToMode: Tab,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - renamepane: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenamePane , SwitchToMode: Pane,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - session: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Detach,] - key: [Char: 'd',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tmux: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Scroll,] - key: [ Char: '['] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Write: [2,], SwitchToMode: Normal] - key: [Ctrl: 'b'] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: "\"",] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: '%',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'c',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: ','] - - action: [GoToPreviousTab, SwitchToMode: Normal,] - key: [ Char: 'p'] - - action: [GoToNextTab, SwitchToMode: Normal,] - key: [ Char: 'n'] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Left,] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Right,] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Down,] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Up,] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Char: 'h'] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Char: 'l'] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Char: 'j'] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Char: 'k'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [FocusNextPane,] - key: [ Char: 'o'] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [Detach,] - key: [Char: 'd',] -plugins: - - path: tab-bar - tag: tab-bar - - path: status-bar - tag: status-bar - - path: strider - tag: strider - - path: compact-bar - tag: compact-bar - -# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -# eg. when terminal window with an active zellij session is closed -# Options: -# - detach (Default) -# - quit -# on_force_close: quit - -# Send a request for a simplified ui (without arrow fonts) to plugins -# Options: -# - true -# - false (Default) -# simplified_ui: true - -# Choose the path to the default shell that zellij will use for opening new panes -# Default: $SHELL -# default_shell: fish - -# Toggle between having pane frames around the panes -# Options: -# - true (default) -# - false -#pane_frames: true - -# Choose the theme that is specified in the themes section. -# For some examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes -# Default: default -#theme: default - -# Choose the mode that zellij uses when starting up. -# Default: normal -#default_mode: locked - -# Toggle enabling the mouse mode. -# On certain configurations, or terminals this could -# potentially interfere with copying text. -# Options: -# - true (default) -# - false -#mouse_mode: false - -# Configure the scroll back buffer size -# This is the number of lines zellij stores for each pane in the scroll back -# buffer. Excess number of lines are discarded in a FIFO fashion. -# Valid values: positive integers -# Default value: 10000 -#scroll_buffer_size: 10000 - -# Provide a command to execute when copying text. The text will be piped to -# the stdin of the program to perform the copy. This can be used with -# terminal emulators which do not support the OSC 52 ANSI control sequence -# that will be used by default if this option is not set. -# Examples: -#copy_command: "xclip -selection clipboard" # x11 -#copy_command: "wl-copy" # wayland -#copy_command: "pbcopy" # osx - -# Choose the destination for copied text -# Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -# Does not apply when using copy_command. -# Options: -# - system (default) -# - primary -#copy_clipboard: primary - -# Enable or disable automatic copy (and clear) of selection when releasing mouse -#copy_on_select: true - -# Path to the default editor to use to edit pane scrollbuffer -# scrollback_editor: /usr/bin/nano -# -themes: - nord: - fg: "D8DEE9" - bg: "#2E3440" - black: "#3B4252" - red: "#BF616A" - green: "#A3BE8C" - yellow: "#EBCB8B" - blue: "#81A1C1" - magenta: "#B48EAD" - cyan: "#88C0D0" - white: "#E5E9F0" - orange: "#D08770" - molokai-dark: - bg: [27, 29, 30] - red: [255, 0, 0] - green: [0, 140, 0] - yellow: [255, 255, 0] - blue: [102, 217, 239] - magenta: [174, 129, 255] - orange: [253, 151, 31] - fg: [248, 248, 240] - cyan: [0, 255, 255] - black: [0, 0, 0] - white: [255, 255, 255] - some-eightbit-theme: - bg: 0 - red: 2 - green: 3 - yellow: 4 - blue: 5 - magenta: 6 - orange: 7 - fg: 8 - cyan: 9 - black: 10 - white: 255 diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_ui.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_ui.yaml deleted file mode 100644 index edf4af81..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_ui.yaml +++ /dev/null @@ -1,643 +0,0 @@ ---- -# Configuration for zellij. - -# In order to troubleshoot your configuration try using the following command: -# `zellij setup --check` -# It should show current config locations and features that are enabled. - -keybinds: - unbind: true - normal: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [NewPane: ] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right ] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up, ] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - locked: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'g',] - resize: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'n', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [Resize: Left,] - key: [Char: 'h', Left,] - - action: [Resize: Down,] - key: [Char: 'j', Down,] - - action: [Resize: Up,] - key: [Char: 'k', Up, ] - - action: [Resize: Right,] - key: [Char: 'l', Right,] - - action: [Resize: Increase,] - key: [Char: '='] - - action: [Resize: Increase,] - key: [ Char: '+'] - - action: [Resize: Decrease,] - key: [Char: '-'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - pane: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'p', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [MoveFocus: Left,] - key: [ Char: 'h', Left,] - - action: [MoveFocus: Right,] - key: [ Char: 'l', Right,] - - action: [MoveFocus: Down,] - key: [ Char: 'j', Down,] - - action: [MoveFocus: Up,] - key: [ Char: 'k', Up,] - - action: [SwitchFocus,] - key: [Char: 'p'] - - action: [NewPane: , SwitchToMode: Normal,] - key: [Char: 'n',] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: 'd',] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: 'r',] - - action: [CloseFocus, SwitchToMode: Normal,] - key: [Char: 'x',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'f',] - - action: [TogglePaneFrames, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [ToggleFloatingPanes, SwitchToMode: Normal,] - key: [Char: 'w'] - - action: [TogglePaneEmbedOrFloating, SwitchToMode: Normal,] - key: [Char: 'e'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: RenamePane, PaneNameInput: [0],] - key: [Char: 'c'] - move: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'h', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [MovePane: ,] - key: [Char: 'n', Char: "\t",] - - action: [MovePane: Left,] - key: [Char: 'h', Left,] - - action: [MovePane: Down,] - key: [Char: 'j', Down,] - - action: [MovePane: Up,] - key: [Char: 'k', Up, ] - - action: [MovePane: Right,] - key: [Char: 'l', Right,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tab: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 't', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: 'r'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [GoToPreviousTab,] - key: [ Char: 'h', Left, Up, Char: 'k',] - - action: [GoToNextTab,] - key: [ Char: 'l', Right,Down, Char: 'j'] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'n',] - - action: [CloseTab, SwitchToMode: Normal,] - key: [ Char: 'x',] - - action: [ToggleActiveSyncTab, SwitchToMode: Normal,] - key: [Char: 's'] - - action: [GoToTab: 1, SwitchToMode: Normal,] - key: [ Char: '1',] - - action: [GoToTab: 2, SwitchToMode: Normal,] - key: [ Char: '2',] - - action: [GoToTab: 3, SwitchToMode: Normal,] - key: [ Char: '3',] - - action: [GoToTab: 4, SwitchToMode: Normal,] - key: [ Char: '4',] - - action: [GoToTab: 5, SwitchToMode: Normal,] - key: [ Char: '5',] - - action: [GoToTab: 6, SwitchToMode: Normal,] - key: [ Char: '6',] - - action: [GoToTab: 7, SwitchToMode: Normal,] - key: [ Char: '7',] - - action: [GoToTab: 8, SwitchToMode: Normal,] - key: [ Char: '8',] - - action: [GoToTab: 9, SwitchToMode: Normal,] - key: [ Char: '9',] - - action: [ToggleTab] - key: [ Char: "\t" ] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - scroll: - - action: [EditScrollback, SwitchToMode: Normal] - key: [Char: 'e'] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - entersearch: - - action: [SwitchToMode: Search,] - key: [Char: "\n"] - - action: [SearchInput: [27], SwitchToMode: Scroll,] - key: [Ctrl: 'c', Esc] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - search: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - - action: [Search: Down] - key: [Char: 'n'] - - action: [Search: Up] - key: [Char: 'p'] - - action: [SearchToggleOption: CaseSensitivity] - key: [Char: 'c'] - - action: [SearchToggleOption: Wrap] - key: [Char: 'w'] - - action: [SearchToggleOption: WholeWord] - key: [Char: 'o'] - renametab: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenameTab , SwitchToMode: Tab,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - renamepane: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenamePane , SwitchToMode: Pane,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - session: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Detach,] - key: [Char: 'd',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tmux: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Scroll,] - key: [ Char: '['] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Write: [2,], SwitchToMode: Normal] - key: [Ctrl: 'b'] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: "\"",] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: '%',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'c',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: ','] - - action: [GoToPreviousTab, SwitchToMode: Normal,] - key: [ Char: 'p'] - - action: [GoToNextTab, SwitchToMode: Normal,] - key: [ Char: 'n'] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Left,] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Right,] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Down,] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Up,] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Char: 'h'] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Char: 'l'] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Char: 'j'] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Char: 'k'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [FocusNextPane,] - key: [ Char: 'o'] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [Detach,] - key: [Char: 'd',] -plugins: - - path: tab-bar - tag: tab-bar - - path: status-bar - tag: status-bar - - path: strider - tag: strider - - path: compact-bar - tag: compact-bar - -ui: - pane_frames: - rounded_corners: true -# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -# eg. when terminal window with an active zellij session is closed -# Options: -# - detach (Default) -# - quit -# on_force_close: quit - -# Send a request for a simplified ui (without arrow fonts) to plugins -# Options: -# - true -# - false (Default) -# simplified_ui: true - -# Choose the path to the default shell that zellij will use for opening new panes -# Default: $SHELL -# default_shell: fish - -# Toggle between having pane frames around the panes -# Options: -# - true (default) -# - false -#pane_frames: true - -# Choose the theme that is specified in the themes section. -# For some examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes -# Default: default -#theme: default - -# Choose the mode that zellij uses when starting up. -# Default: normal -#default_mode: locked - -# Toggle enabling the mouse mode. -# On certain configurations, or terminals this could -# potentially interfere with copying text. -# Options: -# - true (default) -# - false -#mouse_mode: false - -# Configure the scroll back buffer size -# This is the number of lines zellij stores for each pane in the scroll back -# buffer. Excess number of lines are discarded in a FIFO fashion. -# Valid values: positive integers -# Default value: 10000 -#scroll_buffer_size: 10000 - -# Provide a command to execute when copying text. The text will be piped to -# the stdin of the program to perform the copy. This can be used with -# terminal emulators which do not support the OSC 52 ANSI control sequence -# that will be used by default if this option is not set. -# Examples: -#copy_command: "xclip -selection clipboard" # x11 -#copy_command: "wl-copy" # wayland -#copy_command: "pbcopy" # osx - -# Choose the destination for copied text -# Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -# Does not apply when using copy_command. -# Options: -# - system (default) -# - primary -#copy_clipboard: primary - -# Enable or disable automatic copy (and clear) of selection when releasing mouse -#copy_on_select: true - -# Path to the default editor to use to edit pane scrollbuffer -# scrollback_editor: /usr/bin/nano diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_unbind_all_keys_per_mode.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_unbind_all_keys_per_mode.yaml deleted file mode 100644 index 5cf962b8..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_unbind_all_keys_per_mode.yaml +++ /dev/null @@ -1,639 +0,0 @@ ---- -# Configuration for zellij. - -# In order to troubleshoot your configuration try using the following command: -# `zellij setup --check` -# It should show current config locations and features that are enabled. - -keybinds: - normal: - - unbind: true - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [NewPane: ] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right ] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up, ] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - locked: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'g',] - resize: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'n', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [Resize: Left,] - key: [Char: 'h', Left,] - - action: [Resize: Down,] - key: [Char: 'j', Down,] - - action: [Resize: Up,] - key: [Char: 'k', Up, ] - - action: [Resize: Right,] - key: [Char: 'l', Right,] - - action: [Resize: Increase,] - key: [Char: '='] - - action: [Resize: Increase,] - key: [ Char: '+'] - - action: [Resize: Decrease,] - key: [Char: '-'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - pane: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'p', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [MoveFocus: Left,] - key: [ Char: 'h', Left,] - - action: [MoveFocus: Right,] - key: [ Char: 'l', Right,] - - action: [MoveFocus: Down,] - key: [ Char: 'j', Down,] - - action: [MoveFocus: Up,] - key: [ Char: 'k', Up,] - - action: [SwitchFocus,] - key: [Char: 'p'] - - action: [NewPane: , SwitchToMode: Normal,] - key: [Char: 'n',] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: 'd',] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: 'r',] - - action: [CloseFocus, SwitchToMode: Normal,] - key: [Char: 'x',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'f',] - - action: [TogglePaneFrames, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [ToggleFloatingPanes, SwitchToMode: Normal,] - key: [Char: 'w'] - - action: [TogglePaneEmbedOrFloating, SwitchToMode: Normal,] - key: [Char: 'e'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: RenamePane, PaneNameInput: [0],] - key: [Char: 'c'] - move: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'h', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [MovePane: ,] - key: [Char: 'n', Char: "\t",] - - action: [MovePane: Left,] - key: [Char: 'h', Left,] - - action: [MovePane: Down,] - key: [Char: 'j', Down,] - - action: [MovePane: Up,] - key: [Char: 'k', Up, ] - - action: [MovePane: Right,] - key: [Char: 'l', Right,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tab: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 't', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: 'r'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [GoToPreviousTab,] - key: [ Char: 'h', Left, Up, Char: 'k',] - - action: [GoToNextTab,] - key: [ Char: 'l', Right,Down, Char: 'j'] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'n',] - - action: [CloseTab, SwitchToMode: Normal,] - key: [ Char: 'x',] - - action: [ToggleActiveSyncTab, SwitchToMode: Normal,] - key: [Char: 's'] - - action: [GoToTab: 1, SwitchToMode: Normal,] - key: [ Char: '1',] - - action: [GoToTab: 2, SwitchToMode: Normal,] - key: [ Char: '2',] - - action: [GoToTab: 3, SwitchToMode: Normal,] - key: [ Char: '3',] - - action: [GoToTab: 4, SwitchToMode: Normal,] - key: [ Char: '4',] - - action: [GoToTab: 5, SwitchToMode: Normal,] - key: [ Char: '5',] - - action: [GoToTab: 6, SwitchToMode: Normal,] - key: [ Char: '6',] - - action: [GoToTab: 7, SwitchToMode: Normal,] - key: [ Char: '7',] - - action: [GoToTab: 8, SwitchToMode: Normal,] - key: [ Char: '8',] - - action: [GoToTab: 9, SwitchToMode: Normal,] - key: [ Char: '9',] - - action: [ToggleTab] - key: [ Char: "\t" ] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - scroll: - - action: [EditScrollback, SwitchToMode: Normal] - key: [Char: 'e'] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - entersearch: - - action: [SwitchToMode: Search,] - key: [Char: "\n"] - - action: [SearchInput: [27], SwitchToMode: Scroll,] - key: [Ctrl: 'c', Esc] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - search: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - - action: [Search: Down] - key: [Char: 'n'] - - action: [Search: Up] - key: [Char: 'p'] - - action: [SearchToggleOption: CaseSensitivity] - key: [Char: 'c'] - - action: [SearchToggleOption: Wrap] - key: [Char: 'w'] - - action: [SearchToggleOption: WholeWord] - key: [Char: 'o'] - renametab: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenameTab , SwitchToMode: Tab,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - renamepane: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenamePane , SwitchToMode: Pane,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - session: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Detach,] - key: [Char: 'd',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tmux: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Scroll,] - key: [ Char: '['] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Write: [2,], SwitchToMode: Normal] - key: [Ctrl: 'b'] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: "\"",] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: '%',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'c',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: ','] - - action: [GoToPreviousTab, SwitchToMode: Normal,] - key: [ Char: 'p'] - - action: [GoToNextTab, SwitchToMode: Normal,] - key: [ Char: 'n'] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Left,] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Right,] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Down,] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Up,] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Char: 'h'] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Char: 'l'] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Char: 'j'] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Char: 'k'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [FocusNextPane,] - key: [ Char: 'o'] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [Detach,] - key: [Char: 'd',] -plugins: - - path: tab-bar - tag: tab-bar - - path: status-bar - tag: status-bar - - path: strider - tag: strider - - path: compact-bar - tag: compact-bar - -# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -# eg. when terminal window with an active zellij session is closed -# Options: -# - detach (Default) -# - quit -# on_force_close: quit - -# Send a request for a simplified ui (without arrow fonts) to plugins -# Options: -# - true -# - false (Default) -# simplified_ui: true - -# Choose the path to the default shell that zellij will use for opening new panes -# Default: $SHELL -# default_shell: fish - -# Toggle between having pane frames around the panes -# Options: -# - true (default) -# - false -#pane_frames: true - -# Choose the theme that is specified in the themes section. -# For some examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes -# Default: default -#theme: default - -# Choose the mode that zellij uses when starting up. -# Default: normal -#default_mode: locked - -# Toggle enabling the mouse mode. -# On certain configurations, or terminals this could -# potentially interfere with copying text. -# Options: -# - true (default) -# - false -#mouse_mode: false - -# Configure the scroll back buffer size -# This is the number of lines zellij stores for each pane in the scroll back -# buffer. Excess number of lines are discarded in a FIFO fashion. -# Valid values: positive integers -# Default value: 10000 -#scroll_buffer_size: 10000 - -# Provide a command to execute when copying text. The text will be piped to -# the stdin of the program to perform the copy. This can be used with -# terminal emulators which do not support the OSC 52 ANSI control sequence -# that will be used by default if this option is not set. -# Examples: -#copy_command: "xclip -selection clipboard" # x11 -#copy_command: "wl-copy" # wayland -#copy_command: "pbcopy" # osx - -# Choose the destination for copied text -# Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -# Does not apply when using copy_command. -# Options: -# - system (default) -# - primary -#copy_clipboard: primary - -# Enable or disable automatic copy (and clear) of selection when releasing mouse -#copy_on_select: true - -# Path to the default editor to use to edit pane scrollbuffer -# scrollback_editor: /usr/bin/nano diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_unbinds_in_mode.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_unbinds_in_mode.yaml deleted file mode 100644 index fff9a528..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_config_with_unbinds_in_mode.yaml +++ /dev/null @@ -1,640 +0,0 @@ ---- -# Configuration for zellij. - -# In order to troubleshoot your configuration try using the following command: -# `zellij setup --check` -# It should show current config locations and features that are enabled. - -keybinds: - unbind: true - normal: - - unbind: [Ctrl: 'a', Char: "\n"] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [NewPane: ] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right ] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up, ] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - locked: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'g',] - resize: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'n', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [Resize: Left,] - key: [Char: 'h', Left,] - - action: [Resize: Down,] - key: [Char: 'j', Down,] - - action: [Resize: Up,] - key: [Char: 'k', Up, ] - - action: [Resize: Right,] - key: [Char: 'l', Right,] - - action: [Resize: Increase,] - key: [Char: '='] - - action: [Resize: Increase,] - key: [ Char: '+'] - - action: [Resize: Decrease,] - key: [Char: '-'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - pane: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'p', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [MoveFocus: Left,] - key: [ Char: 'h', Left,] - - action: [MoveFocus: Right,] - key: [ Char: 'l', Right,] - - action: [MoveFocus: Down,] - key: [ Char: 'j', Down,] - - action: [MoveFocus: Up,] - key: [ Char: 'k', Up,] - - action: [SwitchFocus,] - key: [Char: 'p'] - - action: [NewPane: , SwitchToMode: Normal,] - key: [Char: 'n',] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: 'd',] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: 'r',] - - action: [CloseFocus, SwitchToMode: Normal,] - key: [Char: 'x',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'f',] - - action: [TogglePaneFrames, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [ToggleFloatingPanes, SwitchToMode: Normal,] - key: [Char: 'w'] - - action: [TogglePaneEmbedOrFloating, SwitchToMode: Normal,] - key: [Char: 'e'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: RenamePane, PaneNameInput: [0],] - key: [Char: 'c'] - move: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'h', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [Quit] - key: [Ctrl: 'q'] - - action: [MovePane: ,] - key: [Char: 'n', Char: "\t",] - - action: [MovePane: Left,] - key: [Char: 'h', Left,] - - action: [MovePane: Down,] - key: [Char: 'j', Down,] - - action: [MovePane: Up,] - key: [Char: 'k', Up, ] - - action: [MovePane: Right,] - key: [Char: 'l', Right,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tab: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 't', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: 'r'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [GoToPreviousTab,] - key: [ Char: 'h', Left, Up, Char: 'k',] - - action: [GoToNextTab,] - key: [ Char: 'l', Right,Down, Char: 'j'] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'n',] - - action: [CloseTab, SwitchToMode: Normal,] - key: [ Char: 'x',] - - action: [ToggleActiveSyncTab, SwitchToMode: Normal,] - key: [Char: 's'] - - action: [GoToTab: 1, SwitchToMode: Normal,] - key: [ Char: '1',] - - action: [GoToTab: 2, SwitchToMode: Normal,] - key: [ Char: '2',] - - action: [GoToTab: 3, SwitchToMode: Normal,] - key: [ Char: '3',] - - action: [GoToTab: 4, SwitchToMode: Normal,] - key: [ Char: '4',] - - action: [GoToTab: 5, SwitchToMode: Normal,] - key: [ Char: '5',] - - action: [GoToTab: 6, SwitchToMode: Normal,] - key: [ Char: '6',] - - action: [GoToTab: 7, SwitchToMode: Normal,] - key: [ Char: '7',] - - action: [GoToTab: 8, SwitchToMode: Normal,] - key: [ Char: '8',] - - action: [GoToTab: 9, SwitchToMode: Normal,] - key: [ Char: '9',] - - action: [ToggleTab] - key: [ Char: "\t" ] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - scroll: - - action: [EditScrollback, SwitchToMode: Normal] - key: [Char: 'e'] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - # uncomment this and adjust key if using copy_on_select=false - # - action: [Copy: ] - # key: [ Alt: 'c'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - entersearch: - - action: [SwitchToMode: Search,] - key: [Char: "\n"] - - action: [SearchInput: [27], SwitchToMode: Scroll,] - key: [Ctrl: 'c', Esc] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - search: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them! - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: EnterSearch, SearchInput: [0],] - key: [Char: 's'] - - action: [Search: Down] - key: [Char: 'n'] - - action: [Search: Up] - key: [Char: 'p'] - - action: [SearchToggleOption: CaseSensitivity] - key: [Char: 'c'] - - action: [SearchToggleOption: Wrap] - key: [Char: 'w'] - - action: [SearchToggleOption: WholeWord] - key: [Char: 'o'] - renametab: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenameTab , SwitchToMode: Tab,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - renamepane: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [UndoRenamePane , SwitchToMode: Pane,] - key: [Esc,] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - session: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Detach,] - key: [Char: 'd',] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tmux: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Scroll,] - key: [ Char: '['] - - action: [Quit,] - key: [Ctrl: 'q',] - - action: [Write: [2,], SwitchToMode: Normal] - key: [Ctrl: 'b'] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: "\"",] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: '%',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'c',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: ','] - - action: [GoToPreviousTab, SwitchToMode: Normal,] - key: [ Char: 'p'] - - action: [GoToNextTab, SwitchToMode: Normal,] - key: [ Char: 'n'] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Left,] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Right,] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Down,] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Up,] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Char: 'h'] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Char: 'l'] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Char: 'j'] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Char: 'k'] - - action: [NewPane: ,] - key: [ Alt: 'n',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h', Alt: Left] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l', Alt: Right] - - action: [MoveFocus: Down,] - key: [ Alt: 'j', Alt: Down] - - action: [MoveFocus: Up,] - key: [ Alt: 'k', Alt: Up] - - action: [FocusNextPane,] - key: [ Char: 'o'] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [Detach,] - key: [Char: 'd',] -plugins: - - path: tab-bar - tag: tab-bar - - path: status-bar - tag: status-bar - - path: strider - tag: strider - - path: compact-bar - tag: compact-bar - -# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -# eg. when terminal window with an active zellij session is closed -# Options: -# - detach (Default) -# - quit -# on_force_close: quit - -# Send a request for a simplified ui (without arrow fonts) to plugins -# Options: -# - true -# - false (Default) -# simplified_ui: true - -# Choose the path to the default shell that zellij will use for opening new panes -# Default: $SHELL -# default_shell: fish - -# Toggle between having pane frames around the panes -# Options: -# - true (default) -# - false -#pane_frames: true - -# Choose the theme that is specified in the themes section. -# For some examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes -# Default: default -#theme: default - -# Choose the mode that zellij uses when starting up. -# Default: normal -#default_mode: locked - -# Toggle enabling the mouse mode. -# On certain configurations, or terminals this could -# potentially interfere with copying text. -# Options: -# - true (default) -# - false -#mouse_mode: false - -# Configure the scroll back buffer size -# This is the number of lines zellij stores for each pane in the scroll back -# buffer. Excess number of lines are discarded in a FIFO fashion. -# Valid values: positive integers -# Default value: 10000 -#scroll_buffer_size: 10000 - -# Provide a command to execute when copying text. The text will be piped to -# the stdin of the program to perform the copy. This can be used with -# terminal emulators which do not support the OSC 52 ANSI control sequence -# that will be used by default if this option is not set. -# Examples: -#copy_command: "xclip -selection clipboard" # x11 -#copy_command: "wl-copy" # wayland -#copy_command: "pbcopy" # osx - -# Choose the destination for copied text -# Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -# Does not apply when using copy_command. -# Options: -# - system (default) -# - primary -#copy_clipboard: primary - -# Enable or disable automatic copy (and clear) of selection when releasing mouse -#copy_on_select: true - -# Path to the default editor to use to edit pane scrollbuffer -# scrollback_editor: /usr/bin/nano diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_config.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_config.yaml deleted file mode 100644 index 0d5f40b9..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_config.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -template: - direction: Horizontal - parts: - - direction: Vertical - borderless: true - split_size: - Fixed: 1 - run: - plugin: - location: "zellij:tab-bar" - - direction: Vertical - body: true - - direction: Vertical - borderless: true - split_size: - Fixed: 2 - run: - plugin: - location: "zellij:status-bar" -tabs: - - direction: Vertical -default_shell: fish -keybinds: - unbind: true - normal: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_config_and_session_name.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_config_and_session_name.yaml deleted file mode 100644 index 7e6fa2cb..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_config_and_session_name.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -template: - direction: Horizontal - parts: - - direction: Vertical - borderless: true - split_size: - Fixed: 1 - run: - plugin: - location: "zellij:tab-bar" - - direction: Vertical - body: true - - direction: Vertical - borderless: true - split_size: - Fixed: 2 - run: - plugin: - location: "zellij:status-bar" -tabs: - - direction: Vertical -session: - name: foo -default_shell: fish -keybinds: - unbind: true - normal: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_quoted_args.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_quoted_args.yaml deleted file mode 100644 index fc595f79..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_quoted_args.yaml +++ /dev/null @@ -1,6 +0,0 @@ -tabs: - - direction: Vertical - parts: - - direction: Vertical - run: - command: {cmd: bash, args: ["-c", "exec bash --init-file <(echo \"echo hi\") -i"]} diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_session_name.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_session_name.yaml deleted file mode 100644 index 9e452574..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_session_name.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -template: - direction: Horizontal - parts: - - direction: Vertical - borderless: true - split_size: - Fixed: 1 - run: - plugin: - location: "zellij:tab-bar" - - direction: Vertical - body: true - - direction: Vertical - borderless: true - split_size: - Fixed: 2 - run: - plugin: - location: "zellij:status-bar" -tabs: - - direction: Vertical -session: - name: foo diff --git a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_session_name_and_attach_false.yaml b/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_session_name_and_attach_false.yaml deleted file mode 100644 index 1f33f1c3..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/old_yaml_layout_with_session_name_and_attach_false.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -template: - direction: Horizontal - parts: - - direction: Vertical - borderless: true - split_size: - Fixed: 1 - run: - plugin: - location: "zellij:tab-bar" - - direction: Vertical - body: true - - direction: Vertical - borderless: true - split_size: - Fixed: 2 - run: - plugin: - location: "zellij:status-bar" -tabs: - - direction: Vertical -session: - name: foo - attach: false diff --git a/zellij-client/src/old_config_converter/unit/fixtures/run_htop_layout.yaml b/zellij-client/src/old_config_converter/unit/fixtures/run_htop_layout.yaml deleted file mode 100644 index 91f4f63c..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/run_htop_layout.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -tabs: - - direction: Vertical - parts: - - direction: Horizontal - split_size: - Percent: 50 - parts: - - direction: Vertical - split_size: - Percent: 50 - - direction: Vertical - split_size: - Percent: 50 - run: - command: {cmd: htop} - - direction: Horizontal - split_size: - Percent: 50 - run: - command: {cmd: htop} diff --git a/zellij-client/src/old_config_converter/unit/fixtures/run_htop_layout_with_plugins.yaml b/zellij-client/src/old_config_converter/unit/fixtures/run_htop_layout_with_plugins.yaml deleted file mode 100644 index 05d2798f..00000000 --- a/zellij-client/src/old_config_converter/unit/fixtures/run_htop_layout_with_plugins.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -tabs: - - direction: Horizontal - parts: - - direction: Vertical - split_size: - Fixed: 1 - run: - plugin: - location: "zellij:tab-bar" - borderless: true - - direction: Vertical - parts: - - direction: Vertical - parts: - - direction: Vertical - split_size: - Percent: 50 - run: - command: {cmd: htop} - - direction: Vertical - split_size: - Percent: 50 - run: - command: {cmd: htop, args: ["-C", "--tree"]} - - direction: Vertical - split_size: - Fixed: 5 - - direction: Vertical - split_size: - Fixed: 2 - run: - plugin: - location: "zellij:status-bar" - borderless: true diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_custom_options.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_custom_options.snap deleted file mode 100644 index 34539e60..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_custom_options.snap +++ /dev/null @@ -1,411 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_config_tests.rs -assertion_line: 24 -expression: "format!(\"{}\", kdl_config)" ---- -keybinds clear-defaults=true { - normal { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - locked { - bind "Ctrl g" { SwitchToMode "normal"; } - } - pane { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl p" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { MoveFocus "Left"; } - bind "l" "Right" { MoveFocus "Right"; } - bind "j" "Down" { MoveFocus "Down"; } - bind "k" "Up" { MoveFocus "Up"; } - bind "p" { SwitchFocus; } - bind "n" { NewPane; SwitchToMode "normal"; } - bind "d" { NewPane "Down"; SwitchToMode "normal"; } - bind "r" { NewPane "Right"; SwitchToMode "normal"; } - bind "x" { CloseFocus; SwitchToMode "normal"; } - bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "normal"; } - bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0; } - } - tab { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "Ctrl q" { Quit; } - bind "h" "Left" "Up" "k" { GoToPreviousTab; } - bind "l" "Right" "Down" "j" { GoToNextTab; } - bind "n" { NewTab; SwitchToMode "normal"; } - bind "x" { CloseTab; SwitchToMode "normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } - bind "1" { GoToTab 1; SwitchToMode "normal"; } - bind "2" { GoToTab 2; SwitchToMode "normal"; } - bind "3" { GoToTab 3; SwitchToMode "normal"; } - bind "4" { GoToTab 4; SwitchToMode "normal"; } - bind "5" { GoToTab 5; SwitchToMode "normal"; } - bind "6" { GoToTab 6; SwitchToMode "normal"; } - bind "7" { GoToTab 7; SwitchToMode "normal"; } - bind "8" { GoToTab 8; SwitchToMode "normal"; } - bind "9" { GoToTab 9; SwitchToMode "normal"; } - bind "Tab" { ToggleTab; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - resize { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { Resize "Left"; } - bind "j" "Down" { Resize "Down"; } - bind "k" "Up" { Resize "Up"; } - bind "l" "Right" { Resize "Right"; } - bind "=" { Resize "Increase"; } - bind "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - move { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl h" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl q" { Quit; } - bind "n" "Tab" { MovePane; } - bind "h" "Left" { MovePane "Left"; } - bind "j" "Down" { MovePane "Down"; } - bind "k" "Up" { MovePane "Up"; } - bind "l" "Right" { MovePane "Right"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - scroll { - bind "e" { EditScrollback; SwitchToMode "normal"; } - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - } - session { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "d" { Detach; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - search { - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - bind "n" { Search "Down"; } - bind "p" { Search "Up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "Enter" { SwitchToMode "search"; } - bind "Ctrl c" "Esc" { SearchInput 27; SwitchToMode "scroll"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenameTab { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "tab"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenamePane { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "pane"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - tmux { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "[" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "Ctrl b" { Write 2; SwitchToMode "normal"; } - bind "\"" { NewPane "Down"; SwitchToMode "normal"; } - bind "%" { NewPane "Right"; SwitchToMode "normal"; } - bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "c" { NewTab; SwitchToMode "normal"; } - bind "," { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "p" { GoToPreviousTab; SwitchToMode "normal"; } - bind "n" { GoToNextTab; SwitchToMode "normal"; } - bind "Left" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "Right" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "Down" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "Up" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "h" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "l" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "j" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "k" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "o" { FocusNextPane; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "d" { Detach; } - } -} - -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// Options: -// - detach (Default) -// - quit -// -on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -default_shell "fish" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -pane_frames true - -// Choose the theme that is specified in the themes section. -// Default: default -// -theme "default" - -// The name of the default layout to load on startup -// Default: "default" -// -// default_layout "compact" - -// Choose the mode that zellij uses when starting up. -// Default: normal -// -default_mode "locked" - -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// Options: -// - true (default) -// - false -// -mouse_mode false - -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// Valid values: positive integers -// Default value: 10000 -// -scroll_buffer_size 10000 - -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command "xclip -selection clipboard" // x11 -// copy_command "wl-copy" // wayland -// copy_command "pbcopy" // osx -copy_command "pbcopy" - -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -copy_on_select true - -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -scrollback_editor "/usr/bin/nano" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// -// layout_dir /path/to/my/layout_dir - -// The folder in which Zellij will look for themes -// -// theme_dir "/path/to/my/theme_dir" - -plugins { - tab-bar { path "tab-bar"; } - status-bar { path "status-bar"; } - strider { path "strider"; } - compact-bar { path "compact-bar"; } -} - diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_env_variables.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_env_variables.snap deleted file mode 100644 index c28f4afa..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_env_variables.snap +++ /dev/null @@ -1,415 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_config_tests.rs -assertion_line: 68 -expression: "format!(\"{}\", kdl_config)" ---- -keybinds clear-defaults=true { - normal { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - locked { - bind "Ctrl g" { SwitchToMode "normal"; } - } - pane { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl p" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { MoveFocus "Left"; } - bind "l" "Right" { MoveFocus "Right"; } - bind "j" "Down" { MoveFocus "Down"; } - bind "k" "Up" { MoveFocus "Up"; } - bind "p" { SwitchFocus; } - bind "n" { NewPane; SwitchToMode "normal"; } - bind "d" { NewPane "Down"; SwitchToMode "normal"; } - bind "r" { NewPane "Right"; SwitchToMode "normal"; } - bind "x" { CloseFocus; SwitchToMode "normal"; } - bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "normal"; } - bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0; } - } - tab { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "Ctrl q" { Quit; } - bind "h" "Left" "Up" "k" { GoToPreviousTab; } - bind "l" "Right" "Down" "j" { GoToNextTab; } - bind "n" { NewTab; SwitchToMode "normal"; } - bind "x" { CloseTab; SwitchToMode "normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } - bind "1" { GoToTab 1; SwitchToMode "normal"; } - bind "2" { GoToTab 2; SwitchToMode "normal"; } - bind "3" { GoToTab 3; SwitchToMode "normal"; } - bind "4" { GoToTab 4; SwitchToMode "normal"; } - bind "5" { GoToTab 5; SwitchToMode "normal"; } - bind "6" { GoToTab 6; SwitchToMode "normal"; } - bind "7" { GoToTab 7; SwitchToMode "normal"; } - bind "8" { GoToTab 8; SwitchToMode "normal"; } - bind "9" { GoToTab 9; SwitchToMode "normal"; } - bind "Tab" { ToggleTab; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - resize { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { Resize "Left"; } - bind "j" "Down" { Resize "Down"; } - bind "k" "Up" { Resize "Up"; } - bind "l" "Right" { Resize "Right"; } - bind "=" { Resize "Increase"; } - bind "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - move { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl h" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl q" { Quit; } - bind "n" "Tab" { MovePane; } - bind "h" "Left" { MovePane "Left"; } - bind "j" "Down" { MovePane "Down"; } - bind "k" "Up" { MovePane "Up"; } - bind "l" "Right" { MovePane "Right"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - scroll { - bind "e" { EditScrollback; SwitchToMode "normal"; } - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - } - session { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "d" { Detach; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - search { - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - bind "n" { Search "Down"; } - bind "p" { Search "Up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "Enter" { SwitchToMode "search"; } - bind "Ctrl c" "Esc" { SearchInput 27; SwitchToMode "scroll"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenameTab { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "tab"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenamePane { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "pane"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - tmux { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "[" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "Ctrl b" { Write 2; SwitchToMode "normal"; } - bind "\"" { NewPane "Down"; SwitchToMode "normal"; } - bind "%" { NewPane "Right"; SwitchToMode "normal"; } - bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "c" { NewTab; SwitchToMode "normal"; } - bind "," { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "p" { GoToPreviousTab; SwitchToMode "normal"; } - bind "n" { GoToNextTab; SwitchToMode "normal"; } - bind "Left" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "Right" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "Down" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "Up" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "h" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "l" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "j" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "k" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "o" { FocusNextPane; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "d" { Detach; } - } -} - -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// Options: -// - detach (Default) -// - quit -// -// on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -// simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -// default_shell "fish" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -// pane_frames true - -// Choose the theme that is specified in the themes section. -// Default: default -// -// theme "default" - -// The name of the default layout to load on startup -// Default: "default" -// -// default_layout "compact" - -// Choose the mode that zellij uses when starting up. -// Default: normal -// -// default_mode "locked" - -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// Options: -// - true (default) -// - false -// -// mouse_mode false - -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// Valid values: positive integers -// Default value: 10000 -// -// scroll_buffer_size 10000 - -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command "xclip -selection clipboard" // x11 -// copy_command "wl-copy" // wayland -// copy_command "pbcopy" // osx - -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -// copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -// copy_on_select false - -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -// scrollback_editor "/usr/bin/vim" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// -// layout_dir /path/to/my/layout_dir - -// The folder in which Zellij will look for themes -// -// theme_dir "/path/to/my/theme_dir" -env { - RUST_BACKTRACE "1" - bar "baz" - foo "bar" -} - -plugins { - tab-bar { path "tab-bar"; } - status-bar { path "status-bar"; } - strider { path "strider"; } - compact-bar { path "compact-bar"; } -} - diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_global_keybind_unbinds.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_global_keybind_unbinds.snap deleted file mode 100644 index 5ce03e24..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_global_keybind_unbinds.snap +++ /dev/null @@ -1,411 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_config_tests.rs -assertion_line: 46 -expression: "format!(\"{}\", kdl_config)" ---- -keybinds { - unbind "Ctrl g" "Space" - normal { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - locked { - bind "Ctrl g" { SwitchToMode "normal"; } - } - pane { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl p" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { MoveFocus "Left"; } - bind "l" "Right" { MoveFocus "Right"; } - bind "j" "Down" { MoveFocus "Down"; } - bind "k" "Up" { MoveFocus "Up"; } - bind "p" { SwitchFocus; } - bind "n" { NewPane; SwitchToMode "normal"; } - bind "d" { NewPane "Down"; SwitchToMode "normal"; } - bind "r" { NewPane "Right"; SwitchToMode "normal"; } - bind "x" { CloseFocus; SwitchToMode "normal"; } - bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "normal"; } - bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0; } - } - tab { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "Ctrl q" { Quit; } - bind "h" "Left" "Up" "k" { GoToPreviousTab; } - bind "l" "Right" "Down" "j" { GoToNextTab; } - bind "n" { NewTab; SwitchToMode "normal"; } - bind "x" { CloseTab; SwitchToMode "normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } - bind "1" { GoToTab 1; SwitchToMode "normal"; } - bind "2" { GoToTab 2; SwitchToMode "normal"; } - bind "3" { GoToTab 3; SwitchToMode "normal"; } - bind "4" { GoToTab 4; SwitchToMode "normal"; } - bind "5" { GoToTab 5; SwitchToMode "normal"; } - bind "6" { GoToTab 6; SwitchToMode "normal"; } - bind "7" { GoToTab 7; SwitchToMode "normal"; } - bind "8" { GoToTab 8; SwitchToMode "normal"; } - bind "9" { GoToTab 9; SwitchToMode "normal"; } - bind "Tab" { ToggleTab; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - resize { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { Resize "Left"; } - bind "j" "Down" { Resize "Down"; } - bind "k" "Up" { Resize "Up"; } - bind "l" "Right" { Resize "Right"; } - bind "=" { Resize "Increase"; } - bind "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - move { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl h" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl q" { Quit; } - bind "n" "Tab" { MovePane; } - bind "h" "Left" { MovePane "Left"; } - bind "j" "Down" { MovePane "Down"; } - bind "k" "Up" { MovePane "Up"; } - bind "l" "Right" { MovePane "Right"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - scroll { - bind "e" { EditScrollback; SwitchToMode "normal"; } - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - } - session { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "d" { Detach; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - search { - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - bind "n" { Search "Down"; } - bind "p" { Search "Up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "Enter" { SwitchToMode "search"; } - bind "Ctrl c" "Esc" { SearchInput 27; SwitchToMode "scroll"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenameTab { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "tab"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenamePane { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "pane"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - tmux { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "[" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "Ctrl b" { Write 2; SwitchToMode "normal"; } - bind "\"" { NewPane "Down"; SwitchToMode "normal"; } - bind "%" { NewPane "Right"; SwitchToMode "normal"; } - bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "c" { NewTab; SwitchToMode "normal"; } - bind "," { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "p" { GoToPreviousTab; SwitchToMode "normal"; } - bind "n" { GoToNextTab; SwitchToMode "normal"; } - bind "Left" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "Right" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "Down" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "Up" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "h" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "l" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "j" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "k" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "o" { FocusNextPane; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "d" { Detach; } - } -} - -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// Options: -// - detach (Default) -// - quit -// -// on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -// simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -// default_shell "fish" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -// pane_frames true - -// Choose the theme that is specified in the themes section. -// Default: default -// -// theme "default" - -// The name of the default layout to load on startup -// Default: "default" -// -// default_layout "compact" - -// Choose the mode that zellij uses when starting up. -// Default: normal -// -// default_mode "locked" - -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// Options: -// - true (default) -// - false -// -// mouse_mode false - -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// Valid values: positive integers -// Default value: 10000 -// -// scroll_buffer_size 10000 - -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command "xclip -selection clipboard" // x11 -// copy_command "wl-copy" // wayland -// copy_command "pbcopy" // osx - -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -// copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -// copy_on_select false - -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -// scrollback_editor "/usr/bin/vim" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// -// layout_dir /path/to/my/layout_dir - -// The folder in which Zellij will look for themes -// -// theme_dir "/path/to/my/theme_dir" - -plugins { - tab-bar { path "tab-bar"; } - status-bar { path "status-bar"; } - strider { path "strider"; } - compact-bar { path "compact-bar"; } -} - diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_keybind_unbinds_in_mode.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_keybind_unbinds_in_mode.snap deleted file mode 100644 index d7ac6474..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_keybind_unbinds_in_mode.snap +++ /dev/null @@ -1,411 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_config_tests.rs -assertion_line: 35 -expression: "format!(\"{}\", kdl_config)" ---- -keybinds clear-defaults=true { - normal { - unbind "Ctrl a" "Enter" - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - locked { - bind "Ctrl g" { SwitchToMode "normal"; } - } - pane { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl p" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { MoveFocus "Left"; } - bind "l" "Right" { MoveFocus "Right"; } - bind "j" "Down" { MoveFocus "Down"; } - bind "k" "Up" { MoveFocus "Up"; } - bind "p" { SwitchFocus; } - bind "n" { NewPane; SwitchToMode "normal"; } - bind "d" { NewPane "Down"; SwitchToMode "normal"; } - bind "r" { NewPane "Right"; SwitchToMode "normal"; } - bind "x" { CloseFocus; SwitchToMode "normal"; } - bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "normal"; } - bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0; } - } - tab { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "Ctrl q" { Quit; } - bind "h" "Left" "Up" "k" { GoToPreviousTab; } - bind "l" "Right" "Down" "j" { GoToNextTab; } - bind "n" { NewTab; SwitchToMode "normal"; } - bind "x" { CloseTab; SwitchToMode "normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } - bind "1" { GoToTab 1; SwitchToMode "normal"; } - bind "2" { GoToTab 2; SwitchToMode "normal"; } - bind "3" { GoToTab 3; SwitchToMode "normal"; } - bind "4" { GoToTab 4; SwitchToMode "normal"; } - bind "5" { GoToTab 5; SwitchToMode "normal"; } - bind "6" { GoToTab 6; SwitchToMode "normal"; } - bind "7" { GoToTab 7; SwitchToMode "normal"; } - bind "8" { GoToTab 8; SwitchToMode "normal"; } - bind "9" { GoToTab 9; SwitchToMode "normal"; } - bind "Tab" { ToggleTab; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - resize { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { Resize "Left"; } - bind "j" "Down" { Resize "Down"; } - bind "k" "Up" { Resize "Up"; } - bind "l" "Right" { Resize "Right"; } - bind "=" { Resize "Increase"; } - bind "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - move { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl h" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl q" { Quit; } - bind "n" "Tab" { MovePane; } - bind "h" "Left" { MovePane "Left"; } - bind "j" "Down" { MovePane "Down"; } - bind "k" "Up" { MovePane "Up"; } - bind "l" "Right" { MovePane "Right"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - scroll { - bind "e" { EditScrollback; SwitchToMode "normal"; } - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - } - session { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "d" { Detach; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - search { - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - bind "n" { Search "Down"; } - bind "p" { Search "Up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "Enter" { SwitchToMode "search"; } - bind "Ctrl c" "Esc" { SearchInput 27; SwitchToMode "scroll"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenameTab { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "tab"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenamePane { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "pane"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - tmux { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "[" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "Ctrl b" { Write 2; SwitchToMode "normal"; } - bind "\"" { NewPane "Down"; SwitchToMode "normal"; } - bind "%" { NewPane "Right"; SwitchToMode "normal"; } - bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "c" { NewTab; SwitchToMode "normal"; } - bind "," { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "p" { GoToPreviousTab; SwitchToMode "normal"; } - bind "n" { GoToNextTab; SwitchToMode "normal"; } - bind "Left" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "Right" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "Down" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "Up" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "h" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "l" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "j" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "k" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "o" { FocusNextPane; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "d" { Detach; } - } -} - -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// Options: -// - detach (Default) -// - quit -// -// on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -// simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -// default_shell "fish" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -// pane_frames true - -// Choose the theme that is specified in the themes section. -// Default: default -// -// theme "default" - -// The name of the default layout to load on startup -// Default: "default" -// -// default_layout "compact" - -// Choose the mode that zellij uses when starting up. -// Default: normal -// -// default_mode "locked" - -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// Options: -// - true (default) -// - false -// -// mouse_mode false - -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// Valid values: positive integers -// Default value: 10000 -// -// scroll_buffer_size 10000 - -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command "xclip -selection clipboard" // x11 -// copy_command "wl-copy" // wayland -// copy_command "pbcopy" // osx - -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -// copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -// copy_on_select false - -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -// scrollback_editor "/usr/bin/vim" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// -// layout_dir /path/to/my/layout_dir - -// The folder in which Zellij will look for themes -// -// theme_dir "/path/to/my/theme_dir" - -plugins { - tab-bar { path "tab-bar"; } - status-bar { path "status-bar"; } - strider { path "strider"; } - compact-bar { path "compact-bar"; } -} - diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_themes_config.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_themes_config.snap deleted file mode 100644 index f8a65133..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_themes_config.snap +++ /dev/null @@ -1,451 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_config_tests.rs -assertion_line: 90 -expression: "format!(\"{}\", kdl_config)" ---- -keybinds clear-defaults=true { - normal { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - locked { - bind "Ctrl g" { SwitchToMode "normal"; } - } - pane { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl p" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { MoveFocus "Left"; } - bind "l" "Right" { MoveFocus "Right"; } - bind "j" "Down" { MoveFocus "Down"; } - bind "k" "Up" { MoveFocus "Up"; } - bind "p" { SwitchFocus; } - bind "n" { NewPane; SwitchToMode "normal"; } - bind "d" { NewPane "Down"; SwitchToMode "normal"; } - bind "r" { NewPane "Right"; SwitchToMode "normal"; } - bind "x" { CloseFocus; SwitchToMode "normal"; } - bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "normal"; } - bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0; } - } - tab { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "Ctrl q" { Quit; } - bind "h" "Left" "Up" "k" { GoToPreviousTab; } - bind "l" "Right" "Down" "j" { GoToNextTab; } - bind "n" { NewTab; SwitchToMode "normal"; } - bind "x" { CloseTab; SwitchToMode "normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } - bind "1" { GoToTab 1; SwitchToMode "normal"; } - bind "2" { GoToTab 2; SwitchToMode "normal"; } - bind "3" { GoToTab 3; SwitchToMode "normal"; } - bind "4" { GoToTab 4; SwitchToMode "normal"; } - bind "5" { GoToTab 5; SwitchToMode "normal"; } - bind "6" { GoToTab 6; SwitchToMode "normal"; } - bind "7" { GoToTab 7; SwitchToMode "normal"; } - bind "8" { GoToTab 8; SwitchToMode "normal"; } - bind "9" { GoToTab 9; SwitchToMode "normal"; } - bind "Tab" { ToggleTab; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - resize { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { Resize "Left"; } - bind "j" "Down" { Resize "Down"; } - bind "k" "Up" { Resize "Up"; } - bind "l" "Right" { Resize "Right"; } - bind "=" { Resize "Increase"; } - bind "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - move { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl h" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl q" { Quit; } - bind "n" "Tab" { MovePane; } - bind "h" "Left" { MovePane "Left"; } - bind "j" "Down" { MovePane "Down"; } - bind "k" "Up" { MovePane "Up"; } - bind "l" "Right" { MovePane "Right"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - scroll { - bind "e" { EditScrollback; SwitchToMode "normal"; } - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - } - session { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "d" { Detach; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - search { - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - bind "n" { Search "Down"; } - bind "p" { Search "Up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "Enter" { SwitchToMode "search"; } - bind "Ctrl c" "Esc" { SearchInput 27; SwitchToMode "scroll"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenameTab { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "tab"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenamePane { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "pane"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - tmux { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "[" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "Ctrl b" { Write 2; SwitchToMode "normal"; } - bind "\"" { NewPane "Down"; SwitchToMode "normal"; } - bind "%" { NewPane "Right"; SwitchToMode "normal"; } - bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "c" { NewTab; SwitchToMode "normal"; } - bind "," { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "p" { GoToPreviousTab; SwitchToMode "normal"; } - bind "n" { GoToNextTab; SwitchToMode "normal"; } - bind "Left" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "Right" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "Down" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "Up" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "h" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "l" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "j" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "k" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "o" { FocusNextPane; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "d" { Detach; } - } -} - -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// Options: -// - detach (Default) -// - quit -// -// on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -// simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -// default_shell "fish" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -// pane_frames true - -// Choose the theme that is specified in the themes section. -// Default: default -// -// theme "default" - -// The name of the default layout to load on startup -// Default: "default" -// -// default_layout "compact" - -// Choose the mode that zellij uses when starting up. -// Default: normal -// -// default_mode "locked" - -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// Options: -// - true (default) -// - false -// -// mouse_mode false - -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// Valid values: positive integers -// Default value: 10000 -// -// scroll_buffer_size 10000 - -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command "xclip -selection clipboard" // x11 -// copy_command "wl-copy" // wayland -// copy_command "pbcopy" // osx - -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -// copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -// copy_on_select false - -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -// scrollback_editor "/usr/bin/vim" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// -// layout_dir /path/to/my/layout_dir - -// The folder in which Zellij will look for themes -// -// theme_dir "/path/to/my/theme_dir" - -plugins { - tab-bar { path "tab-bar"; } - status-bar { path "status-bar"; } - strider { path "strider"; } - compact-bar { path "compact-bar"; } -} -themes { - molokai-dark { - fg 248 248 240 - bg 27 29 30 - black 0 0 0 - red 255 0 0 - green 0 140 0 - yellow 255 255 0 - blue 102 217 239 - magenta 174 129 255 - cyan 0 255 255 - white 255 255 255 - orange 253 151 31 - } - nord { - fg 216 222 233 - bg 46 52 64 - black 59 66 82 - red 191 97 106 - green 163 190 140 - yellow 235 203 139 - blue 129 161 193 - magenta 180 142 173 - cyan 136 192 208 - white 229 233 240 - orange 208 135 112 - } - some-eightbit-theme { - fg 8 - bg 0 - black 10 - red 2 - green 3 - yellow 4 - blue 5 - magenta 6 - cyan 9 - white 255 - orange 7 - } -} - diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_ui_config.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_ui_config.snap deleted file mode 100644 index e805563a..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_ui_config.snap +++ /dev/null @@ -1,416 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_config_tests.rs -assertion_line: 79 -expression: "format!(\"{}\", kdl_config)" ---- -keybinds clear-defaults=true { - normal { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - locked { - bind "Ctrl g" { SwitchToMode "normal"; } - } - pane { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl p" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { MoveFocus "Left"; } - bind "l" "Right" { MoveFocus "Right"; } - bind "j" "Down" { MoveFocus "Down"; } - bind "k" "Up" { MoveFocus "Up"; } - bind "p" { SwitchFocus; } - bind "n" { NewPane; SwitchToMode "normal"; } - bind "d" { NewPane "Down"; SwitchToMode "normal"; } - bind "r" { NewPane "Right"; SwitchToMode "normal"; } - bind "x" { CloseFocus; SwitchToMode "normal"; } - bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "normal"; } - bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0; } - } - tab { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "Ctrl q" { Quit; } - bind "h" "Left" "Up" "k" { GoToPreviousTab; } - bind "l" "Right" "Down" "j" { GoToNextTab; } - bind "n" { NewTab; SwitchToMode "normal"; } - bind "x" { CloseTab; SwitchToMode "normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } - bind "1" { GoToTab 1; SwitchToMode "normal"; } - bind "2" { GoToTab 2; SwitchToMode "normal"; } - bind "3" { GoToTab 3; SwitchToMode "normal"; } - bind "4" { GoToTab 4; SwitchToMode "normal"; } - bind "5" { GoToTab 5; SwitchToMode "normal"; } - bind "6" { GoToTab 6; SwitchToMode "normal"; } - bind "7" { GoToTab 7; SwitchToMode "normal"; } - bind "8" { GoToTab 8; SwitchToMode "normal"; } - bind "9" { GoToTab 9; SwitchToMode "normal"; } - bind "Tab" { ToggleTab; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - resize { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { Resize "Left"; } - bind "j" "Down" { Resize "Down"; } - bind "k" "Up" { Resize "Up"; } - bind "l" "Right" { Resize "Right"; } - bind "=" { Resize "Increase"; } - bind "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - move { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl h" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl q" { Quit; } - bind "n" "Tab" { MovePane; } - bind "h" "Left" { MovePane "Left"; } - bind "j" "Down" { MovePane "Down"; } - bind "k" "Up" { MovePane "Up"; } - bind "l" "Right" { MovePane "Right"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - scroll { - bind "e" { EditScrollback; SwitchToMode "normal"; } - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - } - session { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "d" { Detach; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - search { - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - bind "n" { Search "Down"; } - bind "p" { Search "Up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "Enter" { SwitchToMode "search"; } - bind "Ctrl c" "Esc" { SearchInput 27; SwitchToMode "scroll"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenameTab { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "tab"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenamePane { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "pane"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - tmux { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "[" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "Ctrl b" { Write 2; SwitchToMode "normal"; } - bind "\"" { NewPane "Down"; SwitchToMode "normal"; } - bind "%" { NewPane "Right"; SwitchToMode "normal"; } - bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "c" { NewTab; SwitchToMode "normal"; } - bind "," { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "p" { GoToPreviousTab; SwitchToMode "normal"; } - bind "n" { GoToNextTab; SwitchToMode "normal"; } - bind "Left" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "Right" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "Down" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "Up" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "h" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "l" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "j" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "k" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "o" { FocusNextPane; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "d" { Detach; } - } -} - -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// Options: -// - detach (Default) -// - quit -// -// on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -// simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -// default_shell "fish" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -// pane_frames true - -// Choose the theme that is specified in the themes section. -// Default: default -// -// theme "default" - -// The name of the default layout to load on startup -// Default: "default" -// -// default_layout "compact" - -// Choose the mode that zellij uses when starting up. -// Default: normal -// -// default_mode "locked" - -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// Options: -// - true (default) -// - false -// -// mouse_mode false - -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// Valid values: positive integers -// Default value: 10000 -// -// scroll_buffer_size 10000 - -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command "xclip -selection clipboard" // x11 -// copy_command "wl-copy" // wayland -// copy_command "pbcopy" // osx - -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -// copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -// copy_on_select false - -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -// scrollback_editor "/usr/bin/vim" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// -// layout_dir /path/to/my/layout_dir - -// The folder in which Zellij will look for themes -// -// theme_dir "/path/to/my/theme_dir" - -plugins { - tab-bar { path "tab-bar"; } - status-bar { path "status-bar"; } - strider { path "strider"; } - compact-bar { path "compact-bar"; } -} - -ui { - pane_frames { - rounded_corners true - } -} - diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_unbind_all_keys_per_mode.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_unbind_all_keys_per_mode.snap deleted file mode 100644 index 2b35143e..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__convert_config_with_unbind_all_keys_per_mode.snap +++ /dev/null @@ -1,410 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_config_tests.rs -assertion_line: 57 -expression: "format!(\"{}\", kdl_config)" ---- -keybinds { - normal clear-defaults=true { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - locked { - bind "Ctrl g" { SwitchToMode "normal"; } - } - pane { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl p" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { MoveFocus "Left"; } - bind "l" "Right" { MoveFocus "Right"; } - bind "j" "Down" { MoveFocus "Down"; } - bind "k" "Up" { MoveFocus "Up"; } - bind "p" { SwitchFocus; } - bind "n" { NewPane; SwitchToMode "normal"; } - bind "d" { NewPane "Down"; SwitchToMode "normal"; } - bind "r" { NewPane "Right"; SwitchToMode "normal"; } - bind "x" { CloseFocus; SwitchToMode "normal"; } - bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "normal"; } - bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0; } - } - tab { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "Ctrl q" { Quit; } - bind "h" "Left" "Up" "k" { GoToPreviousTab; } - bind "l" "Right" "Down" "j" { GoToNextTab; } - bind "n" { NewTab; SwitchToMode "normal"; } - bind "x" { CloseTab; SwitchToMode "normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } - bind "1" { GoToTab 1; SwitchToMode "normal"; } - bind "2" { GoToTab 2; SwitchToMode "normal"; } - bind "3" { GoToTab 3; SwitchToMode "normal"; } - bind "4" { GoToTab 4; SwitchToMode "normal"; } - bind "5" { GoToTab 5; SwitchToMode "normal"; } - bind "6" { GoToTab 6; SwitchToMode "normal"; } - bind "7" { GoToTab 7; SwitchToMode "normal"; } - bind "8" { GoToTab 8; SwitchToMode "normal"; } - bind "9" { GoToTab 9; SwitchToMode "normal"; } - bind "Tab" { ToggleTab; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - resize { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { Resize "Left"; } - bind "j" "Down" { Resize "Down"; } - bind "k" "Up" { Resize "Up"; } - bind "l" "Right" { Resize "Right"; } - bind "=" { Resize "Increase"; } - bind "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - move { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl h" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl q" { Quit; } - bind "n" "Tab" { MovePane; } - bind "h" "Left" { MovePane "Left"; } - bind "j" "Down" { MovePane "Down"; } - bind "k" "Up" { MovePane "Up"; } - bind "l" "Right" { MovePane "Right"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - scroll { - bind "e" { EditScrollback; SwitchToMode "normal"; } - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - } - session { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "d" { Detach; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - search { - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - bind "n" { Search "Down"; } - bind "p" { Search "Up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "Enter" { SwitchToMode "search"; } - bind "Ctrl c" "Esc" { SearchInput 27; SwitchToMode "scroll"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenameTab { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "tab"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenamePane { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "pane"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - tmux { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "[" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "Ctrl b" { Write 2; SwitchToMode "normal"; } - bind "\"" { NewPane "Down"; SwitchToMode "normal"; } - bind "%" { NewPane "Right"; SwitchToMode "normal"; } - bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "c" { NewTab; SwitchToMode "normal"; } - bind "," { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "p" { GoToPreviousTab; SwitchToMode "normal"; } - bind "n" { GoToNextTab; SwitchToMode "normal"; } - bind "Left" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "Right" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "Down" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "Up" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "h" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "l" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "j" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "k" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "o" { FocusNextPane; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "d" { Detach; } - } -} - -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// Options: -// - detach (Default) -// - quit -// -// on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -// simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -// default_shell "fish" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -// pane_frames true - -// Choose the theme that is specified in the themes section. -// Default: default -// -// theme "default" - -// The name of the default layout to load on startup -// Default: "default" -// -// default_layout "compact" - -// Choose the mode that zellij uses when starting up. -// Default: normal -// -// default_mode "locked" - -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// Options: -// - true (default) -// - false -// -// mouse_mode false - -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// Valid values: positive integers -// Default value: 10000 -// -// scroll_buffer_size 10000 - -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command "xclip -selection clipboard" // x11 -// copy_command "wl-copy" // wayland -// copy_command "pbcopy" // osx - -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -// copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -// copy_on_select false - -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -// scrollback_editor "/usr/bin/vim" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// -// layout_dir /path/to/my/layout_dir - -// The folder in which Zellij will look for themes -// -// theme_dir "/path/to/my/theme_dir" - -plugins { - tab-bar { path "tab-bar"; } - status-bar { path "status-bar"; } - strider { path "strider"; } - compact-bar { path "compact-bar"; } -} - diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__properly_convert_default_config.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__properly_convert_default_config.snap deleted file mode 100644 index 461258e4..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_config__convert_config_test__properly_convert_default_config.snap +++ /dev/null @@ -1,410 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_config_tests.rs -assertion_line: 13 -expression: "format!(\"{}\", kdl_config)" ---- -keybinds clear-defaults=true { - normal { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - locked { - bind "Ctrl g" { SwitchToMode "normal"; } - } - pane { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl p" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { MoveFocus "Left"; } - bind "l" "Right" { MoveFocus "Right"; } - bind "j" "Down" { MoveFocus "Down"; } - bind "k" "Up" { MoveFocus "Up"; } - bind "p" { SwitchFocus; } - bind "n" { NewPane; SwitchToMode "normal"; } - bind "d" { NewPane "Down"; SwitchToMode "normal"; } - bind "r" { NewPane "Right"; SwitchToMode "normal"; } - bind "x" { CloseFocus; SwitchToMode "normal"; } - bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "normal"; } - bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0; } - } - tab { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "Ctrl q" { Quit; } - bind "h" "Left" "Up" "k" { GoToPreviousTab; } - bind "l" "Right" "Down" "j" { GoToNextTab; } - bind "n" { NewTab; SwitchToMode "normal"; } - bind "x" { CloseTab; SwitchToMode "normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } - bind "1" { GoToTab 1; SwitchToMode "normal"; } - bind "2" { GoToTab 2; SwitchToMode "normal"; } - bind "3" { GoToTab 3; SwitchToMode "normal"; } - bind "4" { GoToTab 4; SwitchToMode "normal"; } - bind "5" { GoToTab 5; SwitchToMode "normal"; } - bind "6" { GoToTab 6; SwitchToMode "normal"; } - bind "7" { GoToTab 7; SwitchToMode "normal"; } - bind "8" { GoToTab 8; SwitchToMode "normal"; } - bind "9" { GoToTab 9; SwitchToMode "normal"; } - bind "Tab" { ToggleTab; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - resize { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl q" { Quit; } - bind "h" "Left" { Resize "Left"; } - bind "j" "Down" { Resize "Down"; } - bind "k" "Up" { Resize "Up"; } - bind "l" "Right" { Resize "Right"; } - bind "=" { Resize "Increase"; } - bind "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - move { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl h" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl q" { Quit; } - bind "n" "Tab" { MovePane; } - bind "h" "Left" { MovePane "Left"; } - bind "j" "Down" { MovePane "Down"; } - bind "k" "Up" { MovePane "Up"; } - bind "l" "Right" { MovePane "Right"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - scroll { - bind "e" { EditScrollback; SwitchToMode "normal"; } - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - } - session { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "d" { Detach; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - search { - bind "Ctrl s" "Space" "Enter" "Esc" { SwitchToMode "normal"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl b" { SwitchToMode "tmux"; } - bind "Ctrl o" { SwitchToMode "session"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } - bind "Ctrl q" { Quit; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "s" { SwitchToMode "entersearch"; SearchInput 0; } - bind "n" { Search "Down"; } - bind "p" { Search "Up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "Enter" { SwitchToMode "search"; } - bind "Ctrl c" "Esc" { SearchInput 27; SwitchToMode "scroll"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenameTab { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "tab"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - RenamePane { - bind "Enter" "Ctrl c" "Esc" { SwitchToMode "normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "pane"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - } - tmux { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl h" { SwitchToMode "move"; } - bind "Ctrl t" { SwitchToMode "tab"; } - bind "Ctrl o" "Enter" "Space" "Esc" { SwitchToMode "normal"; } - bind "Ctrl s" { SwitchToMode "scroll"; } - bind "[" { SwitchToMode "scroll"; } - bind "Ctrl q" { Quit; } - bind "Ctrl b" { Write 2; SwitchToMode "normal"; } - bind "\"" { NewPane "Down"; SwitchToMode "normal"; } - bind "%" { NewPane "Right"; SwitchToMode "normal"; } - bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } - bind "c" { NewTab; SwitchToMode "normal"; } - bind "," { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "p" { GoToPreviousTab; SwitchToMode "normal"; } - bind "n" { GoToNextTab; SwitchToMode "normal"; } - bind "Left" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "Right" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "Down" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "Up" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "h" { MoveFocus "Left"; SwitchToMode "normal"; } - bind "l" { MoveFocus "Right"; SwitchToMode "normal"; } - bind "j" { MoveFocus "Down"; SwitchToMode "normal"; } - bind "k" { MoveFocus "Up"; SwitchToMode "normal"; } - bind "Alt n" { NewPane; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "o" { FocusNextPane; } - bind "Alt =" { Resize "Increase"; } - bind "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "d" { Detach; } - } -} - -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// Options: -// - detach (Default) -// - quit -// -// on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -// simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -// default_shell "fish" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -// pane_frames true - -// Choose the theme that is specified in the themes section. -// Default: default -// -// theme "default" - -// The name of the default layout to load on startup -// Default: "default" -// -// default_layout "compact" - -// Choose the mode that zellij uses when starting up. -// Default: normal -// -// default_mode "locked" - -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// Options: -// - true (default) -// - false -// -// mouse_mode false - -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// Valid values: positive integers -// Default value: 10000 -// -// scroll_buffer_size 10000 - -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command "xclip -selection clipboard" // x11 -// copy_command "wl-copy" // wayland -// copy_command "pbcopy" // osx - -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -// copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -// copy_on_select false - -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -// scrollback_editor "/usr/bin/vim" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// -// layout_dir /path/to/my/layout_dir - -// The folder in which Zellij will look for themes -// -// theme_dir "/path/to/my/theme_dir" - -plugins { - tab-bar { path "tab-bar"; } - status-bar { path "status-bar"; } - strider { path "strider"; } - compact-bar { path "compact-bar"; } -} - diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_default_layout.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_default_layout.snap deleted file mode 100644 index 94a9a4f3..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_default_layout.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_layout_tests.rs -assertion_line: 13 -expression: "format!(\"{}\", kdl_config)" ---- -layout { - pane size=1 borderless=true { - plugin location="zellij:tab-bar" - } - pane - pane size=2 borderless=true { - plugin location="zellij:status-bar" - } -} diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_1.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_1.snap deleted file mode 100644 index 67cb8a60..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_1.snap +++ /dev/null @@ -1,61 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_layout_tests.rs -assertion_line: 68 -expression: "format!(\"{}\", kdl_config)" ---- -layout { - default_tab_template { - pane size=1 borderless=true { - plugin location="zellij:tab-bar" - } - children - pane size=2 borderless=true { - plugin location="zellij:status-bar" - } - } - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane size="50%" - pane size="50%" - } - } - tab - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane size="50%" - pane size="50%" - } - } - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane size="50%" - pane size="50%" split_direction="Horizontal" { - pane size="50%" - pane size="50%" - } - } - } - tab - tab - tab - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane size="20%" { - plugin location="zellij:strider" - } - pane size="80%" split_direction="Horizontal" { - pane size="50%" - pane size="50%" - } - } - } - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane size="40%" - pane size="60%" split_direction="Horizontal" { - pane size="50%" - pane size="50%" - } - } - } -} diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_2.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_2.snap deleted file mode 100644 index 0c5145a1..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_2.snap +++ /dev/null @@ -1,60 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_layout_tests.rs -assertion_line: 79 -expression: "format!(\"{}\", kdl_config)" ---- -layout { - default_tab_template { - pane size=1 borderless=true { - plugin location="zellij:tab-bar" - } - children - pane size=2 borderless=true { - plugin location="zellij:status-bar" - } - } - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane command="htop" size="50%" - pane size="50%" - } - } - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane size="50%" - pane size="50%" - } - } - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane size="50%" - pane size="50%" split_direction="Horizontal" { - pane size="50%" - pane size="50%" - } - } - } - tab - tab - tab - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane size="20%" { - plugin location="zellij:strider" - } - pane size="80%" split_direction="Horizontal" { - pane size="50%" - pane size="50%" - } - } - } - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane size="40%" - pane size="60%" split_direction="Horizontal" { - pane size="50%" - pane size="50%" - } - } - } -} diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_3.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_3.snap deleted file mode 100644 index 733e2aff..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_3.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_layout_tests.rs -assertion_line: 90 -expression: "format!(\"{}\", kdl_config)" ---- -layout { - default_tab_template { - children - } - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane size="50%" split_direction="Horizontal" { - pane size="50%" - pane command="htop" size="50%" - } - pane command="htop" size="50%" - } - } -} diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_4.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_4.snap deleted file mode 100644 index ed6d2d6d..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_example_4.snap +++ /dev/null @@ -1,27 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_layout_tests.rs -assertion_line: 101 -expression: "format!(\"{}\", kdl_config)" ---- -layout { - default_tab_template { - children - } - tab split_direction="Horizontal" { - pane size=1 borderless=true { - plugin location="zellij:tab-bar" - } - pane split_direction="Vertical" { - pane split_direction="Vertical" { - pane command="htop" size="50%" - pane command="htop" size="50%" { - args "-C" "--tree" - } - } - } - pane size=5 - pane size=2 borderless=true { - plugin location="zellij:status-bar" - } - } -} diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_command_quoted_args.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_command_quoted_args.snap deleted file mode 100644 index eb38da80..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_command_quoted_args.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_layout_tests.rs -assertion_line: 156 -expression: "format!(\"{}\", kdl_config)" ---- -layout { - default_tab_template { - children - } - tab split_direction="Vertical" { - pane split_direction="Vertical" { - pane command="bash" { - args "-c" "exec bash --init-file <(echo \"echo hi\") -i" - } - } - } -} diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_config.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_config.snap deleted file mode 100644 index a063d917..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_config.snap +++ /dev/null @@ -1,24 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_layout_tests.rs -assertion_line: 46 -expression: "format!(\"{}\", kdl_config)" ---- -layout { - pane size=1 borderless=true { - plugin location="zellij:tab-bar" - } - pane - pane size=2 borderless=true { - plugin location="zellij:status-bar" - } -} -keybinds clear-defaults=true { - normal { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - } -} -default_shell "fish" - diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_config_and_session_name.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_config_and_session_name.snap deleted file mode 100644 index a77bc525..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_config_and_session_name.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_layout_tests.rs -assertion_line: 57 -expression: "format!(\"{}\", kdl_config)" ---- -layout { - pane size=1 borderless=true { - plugin location="zellij:tab-bar" - } - pane - pane size=2 borderless=true { - plugin location="zellij:status-bar" - } -} -session_name "foo" -attach_to_session true -keybinds clear-defaults=true { - normal { - bind "Ctrl g" { SwitchToMode "locked"; } - bind "Ctrl p" { SwitchToMode "pane"; } - bind "Ctrl n" { SwitchToMode "resize"; } - bind "Ctrl t" { SwitchToMode "tab"; } - } -} -default_shell "fish" - diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_session_name.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_session_name.snap deleted file mode 100644 index 7b607256..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_session_name.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_layout_tests.rs -assertion_line: 24 -expression: "format!(\"{}\", kdl_config)" ---- -layout { - pane size=1 borderless=true { - plugin location="zellij:tab-bar" - } - pane - pane size=2 borderless=true { - plugin location="zellij:status-bar" - } -} -session_name "foo" -attach_to_session true diff --git a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_session_name_and_attach_false.snap b/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_session_name_and_attach_false.snap deleted file mode 100644 index 4a09faea..00000000 --- a/zellij-client/src/old_config_converter/unit/snapshots/zellij_client__old_config_converter__old_layout__convert_layout_test__properly_convert_layout_with_session_name_and_attach_false.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: zellij-client/src/old_config_converter/./unit/convert_layout_tests.rs -assertion_line: 35 -expression: "format!(\"{}\", kdl_config)" ---- -layout { - pane size=1 borderless=true { - plugin location="zellij:tab-bar" - } - pane - pane size=2 borderless=true { - plugin location="zellij:status-bar" - } -} -session_name "foo" -attach_to_session false diff --git a/zellij-client/src/unit/terminal_loop_tests.rs b/zellij-client/src/unit/terminal_loop_tests.rs index 9bb864c8..1d137341 100644 --- a/zellij-client/src/unit/terminal_loop_tests.rs +++ b/zellij-client/src/unit/terminal_loop_tests.rs @@ -254,15 +254,19 @@ mod mock_ws_server { let recv_task = tokio::spawn(async move { while let Some(Ok(axum_msg)) = ws_rx.next().await { let tungstenite_msg = match axum_msg { - axum::extract::ws::Message::Text(text) => Message::Text(text.to_string()), - axum::extract::ws::Message::Binary(data) => Message::Binary(data.to_vec()), - axum::extract::ws::Message::Ping(data) => Message::Ping(data.to_vec()), - axum::extract::ws::Message::Pong(data) => Message::Pong(data.to_vec()), + axum::extract::ws::Message::Text(text) => { + Message::Text(text.to_string().into()) + }, + axum::extract::ws::Message::Binary(data) => { + Message::Binary(data.to_vec().into()) + }, + axum::extract::ws::Message::Ping(data) => Message::Ping(data.to_vec().into()), + axum::extract::ws::Message::Pong(data) => Message::Pong(data.to_vec().into()), axum::extract::ws::Message::Close(frame) => { if let Some(f) = frame { Message::Close(Some(tokio_tungstenite::tungstenite::protocol::CloseFrame { code: tokio_tungstenite::tungstenite::protocol::frame::coding::CloseCode::from(f.code), - reason: std::borrow::Cow::Owned(f.reason.to_string()), + reason: f.reason.to_string().into(), })) } else { Message::Close(None) @@ -278,10 +282,18 @@ mod mock_ws_server { match msg { Ok(tungstenite_msg) => { let axum_msg = match tungstenite_msg { - Message::Text(text) => axum::extract::ws::Message::Text(text.into()), - Message::Binary(data) => axum::extract::ws::Message::Binary(data.into()), - Message::Ping(data) => axum::extract::ws::Message::Ping(data.into()), - Message::Pong(data) => axum::extract::ws::Message::Pong(data.into()), + Message::Text(text) => { + axum::extract::ws::Message::Text(text.to_string().into()) + }, + Message::Binary(data) => { + axum::extract::ws::Message::Binary(data.to_vec().into()) + }, + Message::Ping(data) => { + axum::extract::ws::Message::Ping(data.to_vec().into()) + }, + Message::Pong(data) => { + axum::extract::ws::Message::Pong(data.to_vec().into()) + }, Message::Close(frame) => { if let Some(f) = frame { axum::extract::ws::Message::Close(Some( @@ -429,7 +441,7 @@ async fn test_terminal_output_written_to_stdout() { let test_output = "Hello from terminal"; server .terminal_to_client_tx - .send(Message::Text(test_output.to_string())) + .send(Message::Text(test_output.to_string().into())) .unwrap(); tokio::time::sleep(Duration::from_millis(200)).await; @@ -712,7 +724,9 @@ async fn test_control_message_handling() { let query_msg = WebServerToWebClientControlMessage::QueryTerminalSize; server .control_to_client_tx - .send(Message::Text(serde_json::to_string(&query_msg).unwrap())) + .send(Message::Text( + serde_json::to_string(&query_msg).unwrap().into(), + )) .unwrap(); tokio::time::sleep(Duration::from_millis(200)).await; @@ -744,7 +758,9 @@ async fn test_control_message_handling() { }; server .control_to_client_tx - .send(Message::Text(serde_json::to_string(&log_msg).unwrap())) + .send(Message::Text( + serde_json::to_string(&log_msg).unwrap().into(), + )) .unwrap(); tokio::time::sleep(Duration::from_millis(100)).await; diff --git a/zellij-client/src/web_client/unit/web_client_tests.rs b/zellij-client/src/web_client/unit/web_client_tests.rs index 28c2e87c..4576f7c6 100644 --- a/zellij-client/src/web_client/unit/web_client_tests.rs +++ b/zellij-client/src/web_client/unit/web_client_tests.rs @@ -392,7 +392,9 @@ mod web_client_tests { }; control_sink - .send(Message::Text(serde_json::to_string(&resize_msg).unwrap())) + .send(Message::Text( + serde_json::to_string(&resize_msg).unwrap().into(), + )) .await .expect("Failed to send resize message"); @@ -411,7 +413,7 @@ mod web_client_tests { let (mut terminal_sink, _terminal_stream) = terminal_ws.split(); terminal_sink - .send(Message::Text("echo hello\n".to_string())) + .send(Message::Text("echo hello\n".to_string().into())) .await .expect("Failed to send terminal input"); @@ -809,7 +811,9 @@ mod web_client_tests { }; control_sink - .send(Message::Text(serde_json::to_string(&resize_msg).unwrap())) + .send(Message::Text( + serde_json::to_string(&resize_msg).unwrap().into(), + )) .await .expect("Failed to send resize message"); @@ -965,12 +969,16 @@ mod web_client_tests { }; control_sink_1 - .send(Message::Text(serde_json::to_string(&resize_msg_1).unwrap())) + .send(Message::Text( + serde_json::to_string(&resize_msg_1).unwrap().into(), + )) .await .expect("Failed to send resize message for client 1"); control_sink_2 - .send(Message::Text(serde_json::to_string(&resize_msg_2).unwrap())) + .send(Message::Text( + serde_json::to_string(&resize_msg_2).unwrap().into(), + )) .await .expect("Failed to send resize message for client 2"); @@ -1009,7 +1017,7 @@ mod web_client_tests { let send_result = control_sink_2 .send(Message::Text( - serde_json::to_string(&resize_msg_2_again).unwrap(), + serde_json::to_string(&resize_msg_2_again).unwrap().into(), )) .await; @@ -1099,7 +1107,7 @@ mod web_client_tests { let (mut terminal_sink, mut terminal_stream) = terminal_ws.split(); terminal_sink - .send(Message::Text("test input\n".to_string())) + .send(Message::Text("test input\n".to_string().into())) .await .expect("Failed to send terminal input"); @@ -1235,7 +1243,7 @@ mod web_client_tests { let (mut terminal_sink, mut terminal_stream) = terminal_ws.split(); terminal_sink - .send(Message::Text("echo test\n".to_string())) + .send(Message::Text("echo test\n".to_string().into())) .await .expect("Failed to send terminal input"); @@ -1893,7 +1901,9 @@ mod web_client_tests { }), }; control_sink - .send(Message::Text(serde_json::to_string(&resize_msg).unwrap())) + .send(Message::Text( + serde_json::to_string(&resize_msg).unwrap().into(), + )) .await .expect("Failed to send resize message"); @@ -2066,7 +2076,9 @@ mod web_client_tests { }), }; control_sink - .send(Message::Text(serde_json::to_string(&resize_msg).unwrap())) + .send(Message::Text( + serde_json::to_string(&resize_msg).unwrap().into(), + )) .await .expect("Failed to send resize message"); @@ -2396,7 +2408,9 @@ mod web_client_tests { }; control_sink - .send(Message::Text(serde_json::to_string(&resize_msg).unwrap())) + .send(Message::Text( + serde_json::to_string(&resize_msg).unwrap().into(), + )) .await .expect("Failed to send resize message"); @@ -2499,7 +2513,9 @@ mod web_client_tests { }; control_sink - .send(Message::Text(serde_json::to_string(&resize_msg).unwrap())) + .send(Message::Text( + serde_json::to_string(&resize_msg).unwrap().into(), + )) .await .expect("Failed to send resize message"); diff --git a/zellij-integration-tests/Cargo.toml b/zellij-integration-tests/Cargo.toml index 84f62b78..c7cdc254 100644 --- a/zellij-integration-tests/Cargo.toml +++ b/zellij-integration-tests/Cargo.toml @@ -16,7 +16,7 @@ anyhow = { workspace = true } async-trait = { workspace = true } crossbeam = { version = "0.8", default-features = false, features = ["crossbeam-channel", "std"] } interprocess = { workspace = true } -insta = { version = "1.6.0", features = ["backtrace"] } +insta = "1.48" log = { workspace = true } regex = { workspace = true } tokio = { workspace = true } diff --git a/zellij-server/Cargo.toml b/zellij-server/Cargo.toml index 3b23631a..e5ca3293 100644 --- a/zellij-server/Cargo.toml +++ b/zellij-server/Cargo.toml @@ -28,15 +28,13 @@ log = { workspace = true } notify-debouncer-full = { workspace = true } prost = { workspace = true } regex = { workspace = true } -semver = { version = "0.11.0", default-features = false } serde = { workspace = true } serde_json = { workspace = true } sixel-image = { version = "0.2.1", default-features = false } sixel-tokenizer = { version = "0.1.0", default-features = false } -sysinfo = { version = "0.37", default-features = false, features = ["system"] } +sysinfo = { version = "0.39.5", default-features = false, features = ["system"] } tempfile = { workspace = true } tokio = { workspace = true } -typetag = { version = "0.1.7", default-features = false } unicode-width = { workspace = true } url = { workspace = true } uuid = { workspace = true } @@ -69,7 +67,7 @@ windows-sys = { workspace = true, features = [ ] } [dev-dependencies] -insta = "1.6.0" +insta = "1.48" tempfile = "3.2.0" wasmi = { version = "1.1.0", features = ["std"] } diff --git a/zellij-utils/Cargo.toml b/zellij-utils/Cargo.toml index 72037a66..efc76d77 100644 --- a/zellij-utils/Cargo.toml +++ b/zellij-utils/Cargo.toml @@ -69,7 +69,7 @@ winapi = { version = "0.3.9", default-features = false } dunce = "1.0" [dev-dependencies] -insta = { version = "1.6.0", features = ["backtrace"] } +insta = "1.48" expect-test = "1.4.1" [features] diff --git a/zellij-utils/assets/plugins/about.wasm b/zellij-utils/assets/plugins/about.wasm Binary files differindex 81896425..bd7e4726 100755 --- a/zellij-utils/assets/plugins/about.wasm +++ b/zellij-utils/assets/plugins/about.wasm diff --git a/zellij-utils/assets/plugins/compact-bar.wasm b/zellij-utils/assets/plugins/compact-bar.wasm Binary files differindex 3a22ab1b..a2a60e01 100755 --- a/zellij-utils/assets/plugins/compact-bar.wasm +++ b/zellij-utils/assets/plugins/compact-bar.wasm diff --git a/zellij-utils/assets/plugins/configuration.wasm b/zellij-utils/assets/plugins/configuration.wasm Binary files differindex 5163d569..0582ee5a 100755 --- a/zellij-utils/assets/plugins/configuration.wasm +++ b/zellij-utils/assets/plugins/configuration.wasm diff --git a/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm b/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm Binary files differindex 24170ee3..4862e3e9 100755 --- a/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm +++ b/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm diff --git a/zellij-utils/assets/plugins/layout-manager.wasm b/zellij-utils/assets/plugins/layout-manager.wasm Binary files differindex d4024b7b..5d76beb1 100755 --- a/zellij-utils/assets/plugins/layout-manager.wasm +++ b/zellij-utils/assets/plugins/layout-manager.wasm diff --git a/zellij-utils/assets/plugins/link.wasm b/zellij-utils/assets/plugins/link.wasm Binary files differindex dcb6ca24..d21bb78b 100755 --- a/zellij-utils/assets/plugins/link.wasm +++ b/zellij-utils/assets/plugins/link.wasm diff --git a/zellij-utils/assets/plugins/mobile.wasm b/zellij-utils/assets/plugins/mobile.wasm Binary files differindex 18232c41..77f02e30 100755 --- a/zellij-utils/assets/plugins/mobile.wasm +++ b/zellij-utils/assets/plugins/mobile.wasm diff --git a/zellij-utils/assets/plugins/multiple-select.wasm b/zellij-utils/assets/plugins/multiple-select.wasm Binary files differindex 091dcb3b..64ddfcd8 100755 --- a/zellij-utils/assets/plugins/multiple-select.wasm +++ b/zellij-utils/assets/plugins/multiple-select.wasm diff --git a/zellij-utils/assets/plugins/plugin-manager.wasm b/zellij-utils/assets/plugins/plugin-manager.wasm Binary files differindex 4ee57772..c5a9500f 100755 --- a/zellij-utils/assets/plugins/plugin-manager.wasm +++ b/zellij-utils/assets/plugins/plugin-manager.wasm diff --git a/zellij-utils/assets/plugins/session-manager.wasm b/zellij-utils/assets/plugins/session-manager.wasm Binary files differindex 8607887a..647dee4f 100755 --- a/zellij-utils/assets/plugins/session-manager.wasm +++ b/zellij-utils/assets/plugins/session-manager.wasm diff --git a/zellij-utils/assets/plugins/share.wasm b/zellij-utils/assets/plugins/share.wasm Binary files differindex b77919c3..b110c61a 100755 --- a/zellij-utils/assets/plugins/share.wasm +++ b/zellij-utils/assets/plugins/share.wasm diff --git a/zellij-utils/assets/plugins/status-bar.wasm b/zellij-utils/assets/plugins/status-bar.wasm Binary files differindex 33d8bb4c..64967a8e 100755 --- a/zellij-utils/assets/plugins/status-bar.wasm +++ b/zellij-utils/assets/plugins/status-bar.wasm diff --git a/zellij-utils/assets/plugins/strider.wasm b/zellij-utils/assets/plugins/strider.wasm Binary files differindex efc91d89..5fefd0af 100755 --- a/zellij-utils/assets/plugins/strider.wasm +++ b/zellij-utils/assets/plugins/strider.wasm diff --git a/zellij-utils/assets/plugins/tab-bar.wasm b/zellij-utils/assets/plugins/tab-bar.wasm Binary files differindex cd9ca086..3b1ea0f0 100755 --- a/zellij-utils/assets/plugins/tab-bar.wasm +++ b/zellij-utils/assets/plugins/tab-bar.wasm diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs index 7cc5877c..96372e71 100644 --- a/zellij-utils/src/cli.rs +++ b/zellij-utils/src/cli.rs @@ -640,15 +640,6 @@ pub enum Sessions { )] tab_id: Option<usize>, }, - ConvertConfig { - old_config_file: PathBuf, - }, - ConvertLayout { - old_layout_file: PathBuf, - }, - ConvertTheme { - old_theme_file: PathBuf, - }, /// Send data to one or more plugins, launch them if they are not running. #[clap(override_usage( r#" diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs index ae2cc239..24987179 100644 --- a/zellij-utils/src/errors.rs +++ b/zellij-utils/src/errors.rs @@ -772,7 +772,7 @@ mod not_wasm { const MAX_THREAD_CALL_STACK: usize = 6; #[derive(Debug, ThisError, Diagnostic)] - #[error("{0}{}", self.show_backtrace())] + #[error("{0}{backtrace}", backtrace = self.show_backtrace())] #[diagnostic(help("{}", self.show_help()))] struct Panic(String); diff --git a/zellij-utils/src/ipc/tests/roundtrip_tests.rs b/zellij-utils/src/ipc/tests/roundtrip_tests.rs index f8e6dc91..e441092a 100644 --- a/zellij-utils/src/ipc/tests/roundtrip_tests.rs +++ b/zellij-utils/src/ipc/tests/roundtrip_tests.rs @@ -26,10 +26,19 @@ use crate::position::Position; use std::collections::{BTreeMap, BTreeSet}; use std::path::PathBuf; +const ROUNDTRIP_TEST_STACK_SIZE: usize = 32 * 1024 * 1024; + #[test] fn server_client_contract() { - test_client_messages(); - test_server_messages(); + std::thread::Builder::new() + .stack_size(ROUNDTRIP_TEST_STACK_SIZE) + .spawn(|| { + test_client_messages(); + test_server_messages(); + }) + .expect("failed to spawn roundtrip test thread") + .join() + .expect("roundtrip test thread panicked"); } fn test_client_messages() { diff --git a/zellij-utils/src/web_authentication_tokens.rs b/zellij-utils/src/web_authentication_tokens.rs index b579890f..7e0deabf 100644 --- a/zellij-utils/src/web_authentication_tokens.rs +++ b/zellij-utils/src/web_authentication_tokens.rs @@ -136,7 +136,11 @@ fn init_db(conn: &Connection) -> Result<()> { pub fn hash_token(token: &str) -> String { let mut hasher = Sha256::new(); hasher.update(token.as_bytes()); - format!("{:x}", hasher.finalize()) + hasher + .finalize() + .iter() + .map(|byte| format!("{:02x}", byte)) + .collect() } pub fn create_token(name: Option<String>, read_only: bool) -> Result<(String, String)> { |
