Compare commits
1388 Commits
vim-pyrigh
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 96969ca538 | |||
| fea17f0609 | |||
| 98522f5056 | |||
| e3a9e470f5 | |||
| 45d25d6ac0 | |||
| e120928f50 | |||
| 24ab294f11 | |||
| 6c049fdcfc | |||
| 35231d8749 | |||
| def552033b | |||
| df7f625b4c | |||
| 1e8f2e0e57 | |||
| ebdab1ae44 | |||
| 50f0b33af3 | |||
| 160c06c661 | |||
| f42be40ce5 | |||
| 797fdb5b41 | |||
| 96b8add23e | |||
| 91adc03b90 | |||
| 61e71e1771 | |||
| 97ea54f2b2 | |||
| 342c6d186e | |||
| 5cd27fe13c | |||
| 4e6a0697a5 | |||
| 46ef972920 | |||
| f53dab6909 | |||
| 9589501580 | |||
| 8fbc4c98a9 | |||
| 4107446a1c | |||
| 2e9c444e09 | |||
| f64164b6ff | |||
| 7519995398 | |||
| 06e80254bd | |||
| 845f83c3e0 | |||
| 640fc6d089 | |||
| 9a36640df8 | |||
| 0790b3d363 | |||
| 0f131880b1 | |||
| 0df870b2a0 | |||
| 1db339be4a | |||
| 30fa651030 | |||
| 41be339450 | |||
| 2b9b903803 | |||
| 90c81c3043 | |||
| 7d4085784a | |||
| 8d9ba24d6c | |||
| 5414d49b01 | |||
| d511b9dedc | |||
| f63ba69d99 | |||
| cfb136da9c | |||
| ae3b33e945 | |||
| b68cc25014 | |||
| b01110dc91 | |||
| 9bc9cce6f6 | |||
| e67593582e | |||
| 2cd1a21cdb | |||
| 6ed951778b | |||
| c5cd1726dd | |||
| 02d234be3f | |||
| e30fd5d1d2 | |||
| 7374d444fe | |||
| 24f71239e2 | |||
| 38451f5dee | |||
| 32381a1c40 | |||
| 26ec6aff99 | |||
| 6c5fbd775c | |||
| 9bf180fdda | |||
| 00550ea45d | |||
| ee6e683a4f | |||
| aa14d4125c | |||
| 13f1c4c395 | |||
| e7091b0efc | |||
| 18da9279de | |||
| a2e5f996d9 | |||
| 48719600b2 | |||
| 7a8b0951d1 | |||
| a73a6e6ede | |||
| 4d063a44f4 | |||
| d8b349f0d8 | |||
| 4037dfa979 | |||
| 6db9f3b125 | |||
| d13361cf22 | |||
| 90bbeceb2d | |||
| 29f9bc507e | |||
| 84d40da737 | |||
| 004ef252b0 | |||
| e238460c7b | |||
| faf91675e1 | |||
| 5eac373c2a | |||
| 27170d452c | |||
| 86c638d665 | |||
| 0dfd08e3f5 | |||
| f6742657cc | |||
| 4b9d783284 | |||
| e4a7358443 | |||
| 84fb307256 | |||
| 87fd7fd7f7 | |||
| 036943bb93 | |||
| e32cadf434 | |||
| fc168c197f | |||
| 4f868d83c9 | |||
| f2dc60ba4d | |||
| 81e5d94af7 | |||
| 13bae9730c | |||
| 7e3bc88fc4 | |||
| e6d96c38ea | |||
| c279742cc2 | |||
| 8d289006a8 | |||
| c19b0ce18a | |||
| 2eb84883cd | |||
| 6a06ef5399 | |||
| 250174e5ff | |||
| e7e09b47df | |||
| 51f5010dc9 | |||
| d063d2b447 | |||
| 1b55d67110 | |||
| 9addfbd04e | |||
| cd92b78f23 | |||
| fc26afb9a6 | |||
| 1db4989005 | |||
| 5c96138aca | |||
| 1bc39c91c0 | |||
| 0220be6920 | |||
| 512034a05a | |||
| b50a1bcae2 | |||
| ee2ad8f08b | |||
| 0909b3afb7 | |||
| a585f989f5 | |||
| 6206502fd2 | |||
| e388290c67 | |||
| f0f2105b38 | |||
| b6c2953992 | |||
| 9ae72acb0e | |||
| d439428671 | |||
| 3574ec7f6e | |||
| 72ccbc8110 | |||
| 260ebc30eb | |||
| 55ed73161a | |||
| b2d291bb0a | |||
| 6c019632ba | |||
| 4048e16bbe | |||
| e5f3079c82 | |||
| 17164de6ad | |||
| c5618397dd | |||
| 64531b2113 | |||
| 73f1bda2bf | |||
| 41627767b9 | |||
| 1471013bd7 | |||
| 89b210f663 | |||
| 91e122af50 | |||
| f8f7831415 | |||
| 58e3a093f9 | |||
| f93b556789 | |||
| d547a8f1e0 | |||
| 99601082ce | |||
| 7b7b4094af | |||
| 4a88eb960d | |||
| 361d9ce065 | |||
| a534f5bdd1 | |||
| 99c6c50f42 | |||
| cf783051ad | |||
| 5a45b10698 | |||
| 8e184d2098 | |||
| fdb8fab853 | |||
| bdbf3f9359 | |||
| a55ffaa138 | |||
| 7c763d62e3 | |||
| 3b7f374057 | |||
| 3165c8d469 | |||
| 964f4f5480 | |||
| 947151dd4c | |||
| ead6118efb | |||
| 669ff43ec0 | |||
| c165357066 | |||
| ccc217d191 | |||
| 90c5d38c12 | |||
| adea5a27bb | |||
| 49bf6b287d | |||
| c7a894e5f0 | |||
| 354c1c2a6b | |||
| d859a28f9b | |||
| 28dc71a192 | |||
| 3fa73ef3b6 | |||
| 462c79c9c6 | |||
| 147422ab17 | |||
| ad390d00b6 | |||
| 91b7fc71a7 | |||
| 4b7abd9515 | |||
| c02fb05f22 | |||
| c85397220a | |||
| 10b4373bf0 | |||
| d6b8d7e0ae | |||
| f7b7a2a518 | |||
| b07cf3869e | |||
| 2312e66f1f | |||
| 0d6810f374 | |||
| f54bff0fda | |||
| 86cfba7187 | |||
| 0b99b04495 | |||
| 2c16752260 | |||
| 92792a09af | |||
| 045cf9ca1b | |||
| fa7221ecae | |||
| 334085ab32 | |||
| c8c0a2159e | |||
| 537e66cf20 | |||
| c3a1612b0f | |||
| ff3d5064b8 | |||
| 9081fef1ff | |||
| 20055deed0 | |||
| ec98e1b6b5 | |||
| c655e40f6d | |||
| 84350f5842 | |||
| 03848abdb3 | |||
| a10f949729 | |||
| 247fc36d98 | |||
| 922c614fd0 | |||
| a237eab58f | |||
| e09b56351d | |||
| 729f11cbd3 | |||
| 58c3b7db28 | |||
| 1d2563a49e | |||
| 34f194a91f | |||
| c5ed921348 | |||
| 90f902b715 | |||
| b6c0bed615 | |||
| c463244cc0 | |||
| 0d4cad56bb | |||
| 9679e2079b | |||
| 2fdda3a2e3 | |||
| 1855ecc35d | |||
| 3cd78ae74c | |||
| 3576cb2f20 | |||
| 370ec5fcd9 | |||
| b6f366f7d2 | |||
| 5774abe938 | |||
| 866f46967c | |||
| 3368a564b0 | |||
| 1b6e26c902 | |||
| e658228d3c | |||
| fa7aa567a6 | |||
| a63f591c59 | |||
| d1b587536e | |||
| 832502b1d5 | |||
| df8722644b | |||
| 0171dd5120 | |||
| da43e8cc09 | |||
| b9f5afa0b6 | |||
| a4ed26fdb3 | |||
| a00079c820 | |||
| e26e9f16d5 | |||
| f216ea9e5e | |||
| c2d4b02cb6 | |||
| 4213b395ea | |||
| 9c6b4b0ebf | |||
| 1b62c2a66f | |||
| 35477abe48 | |||
| 9fbf50a1b6 | |||
| d296aadcb5 | |||
| 9584cd0b4c | |||
| 9bcdb62015 | |||
| 749205acc0 | |||
| 59465469fa | |||
| 018874f060 | |||
| b41fe49004 | |||
| bf01e401d2 | |||
| 0f3b2024df | |||
| 46108c2f8d | |||
| 2761b19f1a | |||
| 1d30104340 | |||
| c67ea463e9 | |||
| a89bbc813c | |||
| fd867c892b | |||
| 8bf01c0e95 | |||
| 570db7724c | |||
| 6e9f690a9c | |||
| 5e7f15df2b | |||
| 1c8c0795a4 | |||
| 4b6cbc0f8d | |||
| 69b930d7f4 | |||
| 0d4515d8c3 | |||
| 9367aa7990 | |||
| a701cf558b | |||
| 5b08516319 | |||
| 18b705b718 | |||
| edcb67e9ee | |||
| 9440caf156 | |||
| 6fcf277359 | |||
| 9d2915895b | |||
| 667badeb9c | |||
| 43973a1d68 | |||
| 4b353e47be | |||
| 583b9ff6f7 | |||
| b62bdee1ed | |||
| 9465568b5f | |||
| 66b7dce3c2 | |||
| c1078672bf | |||
| 81bcd8dc3d | |||
| 0a66d62165 | |||
| 7beb5bc38b | |||
| a749f19422 | |||
| 00baf0f20e | |||
| 160cecbbef | |||
| 26e6bd40bb | |||
| e7bfa7fdf6 | |||
| ebb19ef63b | |||
| 3c27faae0e | |||
| 3d82b815b2 | |||
| 3c1b815582 | |||
| c45a39a419 | |||
| 429a4cb2fe | |||
| 74c0fdebb3 | |||
| 259593ba4f | |||
| 1c36a4e5f7 | |||
| cfd6ddee0d | |||
| 91bafdb221 | |||
| dfa0832f8a | |||
| 3aa127e7e6 | |||
| dd7123f98a | |||
| 4235971fb7 | |||
| b807be1587 | |||
| 4ea4da352f | |||
| a4d8e204f6 | |||
| 6bdfc3d812 | |||
| f410467a9a | |||
| 3755822796 | |||
| 1d136f1f64 | |||
| 695522d088 | |||
| c4a7194249 | |||
| 649ca37de8 | |||
| a93541b520 | |||
| a1f0d960e2 | |||
| 76568fa286 | |||
| 46faf1536b | |||
| c217b57e69 | |||
| 2bdf365300 | |||
| 251e88a000 | |||
| 89daf17b92 | |||
| 0734de3f67 | |||
| c25c6bf266 | |||
| a81b4ce279 | |||
| a1e01875de | |||
| 7ad907b609 | |||
| a66621f0a4 | |||
| 3b538ccaf4 | |||
| 09e1fe8b0a | |||
| b3d83a2d78 | |||
| 3775a9b8ec | |||
| 37e9ac2814 | |||
| b20f8aab0a | |||
| a5768d66d8 | |||
| 22b0280702 | |||
| 66681dd143 | |||
| 7cc90747ca | |||
| b159e60370 | |||
| 7761decfb2 | |||
| da9273d38e | |||
| dca27bca1f | |||
| bd473085a7 | |||
| 9cf28b8da9 | |||
| d744b66166 | |||
| 3a39401021 | |||
| e5fd71dcf0 | |||
| 4382797c25 | |||
| 44839849b6 | |||
| cf09544569 | |||
| 67417b09ef | |||
| 468b9b698f | |||
| 5c6f5fba0a | |||
| ac6d7a07ea | |||
| 5ce1ca4a42 | |||
| c180a23930 | |||
| ae5ff167ee | |||
| 9b303d5385 | |||
| 3f0fdef139 | |||
| baa87509da | |||
| 554c117812 | |||
| e26483c0b5 | |||
| 639c7a456d | |||
| 3a4ff6b5b9 | |||
| fc232c4f80 | |||
| c84367bf8c | |||
| 229fb1c863 | |||
| 0cecbd4e43 | |||
| 9e81d06b2e | |||
| bae26dbc66 | |||
| 9ec746a0e1 | |||
| ff5433e202 | |||
| 5819358ea7 | |||
| f64c9db247 | |||
| 8ffa514d22 | |||
| df9852994c | |||
| 2d6735f3ec | |||
| 1766802248 | |||
| 0e698d4f3b | |||
| a1343f2db6 | |||
| 967143bf5a | |||
| e364188ba9 | |||
| 08b8449fe5 | |||
| a79dd142d8 | |||
| 77067e8ff1 | |||
| 7f217ecbd7 | |||
| 9d43f6262d | |||
| 10c7e768a5 | |||
| e98e06cc87 | |||
| 11d26ecad1 | |||
| 7fee966adf | |||
| c4f2513cf5 | |||
| 25ed18fda1 | |||
| bd53de094a | |||
| cca2037d2c | |||
| 94ef205cf7 | |||
| 3e4e42e509 | |||
| c541529016 | |||
| 7c52569f97 | |||
| e4aa9aee25 | |||
| cab6652a51 | |||
| c06d9b4a38 | |||
| 31c636c147 | |||
| 855009b507 | |||
| 4461341ccf | |||
| f9dbce3b07 | |||
| 65ae6b15ad | |||
| 8c346b1729 | |||
| a6b93d3a2f | |||
| 38ab46fa2a | |||
| 5522704219 | |||
| ba1dddb5aa | |||
| 40c6cbce70 | |||
| cb67414281 | |||
| 1ab3bfe01d | |||
| 09dbd61d1b | |||
| 318436053a | |||
| 0ae714129f | |||
| c1ea72f4e6 | |||
| 9db677d2b5 | |||
| 19a1762d9b | |||
| c0d34945eb | |||
| 91d8bd8de2 | |||
| b938586945 | |||
| 816235e298 | |||
| 9cd5e17a5d | |||
| d561b07417 | |||
| 3f7edf97ec | |||
| 9ab8a59193 | |||
| fe80a79846 | |||
| e3ef76a626 | |||
| 61407b51f5 | |||
| 5c6ac9cbcd | |||
| 45a0e43cc1 | |||
| af97f24988 | |||
| 58fe1ab39d | |||
| 4beb245aa4 | |||
| 79ccb183ef | |||
| 7a86d25fb4 | |||
| f657e8be74 | |||
| bf79895ea8 | |||
| 59f8ab46ea | |||
| ccca6a92f9 | |||
| 6f13de7d44 | |||
| 82d9a032ab | |||
| 88e48662a3 | |||
| 2a250daa34 | |||
| fbc3db337e | |||
| 1499c8ff5f | |||
| 882e774bf7 | |||
| ad0b47e6e0 | |||
| 84f508d216 | |||
| 11ca0b250f | |||
| 569d457db6 | |||
| bd1c90c4a3 | |||
| 2dd8b6d5a7 | |||
| 1706e7bda9 | |||
| 0fc4f945bc | |||
| 1c508c6f39 | |||
| 2fe15385e9 | |||
| f8298cfc30 | |||
| e978486393 | |||
| 7f66492f2a | |||
| d1c1287399 | |||
| 5c82197471 | |||
| 6f0c0047d0 | |||
| 0d41b5b5cb | |||
| c7f4925084 | |||
| d3731cb198 | |||
| ed8739aa70 | |||
| 737027bf54 | |||
| 1947b3410b | |||
| f96b5fe783 | |||
| 6ba34f7c69 | |||
| ee275b24b6 | |||
| 4e7ed7fa86 | |||
| a6b8205df1 | |||
| 7a76792eac | |||
| 88de2e74ff | |||
| 321544578e | |||
| 6b5241fb09 | |||
| d365bdc6ff | |||
| dc0ab73547 | |||
| 17d463e424 | |||
| cb15d6404f | |||
| 3b6334581a | |||
| caf52539d1 | |||
| 575ff93131 | |||
| cb079679a8 | |||
| d82b59a56d | |||
| ba786afab4 | |||
| 4b71ffe3b9 | |||
| 3d6a08c9b5 | |||
| d6db0e4b48 | |||
| 3255b770d5 | |||
| 8cd848933f | |||
| 425d2c8789 | |||
| 033425f869 | |||
| 0f001c52d5 | |||
| 9d0568160d | |||
| 7621d1da3b | |||
| f69e8dc834 | |||
| a85249e473 | |||
| 2a4f583d33 | |||
| 436a86a1a4 | |||
| cd8da20d95 | |||
| 3bc1802657 | |||
| 5c6a78ae72 | |||
| 907f390899 | |||
| 8a718dfb3c | |||
| 3c0db2ae64 | |||
| fe2490fc56 | |||
| 8d9614c918 | |||
| c12dd2d0fa | |||
| 5423cd1bd1 | |||
| 76a911ffc9 | |||
| ba8dece09a | |||
| a41a064b4b | |||
| 6fd2f58f6c | |||
| 20e0ec5f7a | |||
| 9ab0d024a6 | |||
| 0c3baa45d4 | |||
| 43b0246b04 | |||
| c1ffdb9b27 | |||
| 3cefe591af | |||
| e5827e1789 | |||
| 1f23150937 | |||
| 4ebb0f6e4e | |||
| 3b52e572d4 | |||
| 1e7023cda2 | |||
| 7a49556d15 | |||
| d4d6e77ce3 | |||
| 6ded275dd3 | |||
| 2404c83783 | |||
| a1be3129ad | |||
| 82de8a8cd1 | |||
| 62dd4101e4 | |||
| a7cbd1112e | |||
| 26729882cb | |||
| dbe321a9fc | |||
| 6933160f7d | |||
| dc9260af5a | |||
| 2c66dbab44 | |||
| 31cf397c4e | |||
| a3404c3d78 | |||
| 56a260ec28 | |||
| 70d39c43c5 | |||
| a44f38820e | |||
| 7673e7f0ca | |||
| 4d1586d26b | |||
| 602b409eff | |||
| 322572c304 | |||
| 835efc372c | |||
| 4115e0cebb | |||
| f9987d191b | |||
| 4d956342e7 | |||
| 17aff0aca3 | |||
| cac169f083 | |||
| e83913a7e3 | |||
| ce249bebd9 | |||
| d4ca67eba0 | |||
| e3c7f6fb21 | |||
| 96b9363b73 | |||
| 2eac5c6075 | |||
| 2c2721f4b0 | |||
| e3293211e5 | |||
| 33101ebb85 | |||
| c7deca5a68 | |||
| c5676ebb4e | |||
| 087f204a75 | |||
| 1b29f09a62 | |||
| 0821891006 | |||
| 793afcdf33 | |||
| 212b85f45c | |||
| 94fc73426c | |||
| c52099f8c2 | |||
| 9c9c717ee2 | |||
| 5037b05b8d | |||
| a288b493fe | |||
| 6dd077e455 | |||
| f5a32c3670 | |||
| 5a241e3bfa | |||
| 591745a472 | |||
| 9db5874ec9 | |||
| 9764834e79 | |||
| 9d94bfa4f9 | |||
| b34161c811 | |||
| 461f6c023d | |||
| ac072c30de | |||
| c158c3f613 | |||
| 2663e165bc | |||
| 8da56e84a5 | |||
| 6ec8aabc58 | |||
| ef5fe02675 | |||
| 0b29b5ad36 | |||
| 09bf90070a | |||
| 643794521d | |||
| 8cb58dcd39 | |||
| 2c3e82d3ed | |||
| 634f0dee30 | |||
| a74eda0825 | |||
| 678fb43670 | |||
| e5e898c44f | |||
| 4d73cecaf1 | |||
| 5832c0d707 | |||
| 05e37ca221 | |||
| 3955ec6e58 | |||
| 652cd816a0 | |||
| 6e23fbd190 | |||
| 2ca6f5fc83 | |||
| 325c2a9f25 | |||
| a69fd53fc3 | |||
| 048eb314e6 | |||
| ed9c18f116 | |||
| 906a276b5d | |||
| 19a468e9d9 | |||
| 6940a95f32 | |||
| 6e543d48dd | |||
| cd88354c40 | |||
| f0945e885e | |||
| 399ebd4347 | |||
| 709c5b331b | |||
| bbfb01c66a | |||
| e16cd3874b | |||
| 9b0769b2f3 | |||
| 8064f04385 | |||
| ee2b3481cf | |||
| 93249c69ee | |||
| d91fd1f033 | |||
| fc146d28f0 | |||
| 71c6c3e733 | |||
| ac58cb8e33 | |||
| c7c9ccf5a8 | |||
| 6999fe2faa | |||
| 1f059c6dc7 | |||
| 0073a497af | |||
| 969bce02d9 | |||
| 2378ecee87 | |||
| ad425f8229 | |||
| b6d0f27455 | |||
| 3641c722a2 | |||
| b9057172df | |||
| 8b1c892172 | |||
| 3eb7922926 | |||
| 986303d858 | |||
| a8f8e8bad1 | |||
| cc64d8a279 | |||
| 5e8a282a01 | |||
| 8b74abf6b8 | |||
| cffaeaec6c | |||
| 0a12479916 | |||
| 99cdd2219f | |||
| 9cabce08ad | |||
| b98b9ad2c1 | |||
| f49e733035 | |||
| abe09fec67 | |||
| d2a3d91ba5 | |||
| 00faaa9d54 | |||
| 75a9a1002e | |||
| 233aac4ed9 | |||
| 8a76c14441 | |||
| a230843188 | |||
| 00f77b361b | |||
| daf376980e | |||
| 93c171b765 | |||
| 0926c60ee2 | |||
| 69ed1d93d0 | |||
| fe7dac8e87 | |||
| 61d5871d04 | |||
| a9977e5b9e | |||
| 1c0dfeb470 | |||
| 4cdccc56c5 | |||
| 59adddd4a6 | |||
| 6cef4e1023 | |||
| 661df0ed20 | |||
| a6731998b1 | |||
| 746bf59952 | |||
| 861e9051ac | |||
| 0306fce08e | |||
| e075ad79c7 | |||
| 68ecd37fac | |||
| 62d9cc825c | |||
| 910fde9b06 | |||
| 153499b787 | |||
| 5337863ed8 | |||
| 7dec95ba32 | |||
| f9aeabd084 | |||
| ddf28ab99e | |||
| 898b5fea00 | |||
| 3f9bae550d | |||
| 348e8b0b9a | |||
| 86ad684503 | |||
| 2cf073c5c8 | |||
| 4fd17ccf0c | |||
| a3f20d2b04 | |||
| 970690d0f2 | |||
| e0281b7ac0 | |||
| ac7a0df836 | |||
| fa21763215 | |||
| d8fef7e944 | |||
| 87904359ea | |||
| 83d1ec948a | |||
| 5d58745a09 | |||
| 035a006a72 | |||
| 658ce5e5be | |||
| 4db685b51f | |||
| b7eee97b30 | |||
| 31a0733a06 | |||
| 59328fc061 | |||
| 1fe2f17c09 | |||
| 72e0916480 | |||
| 22d83b59cc | |||
| 0a047c707c | |||
| 588e3a5012 | |||
| 931f3358b0 | |||
| 74270c1516 | |||
| 622e6b478e | |||
| 16d5621a19 | |||
| d5ed2de48a | |||
| 062a2f7935 | |||
| f1251f6398 | |||
| 94413fc7ed | |||
| 9e6630e4af | |||
| 334641d263 | |||
| 1d390b22ae | |||
| 3d42d8e975 | |||
| 58a794b26c | |||
| eb0650ad1a | |||
| 0a8cae743e | |||
| 9d2cce2688 | |||
| f06daf3bf9 | |||
| 997e3b6177 | |||
| 1c867c89b7 | |||
| 758cbfb7a3 | |||
| 76246af5d7 | |||
| 5649047f85 | |||
| fe959e5aa9 | |||
| b9585c92d1 | |||
| 3e8302a38e | |||
| 1fbc34084d | |||
| 5d337d97e4 | |||
| 89978d3476 | |||
| 21a3015948 | |||
| 7747600976 | |||
| ec5b3a0e29 | |||
| c96fdfba56 | |||
| 9c5fc4147d | |||
| 1670acf5cc | |||
| 3b0dcbf597 | |||
| 004b85ef03 | |||
| 7d8e1c3e22 | |||
| 2ddc7c2f51 | |||
| 57887a7c83 | |||
| b2e6b78f6e | |||
| 54b7196f01 | |||
| 8920594210 | |||
| 70e50a7a50 | |||
| a3f7d765e9 | |||
| 26b3f8f025 | |||
| e8082af9bd | |||
| d09449411b | |||
| 2b1aa6a84b | |||
| ff8840e687 | |||
| 120f7fe29e | |||
| 3e1ad38e3e | |||
| f4c88dc5e5 | |||
| 8d0ffce762 | |||
| 7bb9a3ca97 | |||
| adb2c7713e | |||
| 666a2109d1 | |||
| 8e1079a713 | |||
| 6b28c377c7 | |||
| c170508a26 | |||
| 8e3d11b2c8 | |||
| 27c6af704a | |||
| 1f521d0d64 | |||
| 9ebad0abf1 | |||
| ff697b350b | |||
| fb8fe48182 | |||
| ff3ff9548b | |||
| 165bd86025 | |||
| 0898ac7a64 | |||
| faba5b3530 | |||
| 7c10f7b7f1 | |||
| 0c19a113a4 | |||
| 05d9ab4025 | |||
| 2609ff519e | |||
| 793a649485 | |||
| cb5db2d90b | |||
| faf7b8b68b | |||
| 2a4b7b17d2 | |||
| dfb5b0ce28 | |||
| bc16de86b2 | |||
| 7942b79a61 | |||
| 5464256578 | |||
| b358f7e5bb | |||
| e83c2398ef | |||
| 46c7edd703 | |||
| d85fd48c1c | |||
| 4212284e94 | |||
| 4c4622a764 | |||
| 2da50c955b | |||
| 5f7473dd65 | |||
| 0016fb1af2 | |||
| 1d4cc70783 | |||
| b72c9b2792 | |||
| fbe838a2a9 | |||
| 790e2a871a | |||
| 70c7563638 | |||
| 1f3cdc9ff3 | |||
| c096e3d181 | |||
| 3680649874 | |||
| 01f1db65df | |||
| 58c489c3e9 | |||
| be4bbf5123 | |||
| e3494dcc74 | |||
| 6787c56f33 | |||
| 5d8c1f4432 | |||
| 2905817df9 | |||
| 4fc2971dde | |||
| 60e4c63d78 | |||
| 4a9f0c303d | |||
| f7f7f2bda5 | |||
| d537ddb6b3 | |||
| c8c32651e9 | |||
| 50c1648df5 | |||
| fcc979574c | |||
| 072766cee8 | |||
| de00dd3107 | |||
| 7cf25738cc | |||
| 181303570e | |||
| d37073a391 | |||
| e28af63738 | |||
| e39d46ecfa | |||
| f18321abe6 | |||
| d2a57b6f56 | |||
| e98eb3afcb | |||
| f1b9d3c56d | |||
| c55b7f8745 | |||
| f414ec7d83 | |||
| 949598cdf2 | |||
| 2bd34be8e2 | |||
| ae27d0511b | |||
| 37eb4339fe | |||
| 37c0ef2741 | |||
| 75d64b1e33 | |||
| c58b581e31 | |||
| 154d778f7c | |||
| 933b1fc1d8 | |||
| 052a265534 | |||
| 713b701101 | |||
| cc809c67ab | |||
| 3161685f19 | |||
| 4712edd3bd | |||
| cfe87ecfae | |||
| 0813bf2db6 | |||
| 7f36c026c0 | |||
| 1fedc91252 | |||
| 90c92cd10a | |||
| 76dbdcfbcf | |||
| 273ef5e4ad | |||
| 14c5f4d6c7 | |||
| 4d434ccc80 | |||
| 433ae456ae | |||
| d8e6a6ac08 | |||
| 0a8ac21fac | |||
| 8f786b2a1a | |||
| b2c7d15af0 | |||
| e084fe1f77 | |||
| cd1cebc84d | |||
| 5050bee3c9 | |||
| 9ed41847d5 | |||
| 5cc25ec27b | |||
| e0f5fc80d3 | |||
| 0fbdae557d | |||
| b902354702 | |||
| bcbdd2b475 | |||
| c90e809b44 | |||
| 6d6bc6446c | |||
| 1a9ae43feb | |||
| 53894176f0 | |||
| 3495a3edc7 | |||
| 7118cb6f95 | |||
| e3ad622572 | |||
| 90a1a11f08 | |||
| a578186c4f | |||
| 7a62a3686e | |||
| 6777c7a02d | |||
| 3f530e3803 | |||
| 0c216e7b50 | |||
| 27d4f0a45a | |||
| 49c3aad776 | |||
| fa58f846dc | |||
| 668d4f2b94 | |||
| 5b4a3096b6 | |||
| 73c474c69a | |||
| 08ac03445b | |||
| 4695e435c1 | |||
| abc9276d8e | |||
| 6126294686 | |||
| cb31836972 | |||
| 29cbfba4fb | |||
| 4dde884f8c | |||
| 146cb9745c | |||
| f46a0e5627 | |||
| 660c9b8c40 | |||
| e848f250d4 | |||
| ab29adea47 | |||
| 7c1cd424c7 | |||
| d832ce3369 | |||
| 8f44f46bf5 | |||
| 82df4cf011 | |||
| 8b9a376517 | |||
| 38cfa308e2 | |||
| 639b835ddd | |||
| d3883ca1ce | |||
| 52f778ff4b | |||
| 2195a8bd6f | |||
| 57537c8370 | |||
| 4d78079475 | |||
| fb98aeb74f | |||
| b83c39bb6c | |||
| b5b7ba0ebd | |||
| 1e842617c9 | |||
| 9abf6cceef | |||
| 9d2619fbaf | |||
| 9ce207b697 | |||
| c065b140e2 | |||
| d9dc604fd7 | |||
| 9a9e42d146 | |||
| ac564ce59f | |||
| 4573a2ae3d | |||
| 875dbd6d70 | |||
| cb4c486777 | |||
| d727ce7e7a | |||
| 9d738a868c | |||
| 7da5090092 | |||
| fe96548e2b | |||
| 513aa13031 | |||
| c24ed52238 | |||
| f6b4c7e0ce | |||
| c6b4f0af38 | |||
| bd3a726345 | |||
| 20bc46167d | |||
| f34fdaf984 | |||
| 92a1f63c9e | |||
| 967a6fa4e9 | |||
| f9c16cc297 | |||
| af6ae8dd0c | |||
| 1ce060ac77 | |||
| cd8b9cbd63 | |||
| 8f5735ca01 | |||
| 7cfd04e4b8 | |||
| 569b5aac14 | |||
| 2db818a35e | |||
| 61de98bcd0 | |||
| 345cbebdaf | |||
| 44d2c3f144 | |||
| 65fab39f9d | |||
| 7f50455536 | |||
| 7f65ebc8b1 | |||
| 6d12659e72 | |||
| 8067395002 | |||
| 14b71fa591 | |||
| c5650e7504 | |||
| 5ef2891fd6 | |||
| a4ad253356 | |||
| b936c92e34 | |||
| 0f61afbcfc | |||
| e870324c04 | |||
| d21b0bf01a | |||
| 2188c2fbec | |||
| ad5fba2f0c | |||
| 639c2185dc | |||
| 933e000645 | |||
| 4c04649e21 | |||
| c336a24cae | |||
| 4e4561a196 | |||
| a42c949c0a | |||
| 2a5d94d912 | |||
| c6bc8ed68d | |||
| d35ecd5505 | |||
| e89375cf15 | |||
| c2648953f3 | |||
| 8aee21f0c4 | |||
| 2e429ca9b4 | |||
| 1571c5cd9c | |||
| 5780ddac2f | |||
| 2b4f1559ff | |||
| 70bb3cd4d5 | |||
| c54685ca8a | |||
| 56371406a2 | |||
| 76cea21e9e | |||
| 18b1abdf24 | |||
| 4414d1019e | |||
| 7cbd625d89 | |||
| f658b2aa02 | |||
| 7ebe80c176 | |||
| df4e6b76f6 | |||
| 40c63547de | |||
| 678533c613 | |||
| 2d88a07309 | |||
| 6fb5909b35 | |||
| b304abc60f | |||
| d3eb1b29c2 | |||
| 150d7b0ce8 | |||
| 49b45a2356 | |||
| 22379f8a23 | |||
| 8833186f9b | |||
| 80ab325096 | |||
| 8d2d975c7c | |||
| 3880668f25 | |||
| 9cf5b3a83e | |||
| 0034917b91 | |||
| e9d1db4166 | |||
| 160094ce85 | |||
| d89dc71208 | |||
| 5ff5456159 | |||
| e475a58b4b | |||
| 749c813c63 | |||
| 2fc1486659 | |||
| a694fe88f0 | |||
| 1a815688b6 | |||
| 6ee690d5a5 | |||
| 16b2110de4 | |||
| 64cdc4ea6b | |||
| eb7d783ae0 | |||
| 3ec8c4730c | |||
| 1bc5e83ce8 | |||
| 06e2d0c46e | |||
| 7fd444630b | |||
| 0f8ef200e0 | |||
| d292cb322c | |||
| 4bdace2f9b | |||
| 32c681fc7e | |||
| c4cea7e6c9 | |||
| 841ad03a9b | |||
| e83858606c | |||
| 57e6870f9e | |||
| a1bea6d209 | |||
| 921db4085b | |||
| b987ee5072 | |||
| ff33822aec | |||
| a5935e9c73 | |||
| ccbdd6cf8e | |||
| d48b3f60f2 | |||
| f2f11166f5 | |||
| abb484162a | |||
| c44a47074f | |||
| 94657335b5 | |||
| d096feb72d | |||
| f87057b053 | |||
| 9c4c89b64f | |||
| 435680e6ed | |||
| b2bf59ed50 | |||
| 952b2695fd | |||
| 862ace6718 | |||
| 5f6d518c2c | |||
| a200c7d445 | |||
| e8d0bb16c7 | |||
| ef09552417 | |||
| 60db2029a9 | |||
| 6fbc7221cf | |||
| 74a0a3d8ce | |||
| b7d453078f | |||
| 5bb8821b57 | |||
| afb2051e8b | |||
| 21bc66a15c | |||
| 345b55aebb | |||
| f3017e49c3 | |||
| 24b2a44de1 | |||
| ec580e6a3b | |||
| 14a26288e1 | |||
| 5b1aaedcb8 | |||
| ac26997300 | |||
| 7a56c0a1d3 | |||
| 48822c5847 | |||
| e23f87daea | |||
| 6d6d949f99 | |||
| ddc169dff3 | |||
| 685f7bdade | |||
| 6648edd51d | |||
| fc9c3058d5 | |||
| 16c317d2f5 | |||
| 975efa8de4 | |||
| 16b8e7e2b3 | |||
| 6c3c27082b | |||
| aa528dea3a | |||
| f8cf53680b | |||
| 01c9ea0341 | |||
| c1d4302781 | |||
| 29cb008821 | |||
| 691c7fef6c | |||
| 525d073bcb | |||
| 4ce56ce9e0 | |||
| 52ad61ed16 | |||
| 9c3ab82cab | |||
| 2b7296287f | |||
| 0b4f24a052 | |||
| 2247e334ab | |||
| e2e7f25ca8 | |||
| 42dcbcea83 | |||
| 8380b97769 | |||
| 6c30b9d5da | |||
| 38c31c4724 | |||
| dc9200e7c9 | |||
| 7935d87e7d | |||
| 6f7fde1eba | |||
| 0b534f40f9 | |||
| 59297fc5b9 | |||
| c88c4f56fd | |||
| 1726434b53 | |||
| d3c842947f | |||
| 12900a00b5 | |||
| ab5dd5c11a | |||
| 5bf9f51cd3 | |||
| 9471c4a24e | |||
| 7f878c0495 | |||
| 0e79e384ee | |||
| 323065fc49 | |||
| 110d30a2e8 | |||
| ee5f5d8aba | |||
| eb151093c0 | |||
| 80454c4281 | |||
| 25d7aeadb1 | |||
| 122d0b2297 | |||
| dca683a6e1 | |||
| c4aee638e9 | |||
| 67126480a8 | |||
| 619f686a78 | |||
| 7d5ed5ebac | |||
| d8f4999a58 | |||
| a7c6e3b828 | |||
| a6ed06b81f | |||
| 688e5153e1 | |||
| 168f4be245 | |||
| 7dd816c2f6 | |||
| fd5372535b | |||
| a8a3bd3239 | |||
| 211ac032f4 | |||
| 70513a44c9 | |||
| e3b358a629 | |||
| a5e31ca2b4 | |||
| bad3465e65 | |||
| e3503d3070 | |||
| 6b2496f7a2 | |||
| 23ca2054ee | |||
| ccb6aa6a8d | |||
| 41a18d9805 | |||
| da8d90e7ee | |||
| 96a738f6bc | |||
| 01b7c37139 | |||
| a7d2f297b5 | |||
| fd44615707 | |||
| 76130d6a5d | |||
| 4f0a5c1224 | |||
| d19839a894 | |||
| 73edbd8ae4 | |||
| 6bd8ef9e5d | |||
| 7726504000 | |||
| 6eabcecc5c | |||
| 6bac420531 | |||
| 0368fde089 | |||
| 701ea23649 | |||
| 1245825900 | |||
| af126bb2c8 | |||
| 5390b9a761 | |||
| 97feb47488 | |||
| c0b8785aa1 | |||
| 89d517fe40 | |||
| 641e247c34 | |||
| cb848505ba | |||
| cdbf41230d | |||
| dc54a413ce | |||
| 1cb99ef623 | |||
| cd31360232 | |||
| cfdb0952ca | |||
| da64c088f7 | |||
| 360a93c6d1 | |||
| 85b0441e57 | |||
| 05f6385865 | |||
| 9337889968 | |||
| b6cf873821 | |||
| e3de3005da | |||
| 007027ff69 | |||
| 7dda7ec2a0 | |||
| 60bcfd24b5 | |||
| d5a125567e | |||
| 8c157fc97a | |||
| f7765bedaa | |||
| 92b407a376 | |||
| 68e0356db9 | |||
| c643e6fc28 | |||
| 94e7f28282 | |||
| a7669555a8 | |||
| 04993a0e51 | |||
| 41c1bae229 | |||
| 5627bbb420 | |||
| b5d7b831c9 | |||
| a4fecb61a4 | |||
| 3cac0c1a90 | |||
| 595c39e463 | |||
| c58e1e7a55 | |||
| a49d001f4f | |||
| 8dc512e8d4 | |||
| 17ca925331 | |||
| 4b05b6c8ec | |||
| 2ddc04cd36 | |||
| ce3d6a6ed4 | |||
| 93f606cbed | |||
| 59c5e8796d | |||
| cdbe7f6b73 | |||
| 27c0e8f7fc | |||
| fadee362a6 | |||
| 11f0258fc4 | |||
| 1aadffc0a6 | |||
| 4df7d9fce4 | |||
| 50cd53ed56 | |||
| 09af245522 | |||
| cb432b45aa | |||
| 845867e20e | |||
| 6586a386af | |||
| d6124155b6 | |||
| d940cab887 | |||
| 8405299676 | |||
| ceab2c49e6 | |||
| 41525e6c4d | |||
| 2ba9fb1964 | |||
| 67ea9bdbad | |||
| 3125d13af1 | |||
| 46454a7632 | |||
| 335abc7639 | |||
| c549783c9a | |||
| 21769704a2 | |||
| a23765e787 | |||
| 5dedabeba6 | |||
| 6e9bd6aa12 | |||
| d93f64e5f4 | |||
| b1168ac6fc | |||
| 1340d9c485 | |||
| 733272cc9f | |||
| 7d28be48b7 | |||
| 4d496587b1 | |||
| 065e09a080 | |||
| 1020dd0fa7 | |||
| 88321b8cbf | |||
| c3d874f689 | |||
| a74bcb49e4 | |||
| 2fcbc9c0c9 | |||
| 0f1e8ae460 | |||
| e9cd9b2cc9 | |||
| 647eee7170 | |||
| 5e3dfcefc3 | |||
| 6062d604cd | |||
| 81f9ce3719 | |||
| 7621900fb3 | |||
| 6b2f8e7e15 | |||
| 465b59d9c3 | |||
| 9ffc8e9c61 | |||
| 4bed87326e | |||
| 62bf9667ac | |||
| 38501ff1a1 | |||
| 6e8c62a8a1 | |||
| 15fbe4c8f6 | |||
| bee2daacc1 | |||
| 1913c383b7 | |||
| 0f7b419333 | |||
| 2ea9916e14 | |||
| 0f99bf0d21 | |||
| 302436f0ea | |||
| 8e9c466d27 | |||
| c3f82eb471 | |||
| dfad54e9f5 | |||
| 3c4f377144 | |||
| b1ca90df98 | |||
| 578729dd88 | |||
| 407143e842 | |||
| 5d4c5b8cc0 | |||
| a8493277ec | |||
| 322e929c53 | |||
| ab87c4cbe6 | |||
| e638c1c7ea | |||
| 137701d738 | |||
| 857af1b061 | |||
| 1616d9108a | |||
| d0c5b72959 | |||
| 4eea1daeb6 | |||
| bb56857b7a | |||
| 75527d5111 | |||
| c17f889ffc | |||
| 12e0e9f3ef | |||
| f5fe0656a0 | |||
| 45d9db426d | |||
| 318b9ee9f0 | |||
| 8db9a1f092 | |||
| afb5855c79 | |||
| 21ba4d670b | |||
| f3e5b326d0 | |||
| 1abf2d81d1 | |||
| 0192e68d9c | |||
| 4e43872d81 | |||
| d9dd694b61 | |||
| 450d8d549e | |||
| f4b03ade9f | |||
| b699e03df9 | |||
| dc65760aec | |||
| bdb6db6357 | |||
| f8123a607b | |||
| e406dc6fe7 | |||
| bf72044627 | |||
| a82cc432dc | |||
| 98e6277812 | |||
| d70c2b8b89 | |||
| 24b1bdb838 | |||
| 7f2a381001 | |||
| 74766b9571 | |||
| e5e644e036 | |||
| 843c3da087 | |||
| cd369c2719 | |||
| b0824b8eb8 | |||
| 2b60227127 | |||
| 927c79eccd | |||
| c4b27e82b1 | |||
| 8eddbaa525 | |||
| 8dbcc7c074 | |||
| 654b73a53c | |||
| 190a4d8ab1 | |||
| 357170edcd | |||
| f389cc7b30 | |||
| 279eca8651 | |||
| da95d20e13 | |||
| 10d65125c1 | |||
| b8dc4cb7b2 | |||
| 04d7ecd0ae | |||
| 951b295014 | |||
| 133c314a2f | |||
| 5e7491f77f | |||
| 6fac90a847 | |||
| 0dca47f464 | |||
| 138556ac16 | |||
| 8f5b9e732a | |||
| 3a798a988d | |||
| 347863ce10 | |||
| e96dce8881 | |||
| 37d4209a9d | |||
| d1de1fa15e | |||
| 0eefa3f4fb | |||
| 00df82323e | |||
| 0b6b734bb8 | |||
| 6b0c40c1a5 | |||
| fd9f2618c0 | |||
| e07865d96d | |||
| 5cb665ccc8 | |||
| 1c59f0e9a3 | |||
| 647ca98931 | |||
| 5c2a919448 | |||
| e780e0edeb | |||
| da1a8cee5a | |||
| f2af2d327f | |||
| 693203c3eb | |||
| d06be41540 | |||
| 0660dc8c34 | |||
| c2601bf9d1 | |||
| 38c3d52ba6 | |||
| 77c739964e | |||
| 60e1651f71 | |||
| bee1127b8d | |||
| bc69ac6b7e | |||
| 67b1e6c9bf | |||
| f88f4a003d | |||
| 36d242869b | |||
| 88e507c0af |
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
custom: ['https://qiwi.com/n/THREA793', 'https://www.blockchain.com/btc/address/bc1qgh2fyzqgyxgpstsmqwxyev2luzx7hwc4ezq03u', 'https://www.blockchain.com/eth/address/0x01931cf08BbbA74629c232DbEDB390798cDD121f']
|
|
||||||
51
.gitignore
vendored
51
.gitignore
vendored
@ -1,2 +1,49 @@
|
|||||||
sub/vim/bundle
|
home/user/.config/zsh/plugins/*
|
||||||
sub/zsh/plugins
|
|
||||||
|
home/user/.config/nvim/plugin
|
||||||
|
home/user/.config/nvim/spell
|
||||||
|
|
||||||
|
home/user/.config/zsh/zshrc.d/*
|
||||||
|
!home/user/.config/zsh/zshrc.d/00_zhashd.sh
|
||||||
|
|
||||||
|
home/user/.zshenv.d/*
|
||||||
|
!home/user/.zshenv.d/.gitkeep
|
||||||
|
|
||||||
|
home/user/.config/zsh/.zcalc_history
|
||||||
|
|
||||||
|
.zcompdump
|
||||||
|
*.zwc
|
||||||
|
|
||||||
|
home/user/.ssh/*
|
||||||
|
!home/user/.ssh/config
|
||||||
|
|
||||||
|
home/user/.ipython/profile_default/*
|
||||||
|
!home/user/.ipython/profile_default/ipython_config.py
|
||||||
|
|
||||||
|
home/user/.gnupg/*
|
||||||
|
!home/user/.gnupg/gpg.conf
|
||||||
|
|
||||||
|
lazy-lock.json
|
||||||
|
|
||||||
|
home/user/.config/ranger/plugins
|
||||||
|
home/user/.termux/shell
|
||||||
|
|
||||||
|
home/user/.config/tmux/plugins
|
||||||
|
home/user/.config/tmux/local.conf
|
||||||
|
|
||||||
|
home/user/.tmux/*
|
||||||
|
!home/user/.tmux/dotfiles
|
||||||
|
!home/user/.tmux/sandbox
|
||||||
|
!home/user/.tmux/ssh
|
||||||
|
!home/user/.tmux/example-background-job
|
||||||
|
!home/user/.tmux/system-update
|
||||||
|
!home/user/.tmux/music
|
||||||
|
!home/user/.tmux/landing
|
||||||
|
|
||||||
|
home/user/.config/git/local
|
||||||
|
|
||||||
|
home/user/.config/sway/config.d/*
|
||||||
|
!home/user/.config/sway/config.d/.gitkeep
|
||||||
|
|
||||||
|
home/user/.config/sway/variables.d/*
|
||||||
|
!home/user/.config/sway/variables.d/.gitkeep
|
||||||
|
|||||||
91
Makefile
91
Makefile
@ -1,91 +0,0 @@
|
|||||||
|
|
||||||
all: bash
|
|
||||||
|
|
||||||
backup:
|
|
||||||
mv ~/.bashrc ~/.bashrc.bak || true
|
|
||||||
mv ~/.zshrc ~/.zshrc.bak || true
|
|
||||||
mv ~/.vimrc ~/.vimrc.bak || true
|
|
||||||
mv ~/.vim ~/.vim.bak || true
|
|
||||||
mv ~/.subbash ~/.subbash.bak || true
|
|
||||||
mv ~/.subzsh ~/.subzsh.bak || true
|
|
||||||
mv ~/.tmux.conf ~/.tmux.conf.bak || true
|
|
||||||
mv ~/.gitconfig ~/.gitconfig.bak || true
|
|
||||||
mv ~/.gitignore ~/.gitignore.bak || true
|
|
||||||
|
|
||||||
bash:
|
|
||||||
test -d ~/.subbash || \
|
|
||||||
ln -s $(PWD)/sub/bash ~/.subbash
|
|
||||||
ln -s ~/.subbash/bashrc ~/.bashrc
|
|
||||||
|
|
||||||
zsh:
|
|
||||||
test -d ~/.subzsh || \
|
|
||||||
ln -s $(PWD)/sub/zsh ~/.subzsh
|
|
||||||
ln -s ~/.subzsh/zshrc ~/.zshrc
|
|
||||||
mkdir ~/.subzsh/plugins
|
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.subzsh/plugins/zsh-autosuggestions
|
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.subzsh/plugins/zsh-syntax-highlighting
|
|
||||||
git clone https://github.com/hlissner/zsh-autopair ~/.subzsh/plugins/hlissner/zsh-autopair
|
|
||||||
|
|
||||||
tmux:
|
|
||||||
ln -s $(PWD)/sub/tmux/tmux.conf ~/.tmux.conf
|
|
||||||
|
|
||||||
alacritty:
|
|
||||||
test -d ~/.config/alacritty || \
|
|
||||||
mkdir -p ~/.config/alacritty
|
|
||||||
ln -s $(PWD)/sub/alacritty/alacritty.yml ~/.config/alacritty/
|
|
||||||
|
|
||||||
vim:
|
|
||||||
echo "sudo pacman -S npm; mkdir ~/.npm-global; npm config set prefix '~/.npm-global'; npm install -g pyright"
|
|
||||||
echo "set editing-mode vi" >> ~/.inputrc
|
|
||||||
test -d ~/.vim || \
|
|
||||||
ln -s $(PWD)/sub/vim ~/.vim
|
|
||||||
ln -s ~/.vim/vimrc ~/.vimrc
|
|
||||||
mkdir -p ~/.config/nvim
|
|
||||||
ln -s ~/.vim/vimrc ~/.config/nvim/init.vim
|
|
||||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
|
||||||
vim +PluginInstall +qall
|
|
||||||
|
|
||||||
ssh:
|
|
||||||
cat $(PWD)/sub/ssh/config >> ~/.ssh/config
|
|
||||||
|
|
||||||
git:
|
|
||||||
ln -s $(PWD)/sub/git/gitconfig ~/.gitconfig
|
|
||||||
ln -s $(PWD)/sub/git/gitignore ~/.gitignore
|
|
||||||
|
|
||||||
ranger:
|
|
||||||
echo "sudo pacman -S highlight ttf-joypixels noto-fonts-emoji ueberzug"
|
|
||||||
test -d ~/.config/ranger || \
|
|
||||||
mkdir -p ~/.config/ranger
|
|
||||||
ln -s $(PWD)/sub/ranger/rc.conf ~/.config/ranger
|
|
||||||
mkdir -p ~/.config/ranger/plugins
|
|
||||||
git clone https://github.com/alexanderjeurissen/ranger_devicons ~/.config/ranger/plugins/ranger_devicons
|
|
||||||
ranger --copy-config=all
|
|
||||||
|
|
||||||
gpg:
|
|
||||||
test -d ~/.gnupg || \
|
|
||||||
mkdir -p ~/.gnupg
|
|
||||||
cat $(PWD)/sub/gpg/gpg.conf >> ~/.gnupg/gpg.conf
|
|
||||||
echo -e "default-cache-ttl 1\nmax-cache-ttl 1" > ~/.gnupg/gpg-agent.conf; echo RELOADAGENT | gpg-connect-agent
|
|
||||||
|
|
||||||
i3:
|
|
||||||
echo "sudo pacman -S nitrogen picom compton ttf-font-awesome xdotool xclip maim"
|
|
||||||
test -d ~/.config/i3 || \
|
|
||||||
mkdir -p ~/.config/i3
|
|
||||||
mkdir -p ~/.config/i3status
|
|
||||||
ln -s $(PWD)/sub/i3/config ~/.config/i3/config
|
|
||||||
ln -s $(PWD)/sub/i3/statusconfig ~/.config/i3status/config
|
|
||||||
|
|
||||||
bat:
|
|
||||||
test -d ~/.config/bat || \
|
|
||||||
mkdir -p ~/.config/bat
|
|
||||||
ln -s $(PWD)/sub/bat/config ~/.config/bat/config
|
|
||||||
|
|
||||||
font:
|
|
||||||
mkdir -p ~/.local/share/fonts
|
|
||||||
cd ~/.local/share/fonts
|
|
||||||
wget 'https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraCode.zip'
|
|
||||||
unzip FiraCode.zip -d ~/.local/share/fonts
|
|
||||||
git clone 'https://github.com/powerline/fonts.git' --depth=1
|
|
||||||
cd fonts
|
|
||||||
./install.sh
|
|
||||||
|
|
||||||
45
README.md
45
README.md
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/TheK4n">
|
<a href="https://github.com/TheK4n">
|
||||||
<img src="https://img.shields.io/github/followers/TheK4n?label=Follow&style=social">
|
<img src="https://img.shields.io/github/followers/TheK4n?label=Follow&style=social" alt="TheK4n">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/TheK4n/dotfiles">
|
<a href="https://github.com/TheK4n/dotfiles">
|
||||||
<img src="https://img.shields.io/github/stars/TheK4n/dotfiles?style=social">
|
<img src="https://img.shields.io/github/stars/TheK4n/dotfiles?style=social" alt="project">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
## Content
|
## Content
|
||||||
|
|
||||||
* [Project description](#chapter-0)
|
* [Project description](#chapter-0)
|
||||||
* [Installation](#chapter-1)
|
* [Installation](#chapter-1)
|
||||||
@ -20,14 +20,15 @@
|
|||||||
## Project description
|
## Project description
|
||||||
|
|
||||||
Config files for:
|
Config files for:
|
||||||
* bash
|
|
||||||
* zsh
|
* zsh
|
||||||
* alacritty
|
* alacritty
|
||||||
* tmux
|
* tmux
|
||||||
* ssh
|
* ssh
|
||||||
* git
|
* git
|
||||||
* ranger
|
* ranger
|
||||||
* i3
|
* sway
|
||||||
|
* vim
|
||||||
|
* nvim
|
||||||
|
|
||||||
|
|
||||||
### Prompt
|
### Prompt
|
||||||
@ -35,27 +36,33 @@ Config files for:
|
|||||||
<img src=".assets/prompt.png" alt="Prompt">
|
<img src=".assets/prompt.png" alt="Prompt">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
### i3
|
You can add your files to the `~/.config/zsh/zshrc.d` directory for zsh so
|
||||||
|
that they automatically run in ascending order when you open a terminal.\
|
||||||
|
Example:\
|
||||||
| Feature | Shortcut |
|
`~/.config/zsh/zshrc.d/01_hello.sh`
|
||||||
|:------------------------|-----------------------:|
|
```sh
|
||||||
| Full Screen | PrtScrn |
|
echo "Hello $USER!"
|
||||||
| Selection | Shift + PrtScrn |
|
```
|
||||||
| Active Window | Super + PrtScrn |
|
|
||||||
| Clipboard Full Screen | Ctrl + PrtScrn |
|
|
||||||
| Clipboard Selection | Ctrl + Shift + PrtScrn |
|
|
||||||
| Clipboard Active Window | Ctrl + Super + PrtScrn |
|
|
||||||
|
|
||||||
|
|
||||||
<a id="chapter-1"></a>
|
<a id="chapter-1"></a>
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
git clone https://github.com/TheK4n/dotfiles
|
git clone https://github.com/TheK4n/dotfiles
|
||||||
cd dotfiles
|
cd dotfiles
|
||||||
make
|
./install zsh nvim ...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Installation script
|
||||||
|
Per-user dotfiles "package" manager
|
||||||
|
|
||||||
|
### Features
|
||||||
|
1. Installing files from dotfiles/home/user to $HOME
|
||||||
|
2. Uninstalling installed files
|
||||||
|
3. Check installation integrity
|
||||||
|
4. Transaction based installation
|
||||||
|
5. Does not overwrite your configs
|
||||||
|
|
||||||
|
|
||||||
<h1 align="center"><a href="#top">▲</a></h1>
|
<h1 align="center"><a href="#top">▲</a></h1>
|
||||||
|
|||||||
30
TARGETS.sh
Normal file
30
TARGETS.sh
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
readonly TARGETS="\
|
||||||
|
colors:.config/terminal-colors.d
|
||||||
|
less:.lesskey .infokey
|
||||||
|
tmux:.config/tmux .tmux .config/systemd/user/tmux.service %copypasta
|
||||||
|
t:
|
||||||
|
note:
|
||||||
|
psw:
|
||||||
|
zsh:.config/zsh .zshenv .zshenv.d .inputrc %copypasta %colors
|
||||||
|
alacritty:.config/alacritty
|
||||||
|
nvim:.config/nvim .editorconfig .editrc .local/bin/vim_askpass_helper
|
||||||
|
ssh:
|
||||||
|
git:.config/git .local/bin/ga
|
||||||
|
ranger:.config/ranger
|
||||||
|
gpg:
|
||||||
|
sway:.config/sway .config/i3blocks .config/mako .config/mimeapps.list .config/rofi .local/bin/screenshot .config/swaylock .Xresources .local/bin/slm .local/bin/slm_rofi .local/bin/firefox_media %copypasta %pomodoro
|
||||||
|
pomodoro:
|
||||||
|
bat:.config/bat
|
||||||
|
font:
|
||||||
|
termux:.termux
|
||||||
|
arch:
|
||||||
|
psql:.psqlrc
|
||||||
|
docker:.docker/cli-plugins
|
||||||
|
ipython:.ipython/profile_default/ipython_config.py
|
||||||
|
gdb:.config/gdb
|
||||||
|
sandbox:
|
||||||
|
chromium:.local/bin/pchromium .local/share/applications/pchromium.desktop
|
||||||
|
scripts:.local/bin/httpstatus .local/bin/apco .local/bin/bb .local/bin/emoji .local/bin/mksh .local/bin/nato .local/bin/pastas .local/bin/timer .local/bin/tryna .local/bin/trynafail .local/bin/bak .local/bin/cleanup-directory .local/bin/cleanup-directory-log .local/bin/cleanup-downloads .local/bin/gobuild .local/bin/json .local/bin/open .local/bin/py .local/bin/sha .local/bin/showtips .local/bin/weather .local/bin/radio .local/bin/rmt .local/bin/scratch .local/bin/wake .local/bin/myip .local/bin/genpass .local/bin/gensalt .local/bin/django-create-project .local/bin/mirror-site .local/bin/split-file .local/bin/extract .local/bin/destroy .local/bin/serveit .local/bin/highlight-logs %copypasta
|
||||||
|
music:.local/bin/mpv-service.sh .config/systemd/user/mpv.service .local/bin/player
|
||||||
|
copypasta:.local/bin/copy .local/bin/pasta
|
||||||
|
all:%less %t %note %tmux %zsh %nvim %git"
|
||||||
3
etc/cron.hourly/99beep
Executable file
3
etc/cron.hourly/99beep
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
beep -f 4000 -l 150 -D 150 -n -f 4000 -l 150
|
||||||
14
etc/hosts
Normal file
14
etc/hosts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
# Local
|
||||||
|
## 192.168.50.1 router.home
|
||||||
|
## 192.168.50.2 router2.home
|
||||||
|
|
||||||
|
## 192.168.50.10 files.home
|
||||||
|
## 192.168.50.11 builder.home
|
||||||
|
## 192.168.50.12 printer.home
|
||||||
|
|
||||||
|
## 192.168.50.20 workstation.home
|
||||||
|
## 192.168.50.21 phone.home
|
||||||
|
|
||||||
|
# Network
|
||||||
|
# 91.91.91.91 home
|
||||||
0
etc/skel/code/.gitkeep
Normal file
0
etc/skel/code/.gitkeep
Normal file
0
etc/skel/documents/.gitkeep
Normal file
0
etc/skel/documents/.gitkeep
Normal file
0
etc/skel/downloads/.gitkeep
Normal file
0
etc/skel/downloads/.gitkeep
Normal file
0
etc/skel/playground/.gitkeep
Normal file
0
etc/skel/playground/.gitkeep
Normal file
3
etc/skel/public/.permissions
Normal file
3
etc/skel/public/.permissions
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
chmod 751 "${HOME}"
|
||||||
|
mkdir "${HOME}/public"
|
||||||
|
chmod 1777 "${HOME}/public"
|
||||||
5
etc/sudoers
Normal file
5
etc/sudoers
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
|
||||||
|
|
||||||
|
@includedir /etc/sudoers.d
|
||||||
|
|
||||||
|
Defaults passwd_timeout=0
|
||||||
1
etc/sudoers.d/custompower
Normal file
1
etc/sudoers.d/custompower
Normal file
@ -0,0 +1 @@
|
|||||||
|
%custompower ALL= NOPASSWD: /sbin/reboot,/sbin/shutdown now,/sbin/systemctl suspend
|
||||||
1
etc/sudoers.d/wireguard
Normal file
1
etc/sudoers.d/wireguard
Normal file
@ -0,0 +1 @@
|
|||||||
|
%wireguard ALL= NOPASSWD: /sbin/systemctl start wg-quick@wg0.service,/sbin/systemctl stop wg-quick@wg0.service
|
||||||
10
etc/systemd/system/disable-caps.service
Normal file
10
etc/systemd/system/disable-caps.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Disable capslock
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=sh -c "dumpkeys | sed s/Caps_Lock/Control/ | loadkeys"
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
After=multi-user.target
|
||||||
4
etc/systemd/system/getty@tty1.service.d/autologin.conf
Normal file
4
etc/systemd/system/getty@tty1.service.d/autologin.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=-/sbin/agetty --noreset --noclear --autologin thek4n - ${TERM}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=-/sbin/agetty -o '-p -- %%USER%%' --noclear --skip-login - $TERM
|
||||||
11
etc/systemd/system/wol.service
Normal file
11
etc/systemd/system/wol.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Wake-on-LAN for enp3s0
|
||||||
|
Requires=network.target
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/ethtool -s enp3s0 wol g
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
4
etc/update-motd.d/10-figlet
Executable file
4
etc/update-motd.d/10-figlet
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
echo
|
||||||
|
figlet -ct -f banner "welcome mr.kan"
|
||||||
|
echo
|
||||||
10
etc/update-motd.d/20-service-status.example
Executable file
10
etc/update-motd.d/20-service-status.example
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "wg0 status: $(systemctl is-active wg-quick@wg0.service)"
|
||||||
|
|
||||||
|
if ! systemctl is-active wg-quick@wg0.service 1>/dev/null; then
|
||||||
|
#shellcheck disable=SC2016
|
||||||
|
echo 'Executing this command may fix wireguard: "sudo apt update && sudo apt install linux-headers-$(uname -r) && sudo reboot"'
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
1
home/user/.Xresources
Normal file
1
home/user/.Xresources
Normal file
@ -0,0 +1 @@
|
|||||||
|
Xft.dpi: 100
|
||||||
38
home/user/.config/alacritty/alacritty.toml
Normal file
38
home/user/.config/alacritty/alacritty.toml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
[env]
|
||||||
|
TERM = "xterm-256color"
|
||||||
|
WINIT_X11_SCALE_FACTOR = "1"
|
||||||
|
|
||||||
|
[font]
|
||||||
|
size = 11
|
||||||
|
|
||||||
|
[font.normal]
|
||||||
|
family = "FiraCode Nerd Font Mono"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "SpawnNewInstance"
|
||||||
|
key = "Return"
|
||||||
|
mods = "Control|Shift"
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
action = "None"
|
||||||
|
key = "Space"
|
||||||
|
mods = "Control|Shift"
|
||||||
|
|
||||||
|
[mouse]
|
||||||
|
hide_when_typing = true
|
||||||
|
|
||||||
|
[scrolling]
|
||||||
|
history = 3000
|
||||||
|
multiplier = 3
|
||||||
|
|
||||||
|
[window]
|
||||||
|
dynamic_title = true
|
||||||
|
opacity = 0.92
|
||||||
|
|
||||||
|
[window.dimensions]
|
||||||
|
columns = 150
|
||||||
|
lines = 42
|
||||||
|
|
||||||
|
[general]
|
||||||
|
live_config_reload = true
|
||||||
754
home/user/.config/gdb/gdbinit
Normal file
754
home/user/.config/gdb/gdbinit
Normal file
@ -0,0 +1,754 @@
|
|||||||
|
# set to 1 to enable 64bits target by default (32bit is the default)
|
||||||
|
set $64BITS = 1
|
||||||
|
|
||||||
|
set confirm off
|
||||||
|
set verbose off
|
||||||
|
set prompt \033[31mgdb$ \033[0m
|
||||||
|
|
||||||
|
set output-radix 0x10
|
||||||
|
set input-radix 0x10
|
||||||
|
|
||||||
|
# These make gdb never pause in its output
|
||||||
|
set height 0
|
||||||
|
set width 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# _____________breakpoint aliases_____________
|
||||||
|
define bpl
|
||||||
|
info breakpoints
|
||||||
|
end
|
||||||
|
document bpl
|
||||||
|
List all breakpoints.
|
||||||
|
end
|
||||||
|
|
||||||
|
define bp
|
||||||
|
if $argc != 1
|
||||||
|
help bp
|
||||||
|
else
|
||||||
|
break $arg0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document bp
|
||||||
|
Set breakpoint.
|
||||||
|
Usage: bp LOCATION
|
||||||
|
LOCATION may be a line number, function name, or "*" and an address.
|
||||||
|
|
||||||
|
To break on a symbol you must enclose symbol name inside "".
|
||||||
|
Example:
|
||||||
|
bp "[NSControl stringValue]"
|
||||||
|
Or else you can use directly the break command (break [NSControl stringValue])
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define bpc
|
||||||
|
if $argc != 1
|
||||||
|
help bpc
|
||||||
|
else
|
||||||
|
clear $arg0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document bpc
|
||||||
|
Clear breakpoint.
|
||||||
|
Usage: bpc LOCATION
|
||||||
|
LOCATION may be a line number, function name, or "*" and an address.
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define bpe
|
||||||
|
if $argc != 1
|
||||||
|
help bpe
|
||||||
|
else
|
||||||
|
enable $arg0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document bpe
|
||||||
|
Enable breakpoint with number NUM.
|
||||||
|
Usage: bpe NUM
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define bpd
|
||||||
|
if $argc != 1
|
||||||
|
help bpd
|
||||||
|
else
|
||||||
|
disable $arg0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document bpd
|
||||||
|
Disable breakpoint with number NUM.
|
||||||
|
Usage: bpd NUM
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define bpt
|
||||||
|
if $argc != 1
|
||||||
|
help bpt
|
||||||
|
else
|
||||||
|
tbreak $arg0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document bpt
|
||||||
|
Set a temporary breakpoint.
|
||||||
|
Will be deleted when hit!
|
||||||
|
Usage: bpt LOCATION
|
||||||
|
LOCATION may be a line number, function name, or "*" and an address.
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define bpm
|
||||||
|
if $argc != 1
|
||||||
|
help bpm
|
||||||
|
else
|
||||||
|
awatch $arg0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document bpm
|
||||||
|
Set a read/write breakpoint on EXPRESSION, e.g. *address.
|
||||||
|
Usage: bpm EXPRESSION
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define bhb
|
||||||
|
if $argc != 1
|
||||||
|
help bhb
|
||||||
|
else
|
||||||
|
hb $arg0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document bhb
|
||||||
|
Set hardware assisted breakpoint.
|
||||||
|
Usage: bhb LOCATION
|
||||||
|
LOCATION may be a line number, function name, or "*" and an address.
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ______________process information____________
|
||||||
|
define argv
|
||||||
|
show args
|
||||||
|
end
|
||||||
|
document argv
|
||||||
|
Print program arguments.
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define stack
|
||||||
|
if $argc == 0
|
||||||
|
info stack
|
||||||
|
end
|
||||||
|
if $argc == 1
|
||||||
|
info stack $arg0
|
||||||
|
end
|
||||||
|
if $argc > 1
|
||||||
|
help stack
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document stack
|
||||||
|
Print backtrace of the call stack, or innermost COUNT frames.
|
||||||
|
Usage: stack <COUNT>
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define frame
|
||||||
|
info frame
|
||||||
|
info args
|
||||||
|
info locals
|
||||||
|
end
|
||||||
|
document frame
|
||||||
|
Print stack frame.
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define flags
|
||||||
|
# OF (overflow) flag
|
||||||
|
if (($eflags >> 0xB) & 1)
|
||||||
|
printf "O "
|
||||||
|
set $_of_flag = 1
|
||||||
|
else
|
||||||
|
printf "o "
|
||||||
|
set $_of_flag = 0
|
||||||
|
end
|
||||||
|
if (($eflags >> 0xA) & 1)
|
||||||
|
printf "D "
|
||||||
|
else
|
||||||
|
printf "d "
|
||||||
|
end
|
||||||
|
if (($eflags >> 9) & 1)
|
||||||
|
printf "I "
|
||||||
|
else
|
||||||
|
printf "i "
|
||||||
|
end
|
||||||
|
if (($eflags >> 8) & 1)
|
||||||
|
printf "T "
|
||||||
|
else
|
||||||
|
printf "t "
|
||||||
|
end
|
||||||
|
# SF (sign) flag
|
||||||
|
if (($eflags >> 7) & 1)
|
||||||
|
printf "S "
|
||||||
|
set $_sf_flag = 1
|
||||||
|
else
|
||||||
|
printf "s "
|
||||||
|
set $_sf_flag = 0
|
||||||
|
end
|
||||||
|
# ZF (zero) flag
|
||||||
|
if (($eflags >> 6) & 1)
|
||||||
|
printf "Z "
|
||||||
|
set $_zf_flag = 1
|
||||||
|
else
|
||||||
|
printf "z "
|
||||||
|
set $_zf_flag = 0
|
||||||
|
end
|
||||||
|
if (($eflags >> 4) & 1)
|
||||||
|
printf "A "
|
||||||
|
else
|
||||||
|
printf "a "
|
||||||
|
end
|
||||||
|
# PF (parity) flag
|
||||||
|
if (($eflags >> 2) & 1)
|
||||||
|
printf "P "
|
||||||
|
set $_pf_flag = 1
|
||||||
|
else
|
||||||
|
printf "p "
|
||||||
|
set $_pf_flag = 0
|
||||||
|
end
|
||||||
|
# CF (carry) flag
|
||||||
|
if ($eflags & 1)
|
||||||
|
printf "C "
|
||||||
|
set $_cf_flag = 1
|
||||||
|
else
|
||||||
|
printf "c "
|
||||||
|
set $_cf_flag = 0
|
||||||
|
end
|
||||||
|
printf "\n"
|
||||||
|
end
|
||||||
|
document flags
|
||||||
|
Print flags register.
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define eflags
|
||||||
|
printf " OF <%d> DF <%d> IF <%d> TF <%d>",\
|
||||||
|
(($eflags >> 0xB) & 1), (($eflags >> 0xA) & 1), \
|
||||||
|
(($eflags >> 9) & 1), (($eflags >> 8) & 1)
|
||||||
|
printf " SF <%d> ZF <%d> AF <%d> PF <%d> CF <%d>\n",\
|
||||||
|
(($eflags >> 7) & 1), (($eflags >> 6) & 1),\
|
||||||
|
(($eflags >> 4) & 1), (($eflags >> 2) & 1), ($eflags & 1)
|
||||||
|
printf " ID <%d> VIP <%d> VIF <%d> AC <%d>",\
|
||||||
|
(($eflags >> 0x15) & 1), (($eflags >> 0x14) & 1), \
|
||||||
|
(($eflags >> 0x13) & 1), (($eflags >> 0x12) & 1)
|
||||||
|
printf " VM <%d> RF <%d> NT <%d> IOPL <%d>\n",\
|
||||||
|
(($eflags >> 0x11) & 1), (($eflags >> 0x10) & 1),\
|
||||||
|
(($eflags >> 0xE) & 1), (($eflags >> 0xC) & 3)
|
||||||
|
end
|
||||||
|
document eflags
|
||||||
|
Print eflags register.
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define reg
|
||||||
|
if ($64BITS == 1)
|
||||||
|
# 64bits stuff
|
||||||
|
printf " "
|
||||||
|
echo \033[32m
|
||||||
|
printf "RAX:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $rax
|
||||||
|
echo \033[32m
|
||||||
|
printf "RBX:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $rbx
|
||||||
|
echo \033[32m
|
||||||
|
printf "RCX:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $rcx
|
||||||
|
echo \033[32m
|
||||||
|
printf "RDX:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $rdx
|
||||||
|
echo \033[1m\033[4m\033[31m
|
||||||
|
flags
|
||||||
|
echo \033[0m
|
||||||
|
printf " "
|
||||||
|
echo \033[32m
|
||||||
|
printf "RSI:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $rsi
|
||||||
|
echo \033[32m
|
||||||
|
printf "RDI:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $rdi
|
||||||
|
echo \033[32m
|
||||||
|
printf "RBP:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $rbp
|
||||||
|
echo \033[32m
|
||||||
|
printf "RSP:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $rsp
|
||||||
|
echo \033[32m
|
||||||
|
printf "RIP:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX\n ", $rip
|
||||||
|
echo \033[32m
|
||||||
|
printf "R8 :"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $r8
|
||||||
|
echo \033[32m
|
||||||
|
printf "R9 :"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $r9
|
||||||
|
echo \033[32m
|
||||||
|
printf "R10:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $r10
|
||||||
|
echo \033[32m
|
||||||
|
printf "R11:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $r11
|
||||||
|
echo \033[32m
|
||||||
|
printf "R12:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX\n ", $r12
|
||||||
|
echo \033[32m
|
||||||
|
printf "R13:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $r13
|
||||||
|
echo \033[32m
|
||||||
|
printf "R14:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX ", $r14
|
||||||
|
echo \033[32m
|
||||||
|
printf "R15:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%016lX\n ", $r15
|
||||||
|
echo \033[32m
|
||||||
|
printf "CS:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X ", $cs
|
||||||
|
echo \033[32m
|
||||||
|
printf "DS:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X ", $ds
|
||||||
|
echo \033[32m
|
||||||
|
printf "ES:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X ", $es
|
||||||
|
echo \033[32m
|
||||||
|
printf "FS:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X ", $fs
|
||||||
|
echo \033[32m
|
||||||
|
printf "GS:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X ", $gs
|
||||||
|
echo \033[32m
|
||||||
|
printf "SS:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X", $ss
|
||||||
|
echo \033[0m
|
||||||
|
# 32bits stuff
|
||||||
|
else
|
||||||
|
printf " "
|
||||||
|
echo \033[32m
|
||||||
|
printf "EAX:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%08X ", $eax
|
||||||
|
echo \033[32m
|
||||||
|
printf "EBX:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%08X ", $ebx
|
||||||
|
echo \033[32m
|
||||||
|
printf "ECX:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%08X ", $ecx
|
||||||
|
echo \033[32m
|
||||||
|
printf "EDX:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%08X ", $edx
|
||||||
|
echo \033[1m\033[4m\033[31m
|
||||||
|
flags
|
||||||
|
echo \033[0m
|
||||||
|
printf " "
|
||||||
|
echo \033[32m
|
||||||
|
printf "ESI:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%08X ", $esi
|
||||||
|
echo \033[32m
|
||||||
|
printf "EDI:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%08X ", $edi
|
||||||
|
echo \033[32m
|
||||||
|
printf "EBP:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%08X ", $ebp
|
||||||
|
echo \033[32m
|
||||||
|
printf "ESP:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%08X ", $esp
|
||||||
|
echo \033[32m
|
||||||
|
printf "EIP:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " 0x%08X\n ", $eip
|
||||||
|
echo \033[32m
|
||||||
|
printf "CS:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X ", $cs
|
||||||
|
echo \033[32m
|
||||||
|
printf "DS:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X ", $ds
|
||||||
|
echo \033[32m
|
||||||
|
printf "ES:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X ", $es
|
||||||
|
echo \033[32m
|
||||||
|
printf "FS:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X ", $fs
|
||||||
|
echo \033[32m
|
||||||
|
printf "GS:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X ", $gs
|
||||||
|
echo \033[32m
|
||||||
|
printf "SS:"
|
||||||
|
echo \033[0m
|
||||||
|
printf " %04X", $ss
|
||||||
|
echo \033[0m
|
||||||
|
end
|
||||||
|
# call smallregisters
|
||||||
|
smallregisters
|
||||||
|
# display conditional jump routine
|
||||||
|
if ($64BITS == 1)
|
||||||
|
printf "\t\t\t\t"
|
||||||
|
end
|
||||||
|
dumpjump
|
||||||
|
printf "\n"
|
||||||
|
end
|
||||||
|
document reg
|
||||||
|
Print CPU registers.
|
||||||
|
end
|
||||||
|
|
||||||
|
define smallregisters
|
||||||
|
if ($64BITS == 1)
|
||||||
|
#64bits stuff
|
||||||
|
# from rax
|
||||||
|
set $eax = $rax & 0xffffffff
|
||||||
|
set $ax = $rax & 0xffff
|
||||||
|
set $al = $ax & 0xff
|
||||||
|
set $ah = $ax >> 8
|
||||||
|
# from rbx
|
||||||
|
set $bx = $rbx & 0xffff
|
||||||
|
set $bl = $bx & 0xff
|
||||||
|
set $bh = $bx >> 8
|
||||||
|
# from rcx
|
||||||
|
set $ecx = $rcx & 0xffffffff
|
||||||
|
set $cx = $rcx & 0xffff
|
||||||
|
set $cl = $cx & 0xff
|
||||||
|
set $ch = $cx >> 8
|
||||||
|
# from rdx
|
||||||
|
set $edx = $rdx & 0xffffffff
|
||||||
|
set $dx = $rdx & 0xffff
|
||||||
|
set $dl = $dx & 0xff
|
||||||
|
set $dh = $dx >> 8
|
||||||
|
# from rsi
|
||||||
|
set $esi = $rsi & 0xffffffff
|
||||||
|
set $si = $rsi & 0xffff
|
||||||
|
# from rdi
|
||||||
|
set $edi = $rdi & 0xffffffff
|
||||||
|
set $di = $rdi & 0xffff
|
||||||
|
#32 bits stuff
|
||||||
|
else
|
||||||
|
# from eax
|
||||||
|
set $ax = $eax & 0xffff
|
||||||
|
set $al = $ax & 0xff
|
||||||
|
set $ah = $ax >> 8
|
||||||
|
# from ebx
|
||||||
|
set $bx = $ebx & 0xffff
|
||||||
|
set $bl = $bx & 0xff
|
||||||
|
set $bh = $bx >> 8
|
||||||
|
# from ecx
|
||||||
|
set $cx = $ecx & 0xffff
|
||||||
|
set $cl = $cx & 0xff
|
||||||
|
set $ch = $cx >> 8
|
||||||
|
# from edx
|
||||||
|
set $dx = $edx & 0xffff
|
||||||
|
set $dl = $dx & 0xff
|
||||||
|
set $dh = $dx >> 8
|
||||||
|
# from esi
|
||||||
|
set $si = $esi & 0xffff
|
||||||
|
# from edi
|
||||||
|
set $di = $edi & 0xffff
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
document smallregisters
|
||||||
|
Create the 16 and 8 bit cpu registers (gdb doesn't have them by default)
|
||||||
|
And 32bits if we are dealing with 64bits binaries
|
||||||
|
end
|
||||||
|
|
||||||
|
define func
|
||||||
|
if $argc == 0
|
||||||
|
info functions
|
||||||
|
end
|
||||||
|
if $argc == 1
|
||||||
|
info functions $arg0
|
||||||
|
end
|
||||||
|
if $argc > 1
|
||||||
|
help func
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document func
|
||||||
|
Print all function names in target, or those matching REGEXP.
|
||||||
|
Usage: func <REGEXP>
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define var
|
||||||
|
if $argc == 0
|
||||||
|
info variables
|
||||||
|
end
|
||||||
|
if $argc == 1
|
||||||
|
info variables $arg0
|
||||||
|
end
|
||||||
|
if $argc > 1
|
||||||
|
help var
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document var
|
||||||
|
Print all global and static variable names (symbols), or those matching REGEXP.
|
||||||
|
Usage: var <REGEXP>
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define lib
|
||||||
|
info sharedlibrary
|
||||||
|
end
|
||||||
|
document lib
|
||||||
|
Print shared libraries linked to target.
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define sig
|
||||||
|
if $argc == 0
|
||||||
|
info signals
|
||||||
|
end
|
||||||
|
if $argc == 1
|
||||||
|
info signals $arg0
|
||||||
|
end
|
||||||
|
if $argc > 1
|
||||||
|
help sig
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document sig
|
||||||
|
Print what debugger does when program gets various signals.
|
||||||
|
Specify a SIGNAL as argument to print info on that signal only.
|
||||||
|
Usage: sig <SIGNAL>
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define threads
|
||||||
|
info threads
|
||||||
|
end
|
||||||
|
document threads
|
||||||
|
Print threads in target.
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define dis
|
||||||
|
if $argc == 0
|
||||||
|
disassemble
|
||||||
|
end
|
||||||
|
if $argc == 1
|
||||||
|
disassemble $arg0
|
||||||
|
end
|
||||||
|
if $argc == 2
|
||||||
|
disassemble $arg0 $arg1
|
||||||
|
end
|
||||||
|
if $argc > 2
|
||||||
|
help dis
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document dis
|
||||||
|
Disassemble a specified section of memory.
|
||||||
|
Default is to disassemble the function surrounding the PC (program counter)
|
||||||
|
of selected frame. With one argument, ADDR1, the function surrounding this
|
||||||
|
address is dumped. Two arguments are taken as a range of memory to dump.
|
||||||
|
Usage: dis <ADDR1> <ADDR2>
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# __________hex/ascii dump an address_________
|
||||||
|
define ascii_char
|
||||||
|
if $argc != 1
|
||||||
|
help ascii_char
|
||||||
|
else
|
||||||
|
# thanks elaine :)
|
||||||
|
set $_c = *(unsigned char *)($arg0)
|
||||||
|
if ($_c < 0x20 || $_c > 0x7E)
|
||||||
|
printf "."
|
||||||
|
else
|
||||||
|
printf "%c", $_c
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document ascii_char
|
||||||
|
Print ASCII value of byte at address ADDR.
|
||||||
|
Print "." if the value is unprintable.
|
||||||
|
Usage: ascii_char ADDR
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define hex_quad
|
||||||
|
if $argc != 1
|
||||||
|
help hex_quad
|
||||||
|
else
|
||||||
|
printf "%02X %02X %02X %02X %02X %02X %02X %02X", \
|
||||||
|
*(unsigned char*)($arg0), *(unsigned char*)($arg0 + 1), \
|
||||||
|
*(unsigned char*)($arg0 + 2), *(unsigned char*)($arg0 + 3), \
|
||||||
|
*(unsigned char*)($arg0 + 4), *(unsigned char*)($arg0 + 5), \
|
||||||
|
*(unsigned char*)($arg0 + 6), *(unsigned char*)($arg0 + 7)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document hex_quad
|
||||||
|
Print eight hexadecimal bytes starting at address ADDR.
|
||||||
|
Usage: hex_quad ADDR
|
||||||
|
end
|
||||||
|
|
||||||
|
define hexdump
|
||||||
|
if $argc != 1
|
||||||
|
help hexdump
|
||||||
|
else
|
||||||
|
echo \033[1m
|
||||||
|
if ($64BITS == 1)
|
||||||
|
printf "0x%016lX : ", $arg0
|
||||||
|
else
|
||||||
|
printf "0x%08X : ", $arg0
|
||||||
|
end
|
||||||
|
echo \033[0m
|
||||||
|
hex_quad $arg0
|
||||||
|
echo \033[1m
|
||||||
|
printf " - "
|
||||||
|
echo \033[0m
|
||||||
|
hex_quad $arg0+8
|
||||||
|
printf " "
|
||||||
|
echo \033[1m
|
||||||
|
ascii_char $arg0+0x0
|
||||||
|
ascii_char $arg0+0x1
|
||||||
|
ascii_char $arg0+0x2
|
||||||
|
ascii_char $arg0+0x3
|
||||||
|
ascii_char $arg0+0x4
|
||||||
|
ascii_char $arg0+0x5
|
||||||
|
ascii_char $arg0+0x6
|
||||||
|
ascii_char $arg0+0x7
|
||||||
|
ascii_char $arg0+0x8
|
||||||
|
ascii_char $arg0+0x9
|
||||||
|
ascii_char $arg0+0xA
|
||||||
|
ascii_char $arg0+0xB
|
||||||
|
ascii_char $arg0+0xC
|
||||||
|
ascii_char $arg0+0xD
|
||||||
|
ascii_char $arg0+0xE
|
||||||
|
ascii_char $arg0+0xF
|
||||||
|
echo \033[0m
|
||||||
|
printf "\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document hexdump
|
||||||
|
Display a 16-byte hex/ASCII dump of memory at address ADDR.
|
||||||
|
Usage: hexdump ADDR
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# _______________data window__________________
|
||||||
|
define ddump
|
||||||
|
if $argc != 1
|
||||||
|
help ddump
|
||||||
|
else
|
||||||
|
echo \033[34m
|
||||||
|
if ($64BITS == 1)
|
||||||
|
printf "[0x%04X:0x%016lX]", $ds, $data_addr
|
||||||
|
else
|
||||||
|
printf "[0x%04X:0x%08X]", $ds, $data_addr
|
||||||
|
end
|
||||||
|
echo \033[34m
|
||||||
|
printf "------------------------"
|
||||||
|
printf "-------------------------------"
|
||||||
|
if ($64BITS == 1)
|
||||||
|
printf "-------------------------------------"
|
||||||
|
end
|
||||||
|
|
||||||
|
echo \033[1;34m
|
||||||
|
printf "[data]\n"
|
||||||
|
echo \033[0m
|
||||||
|
set $_count = 0
|
||||||
|
while ($_count < $arg0)
|
||||||
|
set $_i = ($_count * 0x10)
|
||||||
|
hexdump $data_addr+$_i
|
||||||
|
set $_count++
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document ddump
|
||||||
|
Display NUM lines of hexdump for address in $data_addr global variable.
|
||||||
|
Usage: ddump NUM
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define dd
|
||||||
|
if $argc != 1
|
||||||
|
help dd
|
||||||
|
else
|
||||||
|
if ((($arg0 >> 0x18) == 0x40) || (($arg0 >> 0x18) == 0x08) || (($arg0 >> 0x18) == 0xBF))
|
||||||
|
set $data_addr = $arg0
|
||||||
|
ddump 0x10
|
||||||
|
else
|
||||||
|
printf "Invalid address: %08X\n", $arg0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
document dd
|
||||||
|
Display 16 lines of a hex dump of address starting at ADDR.
|
||||||
|
Usage: dd ADDR
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
define datawin
|
||||||
|
if ($64BITS == 1)
|
||||||
|
if ((($rsi >> 0x18) == 0x40) || (($rsi >> 0x18) == 0x08) || (($rsi >> 0x18) == 0xBF))
|
||||||
|
set $data_addr = $rsi
|
||||||
|
else
|
||||||
|
if ((($rdi >> 0x18) == 0x40) || (($rdi >> 0x18) == 0x08) || (($rdi >> 0x18) == 0xBF))
|
||||||
|
set $data_addr = $rdi
|
||||||
|
else
|
||||||
|
if ((($rax >> 0x18) == 0x40) || (($rax >> 0x18) == 0x08) || (($rax >> 0x18) == 0xBF))
|
||||||
|
set $data_addr = $rax
|
||||||
|
else
|
||||||
|
set $data_addr = $rsp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if ((($esi >> 0x18) == 0x40) || (($esi >> 0x18) == 0x08) || (($esi >> 0x18) == 0xBF))
|
||||||
|
set $data_addr = $esi
|
||||||
|
else
|
||||||
|
if ((($edi >> 0x18) == 0x40) || (($edi >> 0x18) == 0x08) || (($edi >> 0x18) == 0xBF))
|
||||||
|
set $data_addr = $edi
|
||||||
|
else
|
||||||
|
if ((($eax >> 0x18) == 0x40) || (($eax >> 0x18) == 0x08) || (($eax >> 0x18) == 0xBF))
|
||||||
|
set $data_addr = $eax
|
||||||
|
else
|
||||||
|
set $data_addr = $esp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
ddump $CONTEXTSIZE_DATA
|
||||||
|
end
|
||||||
|
document datawin
|
||||||
|
Display valid address from one register in data window.
|
||||||
|
Registers to choose are: esi, edi, eax, or esp.
|
||||||
|
end
|
||||||
63
home/user/.config/git/aliases
Normal file
63
home/user/.config/git/aliases
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# vim: ft=gitconfig
|
||||||
|
|
||||||
|
|
||||||
|
[alias]
|
||||||
|
a = "!ga"
|
||||||
|
u = "!git diff --name-only --cached | fzf -1 -0 -m --bind load:last --preview 'git diff --staged --color=always {1}' | xargs -r git restore --staged"
|
||||||
|
msg = log -1 --pretty=%B
|
||||||
|
d = diff
|
||||||
|
di = diff
|
||||||
|
ds = diff --staged
|
||||||
|
dno = diff --name-only
|
||||||
|
dw = diff --word-diff=color
|
||||||
|
dws = diff --word-diff=color --staged
|
||||||
|
sw = switch
|
||||||
|
swl = switch -
|
||||||
|
swb = switch -c
|
||||||
|
swc = switch -c
|
||||||
|
co = checkout
|
||||||
|
col = checkout @{-1}
|
||||||
|
cob = checkout -b
|
||||||
|
ci = commit
|
||||||
|
cia = commit --all
|
||||||
|
amend = commit --amend --no-edit
|
||||||
|
amenda = commit --all --amend --no-edit
|
||||||
|
fuck = commit --amend
|
||||||
|
uncommit = reset --soft HEAD~1
|
||||||
|
untrack = rm --cache --
|
||||||
|
cim = "!_m() { git commit -m \"$*\"; }; _m"
|
||||||
|
cima = "!_m() { git commit -am \"$*\"; }; _m"
|
||||||
|
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
pst = "!git push origin --tags"
|
||||||
|
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
pr = "pull --rebase"
|
||||||
|
s = status
|
||||||
|
st = status
|
||||||
|
br = branch
|
||||||
|
bm = branch --merged
|
||||||
|
bn = branch --no-merged
|
||||||
|
hist = log --pretty=format:'%Cgreen%h %Creset%cd %Cblue[%cn](%G?) %Creset%s%C(yellow)%d%C(reset)' --graph --date=relative --decorate --color=always
|
||||||
|
history = hist --all
|
||||||
|
hs = hist -n 10
|
||||||
|
hsa = hist -n 10 --all
|
||||||
|
last = log -1 HEAD
|
||||||
|
lastd = diff HEAD^ HEAD
|
||||||
|
today = hist --since=midnight
|
||||||
|
df = "!_m() { git log --pretty=format:'%h %cd [%cn] %s%d' --date=relative | fzf --bind \"enter:execute(git diff --color=always $@ {1}^ {1} | ${PAGER})\" --preview-window=65% --preview=\"git diff --color=always $@ {1}^ {1}\"; }; _m"
|
||||||
|
type = cat-file -t
|
||||||
|
dump = cat-file -p
|
||||||
|
unstage = "reset HEAD --"
|
||||||
|
count = "rev-list --count --all"
|
||||||
|
tags = "for-each-ref --sort=-creatordate --format '%(refname:strip=2)' refs/tags"
|
||||||
|
initci = "commit --allow-empty -m 'Initial commit'"
|
||||||
|
|
||||||
|
# edit conflicted file on merge
|
||||||
|
edit-unmerged = "!$EDITOR $(git ls-files --unmerged | cut -f2 | sort -u)"
|
||||||
|
|
||||||
|
# add conflicted file on merge
|
||||||
|
add-unmerged = "!git add $(git ls-files --unmerged | cut -f2 | sort -u)"
|
||||||
|
remove-remote-tag = "!f() { git tag -d $1 && git push origin :refs/tags/$1 }; f"
|
||||||
|
aliases = "!git config -l | grep '^alias\\.' | cut -d. -f2-"
|
||||||
|
|
||||||
|
# git clone git://localhost/
|
||||||
|
serve = daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/
|
||||||
62
home/user/.config/git/config
Normal file
62
home/user/.config/git/config
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
[core]
|
||||||
|
excludesfile = ~/.config/git/ignore
|
||||||
|
editor = "$EDITOR"
|
||||||
|
pager = "$PAGER -+C -F"
|
||||||
|
fileMode = true
|
||||||
|
whitespace = fix,trailing-space,cr-at-eol
|
||||||
|
autocrlf = input
|
||||||
|
quotepath = false
|
||||||
|
|
||||||
|
[i18n]
|
||||||
|
commitEncoding = utf-8
|
||||||
|
logOutputEncoding = utf-8
|
||||||
|
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
|
||||||
|
[push]
|
||||||
|
default = current
|
||||||
|
|
||||||
|
[pull]
|
||||||
|
rebase = false
|
||||||
|
ff = only
|
||||||
|
|
||||||
|
[color]
|
||||||
|
status = auto
|
||||||
|
diff = auto
|
||||||
|
branch = auto
|
||||||
|
interactive = auto
|
||||||
|
grep = auto
|
||||||
|
ui = auto
|
||||||
|
|
||||||
|
[advice]
|
||||||
|
addEmptyPathspec = false
|
||||||
|
|
||||||
|
[log]
|
||||||
|
abbrevCommit = true
|
||||||
|
|
||||||
|
[apply]
|
||||||
|
whitespace = fix
|
||||||
|
|
||||||
|
[rerere]
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
[diff]
|
||||||
|
mnemonicPrefix = true
|
||||||
|
suppressBlankEmpty = true
|
||||||
|
rename = copy
|
||||||
|
submodule = short
|
||||||
|
algorithm = histogram
|
||||||
|
colormoved = default
|
||||||
|
colormovedws = allow-indentation-change
|
||||||
|
|
||||||
|
[include]
|
||||||
|
path = ~/.config/git/url-aliases
|
||||||
|
path = ~/.config/git/aliases
|
||||||
|
path = ~/.config/git/local
|
||||||
|
|
||||||
|
[filter "lfs"]
|
||||||
|
clean = git-lfs clean -- %f
|
||||||
|
smudge = git-lfs smudge -- %f
|
||||||
|
process = git-lfs filter-process
|
||||||
|
required = true
|
||||||
56
home/user/.config/git/ignore
Normal file
56
home/user/.config/git/ignore
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
|
||||||
|
# Pycharm
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# vim
|
||||||
|
*.sw[op]
|
||||||
|
Session.vim
|
||||||
|
|
||||||
|
# python virtual env
|
||||||
|
venv
|
||||||
|
.venv
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
.env
|
||||||
|
*.env
|
||||||
|
*.log
|
||||||
|
*.bak
|
||||||
|
*~
|
||||||
|
|
||||||
|
# db
|
||||||
|
*.db
|
||||||
|
db.sqlite3
|
||||||
|
|
||||||
|
nohup.out
|
||||||
|
|
||||||
|
# cmake
|
||||||
|
cmake_install.cmake
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles
|
||||||
|
|
||||||
|
# build files
|
||||||
|
*.a
|
||||||
|
*.so
|
||||||
|
*.o
|
||||||
|
a.out
|
||||||
|
*.exe
|
||||||
|
*.ipk
|
||||||
|
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
.tns
|
||||||
|
|
||||||
|
.autoenv.zsh
|
||||||
|
.autoenv_leave.zsh
|
||||||
|
|
||||||
|
*.tar
|
||||||
|
*.gz
|
||||||
|
*.zip
|
||||||
|
|
||||||
|
|
||||||
|
.redo/
|
||||||
13
home/user/.config/git/local.example
Normal file
13
home/user/.config/git/local.example
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# vim: ft=gitconfig
|
||||||
|
|
||||||
|
[github]
|
||||||
|
user = "thek4n"
|
||||||
|
email = "thek4n@yandex.ru"
|
||||||
|
|
||||||
|
[user]
|
||||||
|
name = "thek4n"
|
||||||
|
email = "thek4n@yandex.ru"
|
||||||
|
signingkey = "thek4n"
|
||||||
|
|
||||||
|
[url "git@github.com:TheK4n/notes"]
|
||||||
|
insteadOf = "git@github.com:TheK4n/notes"
|
||||||
41
home/user/.config/git/url-aliases
Normal file
41
home/user/.config/git/url-aliases
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# vim: ft=gitconfig
|
||||||
|
|
||||||
|
# alias gh:=https://github.com/
|
||||||
|
[url "https://github.com/"]
|
||||||
|
insteadOf = "gh:"
|
||||||
|
|
||||||
|
# alias gist:=https://gist.github.com/
|
||||||
|
[url "https://gist.github.com/"]
|
||||||
|
insteadOf = "gist:"
|
||||||
|
|
||||||
|
# alias gl:=https://gitlab.com/
|
||||||
|
[url "https://gitlab.com/"]
|
||||||
|
insteadOf = "gl:"
|
||||||
|
|
||||||
|
# alias bb:=https://bitbucket.org/
|
||||||
|
[url "https://bitbucket.org/"]
|
||||||
|
insteadOf = "bb:"
|
||||||
|
|
||||||
|
|
||||||
|
[url "git@github.com:"]
|
||||||
|
pushInsteadOf = "https://github.com/"
|
||||||
|
pushInsteadOf = "http://github.com/"
|
||||||
|
pushInsteadOf = "git@github.com:"
|
||||||
|
pushInsteadOf = "gh:"
|
||||||
|
|
||||||
|
[url "git@gist.github.com:"]
|
||||||
|
pushInsteadOf = "https://gist.github.com/"
|
||||||
|
pushInsteadOf = "http://gist.github.com/"
|
||||||
|
pushInsteadOf = "gist:"
|
||||||
|
|
||||||
|
[url "git@gitlab.com:"]
|
||||||
|
pushInsteadOf = "https://gitlab.com/"
|
||||||
|
pushInsteadOf = "http://gitlab.com/"
|
||||||
|
pushInsteadOf = "git@gitlab.com:"
|
||||||
|
pushInsteadOf = "gl:"
|
||||||
|
|
||||||
|
; [url "https://github.com/"]
|
||||||
|
; insteadOf = "git@github.com:"
|
||||||
|
|
||||||
|
[url "https://gitlab.com/"]
|
||||||
|
insteadOf = "git@gitlab.com:"
|
||||||
64
home/user/.config/i3blocks/config
Normal file
64
home/user/.config/i3blocks/config
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
separator_block_width=15
|
||||||
|
markup=pango
|
||||||
|
|
||||||
|
color=#FFFFFF
|
||||||
|
|
||||||
|
interval=5
|
||||||
|
|
||||||
|
[wireless]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh wireless
|
||||||
|
interval=10
|
||||||
|
|
||||||
|
[ethernet]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh ethernet
|
||||||
|
interval=10
|
||||||
|
|
||||||
|
[diskroot]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh disk_root
|
||||||
|
interval=30
|
||||||
|
|
||||||
|
[diskhome]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh disk_home
|
||||||
|
interval=30
|
||||||
|
|
||||||
|
[memory]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh memory
|
||||||
|
interval=5
|
||||||
|
|
||||||
|
[cpu_usage]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh cpu_usage
|
||||||
|
interval=5
|
||||||
|
|
||||||
|
[cpu_temp]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh cpu_temp
|
||||||
|
interval=5
|
||||||
|
|
||||||
|
[bluetooth]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh bluetooth_battery
|
||||||
|
interval=5
|
||||||
|
|
||||||
|
[battery]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh battery
|
||||||
|
interval=30
|
||||||
|
|
||||||
|
[volume]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh volume
|
||||||
|
interval=1
|
||||||
|
signal=1
|
||||||
|
|
||||||
|
[pomodoro]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh pomodoro
|
||||||
|
interval=1
|
||||||
|
signal=2
|
||||||
|
|
||||||
|
[language]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh language
|
||||||
|
signal=1
|
||||||
|
|
||||||
|
[userhost]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh userhost
|
||||||
|
signal=1
|
||||||
|
|
||||||
|
[time]
|
||||||
|
command=~/.config/i3blocks/scripts/builder.sh time
|
||||||
|
interval=30
|
||||||
125
home/user/.config/i3blocks/scripts/builder.sh
Executable file
125
home/user/.config/i3blocks/scripts/builder.sh
Executable file
@ -0,0 +1,125 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -ue
|
||||||
|
|
||||||
|
|
||||||
|
readonly EXIT_SUCCESS=0
|
||||||
|
readonly EXIT_FAILURE=1
|
||||||
|
|
||||||
|
|
||||||
|
cmd_wireless() {
|
||||||
|
wifiname="$(LANG=C nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d: -f2)"
|
||||||
|
wifi_ip=$(ip -o -4 addr show | grep wlp | awk '{print $4}' | cut -d/ -f1 | head -1)
|
||||||
|
|
||||||
|
if [ -z "${wifiname}" ] || [ -z "${wifi_ip}" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf ' %s %s\n' "${wifiname}" "${wifi_ip}"
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_battery() {
|
||||||
|
charging_status="$(cat /sys/class/power_supply/BAT0/status)"
|
||||||
|
percent="$(cat /sys/class/power_supply/BAT0/capacity)"
|
||||||
|
|
||||||
|
if [ "${percent}" -lt 35 ]; then
|
||||||
|
emoji_status="🪫"
|
||||||
|
else
|
||||||
|
emoji_status="🔋"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${charging_status}" = "Charging" ]; then
|
||||||
|
emoji_status="🔌"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "%s %s%%\n" "${emoji_status}" "${percent}"
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_disk_root() {
|
||||||
|
df -h / | awk '/\// {print "/ "$3"/"$2}'
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_disk_home() {
|
||||||
|
res="$(df -h /home)"
|
||||||
|
if [ "$(echo "${res}" | awk '/\// {print $6}')" = "/" ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
df -h /home | awk '/\// {print " "$3"/"$2}'
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_memory() {
|
||||||
|
free -h | awk '/^Mem/ {print "🎟 "$3"/"$2}' | sed 's/i//g'
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_cpu_usage() {
|
||||||
|
top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print " "100 - $1"%"}'
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_cpu_temp() {
|
||||||
|
temp_mC="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
||||||
|
temp_C="$((temp_mC / 1000))"
|
||||||
|
|
||||||
|
if [ "${temp_C}" -gt 80 ]; then
|
||||||
|
printf '<span foreground="red"> %s°C</span>\n' "${temp_C}"
|
||||||
|
else
|
||||||
|
printf ' %s°C\n' "${temp_C}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_time() {
|
||||||
|
LC_ALL=C date '+ %d.%m.%y %a %H:%M'
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_volume() {
|
||||||
|
value="$(pactl --format=json get-sink-volume @DEFAULT_SINK@ | jq --raw-output '.volume."front-left".value_percent')"
|
||||||
|
printf ' %s\n' "${value}"
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_pomodoro() {
|
||||||
|
pomodoro get
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_bluetooth_battery() {
|
||||||
|
device="$(upower -e | grep headset | head -1)"
|
||||||
|
upower -i "${device}" | grep percentage | awk '{ print "🎧🔋"$2"" }'
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_language() {
|
||||||
|
layout="$(swaymsg -t get_inputs | jq -r '.[] | select(.type == "keyboard") | .xkb_active_layout_name' | head -1)"
|
||||||
|
|
||||||
|
case "${layout}" in
|
||||||
|
"English (US)")
|
||||||
|
printf '🇬🇧 En\n'
|
||||||
|
;;
|
||||||
|
Russian)
|
||||||
|
printf '🇷🇺 Ru\n'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf '🌐 %s\n' "${layout}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_userhost() {
|
||||||
|
printf "%s@%s\n" "${USER}" "${HOST:-${HOSTNAME:-}}"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "${1}" in
|
||||||
|
wireless) shift; cmd_wireless "$@" ;;
|
||||||
|
ethernet) shift; cmd_ethernet "$@" ;;
|
||||||
|
battery) shift; cmd_battery "$@" ;;
|
||||||
|
disk_root) shift; cmd_disk_root "$@" ;;
|
||||||
|
disk_home) shift; cmd_disk_home "$@" ;;
|
||||||
|
memory) shift; cmd_memory "$@" ;;
|
||||||
|
cpu_usage) shift; cmd_cpu_usage "$@" ;;
|
||||||
|
cpu_temp) shift; cmd_cpu_temp "$@" ;;
|
||||||
|
time) shift; cmd_time "$@" ;;
|
||||||
|
volume) shift; cmd_volume "$@" ;;
|
||||||
|
pomodoro) shift; cmd_pomodoro "$@" ;;
|
||||||
|
bluetooth_battery) shift; cmd_bluetooth_battery "$@" ;;
|
||||||
|
language) shift; cmd_language "$@" ;;
|
||||||
|
userhost) shift; cmd_userhost "$@" ;;
|
||||||
|
|
||||||
|
*) exit "${EXIT_FAILURE}" ;;
|
||||||
|
esac
|
||||||
|
exit "${EXIT_SUCCESS}"
|
||||||
8
home/user/.config/i3blocks/scripts/layout_change_handler.sh
Executable file
8
home/user/.config/i3blocks/scripts/layout_change_handler.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
swaymsg -m -t SUBSCRIBE "['input']" | \
|
||||||
|
jq --unbuffered -r '.change' | while read -r line; do
|
||||||
|
if echo "${line}" | grep -q "xkb_layout"; then
|
||||||
|
pkill -RTMIN+1 i3blocks
|
||||||
|
fi
|
||||||
|
done
|
||||||
1
home/user/.config/mako/config
Normal file
1
home/user/.config/mako/config
Normal file
@ -0,0 +1 @@
|
|||||||
|
output=DP-1
|
||||||
11
home/user/.config/mimeapps.list
Normal file
11
home/user/.config/mimeapps.list
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Default Applications]
|
||||||
|
application/pdf=firefox.desktop;
|
||||||
|
text/html=firefox.desktop
|
||||||
|
x-scheme-handler/about=firefox.desktop
|
||||||
|
x-scheme-handler/http=firefox.desktop
|
||||||
|
x-scheme-handler/https=firefox.desktop
|
||||||
|
x-scheme-handler/about=firefox.desktop
|
||||||
|
x-scheme-handler/unknown=firefox.desktop
|
||||||
|
x-scheme-handler/tonsite=org.telegram.desktop.desktop
|
||||||
|
x-scheme-handler/tg=org.telegram.desktop.desktop
|
||||||
|
x-scheme-handler/postman=Postman.desktop
|
||||||
3
home/user/.config/nvim/after/ftplugin/cpp.lua
Normal file
3
home/user/.config/nvim/after/ftplugin/cpp.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
local opt = vim.opt_local
|
||||||
|
|
||||||
|
opt.foldmethod = "indent"
|
||||||
2
home/user/.config/nvim/after/ftplugin/gitcommit.lua
Normal file
2
home/user/.config/nvim/after/ftplugin/gitcommit.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vim.bo.textwidth = 72
|
||||||
|
vim.wo.colorcolumn = '+0'
|
||||||
5
home/user/.config/nvim/after/ftplugin/go.lua
Normal file
5
home/user/.config/nvim/after/ftplugin/go.lua
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
local opt = vim.opt_local
|
||||||
|
|
||||||
|
opt.expandtab = false
|
||||||
|
opt.tabstop = 4
|
||||||
|
opt.shiftwidth = 4
|
||||||
6
home/user/.config/nvim/after/ftplugin/netrw.lua
Normal file
6
home/user/.config/nvim/after/ftplugin/netrw.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
local map = vim.api.nvim_buf_set_keymap
|
||||||
|
|
||||||
|
map(0, 'n', "H", "u", {noremap=false})
|
||||||
|
map(0, 'n', "h", "-^", {noremap=false})
|
||||||
|
map(0, 'n', "l", "<CR>", {noremap=false})
|
||||||
|
map(0, 'n', ".", "gh", {noremap=false})
|
||||||
7
home/user/.config/nvim/after/ftplugin/python.lua
Normal file
7
home/user/.config/nvim/after/ftplugin/python.lua
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
vim.g.python_indent = {
|
||||||
|
open_paren = 'shiftwidth()',
|
||||||
|
nested_paren = 'shiftwidth()',
|
||||||
|
continue = 'shiftwidth()',
|
||||||
|
closed_paren_align_last_line = false,
|
||||||
|
searchpair_timeout = 150,
|
||||||
|
}
|
||||||
1
home/user/.config/nvim/init.lua
Normal file
1
home/user/.config/nvim/init.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
require("core")
|
||||||
11
home/user/.config/nvim/lua/core/init.lua
Normal file
11
home/user/.config/nvim/lua/core/init.lua
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
for _, source in ipairs({
|
||||||
|
"core.options",
|
||||||
|
"core.mappings",
|
||||||
|
"core.lazy",
|
||||||
|
})
|
||||||
|
do
|
||||||
|
local status_ok, fault = pcall(require, source)
|
||||||
|
if not status_ok then
|
||||||
|
vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault)
|
||||||
|
end
|
||||||
|
end
|
||||||
31
home/user/.config/nvim/lua/core/lazy.lua
Normal file
31
home/user/.config/nvim/lua/core/lazy.lua
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
local function install_lazy_if_not_installed(lazypath)
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git", "clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable",
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
install_lazy_if_not_installed(lazypath)
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
|
||||||
|
require("lazy").setup(
|
||||||
|
"plugins",
|
||||||
|
{
|
||||||
|
change_detection = { enabled = false },
|
||||||
|
lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json",
|
||||||
|
ui = { border = "rounded" },
|
||||||
|
performance = {
|
||||||
|
cache = {
|
||||||
|
enabled = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
2
home/user/.config/nvim/lua/core/mappings/init.lua
Normal file
2
home/user/.config/nvim/lua/core/mappings/init.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
require("core.mappings.mappings")
|
||||||
|
require("core.mappings.run-scripts")
|
||||||
190
home/user/.config/nvim/lua/core/mappings/mappings.lua
Normal file
190
home/user/.config/nvim/lua/core/mappings/mappings.lua
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
|
||||||
|
vim.g.mapleader = ','
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Sections
|
||||||
|
map('n', '<Leader>h', '', {desc = "UI"})
|
||||||
|
map('n', '<Leader>c', '', {desc = "Colorschemes"})
|
||||||
|
map('n', '<Leader>f', '', {desc = "Telescope"})
|
||||||
|
map('n', '<Leader>p', '', {desc = "Config manage"})
|
||||||
|
map('n', '<Leader>q', '', {desc = "Exits"})
|
||||||
|
map('n', '<Leader>r', '', {desc = "Run file"})
|
||||||
|
|
||||||
|
|
||||||
|
local function create_function_tabdo(command)
|
||||||
|
return function()
|
||||||
|
local curr_tab = vim.fn.tabpagenr()
|
||||||
|
vim.cmd.tabdo(command)
|
||||||
|
vim.cmd.tabn(curr_tab)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
map('n', '<Leader>hc', create_function_tabdo('set cursorline!'),
|
||||||
|
{desc = "Toggle line highlighting"})
|
||||||
|
|
||||||
|
map('n', '<Leader>cs',
|
||||||
|
function() vim.fn.setreg('/', '\\%x') end,
|
||||||
|
{desc = "Clear search"})
|
||||||
|
|
||||||
|
map('n', '<Leader>h/', function() vim.o.hlsearch = not vim.o.hlsearch end, {desc = "Clear search"})
|
||||||
|
|
||||||
|
|
||||||
|
-- enable search highlight in search mode
|
||||||
|
map('n', '/', ':set hlsearch<CR>/', {silent = true})
|
||||||
|
|
||||||
|
-- copy selection to search line
|
||||||
|
map('v', '<C-f>', '"fy:set hlsearch<CR>/\\V<C-r>f\\C<CR>')
|
||||||
|
|
||||||
|
-- copy word under cursor to search line
|
||||||
|
map('n', '<C-f>', ':set hlsearch<CR>/\\V<C-r><C-w>\\C<CR>')
|
||||||
|
|
||||||
|
map('n', '<Leader>hl', create_function_tabdo('lua toggle_number_style()'),
|
||||||
|
{desc = "Toggle line number style"})
|
||||||
|
|
||||||
|
|
||||||
|
map('n', '~', 'vg~', {desc = "Toggle character case"})
|
||||||
|
map('n', 'Ё', 'vg~', {desc = "Toggle character case"})
|
||||||
|
|
||||||
|
map('v', 'Ё', '~', {desc = "Toggle character case"})
|
||||||
|
|
||||||
|
|
||||||
|
map('n',
|
||||||
|
'.',
|
||||||
|
function()
|
||||||
|
local current_position = vim.api.nvim_win_get_cursor(0)
|
||||||
|
vim.cmd('norm! .')
|
||||||
|
vim.api.nvim_win_set_cursor(0, current_position)
|
||||||
|
end,
|
||||||
|
{remap = false, silent = true}
|
||||||
|
)
|
||||||
|
|
||||||
|
map('n', 'q:', ':')
|
||||||
|
map('n', 'Ж', ':')
|
||||||
|
|
||||||
|
map('n', '<Enter>', 'o<ESC>')
|
||||||
|
|
||||||
|
|
||||||
|
-- x to blackhole
|
||||||
|
map({'n', 'v'}, 'x', '"_x')
|
||||||
|
|
||||||
|
|
||||||
|
-- Put without overwrite yanked text
|
||||||
|
map('v', 'p', 'P')
|
||||||
|
|
||||||
|
-- map \ to prev finding
|
||||||
|
map({"n", "v"}, [[\]], ',')
|
||||||
|
|
||||||
|
-- Select all
|
||||||
|
map('n', '<C-a>', 'mvggVG')
|
||||||
|
map('v', '<C-a>', '<Esc>`v:delmarks v<CR>', {silent = true})
|
||||||
|
|
||||||
|
|
||||||
|
map("n", '<Leader>qq', '<cmd>bd!<CR>',
|
||||||
|
{desc = "Kill current buffer"})
|
||||||
|
|
||||||
|
map("n", '<Leader>qa', '<cmd>qa!<CR>',
|
||||||
|
{desc = "Exit without saving"})
|
||||||
|
|
||||||
|
|
||||||
|
map("n", '<Leader>he', '<cmd>set list!<CR>',
|
||||||
|
{desc = "Show hidden symbols"})
|
||||||
|
vim.opt.listchars=[[tab:→\ ,eol:↵,trail:·,extends:↷,precedes:↶]]
|
||||||
|
|
||||||
|
|
||||||
|
map("n", "<Leader>pl", "<cmd>Lazy<CR>",
|
||||||
|
{desc = "Package manager"})
|
||||||
|
|
||||||
|
map("n", "<Leader>pm", "<cmd>Mason<CR>",
|
||||||
|
{desc = "LSP Manager"})
|
||||||
|
|
||||||
|
|
||||||
|
-- Tab to go prev buffer
|
||||||
|
map("n", "<TAB>", ":b#<CR>", {silent = true})
|
||||||
|
|
||||||
|
|
||||||
|
-- Expand %% to dirname of current file in command line
|
||||||
|
map("c", '%%', [[getcmdtype() == ':' ? expand('%:h').'/' : '%%']], {expr = true})
|
||||||
|
|
||||||
|
|
||||||
|
-- Save from root
|
||||||
|
vim.api.nvim_create_user_command('W', [[execute 'silent! write !SUDO_ASKPASS=vim_askpass_helper sudo -A tee % >/dev/null' <bar> edit!]], {})
|
||||||
|
vim.api.nvim_create_user_command('X', [[execute 'silent! write !SUDO_ASKPASS=vim_askpass_helper sudo -A tee % >/dev/null' <bar> edit! | q]], {})
|
||||||
|
vim.cmd([[autocmd FileChangedRO * set readonly!]])
|
||||||
|
|
||||||
|
|
||||||
|
-- Toggle line number style
|
||||||
|
function toggle_number_style()
|
||||||
|
local opt = vim.opt
|
||||||
|
local number = opt.number["_value"]
|
||||||
|
local relativenumber = opt.relativenumber["_value"]
|
||||||
|
|
||||||
|
if (not number) and (not relativenumber) then
|
||||||
|
opt.number = true
|
||||||
|
opt.relativenumber = false
|
||||||
|
elseif (number) and (not relativenumber) then
|
||||||
|
opt.number = false
|
||||||
|
opt.relativenumber = true
|
||||||
|
elseif (not number) and (relativenumber) then
|
||||||
|
opt.number = true
|
||||||
|
opt.relativenumber = true
|
||||||
|
elseif (number) and (relativenumber) then
|
||||||
|
opt.number = false
|
||||||
|
opt.relativenumber = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function reload_config()
|
||||||
|
vim.cmd.source(vim.env.MYVIMRC)
|
||||||
|
vim.notify('Config reloaded...', vim.log.levels.INFO)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function fetch_config()
|
||||||
|
vim.fn.system('git -C ~/dotfiles pull')
|
||||||
|
end
|
||||||
|
|
||||||
|
local function update_plugins()
|
||||||
|
vim.cmd("Lazy sync")
|
||||||
|
end
|
||||||
|
|
||||||
|
local function fetch_and_reload_config_and_update_plugins()
|
||||||
|
fetch_config()
|
||||||
|
reload_config()
|
||||||
|
update_plugins()
|
||||||
|
end
|
||||||
|
|
||||||
|
map("n", "<Leader>pr", reload_config,
|
||||||
|
{desc = "Reload config"})
|
||||||
|
|
||||||
|
map("n", "<Leader>pR", fetch_and_reload_config_and_update_plugins,
|
||||||
|
{desc = "Fetch and reload config and update plugins"})
|
||||||
|
|
||||||
|
|
||||||
|
vim.cmd([[
|
||||||
|
menu Encoding.utf-8 :e ++enc=utf8<CR>
|
||||||
|
menu Encoding.windows-1251 :e ++enc=cp1251 ++ff=dos<CR>
|
||||||
|
menu Encoding.koi8-r :e ++enc=koi8-r ++ff=unix<CR>
|
||||||
|
menu Encoding.cp866 :e ++enc=cp866 ++ff=dos<CR>
|
||||||
|
menu Encoding.koi8-u :e ++enc=koi8-u ++ff=unix<CR>
|
||||||
|
|
||||||
|
map <F8> :emenu Encoding.
|
||||||
|
]])
|
||||||
|
|
||||||
|
|
||||||
|
vim.cmd([[
|
||||||
|
menu Indent.tabs :set noexpandtab tabstop=4 shiftwidth=4<CR>
|
||||||
|
menu Indent.spaces :set expandtab tabstop=4 shiftwidth=4<CR>
|
||||||
|
|
||||||
|
map <F7> :emenu Indent.
|
||||||
|
]])
|
||||||
|
|
||||||
|
|
||||||
|
map("n", "<Leader>cd", "<cmd>colorscheme default<CR>")
|
||||||
|
map("n", "<Leader>cn", "<cmd>colorscheme nightfox<CR>")
|
||||||
|
|
||||||
|
map("n", "<Leader>ct", "<cmd>colorscheme elflord<CR>",
|
||||||
|
{desc = "TTY colorscheme"}
|
||||||
|
)
|
||||||
35
home/user/.config/nvim/lua/core/mappings/run-scripts.lua
Normal file
35
home/user/.config/nvim/lua/core/mappings/run-scripts.lua
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
|
||||||
|
local function map_filetype(filetype, key, cmd)
|
||||||
|
local function format_string()
|
||||||
|
local run_script_string = [[:terminal %s <CR> :set nocursorline number norelativenumber <CR> G]]
|
||||||
|
local cmd_string = string.format(run_script_string, cmd)
|
||||||
|
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
vim.keymap.set('n', key, cmd_string, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType",
|
||||||
|
{ pattern = filetype, callback = format_string}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
map_filetype('*', '<Leader>rs', '$(head -1 % | cut -c 3-) %')
|
||||||
|
|
||||||
|
map_filetype('nroff', '<Leader>rr', 'man -P cat -l %')
|
||||||
|
map_filetype('markdown', '<Leader>rr', 'pandoc -t plain %')
|
||||||
|
|
||||||
|
map_filetype('python', '<Leader>rr', 'python3 %')
|
||||||
|
map_filetype('python', '<Leader>rt', 'pytest %')
|
||||||
|
|
||||||
|
map_filetype('go', '<Leader>rr', 'go run %')
|
||||||
|
|
||||||
|
map_filetype('rust', '<Leader>rr', 'cargo run')
|
||||||
|
|
||||||
|
map_filetype('c', '<Leader>rr', 'gcc -o "${TMPDIR}/a.out" % && "${TMPDIR}/a.out"')
|
||||||
|
map_filetype('cpp', '<Leader>rr', 'g++ -o "${TMPDIR}/a.out" % && "${TMPDIR}/a.out"')
|
||||||
|
|
||||||
|
map_filetype('asm', '<Leader>rr', 'as -o "${TMPDIR}/out.o" % && ld -o "${TMPDIR}/a.out" "${TMPDIR}/out.o" && "${TMPDIR}/a.out"')
|
||||||
|
|
||||||
|
map_filetype('make', '<Leader>rr', 'make -C "$(dirname "%")"')
|
||||||
172
home/user/.config/nvim/lua/core/options.lua
Normal file
172
home/user/.config/nvim/lua/core/options.lua
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
local opt = vim.opt
|
||||||
|
|
||||||
|
|
||||||
|
opt.ruler = true
|
||||||
|
opt.encoding = 'utf-8'
|
||||||
|
opt.fileencoding = 'utf-8'
|
||||||
|
|
||||||
|
opt.number = true
|
||||||
|
opt.relativenumber = true
|
||||||
|
|
||||||
|
|
||||||
|
opt.clipboard:append { 'unnamed' }
|
||||||
|
opt.clipboard:append { 'unnamedplus' }
|
||||||
|
|
||||||
|
opt.shortmess:append{a = true, s = true, I = true, c = true, S = true}
|
||||||
|
|
||||||
|
opt.cmdheight = 0
|
||||||
|
vim.wo.signcolumn = "yes:1"
|
||||||
|
|
||||||
|
opt.shell = vim.env.SHELL
|
||||||
|
|
||||||
|
opt.ttimeoutlen = 50
|
||||||
|
opt.timeoutlen = 500
|
||||||
|
|
||||||
|
opt.pumheight = 15
|
||||||
|
|
||||||
|
opt.compatible = false
|
||||||
|
|
||||||
|
opt.hidden = true
|
||||||
|
|
||||||
|
-- indent
|
||||||
|
opt.expandtab = true -- spaces instead of tab
|
||||||
|
opt.smarttab = true
|
||||||
|
opt.tabstop = 4 -- 1 tab appears number spaces
|
||||||
|
opt.softtabstop = 4
|
||||||
|
opt.shiftwidth = vim.bo.tabstop -- insert tab or shift inserting .shiftwidth*.tabstop spaces or .shiftwidth/.tabstop tabs
|
||||||
|
opt.autoindent = true
|
||||||
|
opt.smartindent = true
|
||||||
|
|
||||||
|
-- tabline
|
||||||
|
opt.showtabline = 0
|
||||||
|
|
||||||
|
opt.cursorline = true
|
||||||
|
opt.wrap = false
|
||||||
|
|
||||||
|
opt.ttyfast = true
|
||||||
|
opt.autoread = true
|
||||||
|
|
||||||
|
opt.errorbells = false
|
||||||
|
opt.visualbell = false
|
||||||
|
opt.showcmd = true
|
||||||
|
|
||||||
|
opt.ignorecase = true
|
||||||
|
opt.smartcase = true -- if search line hasn`t Upper case chars - ignore case search, else case-sensivity search
|
||||||
|
opt.incsearch = true
|
||||||
|
|
||||||
|
opt.mousehide = true
|
||||||
|
opt.mouse = 'a'
|
||||||
|
|
||||||
|
opt.scrolloff = 999
|
||||||
|
|
||||||
|
|
||||||
|
COLUMN_NUMBER_BEFORE_INSERT=1
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||||
|
callback = function()
|
||||||
|
_, COLUMN_NUMBER_BEFORE_INSERT = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- disable paste comment on new line
|
||||||
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
|
pattern = {"*"},
|
||||||
|
callback = function()
|
||||||
|
opt.formatoptions:remove("c")
|
||||||
|
opt.formatoptions:remove("r")
|
||||||
|
opt.formatoptions:remove("o")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
opt.termguicolors = true
|
||||||
|
|
||||||
|
opt.background = 'dark'
|
||||||
|
|
||||||
|
opt.backup = true
|
||||||
|
opt.swapfile = false
|
||||||
|
opt.undofile = true
|
||||||
|
opt.history = 1000
|
||||||
|
opt.undoreload = 1000
|
||||||
|
|
||||||
|
local prefix = vim.fn.expand("~/.local/state/nvim")
|
||||||
|
|
||||||
|
opt.undodir = { prefix .. "/undo//" }
|
||||||
|
opt.backupdir = { prefix .. "/backup//" }
|
||||||
|
opt.directory = { prefix .. "/swap//" }
|
||||||
|
|
||||||
|
|
||||||
|
local function makeDirIfNoExists(path)
|
||||||
|
path = path["_value"]
|
||||||
|
if (vim.fn.isdirectory(path) == 0) then
|
||||||
|
vim.fn.mkdir(path, "p")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- make this dirs if no exists previously
|
||||||
|
makeDirIfNoExists(opt.undodir)
|
||||||
|
makeDirIfNoExists(opt.backupdir)
|
||||||
|
makeDirIfNoExists(opt.directory)
|
||||||
|
|
||||||
|
opt.ffs = 'unix,mac'
|
||||||
|
|
||||||
|
opt.path:append { '**' } -- Finding files - Search down into subfolders
|
||||||
|
|
||||||
|
|
||||||
|
vim.g.t_SI = [[\e[5 q]]
|
||||||
|
vim.g.t_SR = [[\e[3 q]]
|
||||||
|
vim.g.t_EI = [[\e[1 q]]
|
||||||
|
|
||||||
|
-- SI - режим вставки
|
||||||
|
-- SR - режим замены
|
||||||
|
-- EI - нормальный режим
|
||||||
|
|
||||||
|
|
||||||
|
vim.g.netrw_banner = 0 -- hide banner
|
||||||
|
vim.g.highlighturl_enabled = true -- highlight URLs by default
|
||||||
|
|
||||||
|
|
||||||
|
-- Highlight yanked text for a while
|
||||||
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
|
pattern = "*",
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd.highlight({ "DiagnosticError", "guifg=Grey" })
|
||||||
|
vim.cmd.highlight({ "DiagnosticWarn", "guifg=Grey" })
|
||||||
|
vim.cmd.highlight({ "DiagnosticInfo", "guifg=Grey" })
|
||||||
|
vim.cmd.highlight({ "DiagnosticHint", "guifg=Grey" })
|
||||||
|
|
||||||
|
-- Russian commands
|
||||||
|
opt.langmap = 'ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz'
|
||||||
|
|
||||||
|
|
||||||
|
vim.o.viewdir = vim.fn.stdpath('cache')..'/view'
|
||||||
|
vim.fn.mkdir(vim.o.viewdir, 'p')
|
||||||
|
opt.viewoptions = "folds,cursor"
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWinLeave", {
|
||||||
|
pattern = {"?*"},
|
||||||
|
callback = function(args)
|
||||||
|
local bufname = vim.api.nvim_buf_get_name(args.buf)
|
||||||
|
if not bufname:match("^term://") then
|
||||||
|
vim.cmd.mkview(1)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWinEnter", {
|
||||||
|
pattern = {"?*"},
|
||||||
|
callback = function(args)
|
||||||
|
local bufname = vim.api.nvim_buf_get_name(args.buf)
|
||||||
|
if not bufname:match("^term://") then
|
||||||
|
vim.cmd([[silent! loadview 1]])
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.opt.foldcolumn = "1"
|
||||||
137
home/user/.config/nvim/lua/plugins/autocomplete.lua
Normal file
137
home/user/.config/nvim/lua/plugins/autocomplete.lua
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
local border_opts = {
|
||||||
|
border = "rounded",
|
||||||
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None",
|
||||||
|
max_width = 50,
|
||||||
|
min_width = 50,
|
||||||
|
max_height = math.floor(vim.o.lines * 0.4),
|
||||||
|
min_height = 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
local function has_words_before()
|
||||||
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local function setup_cmp()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
preselect = cmp.PreselectMode.None,
|
||||||
|
completion = {
|
||||||
|
completeopt = 'menu,menuone,noinsert,noselect',
|
||||||
|
},
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
vim.snippet.expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
['<Tab>'] = cmp.mapping(
|
||||||
|
function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.confirm({
|
||||||
|
behavior = cmp.ConfirmBehavior.Select,
|
||||||
|
select = true,
|
||||||
|
})
|
||||||
|
elseif has_words_before() then
|
||||||
|
cmp.complete()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{ "i", "s" }
|
||||||
|
),
|
||||||
|
['<C-k>'] = cmp.mapping.select_prev_item({ behaviour = cmp.SelectBehavior.Select }),
|
||||||
|
['<C-j>'] = cmp.mapping.select_next_item({ behaviour = cmp.SelectBehavior.Select }),
|
||||||
|
['<C-p>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
['<C-n>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-e>'] = cmp.mapping.abort(),
|
||||||
|
}),
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered(border_opts),
|
||||||
|
documentation = cmp.config.window.bordered(border_opts),
|
||||||
|
},
|
||||||
|
sorting = {
|
||||||
|
priority_weight = 1.0,
|
||||||
|
comparators = {
|
||||||
|
cmp.config.compare.score,
|
||||||
|
cmp.config.compare.locality,
|
||||||
|
cmp.config.compare.recently_used,
|
||||||
|
cmp.config.compare.offset,
|
||||||
|
require("cmp-under-comparator").under,
|
||||||
|
cmp.config.compare.order,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'nvim_lsp', priority = 1500 },
|
||||||
|
{ name = 'luasnip', priority = 1250 },
|
||||||
|
{ name = 'buffer', priority = 1000 },
|
||||||
|
{ name = 'tmux', priority = 750 },
|
||||||
|
{ name = "dotenv", priority = 500 },
|
||||||
|
{ name = 'path', priority = 250 },
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
event = "InsertEnter",
|
||||||
|
build = "make install_jsregexp",
|
||||||
|
dependencies = {
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
'honza/vim-snippets',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local ls = require("luasnip")
|
||||||
|
|
||||||
|
vim.g.snips_author = 'thek4n'
|
||||||
|
vim.g.snips_email = 'thek4n@yandex.com'
|
||||||
|
vim.g.snips_github = 'https://github.com/thek4n'
|
||||||
|
|
||||||
|
local function jump(val)
|
||||||
|
return function()
|
||||||
|
ls.jump(val)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local map = vim.keymap.set
|
||||||
|
map({'i', 's'}, '<C-n>', jump(1), {silent = true})
|
||||||
|
map({'i', 's'}, '<C-p>', jump(-1), {silent = true})
|
||||||
|
map({'i', 's'}, '<C-k>', ls.expand, {silent = true})
|
||||||
|
map({"i", "s"}, "<C-e>",
|
||||||
|
function()
|
||||||
|
if ls.choice_active() then
|
||||||
|
ls.change_choice(1)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{silent = true}
|
||||||
|
)
|
||||||
|
|
||||||
|
local luasnip_loaders = require("luasnip.loaders.from_snipmate")
|
||||||
|
|
||||||
|
luasnip_loaders.lazy_load()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
event = "InsertEnter",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'lukas-reineke/cmp-under-comparator',
|
||||||
|
'SergioRibera/cmp-dotenv',
|
||||||
|
'andersevenrud/cmp-tmux',
|
||||||
|
},
|
||||||
|
config = setup_cmp,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function()
|
||||||
|
vim.diagnostic.config({ virtual_text = true })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
189
home/user/.config/nvim/lua/plugins/coding.lua
Normal file
189
home/user/.config/nvim/lua/plugins/coding.lua
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"ellisonleao/dotenv.nvim",
|
||||||
|
config = function()
|
||||||
|
require('dotenv').setup({
|
||||||
|
enable_on_load = true, -- will load your .env file upon loading a buffer
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
|
pattern = "*", callback = require('dotenv').autocmd
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ThePrimeagen/refactoring.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("telescope").load_extension("refactoring")
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ "<space>r", "", desc = "Refactoring", mode = {"n", "v"} },
|
||||||
|
{
|
||||||
|
"<space>rr",
|
||||||
|
":lua require('refactoring').select_refactor()<CR>",
|
||||||
|
desc = "Select refactoring",
|
||||||
|
mode = {"n", "x"},
|
||||||
|
},
|
||||||
|
-- Refactoring operations
|
||||||
|
{
|
||||||
|
"<space>re",
|
||||||
|
"<Esc><Cmd>lua require('refactoring').refactor('Extract Function')<CR>",
|
||||||
|
desc = "Extract Function",
|
||||||
|
mode = "x",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<space>rf",
|
||||||
|
"<Esc><Cmd>lua require('refactoring').refactor('Extract Function To File')<CR>",
|
||||||
|
desc = "Extract Function To File",
|
||||||
|
mode = "x",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<space>rv",
|
||||||
|
"<Esc><Cmd>lua require('refactoring').refactor('Extract Variable')<CR>",
|
||||||
|
desc = "Extract Variable",
|
||||||
|
mode = "x",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<space>rI",
|
||||||
|
"<Esc><Cmd>lua require('refactoring').refactor('Inline Function')<CR>",
|
||||||
|
desc = "Inline Function",
|
||||||
|
mode = "n",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<space>ri",
|
||||||
|
"<Esc><Cmd>lua require('refactoring').refactor('Inline Variable')<CR>",
|
||||||
|
desc = "Inline Variable",
|
||||||
|
mode = {"n", "x"},
|
||||||
|
},
|
||||||
|
-- Extract block
|
||||||
|
{
|
||||||
|
"<space>rb",
|
||||||
|
"<Cmd>lua require('refactoring').refactor('Extract Block')<CR>",
|
||||||
|
desc = "Extract Block",
|
||||||
|
mode = "n",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<space>rbf",
|
||||||
|
"<Cmd>lua require('refactoring').refactor('Extract Block To File')<CR>",
|
||||||
|
desc = "Extract Block To File",
|
||||||
|
mode = "n",
|
||||||
|
},
|
||||||
|
-- Telescope
|
||||||
|
{
|
||||||
|
"<leader>fr",
|
||||||
|
"<Cmd>lua require('telescope').extensions.refactoring.refactors()<CR>",
|
||||||
|
desc = "Telescope refactorings",
|
||||||
|
mode = "n",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'folke/neodev.nvim',
|
||||||
|
ft = {'lua'},
|
||||||
|
dependencies = {
|
||||||
|
'neovim/nvim-lspconfig'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('neodev').setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'folke/trouble.nvim',
|
||||||
|
dependencies = { 'kyazdani42/nvim-web-devicons' },
|
||||||
|
config = function()
|
||||||
|
require("trouble").setup()
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<space>x", "", {desc = "Diagnostics"})
|
||||||
|
local function set_trouble_keymap(key, cmd, opts)
|
||||||
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
string.format("<space>x%s", key),
|
||||||
|
string.format("<cmd>Trouble %s<CR>", cmd),
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
set_trouble_keymap("x", "diagnostics toggle", {desc = "Workspace diagnostics window"})
|
||||||
|
set_trouble_keymap("X", "diagnostics toggle filter.buf=0", {desc = "Buffer diagnostics window"})
|
||||||
|
set_trouble_keymap("Q", "qflist toggle", {desc = "Qflist"})
|
||||||
|
set_trouble_keymap("l", "lsp toggle focus=false win.position=right", {desc = "Toggle LSP diagnostics"})
|
||||||
|
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
event = "BufReadPost",
|
||||||
|
enabled = vim.fn.executable "git" == 1,
|
||||||
|
config = function()
|
||||||
|
require("gitsigns").setup({
|
||||||
|
signs = {
|
||||||
|
add = { text = "+" },
|
||||||
|
change = { text = "|" },
|
||||||
|
delete = { text = "-" },
|
||||||
|
topdelete = { text = "^" },
|
||||||
|
changedelete = { text = "~" },
|
||||||
|
untracked = { text = "0" },
|
||||||
|
},
|
||||||
|
signs_staged = {
|
||||||
|
add = { text = '+' },
|
||||||
|
change = { text = '|' },
|
||||||
|
delete = { text = '-' },
|
||||||
|
topdelete = { text = "^" },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
untracked = { text = '0' },
|
||||||
|
},
|
||||||
|
signs_staged_enable = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<space>g", "", {desc = "Git actions"})
|
||||||
|
local function set_gitsigns_keymap(key, cmd, opts)
|
||||||
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
string.format("<space>g%s", key),
|
||||||
|
string.format("<cmd>Gitsigns %s<CR>", cmd),
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
set_gitsigns_keymap('p', 'preview_hunk', {desc = "Preview hunk"})
|
||||||
|
set_gitsigns_keymap('b', 'blame_line', {desc = "Show line commit info"})
|
||||||
|
set_gitsigns_keymap('n', 'next_hunk', {desc = "Next changes"})
|
||||||
|
set_gitsigns_keymap('N', 'prev_hunk', {desc = "Previous changes"})
|
||||||
|
set_gitsigns_keymap('r', 'reset_hunk', {desc = "Reset changes"})
|
||||||
|
set_gitsigns_keymap('h', 'toggle_linehl', {desc = "Toggle changes highlight"})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"wsdjeg/vim-fetch",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aznhe21/actions-preview.nvim",
|
||||||
|
dependencies = {
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
'MunifTanjim/nui.nvim'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("actions-preview").setup {
|
||||||
|
telescope = {
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
layout_strategy = "vertical",
|
||||||
|
layout_config = {
|
||||||
|
width = 0.8,
|
||||||
|
height = 0.9,
|
||||||
|
prompt_position = "top",
|
||||||
|
preview_cutoff = 20,
|
||||||
|
preview_height = function(_, _, max_lines)
|
||||||
|
return max_lines - 15
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
vim.keymap.set("n", "<space>c", "", {desc = "Code action"})
|
||||||
|
vim.keymap.set("n", "<space>ca", require("actions-preview").code_actions, {desc = "Code action"})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
80
home/user/.config/nvim/lua/plugins/lsp_manager.lua
Normal file
80
home/user/.config/nvim/lua/plugins/lsp_manager.lua
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
|
||||||
|
local lsp_have_feature = {
|
||||||
|
rename = function(client)
|
||||||
|
return client.supports_method "textDocument/rename"
|
||||||
|
end,
|
||||||
|
inlay_hint = function(client)
|
||||||
|
return client.supports_method "textDocument/inlayHint"
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
local function get_lsp_client_names(have_feature)
|
||||||
|
local client_names = {}
|
||||||
|
local attached_clients = vim.lsp.get_clients { bufnr = 0 }
|
||||||
|
for _, client in ipairs(attached_clients) do
|
||||||
|
if have_feature(client) then
|
||||||
|
table.insert(client_names, client.name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return client_names
|
||||||
|
end
|
||||||
|
|
||||||
|
local function lsp_buf_rename(client_name)
|
||||||
|
vim.lsp.buf.rename(nil, { name = client_name })
|
||||||
|
end
|
||||||
|
|
||||||
|
function LSP_BUF_RENAME_USE_ANY(fallback)
|
||||||
|
local client_names = get_lsp_client_names(lsp_have_feature.rename)
|
||||||
|
for _, client_name in ipairs(client_names) do
|
||||||
|
lsp_buf_rename(client_name)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if fallback then
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'mason-org/mason.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
"mason-org/mason-lspconfig.nvim",
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
-- Mappings.
|
||||||
|
local opts = { noremap=true, silent=true }
|
||||||
|
|
||||||
|
local function desc(description)
|
||||||
|
return vim.tbl_extend("keep", opts, {desc = description})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Sections
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>w', '', {desc = "Workspace manage"})
|
||||||
|
|
||||||
|
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||||
|
vim.api.nvim_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', desc("Go declaration"))
|
||||||
|
vim.api.nvim_set_keymap('n', 'gd', '<cmd>Telescope lsp_definitions<CR>', desc("Go definition"))
|
||||||
|
vim.api.nvim_set_keymap('n', 'gi', '<cmd>Telescope lsp_implementations<CR>', desc("Go implementation"))
|
||||||
|
vim.api.nvim_set_keymap('n', 'gr', '<cmd>Telescope lsp_references<CR>', desc("Go references"))
|
||||||
|
vim.api.nvim_set_keymap('n', 'gt', '<cmd>Telescope lsp_type_definitions<CR>', desc("Go type references"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>k', '<cmd>lua vim.lsp.buf.hover()<CR>', desc("Show help"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>K', '<cmd>lua vim.lsp.buf.signature_help()<CR>', desc("Show signature"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', desc("Add workspace folder"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', desc("Remove workspace folder"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', desc("Show workspace folders"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', desc("Show type"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>rn', "<cmd>lua LSP_BUF_RENAME_USE_ANY()<CR>", desc("Rename object"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<CR>', desc("Show diagnostic"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>p', '<cmd>lua vim.diagnostic.goto_prev()<CR>', desc("Previous problem"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>n', '<cmd>lua vim.diagnostic.goto_next()<CR>', desc("Next problem"))
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
|
||||||
|
vim.api.nvim_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.format()<CR>', desc("Format file"))
|
||||||
|
|
||||||
|
require("mason").setup()
|
||||||
|
require("mason-lspconfig").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
128
home/user/.config/nvim/lua/plugins/misc.lua
Normal file
128
home/user/.config/nvim/lua/plugins/misc.lua
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
return {
|
||||||
|
'tpope/vim-repeat',
|
||||||
|
'google/vim-searchindex',
|
||||||
|
'preservim/vim-pencil',
|
||||||
|
{
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
desc = "Auto pair brackets and tags",
|
||||||
|
event = "InsertEnter",
|
||||||
|
opts = {
|
||||||
|
disable_in_macro = true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kylechui/nvim-surround",
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
require("nvim-surround").setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'windwp/nvim-ts-autotag',
|
||||||
|
config = function()
|
||||||
|
require("nvim-ts-autotag").setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'numToStr/Comment.nvim',
|
||||||
|
keys = { { "gc" }, { "gc", mode = "v" } },
|
||||||
|
config = function()
|
||||||
|
require("Comment").setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
build = ':TSUpdate',
|
||||||
|
event = "BufReadPost",
|
||||||
|
config = function()
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
ensure_installed = {"python", "lua", "vim", "html", "rust", "markdown", "regex"},
|
||||||
|
auto_install = true,
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"thek4n/mdimage.nvim",
|
||||||
|
config = function()
|
||||||
|
require("mdimage").setup({
|
||||||
|
target_path = "./.img",
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"thek4n/postman.nvim",
|
||||||
|
keys = {"<leader>rl"},
|
||||||
|
cmd = {"PostmanExec"},
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set("n", "<Leader>rl", '<cmd>PostmanExec<CR>')
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'monaqa/dial.nvim',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
keys = {"+", "-"},
|
||||||
|
config = function()
|
||||||
|
local augend = require("dial.augend")
|
||||||
|
|
||||||
|
require("dial.config").augends:register_group{
|
||||||
|
default = {
|
||||||
|
augend.integer.alias.decimal_int,
|
||||||
|
augend.semver.alias.semver,
|
||||||
|
augend.constant.alias.bool
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.keymap.set("n", "+", function()
|
||||||
|
require("dial.map").manipulate("increment", "normal")
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "-", function()
|
||||||
|
require("dial.map").manipulate("decrement", "normal")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'chentoast/marks.nvim',
|
||||||
|
config = function()
|
||||||
|
require("marks").setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'Pocco81/auto-save.nvim',
|
||||||
|
config = function()
|
||||||
|
require("auto-save").setup({
|
||||||
|
enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it)
|
||||||
|
execution_message = {
|
||||||
|
message = function() -- message to print on save
|
||||||
|
return ""
|
||||||
|
end,
|
||||||
|
dim = 0.18, -- dim the color of `message`
|
||||||
|
cleaning_interval = 1250, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea
|
||||||
|
},
|
||||||
|
trigger_events = {"InsertLeave", "TextChanged"}, -- vim events that trigger auto-save. See :h events
|
||||||
|
condition = function(buf)
|
||||||
|
local fn = vim.fn
|
||||||
|
local utils = require("auto-save.utils.data")
|
||||||
|
if
|
||||||
|
fn.getbufvar(buf, "&modifiable") == 1 and
|
||||||
|
utils.not_in(fn.getbufvar(buf, "&filetype"), {})
|
||||||
|
then
|
||||||
|
return true -- met condition(s), can save
|
||||||
|
end
|
||||||
|
return false -- can't save
|
||||||
|
end,
|
||||||
|
write_all_buffers = false, -- write all buffers when the current one meets `condition`
|
||||||
|
debounce_delay = 135, -- saves the file at most every `debounce_delay` milliseconds
|
||||||
|
callbacks = { -- functions to be executed at different intervals
|
||||||
|
enabling = nil, -- ran when enabling auto-save
|
||||||
|
disabling = nil, -- ran when disabling auto-save
|
||||||
|
before_asserting_save = nil, -- ran before checking `condition`
|
||||||
|
before_saving = nil, -- ran before doing the actual save
|
||||||
|
after_saving = nil -- ran after doing the actual save
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
}
|
||||||
129
home/user/.config/nvim/lua/plugins/telescope.lua
Normal file
129
home/user/.config/nvim/lua/plugins/telescope.lua
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
enabled = vim.fn.executable("fzf") == 1,
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
|
enabled = vim.fn.executable("make") == 1,
|
||||||
|
build = "make"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cmd = {
|
||||||
|
"Telescope"
|
||||||
|
},
|
||||||
|
previewers = {
|
||||||
|
buffer_previewer_maker = require('telescope.previewers').buffer_previewer_maker
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<Leader>fb', '<cmd>Telescope buffers<CR>' },
|
||||||
|
{ '<Leader>ff', '<cmd>Telescope find_files<CR>' },
|
||||||
|
{ '<Leader>fg', '<cmd>Telescope live_grep<CR>' },
|
||||||
|
{ '<Leader>fc', '<cmd>Telescope git_commits<CR>' },
|
||||||
|
{ '<Leader>fd', '<cmd>Telescope diagnostics<CR>' },
|
||||||
|
{ '<Leader><Leader>', '<cmd>Telescope buffers<CR>' },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local telescope = require("telescope")
|
||||||
|
local actions = require("telescope.actions")
|
||||||
|
|
||||||
|
telescope.load_extension("fzf")
|
||||||
|
|
||||||
|
telescope.setup({
|
||||||
|
pickers = {
|
||||||
|
find_files = {
|
||||||
|
hidden = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<C-j>"] = actions.move_selection_next,
|
||||||
|
["<C-k>"] = actions.move_selection_previous,
|
||||||
|
["<C-n>"] = actions.preview_scrolling_down,
|
||||||
|
["<C-p>"] = actions.preview_scrolling_up,
|
||||||
|
["<C-a>"] = actions.toggle_all,
|
||||||
|
["<C-o>"] = actions.toggle_selection,
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
["<C-j>"] = actions.move_selection_next,
|
||||||
|
["<C-k>"] = actions.move_selection_previous,
|
||||||
|
["<C-n>"] = actions.preview_scrolling_down,
|
||||||
|
["<C-p>"] = actions.preview_scrolling_up,
|
||||||
|
["<C-a>"] = actions.toggle_all,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selection_caret = " ",
|
||||||
|
path_display = { "truncate" },
|
||||||
|
file_ignore_patterns = {
|
||||||
|
"%.git/",
|
||||||
|
"%.svn/",
|
||||||
|
"%.o",
|
||||||
|
"%.a",
|
||||||
|
"%.so",
|
||||||
|
"a%.out",
|
||||||
|
"venv/",
|
||||||
|
"CMakeFiles/",
|
||||||
|
"cmake_install%.cmake",
|
||||||
|
"CMakeCache%.txt",
|
||||||
|
"target/",
|
||||||
|
"%.pytest_cache/",
|
||||||
|
"vendor/",
|
||||||
|
"%.lock",
|
||||||
|
"%.db",
|
||||||
|
"%.sqlite3",
|
||||||
|
"%.sqlite",
|
||||||
|
"%.ipynb",
|
||||||
|
"%.svg",
|
||||||
|
"%.burp",
|
||||||
|
"%.mp4",
|
||||||
|
"%.png",
|
||||||
|
"%.jpeg",
|
||||||
|
"%.jpg",
|
||||||
|
"%.gif",
|
||||||
|
"%.mkv",
|
||||||
|
"%.otf",
|
||||||
|
"%.ttf",
|
||||||
|
"%.webp",
|
||||||
|
"%.bin",
|
||||||
|
"%.dart_tool/",
|
||||||
|
"%.gradle/",
|
||||||
|
"%.idea/",
|
||||||
|
"%.settings/",
|
||||||
|
"%.vscode/",
|
||||||
|
"pycache/",
|
||||||
|
"build/",
|
||||||
|
"env/",
|
||||||
|
"gradle/",
|
||||||
|
"node_modules/",
|
||||||
|
"%.pdb",
|
||||||
|
"%.dll",
|
||||||
|
"%.class",
|
||||||
|
"%.exe",
|
||||||
|
"%.cache",
|
||||||
|
"%.ico",
|
||||||
|
"%.pdf",
|
||||||
|
"%.dylib",
|
||||||
|
"%.jar",
|
||||||
|
"%.docx",
|
||||||
|
"%.met",
|
||||||
|
"%.vale/",
|
||||||
|
"%.rar",
|
||||||
|
"%.zip",
|
||||||
|
"%.7z",
|
||||||
|
"%.tar",
|
||||||
|
"%.xz",
|
||||||
|
"%.gz",
|
||||||
|
"%.bz2",
|
||||||
|
"%.epub",
|
||||||
|
"%.flac",
|
||||||
|
"%.tar.gz",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
17
home/user/.config/nvim/lua/plugins/textobjects.lua
Normal file
17
home/user/.config/nvim/lua/plugins/textobjects.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'kana/vim-textobj-lastpat', -- text-object i/, operate under finding
|
||||||
|
dependencies = { 'kana/vim-textobj-user' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'sgur/vim-textobj-parameter',
|
||||||
|
dependencies = { 'kana/vim-textobj-user' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'chaoren/vim-wordmotion',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
|
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
||||||
|
},
|
||||||
|
}
|
||||||
209
home/user/.config/nvim/lua/plugins/ui.lua
Normal file
209
home/user/.config/nvim/lua/plugins/ui.lua
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
local function get_virtual_env()
|
||||||
|
return vim.fs.basename(os.getenv("VIRTUAL_ENV"))
|
||||||
|
end
|
||||||
|
|
||||||
|
function GET_FORMATTED_VIRTUAL_ENV()
|
||||||
|
if vim.bo.filetype == 'python' then
|
||||||
|
return "<" .. get_virtual_env() .. ">"
|
||||||
|
end
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
|
||||||
|
function DETECT_INDENT_TYPE()
|
||||||
|
if vim.bo.expandtab then
|
||||||
|
return vim.bo.shiftwidth .. " spaces"
|
||||||
|
else
|
||||||
|
return vim.bo.shiftwidth / vim.bo.tabstop .. " tabs (" .. vim.bo.tabstop .. ")"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function is_absolute_path(path)
|
||||||
|
return string.sub(path, 1, 1) == '/' or string.sub(path, 1, 1) == '~'
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/twilight.nvim",
|
||||||
|
cmd = "Twilight"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'HiPhish/rainbow-delimiters.nvim',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-lualine/lualine.nvim',
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
require("lualine").setup({
|
||||||
|
options = {
|
||||||
|
component_separators = { left = '', right = '' },
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {'mode'},
|
||||||
|
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||||
|
lualine_c = {
|
||||||
|
{
|
||||||
|
'vim.fn.getcwd()',
|
||||||
|
fmt = function(str)
|
||||||
|
return str:gsub(os.getenv("HOME"), "~")
|
||||||
|
end,
|
||||||
|
color = { fg='white', gui='bold' },
|
||||||
|
padding = { left = 1, right = 0 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'filename',
|
||||||
|
fmt = function(str)
|
||||||
|
local res = str
|
||||||
|
|
||||||
|
if is_absolute_path(res) then
|
||||||
|
res = " " .. res
|
||||||
|
else
|
||||||
|
res = "/" .. res
|
||||||
|
end
|
||||||
|
|
||||||
|
return res
|
||||||
|
end,
|
||||||
|
file_status = true,
|
||||||
|
path = 1,
|
||||||
|
padding = { left = 0, right = 1 }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lualine_x = {'GET_FORMATTED_VIRTUAL_ENV()', 'DETECT_INDENT_TYPE()', 'filetype'},
|
||||||
|
lualine_y = {'searchcount'},
|
||||||
|
lualine_z = {'location', 'selectioncount'},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = { 'kyazdani42/nvim-web-devicons' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'EdenEast/nightfox.nvim',
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
build = function()
|
||||||
|
require("nightfox").compile()
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
require("nightfox").setup({
|
||||||
|
options = {
|
||||||
|
transparent = true,
|
||||||
|
styles = {
|
||||||
|
strings = "italic",
|
||||||
|
comments = "italic",
|
||||||
|
constants = "bold",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd.colorscheme("nightfox")
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'ellisonleao/gruvbox.nvim',
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'xiyaowong/transparent.nvim',
|
||||||
|
enabled = false,
|
||||||
|
lazy = true,
|
||||||
|
config = function()
|
||||||
|
require("transparent").setup({
|
||||||
|
exclude_groups = {'CursorLine'},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'lukas-reineke/virt-column.nvim',
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
require("virt-column").setup({
|
||||||
|
virtcolumn = '80'
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'norcalli/nvim-colorizer.lua',
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
require('colorizer').setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
config = function()
|
||||||
|
require("ibl").setup({
|
||||||
|
scope = { enabled = false },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
main = "ibl"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'karb94/neoscroll.nvim',
|
||||||
|
config = function()
|
||||||
|
require('neoscroll').setup({
|
||||||
|
mappings = {'<C-u>', '<C-d>', '<C-b>',
|
||||||
|
'<C-y>', '<C-e>', 'zt', 'zz', 'zb'},
|
||||||
|
respect_scrolloff = true,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'folke/which-key.nvim',
|
||||||
|
config = function()
|
||||||
|
require("which-key").setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("noice").setup({
|
||||||
|
presets = {
|
||||||
|
bottom_search = true,
|
||||||
|
},
|
||||||
|
cmdline = {
|
||||||
|
enabled = true,
|
||||||
|
view = "cmdline_popup",
|
||||||
|
},
|
||||||
|
health = {
|
||||||
|
checker = false,
|
||||||
|
},
|
||||||
|
routes = {
|
||||||
|
{ -- hack to disable search count
|
||||||
|
filter = {
|
||||||
|
event = "msg_show",
|
||||||
|
kind = "echo",
|
||||||
|
["not"] = { cmdline = true },
|
||||||
|
},
|
||||||
|
opts = { skip = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"https://github.com/liangxianzhe/floating-input.nvim.git",
|
||||||
|
config = function()
|
||||||
|
vim.ui.input = function(opts, on_confirm)
|
||||||
|
require("floating-input").input(opts, on_confirm, { border = 'single' })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"petertriho/nvim-scrollbar",
|
||||||
|
config = function()
|
||||||
|
require("scrollbar").setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
}
|
||||||
@ -1,9 +1,12 @@
|
|||||||
set preview_images true
|
set preview_images true
|
||||||
set preview_images_method ueberzug
|
set preview_images_method ueberzug
|
||||||
|
|
||||||
|
# Show VCS info
|
||||||
|
set vcs_aware true
|
||||||
|
|
||||||
default_linemode devicons
|
default_linemode devicons
|
||||||
|
|
||||||
set viewmode miller
|
set viewmode miller
|
||||||
|
|
||||||
map <F3> exit
|
map <F3> exit
|
||||||
|
map ,x exit
|
||||||
10
home/user/.config/rofi/config.rasi
Normal file
10
home/user/.config/rofi/config.rasi
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
configuration {
|
||||||
|
show-icons: true;
|
||||||
|
terminal: "alacritty";
|
||||||
|
font: "xft:FiraCode 12";
|
||||||
|
kb-accept-entry: "Ctrl+m,Return";
|
||||||
|
kb-row-up: "Ctrl+k";
|
||||||
|
kb-row-down: "Ctrl+j";
|
||||||
|
kb-remove-to-eol: "";
|
||||||
|
}
|
||||||
|
@theme "Arc-Dark"
|
||||||
28
home/user/.config/sway/autostart.conf
Normal file
28
home/user/.config/sway/autostart.conf
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# vim: ft=swayconfig
|
||||||
|
# Sway autostart
|
||||||
|
|
||||||
|
exec swayidle -w \
|
||||||
|
timeout 1800 'swaylock -f' \
|
||||||
|
timeout 1805 'swaymsg "output * power off"' \
|
||||||
|
resume 'swaymsg "output * power on"' \
|
||||||
|
before-sleep 'swaylock -f'
|
||||||
|
|
||||||
|
# Screen layout
|
||||||
|
exec_always ~/.screenlayout/default
|
||||||
|
|
||||||
|
output * bg "$(find ~/.wallpaper -type f | shuf -n 1)" fill
|
||||||
|
|
||||||
|
# Notifications
|
||||||
|
#systemctl --user enable --now dbus.service
|
||||||
|
exec mako --anchor top-right --default-timeout 4000 --icons 1 --actions 1 --output $primary
|
||||||
|
|
||||||
|
exec_always wayvnc -o $primary -S "$(mktemp --dry-run --tmpdir="${XDG_RUNTIME_DIR}" wayvnc.XXXXXXXXXX)" 127.0.0.1 5900
|
||||||
|
exec_always wayvnc -o $secondary -S "$(mktemp --dry-run --tmpdir="${XDG_RUNTIME_DIR}" wayvnc.XXXXXXXXXX)" 127.0.0.1 5901
|
||||||
|
exec --no-startup-id easyeffects --gapplication-service
|
||||||
|
|
||||||
|
exec --no-startup-id pomodoro daemon
|
||||||
|
|
||||||
|
exec $browser
|
||||||
|
exec $terminal
|
||||||
|
exec Telegram
|
||||||
|
exec firefox_media
|
||||||
19
home/user/.config/sway/bar.conf
Normal file
19
home/user/.config/sway/bar.conf
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# vim: ft=swayconfig
|
||||||
|
# Sway bar
|
||||||
|
|
||||||
|
bar {
|
||||||
|
mode dock
|
||||||
|
position bottom
|
||||||
|
status_command i3blocks
|
||||||
|
wrap_scroll no
|
||||||
|
bindsym button4 nop
|
||||||
|
bindsym button5 nop
|
||||||
|
hidden_state hide
|
||||||
|
output *
|
||||||
|
tray_output $primary
|
||||||
|
strip_workspace_name no
|
||||||
|
strip_workspace_numbers no
|
||||||
|
modifier $mod
|
||||||
|
}
|
||||||
|
|
||||||
|
exec ~/.config/i3blocks/scripts/layout_change_handler.sh
|
||||||
201
home/user/.config/sway/bindings.conf
Normal file
201
home/user/.config/sway/bindings.conf
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
# vim: ft=swayconfig
|
||||||
|
# Sway bindings
|
||||||
|
|
||||||
|
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && pkill -RTMIN+1 i3blocks
|
||||||
|
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && pkill -RTMIN+1 i3blocks
|
||||||
|
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && pkill -RTMIN+1 i3blocks
|
||||||
|
|
||||||
|
bindsym --locked XF86AudioPlay exec playerctl play-pause
|
||||||
|
bindsym --locked XF86AudioPause exec playerctl play-pause
|
||||||
|
bindsym --locked XF86AudioNext exec playerctl next
|
||||||
|
bindsym --locked XF86AudioPrev exec playerctl previous
|
||||||
|
bindsym --locked XF86Tools exec pavucontrol
|
||||||
|
|
||||||
|
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
||||||
|
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||||
|
|
||||||
|
bindsym --to-code $mod+p exec pomodoro toggle && pkill -RTMIN+2 i3blocks
|
||||||
|
|
||||||
|
bindsym $mod+z exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 0 ## Hold to talk
|
||||||
|
bindsym --release $mod+z exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 1 ## Release to mute
|
||||||
|
|
||||||
|
bindsym $mod+Shift+z exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||||
|
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||||
|
|
||||||
|
bindsym XF86PickupPhone exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 0 ## Hold to talk
|
||||||
|
bindsym --release XF86PickupPhone exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 1 ## Release to mute
|
||||||
|
|
||||||
|
bindsym XF86Go exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 0 ## Hold to talk, x1carb11
|
||||||
|
bindsym --release XF86Go exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ 1 ## Release to mute, x1carb11
|
||||||
|
|
||||||
|
|
||||||
|
bindsym $mod+XF86AudioMicMute exec --no-startup-id pactl list short sources | awk '/input.*RUNNING/ {system("pactl set-source-mute " $1 " toggle")}' ## Find and mute mics
|
||||||
|
|
||||||
|
bindsym --to-code $mod+s exec ~/.config/sway/scripts/swap-workspaces.sh
|
||||||
|
|
||||||
|
bindsym --to-code $mod+Shift+q kill
|
||||||
|
bindsym --to-code $mod+Shift+r reload
|
||||||
|
|
||||||
|
set $menu rofi -show drun -m -1
|
||||||
|
bindsym --to-code $mod+d exec $menu
|
||||||
|
bindsym $mod+o exec --no-startup-id slm_rofi
|
||||||
|
|
||||||
|
# Change focus
|
||||||
|
bindsym --to-code $mod+h focus left
|
||||||
|
bindsym --to-code $mod+j focus down
|
||||||
|
bindsym --to-code $mod+k focus up
|
||||||
|
bindsym --to-code $mod+l focus right
|
||||||
|
bindsym --to-code $mod+Left focus left
|
||||||
|
bindsym --to-code $mod+Down focus down
|
||||||
|
bindsym --to-code $mod+Up focus up
|
||||||
|
bindsym --to-code $mod+Right focus right
|
||||||
|
|
||||||
|
# Move focused window
|
||||||
|
bindsym --to-code $mod+Shift+h move left
|
||||||
|
bindsym --to-code $mod+Shift+j move down
|
||||||
|
bindsym --to-code $mod+Shift+k move up
|
||||||
|
bindsym --to-code $mod+Shift+l move right
|
||||||
|
bindsym --to-code $mod+Shift+Left move left
|
||||||
|
bindsym --to-code $mod+Shift+Down move down
|
||||||
|
bindsym --to-code $mod+Shift+Up move up
|
||||||
|
bindsym --to-code $mod+Shift+Right move right
|
||||||
|
|
||||||
|
|
||||||
|
bindsym --to-code $mod+Ctrl+Shift+l move workspace to output right
|
||||||
|
bindsym --to-code $mod+Ctrl+Shift+h move workspace to output left
|
||||||
|
bindsym --to-code $mod+Ctrl+Shift+k move workspace to output up
|
||||||
|
bindsym --to-code $mod+Ctrl+Shift+j move workspace to output down
|
||||||
|
|
||||||
|
|
||||||
|
bindsym --to-code $mod+f fullscreen toggle
|
||||||
|
|
||||||
|
bindsym --to-code $mod+t layout tabbed
|
||||||
|
bindsym --to-code $mod+v layout toggle split
|
||||||
|
bindsym --to-code $mod+a focus parent
|
||||||
|
|
||||||
|
bindsym --to-code $mod+Shift+slash floating toggle
|
||||||
|
bindsym --to-code $mod+Shift+comma sticky toggle
|
||||||
|
|
||||||
|
# Change focus between tiling / floating windows
|
||||||
|
bindsym --to-code $mod+slash focus mode_toggle
|
||||||
|
|
||||||
|
|
||||||
|
bindsym --to-code Print exec --no-startup-id screenshot select copy
|
||||||
|
bindsym --to-code $mod+Print exec --no-startup-id screenshot window copy
|
||||||
|
bindsym --to-code Ctrl+Print exec --no-startup-id screenshot entire copy
|
||||||
|
|
||||||
|
bindsym --to-code Shift+Print exec --no-startup-id screenshot select save
|
||||||
|
bindsym --to-code Shift+$mod+Print exec --no-startup-id screenshot window save
|
||||||
|
bindsym --to-code Shift+Ctrl+Print exec --no-startup-id screenshot entire save
|
||||||
|
|
||||||
|
|
||||||
|
bindsym --to-code $mod+q workspace hide1; workspace hide2
|
||||||
|
|
||||||
|
|
||||||
|
bindsym $mod+Shift+minus move scratchpad
|
||||||
|
bindsym $mod+minus scratchpad show
|
||||||
|
|
||||||
|
|
||||||
|
bindsym --to-code $mod+b bar mode toggle
|
||||||
|
|
||||||
|
set $exitmode "Power: [e]xit, [r]eboot, [s]hutdown, s[u]spend, [l]ock, [b]lack, [R]UEFI"
|
||||||
|
mode $exitmode {
|
||||||
|
bindsym --to-code e exit
|
||||||
|
bindsym --to-code r exec --no-startup-id reboot
|
||||||
|
bindsym --to-code s exec --no-startup-id shutdown -h now
|
||||||
|
bindsym --to-code u exec ~/.config/sway/scripts/lock-telegram.sh && systemctl suspend; mode "default"
|
||||||
|
bindsym --to-code l exec ~/.config/sway/scripts/lock-telegram.sh && swaylock -f; mode "default"
|
||||||
|
bindsym --to-code b exec magick canvas:none PNG:- | feh --class black -YFx -; mode "default"
|
||||||
|
bindsym --to-code Shift+r exec --no-startup-id systemctl reboot --firmware-setup
|
||||||
|
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
bindsym Return mode "default"
|
||||||
|
}
|
||||||
|
bindsym --to-code $mod+x mode $exitmode
|
||||||
|
|
||||||
|
# switch to workspace
|
||||||
|
bindsym --to-code $mod+1 workspace number $ws1
|
||||||
|
bindsym --to-code $mod+2 workspace number $ws2
|
||||||
|
bindsym --to-code $mod+3 workspace number $ws3
|
||||||
|
bindsym --to-code $mod+4 workspace number $ws4
|
||||||
|
bindsym --to-code $mod+5 workspace number $ws5
|
||||||
|
bindsym --to-code $mod+6 workspace number $ws6
|
||||||
|
bindsym --to-code $mod+7 workspace number $ws7
|
||||||
|
bindsym --to-code $mod+8 workspace number $ws8
|
||||||
|
bindsym --to-code $mod+9 workspace number $ws9
|
||||||
|
bindsym --to-code $mod+0 workspace number $ws10
|
||||||
|
|
||||||
|
# move focused container to workspace
|
||||||
|
bindsym --to-code $mod+Shift+1 move container to workspace number $ws1
|
||||||
|
bindsym --to-code $mod+Shift+2 move container to workspace number $ws2
|
||||||
|
bindsym --to-code $mod+Shift+3 move container to workspace number $ws3
|
||||||
|
bindsym --to-code $mod+Shift+4 move container to workspace number $ws4
|
||||||
|
bindsym --to-code $mod+Shift+5 move container to workspace number $ws5
|
||||||
|
bindsym --to-code $mod+Shift+6 move container to workspace number $ws6
|
||||||
|
bindsym --to-code $mod+Shift+7 move container to workspace number $ws7
|
||||||
|
bindsym --to-code $mod+Shift+8 move container to workspace number $ws8
|
||||||
|
bindsym --to-code $mod+Shift+9 move container to workspace number $ws9
|
||||||
|
bindsym --to-code $mod+Shift+0 move container to workspace number $ws10
|
||||||
|
|
||||||
|
bindsym --to-code $mod+u workspace prev
|
||||||
|
bindsym --to-code $mod+Shift+u workspace next
|
||||||
|
|
||||||
|
# workspace_auto_back_and_forth no
|
||||||
|
bindsym --to-code $mod+Tab workspace back_and_forth
|
||||||
|
|
||||||
|
# resize window (you can also use the mouse for that)
|
||||||
|
set $resizemode "Resize: toggle [p]recize"
|
||||||
|
mode $resizemode {
|
||||||
|
bindsym --to-code h resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym --to-code j resize grow height 10 px or 10 ppt
|
||||||
|
bindsym --to-code k resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym --to-code l resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
bindsym --to-code $mod+r mode "default"
|
||||||
|
bindsym --to-code p mode $presizemode
|
||||||
|
|
||||||
|
bindsym --to-code Return mode "default"
|
||||||
|
bindsym --to-code Escape mode "default"
|
||||||
|
}
|
||||||
|
set $presizemode "Precise resize: toggle [p]resize"
|
||||||
|
mode $presizemode {
|
||||||
|
bindsym --to-code h resize shrink width 1 px or 1 ppt
|
||||||
|
bindsym --to-code j resize grow height 1 px or 1 ppt
|
||||||
|
bindsym --to-code k resize shrink height 1 px or 1 ppt
|
||||||
|
bindsym --to-code l resize grow width 1 px or 1 ppt
|
||||||
|
|
||||||
|
bindsym --to-code $mod+r mode "default"
|
||||||
|
bindsym --to-code p mode $resizemode
|
||||||
|
|
||||||
|
bindsym --to-code Return mode "default"
|
||||||
|
bindsym --to-code Escape mode "default"
|
||||||
|
}
|
||||||
|
bindsym --to-code $mod+r mode $resizemode
|
||||||
|
|
||||||
|
input type:keyboard {
|
||||||
|
xkb_layout us,ru
|
||||||
|
xkb_options grp:win_space_toggle,caps:ctrl_modifier
|
||||||
|
xkb_model "pc101"
|
||||||
|
repeat_delay 250
|
||||||
|
repeat_rate 100
|
||||||
|
}
|
||||||
|
|
||||||
|
input type:pointer {
|
||||||
|
natural_scroll disabled
|
||||||
|
}
|
||||||
|
|
||||||
|
input type:touchpad {
|
||||||
|
tap enabled
|
||||||
|
tap_button_map lrm
|
||||||
|
dwt enabled
|
||||||
|
scroll_method two_finger
|
||||||
|
natural_scroll enabled
|
||||||
|
drag enabled
|
||||||
|
drag_lock disabled
|
||||||
|
pointer_accel 0.4
|
||||||
|
}
|
||||||
|
|
||||||
|
bindgesture swipe:3:right workspace next
|
||||||
|
bindgesture swipe:3:left workspace prev
|
||||||
|
bindgesture swipe:3:up exec $menu
|
||||||
|
bindgesture swipe:3:down workspace hide1; workspace hide2
|
||||||
34
home/user/.config/sway/config
Normal file
34
home/user/.config/sway/config
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Sway config sourcer
|
||||||
|
|
||||||
|
exec swaylock -f
|
||||||
|
|
||||||
|
set $mod Mod4
|
||||||
|
|
||||||
|
set $ws1 "1 Browser"
|
||||||
|
set $ws2 "2 Code"
|
||||||
|
set $ws3 "3"
|
||||||
|
set $ws4 "4"
|
||||||
|
set $ws5 "5"
|
||||||
|
set $ws6 "6"
|
||||||
|
set $ws7 "7"
|
||||||
|
set $ws8 "8💬Social"
|
||||||
|
set $ws9 "9🎵Music"
|
||||||
|
set $ws10 "10🍿Media"
|
||||||
|
|
||||||
|
set $terminal ~/.config/sway/scripts/auto-alacritty.sh
|
||||||
|
set $browser firefox
|
||||||
|
|
||||||
|
# Example variables.d:
|
||||||
|
#set $primary DVI-I-1
|
||||||
|
#set $secondary VGA-1
|
||||||
|
#set $terminal alacritty
|
||||||
|
#set $browser firefox
|
||||||
|
include ~/.config/sway/variables.d/*.conf
|
||||||
|
|
||||||
|
include ~/.config/sway/other.conf
|
||||||
|
include ~/.config/sway/bindings.conf
|
||||||
|
include ~/.config/sway/bar.conf
|
||||||
|
include ~/.config/sway/autostart.conf
|
||||||
|
|
||||||
|
include /etc/sway/config.d/*.conf
|
||||||
|
include ~/.config/sway/config.d/*.conf
|
||||||
0
home/user/.config/sway/config.d/.gitkeep
Normal file
0
home/user/.config/sway/config.d/.gitkeep
Normal file
55
home/user/.config/sway/other.conf
Normal file
55
home/user/.config/sway/other.conf
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
# vim: ft=swayconfig
|
||||||
|
# Other sway config
|
||||||
|
|
||||||
|
# Hide cursor
|
||||||
|
seat seat0 hide_cursor when-typing enable
|
||||||
|
seat seat0 hide_cursor 5000
|
||||||
|
|
||||||
|
|
||||||
|
set $font_size 11
|
||||||
|
font xft:FiraCode $font_size
|
||||||
|
|
||||||
|
floating_modifier $mod
|
||||||
|
|
||||||
|
focus_follows_mouse no
|
||||||
|
mouse_warping none
|
||||||
|
popup_during_fullscreen smart
|
||||||
|
smart_borders on
|
||||||
|
focus_on_window_activation urgent
|
||||||
|
|
||||||
|
default_border pixel 1
|
||||||
|
default_floating_border normal
|
||||||
|
hide_edge_borders smart
|
||||||
|
|
||||||
|
for_window [tiling] border pixel 3
|
||||||
|
for_window [title="Picture-in-Picture"] sticky enable
|
||||||
|
for_window [title="Picture-in-Picture"] border pixel 0
|
||||||
|
for_window [app_id="firefox"] inhibit_idle fullscreen
|
||||||
|
|
||||||
|
for_window [app_id="pavucontrol"] {
|
||||||
|
floating enable
|
||||||
|
resize set width 60 ppt height 80 ppt
|
||||||
|
move position center
|
||||||
|
}
|
||||||
|
|
||||||
|
for_window [class="black"] fullscreen enable
|
||||||
|
|
||||||
|
no_focus [title="^Peek preview$"]
|
||||||
|
no_focus [class="black"]
|
||||||
|
|
||||||
|
assign [app_id="firefox_media"] workspace $ws10
|
||||||
|
assign [app_id="Alacritty"] workspace $ws2
|
||||||
|
assign [app_id="org.telegram.desktop"] workspace $ws8
|
||||||
|
assign [app_id="firefox"] workspace $ws1
|
||||||
|
|
||||||
|
workspace $ws1 output $primary
|
||||||
|
workspace $ws2 output $primary
|
||||||
|
workspace $ws3 output $primary
|
||||||
|
workspace $ws9 output $secondary
|
||||||
|
workspace $ws10 output $secondary
|
||||||
|
|
||||||
|
workspace hide1 output $primary
|
||||||
|
workspace hide2 output $secondary
|
||||||
|
|
||||||
|
|
||||||
|
exec_always test -f ~/.Xresources && xrdb -merge ~/.Xresources
|
||||||
6
home/user/.config/sway/scripts/auto-alacritty.sh
Executable file
6
home/user/.config/sway/scripts/auto-alacritty.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
alacritty
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
25
home/user/.config/sway/scripts/lock-telegram.sh
Executable file
25
home/user/.config/sway/scripts/lock-telegram.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
TELEGRAM_WINDOW="$(
|
||||||
|
swaymsg -t get_tree | \
|
||||||
|
jq -r '.. | select(.app_id? == "org.telegram.desktop") | .id' | \
|
||||||
|
head -n 1
|
||||||
|
)"
|
||||||
|
|
||||||
|
readonly TELEGRAM_WINDOW
|
||||||
|
|
||||||
|
|
||||||
|
if [ -z "${TELEGRAM_WINDOW}" ]; then
|
||||||
|
echo "Error: Telegram not found"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
swaymsg "[con_id=${TELEGRAM_WINDOW}] focus"
|
||||||
|
|
||||||
|
sleep 0.2
|
||||||
|
|
||||||
|
wtype -M ctrl l
|
||||||
|
|
||||||
|
swaymsg workspace back_and_forth
|
||||||
|
|
||||||
|
exit 0
|
||||||
26
home/user/.config/sway/scripts/swap-workspaces.sh
Executable file
26
home/user/.config/sway/scripts/swap-workspaces.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
|
||||||
|
current_monitor=$(swaymsg -r -t get_workspaces | jq '.[] | select(.focused).output' | tr -d '"')
|
||||||
|
other_monitor=$(swaymsg -r -t get_outputs | jq -r ".[] | select(.active and .name != \"${current_monitor}\").name" | head -n 1)
|
||||||
|
|
||||||
|
if [ -z "${other_monitor}" ]; then
|
||||||
|
echo "No other active monitor found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
current_workspace=$(swaymsg -r -t get_workspaces | jq '.[] | select(.focused).name' | tr -d '"')
|
||||||
|
other_workspace=$(swaymsg -r -t get_workspaces | jq -r ".[] | select(.visible and .output == \"${other_monitor}\").name" | head -n 1)
|
||||||
|
|
||||||
|
if [ -n "${other_workspace}" ]; then
|
||||||
|
# Swap workspaces
|
||||||
|
swaymsg "workspace ${other_workspace}; move workspace to output ${current_monitor}"
|
||||||
|
swaymsg "workspace ${current_workspace}; move workspace to output ${other_monitor}"
|
||||||
|
swaymsg "workspace ${other_workspace}"
|
||||||
|
else
|
||||||
|
# Just move current workspace if target is empty
|
||||||
|
swaymsg "move workspace to output ${other_monitor}"
|
||||||
|
fi
|
||||||
0
home/user/.config/sway/variables.d/.gitkeep
Normal file
0
home/user/.config/sway/variables.d/.gitkeep
Normal file
3
home/user/.config/swaylock/config
Normal file
3
home/user/.config/swaylock/config
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
color=000000
|
||||||
|
ignore-empty-password
|
||||||
|
show-failed-attempts
|
||||||
18
home/user/.config/systemd/user/mpv.service
Normal file
18
home/user/.config/systemd/user/mpv.service
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=MPV Audio Player Service
|
||||||
|
Documentation=man:mpv(1)
|
||||||
|
After=sound.target graphical-session.target
|
||||||
|
Wants=sound.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=%h/.local/bin/mpv-service.sh
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
|
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=%t/bus
|
||||||
|
Environment=XDG_RUNTIME_DIR=%t
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
17
home/user/.config/systemd/user/ssh-proxy@.service
Normal file
17
home/user/.config/systemd/user/ssh-proxy@.service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=SSH proxy
|
||||||
|
Requires=default.target
|
||||||
|
After=default.target
|
||||||
|
|
||||||
|
# ln -s % ~/.config/systemd/user
|
||||||
|
# systemctl --user enable --now ssh-proxy@server.vpn
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/ssh -o ControlMaster=no -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -vCTN -D 127.0.0.1:1080 %i
|
||||||
|
Restart=always
|
||||||
|
RestartSec=3
|
||||||
|
StartLimitInterval=0
|
||||||
|
StartLimitBurst=0
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
15
home/user/.config/systemd/user/tmux.service
Normal file
15
home/user/.config/systemd/user/tmux.service
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Tmux server
|
||||||
|
Requires=default.target
|
||||||
|
After=default.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/tmux -D -L %u
|
||||||
|
ExecStop=/usr/bin/tmux -L %u kill-server
|
||||||
|
ExecReload=/usr/bin/tmux -L %u source-file %h/.config/tmux/tmux.conf
|
||||||
|
Restart=on-failure
|
||||||
|
ExecStartPost=/usr/bin/tmux -L %u new-session -d -s landing 'sh -c "tmux rename-window -t 1 landing; tmux set-option remain-on-exit on; figlet -w 200 -c -f big Landing; trap : INT; while true; do sleep 3600; done"'
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
14
home/user/.config/systemd/user/x11vnc.service
Normal file
14
home/user/.config/systemd/user/x11vnc.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=VNC Server for X11
|
||||||
|
Requires=default.target
|
||||||
|
After=default.target
|
||||||
|
|
||||||
|
# x11vnc -storepasswd ~/.vnc/passwd
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStartPre=/bin/sleep 10
|
||||||
|
ExecStart=/usr/bin/x11vnc -noxdamage -rfbauth %h/.vnc/passwd -display :0 -forever -reopen -shared
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
3
home/user/.config/terminal-colors.d/cal.scheme
Normal file
3
home/user/.config/terminal-colors.d/cal.scheme
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
weekend 31
|
||||||
|
today 30;47
|
||||||
|
header 1;37
|
||||||
42
home/user/.config/tmux/aliases.conf
Normal file
42
home/user/.config/tmux/aliases.conf
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# vim: ft=tmux
|
||||||
|
|
||||||
|
set -g command-alias[101] kill='kill-session -t'
|
||||||
|
|
||||||
|
set -g command-alias[102] k='kill-session -t'
|
||||||
|
|
||||||
|
set -g command-alias[103] reload-config='source-file ~/.config/tmux/tmux.conf ; display-message "Config reloaded..."'
|
||||||
|
|
||||||
|
set -g command-alias[104] detect-panes='
|
||||||
|
set -g display-time $_tmux_display_panes_time
|
||||||
|
display-message
|
||||||
|
display-panes
|
||||||
|
set -g display-time $_tmux_display_time
|
||||||
|
'
|
||||||
|
|
||||||
|
set -g command-alias[105] stash-pane='if-shell "tmux join-pane -l $_tmux_main_pane_size -h -s stash" "" "break-pane -d -n stash"'
|
||||||
|
|
||||||
|
set -g command-alias[106] detach-other='if -F "#{session_many_attached}" {
|
||||||
|
confirm-before -p "Detach other clients? (y/n)" "detach -a"
|
||||||
|
} {
|
||||||
|
display "Session has only 1 client attached"
|
||||||
|
}'
|
||||||
|
|
||||||
|
set -g command-alias[107] toggle-synchronize-panes='
|
||||||
|
if -F "#{pane_synchronized}" "setw synchronize-panes off" "setw synchronize-panes on"
|
||||||
|
'
|
||||||
|
|
||||||
|
# Choose session with key index starting from 1
|
||||||
|
set -g command-alias[108] choose-tree-index="
|
||||||
|
choose-tree -ZsK '#{?#{e|<:#{line},9},#{e|+:1,#{line}},#{?#{e|<:#{line},35},M-#{a:#{e|+:97,#{e|-:#{line},9}}},}}'
|
||||||
|
"
|
||||||
|
|
||||||
|
set -g command-alias[109] toggle-zoom='resize-pane -Z'
|
||||||
|
|
||||||
|
set -g command-alias[110] default-layout="
|
||||||
|
resize-pane -x $_tmux_main_pane_size
|
||||||
|
select-layout '6c98,213x55,0,0{72x55,0,0,72,140x55,73,0,73}'
|
||||||
|
"
|
||||||
|
|
||||||
|
set -g command-alias[111] enable-zoom='
|
||||||
|
if -F "#{window_zoomed_flag}" "" "resize-pane -Z"
|
||||||
|
'
|
||||||
225
home/user/.config/tmux/mappings.conf
Normal file
225
home/user/.config/tmux/mappings.conf
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
# vim: ft=tmux
|
||||||
|
|
||||||
|
|
||||||
|
set -g prefix C-b
|
||||||
|
bind C-b send-prefix
|
||||||
|
bind C-и send-prefix
|
||||||
|
|
||||||
|
|
||||||
|
# Toggle local tmux mappings to allow control remote tmux
|
||||||
|
bind -T root F12 {
|
||||||
|
set prefix None
|
||||||
|
set key-table off
|
||||||
|
set status off
|
||||||
|
}
|
||||||
|
|
||||||
|
bind -T off F12 {
|
||||||
|
set -u prefix
|
||||||
|
set -u key-table
|
||||||
|
set status on
|
||||||
|
}
|
||||||
|
|
||||||
|
bind WheelUpPane send-keys -N 2 scroll-up
|
||||||
|
bind WheelDownPane send-keys -N 2 scroll-Down
|
||||||
|
|
||||||
|
bind F12 send-keys F12
|
||||||
|
|
||||||
|
|
||||||
|
# View current pane in editor
|
||||||
|
bind y {
|
||||||
|
capture-pane -J
|
||||||
|
save-buffer /tmp/tmux-buffer
|
||||||
|
delete-buffer
|
||||||
|
display-popup -E -w 90% -h 80% "nvim /tmp/tmux-buffer"
|
||||||
|
}
|
||||||
|
|
||||||
|
# View current buffer in editor
|
||||||
|
bind Y {
|
||||||
|
capture-pane -J -S - -E -
|
||||||
|
save-buffer /tmp/tmux-buffer
|
||||||
|
delete-buffer
|
||||||
|
display-popup -E -w 90% -h 80% "nvim /tmp/tmux-buffer"
|
||||||
|
}
|
||||||
|
|
||||||
|
bind t display-popup -E -h 70% -w 60% -d "${HOME}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
bind c display-menu \
|
||||||
|
calendar c {
|
||||||
|
display-popup -w 33% -h 70% "cal -my"
|
||||||
|
} \
|
||||||
|
time t {
|
||||||
|
display-popup -w 50% -h 17% "watch -t -n 1 'figlet -ct -f big \"$(date \"+%H : %M : %S\")\"'"
|
||||||
|
} \
|
||||||
|
weather w {
|
||||||
|
display-popup -h 80% -w 60% "zsh -ic 'weather \$CITY'"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Switch new session
|
||||||
|
bind n new-session -c ~
|
||||||
|
# Switch new named session
|
||||||
|
bind N command-prompt -p "New session:" "new-session -A -s '%1' -c ~"
|
||||||
|
|
||||||
|
bind x if -F "#{?#{==:#{client_session},landing},0,1}" \
|
||||||
|
"confirm-before -p \"kill current session? (y/n)\" kill-session" \
|
||||||
|
"display-message 'Cannot kill session: landing'"
|
||||||
|
|
||||||
|
bind X if -F "#{?#{==:#{client_last_session},landing},0,1}" \
|
||||||
|
"confirm-before -p \"kill last session [#{client_last_session}]? (y/n)\" \"kill-session -t #{client_last_session} \\; display-message 'Killed last session'\"" \
|
||||||
|
"display-message 'Cannot kill session: landing'"
|
||||||
|
|
||||||
|
bind q if -F "#{?#{==:#{client_session},landing},0,1}" \
|
||||||
|
"confirm-before -p \"kill current pane? (y/n)\" kill-pane" \
|
||||||
|
"display-message 'Cannot kill session: landing'"
|
||||||
|
|
||||||
|
bind Q if -F "#{?#{==:#{window_name},landing},0,1}" \
|
||||||
|
"confirm-before -p \"kill current window? (y/n)\" kill-window" \
|
||||||
|
"display-message 'Cannot kill session: landing'"
|
||||||
|
|
||||||
|
bind d detach
|
||||||
|
bind D choose-client -Z
|
||||||
|
bind C-d detach-other
|
||||||
|
|
||||||
|
bind r command-prompt -I '#W' -p "New window name:" "rename-window '%%'"
|
||||||
|
bind R command-prompt -I '#S' -p "New session name:" "rename-session '%%'"
|
||||||
|
|
||||||
|
|
||||||
|
bind ';' command-prompt
|
||||||
|
|
||||||
|
|
||||||
|
bind -n M-f toggle-zoom
|
||||||
|
|
||||||
|
|
||||||
|
bind l choose-window -w -Z 'link-window -s "%%" -a'
|
||||||
|
bind u unlink-window
|
||||||
|
|
||||||
|
bind j choose-window -Z 'join-pane -s "%%"'
|
||||||
|
|
||||||
|
|
||||||
|
bind Tab switch-client -l
|
||||||
|
|
||||||
|
|
||||||
|
bind F5 reload-config
|
||||||
|
|
||||||
|
|
||||||
|
# Panes navigation
|
||||||
|
bind -n M-h select-pane -L
|
||||||
|
bind -n M-l select-pane -R
|
||||||
|
bind -n M-j select-pane -D
|
||||||
|
bind -n M-k select-pane -U
|
||||||
|
|
||||||
|
|
||||||
|
# Resizing
|
||||||
|
bind -n C-M-l resize-pane -R
|
||||||
|
bind -n C-M-h resize-pane -L
|
||||||
|
bind -n C-M-j resize-pane -D
|
||||||
|
bind -n C-M-k resize-pane -U
|
||||||
|
|
||||||
|
|
||||||
|
# Swappings panes
|
||||||
|
bind -n M-L swap-pane -d -Z -t '{right-of}'
|
||||||
|
bind -n M-H swap-pane -d -Z -t '{left-of}'
|
||||||
|
bind -n M-J swap-pane -d -Z -t '{down-of}'
|
||||||
|
bind -n M-K swap-pane -d -Z -t '{up-of}'
|
||||||
|
|
||||||
|
|
||||||
|
# Sync panes
|
||||||
|
bind o toggle-synchronize-panes
|
||||||
|
bind O setw synchronize-panes off
|
||||||
|
|
||||||
|
|
||||||
|
bind i detect-panes
|
||||||
|
|
||||||
|
|
||||||
|
# Windows navigation
|
||||||
|
bind -n M-1 if-shell 'tmux new-window -t 1 -n 1 -c "#{pane_current_path}"' '' 'select-window -t 1'
|
||||||
|
bind -n M-2 if-shell 'tmux new-window -t 2 -n 2 -c "#{pane_current_path}"' '' 'select-window -t 2'
|
||||||
|
bind -n M-3 if-shell 'tmux new-window -t 3 -n 3 -c "#{pane_current_path}"' '' 'select-window -t 3'
|
||||||
|
bind -n M-4 if-shell 'tmux new-window -t 4 -n 4 -c "#{pane_current_path}"' '' 'select-window -t 4'
|
||||||
|
bind -n M-5 if-shell 'tmux new-window -t 5 -n 5 -c "#{pane_current_path}"' '' 'select-window -t 5'
|
||||||
|
bind -n M-6 if-shell 'tmux new-window -t 6 -n 6 -c "#{pane_current_path}"' '' 'select-window -t 6'
|
||||||
|
bind -n M-7 if-shell 'tmux new-window -t 7 -n 7 -c "#{pane_current_path}"' '' 'select-window -t 7'
|
||||||
|
bind -n M-8 if-shell 'tmux new-window -t 8 -n 8 -c "#{pane_current_path}"' '' 'select-window -t 8'
|
||||||
|
bind -n M-9 if-shell 'tmux new-window -t 9 -n 9 -c "#{pane_current_path}"' '' 'select-window -t 9'
|
||||||
|
bind -n M-0 if-shell 'tmux new-window -t 10 -n 10 -c "#{pane_current_path}"' '' 'select-window -t 10'
|
||||||
|
|
||||||
|
|
||||||
|
# Moving pane to window by Alt+Shift+Number
|
||||||
|
bind -n 'M-!' if-shell 'tmux join-pane -d -h -t :1' '' 'break-pane -t 1 -d -n 1'
|
||||||
|
bind -n 'M-@' if-shell 'tmux join-pane -d -h -t :2' '' 'break-pane -t 2 -d -n 2'
|
||||||
|
bind -n 'M-#' if-shell 'tmux join-pane -d -h -t :3' '' 'break-pane -t 3 -d -n 3'
|
||||||
|
bind -n 'M-$' if-shell 'tmux join-pane -d -h -t :4' '' 'break-pane -t 4 -d -n 4'
|
||||||
|
bind -n 'M-%' if-shell 'tmux join-pane -d -h -t :5' '' 'break-pane -t 5 -d -n 5'
|
||||||
|
bind -n 'M-^' if-shell 'tmux join-pane -d -h -t :6' '' 'break-pane -t 6 -d -n 6'
|
||||||
|
bind -n 'M-&' if-shell 'tmux join-pane -d -h -t :7' '' 'break-pane -t 7 -d -n 7'
|
||||||
|
bind -n 'M-*' if-shell 'tmux join-pane -d -h -t :8' '' 'break-pane -t 8 -d -n 8'
|
||||||
|
bind -n 'M-(' if-shell 'tmux join-pane -d -h -t :9' '' 'break-pane -t 9 -d -n 9'
|
||||||
|
bind -n 'M-)' if-shell 'tmux join-pane -d -h -t :10' '' 'break-pane -t 10 -d -n 10'
|
||||||
|
|
||||||
|
|
||||||
|
set -g main-pane-width '$_tmux_other_pane_size'
|
||||||
|
set -g main-pane-height '100%'
|
||||||
|
|
||||||
|
|
||||||
|
# Swapping windows
|
||||||
|
bind -r "<" swap-window -d -t -1
|
||||||
|
bind -r ">" swap-window -d -t +1
|
||||||
|
|
||||||
|
|
||||||
|
# Windows splitting
|
||||||
|
bind -n M-Enter split-window -d -h -b -l $_tmux_other_pane_size -c "#{pane_current_path}"
|
||||||
|
bind -n M-t split-window -v -l 20% -c "#{pane_current_path}"
|
||||||
|
bind \\ split-window -h -c "#{pane_current_path}"
|
||||||
|
bind - split-window -v -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
|
||||||
|
bind -n M-q stash-pane
|
||||||
|
|
||||||
|
bind -n M-r default-layout
|
||||||
|
|
||||||
|
# Swap left pane
|
||||||
|
bind -n M-Tab swap-pane -t '{left-of}'
|
||||||
|
|
||||||
|
|
||||||
|
# Copy mode
|
||||||
|
setw -g mode-keys vi
|
||||||
|
bind v copy-mode
|
||||||
|
bind C-p choose-buffer
|
||||||
|
bind -T copy-mode-vi C-v {
|
||||||
|
send-keys -X rectangle-toggle
|
||||||
|
if -F '#{selection_active}' '' 'send-keys -X begin-selection'
|
||||||
|
}
|
||||||
|
|
||||||
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "copy"
|
||||||
|
|
||||||
|
bind MouseDrag1Pane copy-mode
|
||||||
|
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "copy"
|
||||||
|
|
||||||
|
bind -r p run-shell "pasta | tmux load-buffer - && tmux paste-buffer -p"
|
||||||
|
bind -r з run-shell "pasta | tmux load-buffer - && tmux paste-buffer -p"
|
||||||
|
bind -r P paste-buffer -p
|
||||||
|
|
||||||
|
|
||||||
|
## Toggle selection
|
||||||
|
bind -T copy-mode-vi v if -F '#{selection_active}' 'send-keys -X clear-selection' 'send-keys -X begin-selection'
|
||||||
|
|
||||||
|
bind -T copy-mode-vi Escape if -F '#{selection_active}' 'send-keys -X clear-selection' 'send-keys -X cancel'
|
||||||
|
|
||||||
|
bind -T copy-mode-vi C-c send-keys -X cancel
|
||||||
|
bind -T copy-mode-vi q send-keys -X cancel
|
||||||
|
|
||||||
|
|
||||||
|
bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 2 scroll-up
|
||||||
|
bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 2 scroll-down
|
||||||
|
|
||||||
|
## Search all files in buffer
|
||||||
|
bind-key f copy-mode \; send-keys -X search-backward \
|
||||||
|
'(^|/|\<|[[:space:]"])((\.|\.\.)|[[:alnum:]~_"-]*)((/[][[:alnum:]_.#$%&+=@"-]+)+([/ "]|\.([][[:alnum:]_.#$%&+=@"-]+(:[0-9]+)?(:[0-9]+)?)|[][[:alnum:]_.#$%&+=@"-]+(:[0-9]+)(:[0-9]+)?)|(/[][[:alnum:]_.#$%&+=@"-]+){2,}([/ "]|\.([][[:alnum:]_.#$%&+=@"-]+(:[0-9]+)?(:[0-9]+)?)|[][[:alnum:]_.#$%&+=@"-]+(:[0-9]+)(:[0-9]+)?)?|(\.|\.\.)/([][[:alnum:]_.#$%&+=@"-]+(:[0-9]+)?(:[0-9]+)?))'
|
||||||
|
|
||||||
|
|
||||||
|
# Session managment
|
||||||
|
bind a display-popup -EE -w 80% -h 80% -B '~/.config/tmux/scripts/attach_session.sh'
|
||||||
|
bind s display-popup -EE -w 80% -h 80% -B '~/.config/tmux/scripts/start_session.sh'
|
||||||
|
bind S display-popup -EE -w 40% -h 80% -B '~/.config/tmux/scripts/start_projects.sh'
|
||||||
39
home/user/.config/tmux/options.conf
Normal file
39
home/user/.config/tmux/options.conf
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# vim: ft=tmux
|
||||||
|
|
||||||
|
_tmux_display_panes_time=4000
|
||||||
|
_tmux_display_time=450
|
||||||
|
|
||||||
|
_tmux_main_pane_size="66%"
|
||||||
|
_tmux_other_pane_size="34%"
|
||||||
|
|
||||||
|
set -s exit-unattached off
|
||||||
|
set -s exit-empty off
|
||||||
|
|
||||||
|
set -g detach-on-destroy off
|
||||||
|
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
set -s escape-time 0
|
||||||
|
set -g repeat-time 400
|
||||||
|
|
||||||
|
set -g base-index 1
|
||||||
|
set -g pane-base-index 1
|
||||||
|
set -g renumber-windows on
|
||||||
|
|
||||||
|
set -g history-limit 10000
|
||||||
|
|
||||||
|
setw -g aggressive-resize on
|
||||||
|
|
||||||
|
set -g display-time $_tmux_display_time
|
||||||
|
set -g display-panes-time $_tmux_display_panes_time
|
||||||
|
|
||||||
|
set -g lock-command vlock
|
||||||
|
|
||||||
|
set -g focus-events on
|
||||||
|
|
||||||
|
set -g default-terminal "tmux-256color"
|
||||||
|
set -g terminal-overrides[101] "xterm-256color:Tc"
|
||||||
|
|
||||||
|
set-hook -g after-new-session[101] 'rename-window -t 1 1'
|
||||||
|
|
||||||
|
set -g update-environment "PATH DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM LANG LC_ALL COLORTERM EDITOR VISUAL SWAYSOCK WAYLAND_DISPLAY"
|
||||||
14
home/user/.config/tmux/plugins.conf
Normal file
14
home/user/.config/tmux/plugins.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# vim: ft=tmux
|
||||||
|
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'laktak/extrakto'
|
||||||
|
|
||||||
|
# Options
|
||||||
|
|
||||||
|
## extrakto
|
||||||
|
set -g @extrakto_popup_size '40%'
|
||||||
|
set -g @extrakto_key 'e'
|
||||||
|
set -g @extrakto_fzf_unset_default_opts "false"
|
||||||
|
set -g @extrakto_insert_key 'enter'
|
||||||
|
set -g @extrakto_copy_key 'tab'
|
||||||
|
set -g @extrakto_help_key 'ctrl-/'
|
||||||
1
home/user/.config/tmux/remote.conf
Normal file
1
home/user/.config/tmux/remote.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
# vim: ft=tmux
|
||||||
27
home/user/.config/tmux/scripts/attach_session.sh
Executable file
27
home/user/.config/tmux/scripts/attach_session.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
readonly tmux_list_sessions_script="${HOME}/.config/tmux/scripts/list_sessions.sh"
|
||||||
|
readonly tmux_kill_session_script="${HOME}/.config/tmux/scripts/kill_session.sh"
|
||||||
|
|
||||||
|
export FZF_DEFAULT_OPTS="\
|
||||||
|
${FZF_DEFAULT_OPTS}
|
||||||
|
--no-multi
|
||||||
|
--marker=''
|
||||||
|
--border=rounded
|
||||||
|
--border-label-pos=bottom
|
||||||
|
--border-label=' Attach session '
|
||||||
|
--color='border:blue,label:blue'
|
||||||
|
--preview-window=follow
|
||||||
|
--preview='tmux capture-pane -p -e -t {1}'
|
||||||
|
--bind
|
||||||
|
ctrl-x:execute\(${tmux_kill_session_script}\ {1}\)+reload\(${tmux_list_sessions_script}\),\
|
||||||
|
load:reload\(${tmux_list_sessions_script}\;sleep\ 1\)\
|
||||||
|
"
|
||||||
|
|
||||||
|
session_to_attach="$("${tmux_list_sessions_script}" | fzf | awk '{printf $1}')"
|
||||||
|
readonly session_to_attach
|
||||||
|
|
||||||
|
if [ -n "${session_to_attach}" ]; then
|
||||||
|
tmux switch-client -t "${session_to_attach}"
|
||||||
|
fi
|
||||||
7
home/user/.config/tmux/scripts/kill_session.sh
Executable file
7
home/user/.config/tmux/scripts/kill_session.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "${1}" = "landing" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux kill-session -t "${1}"
|
||||||
15
home/user/.config/tmux/scripts/list_sessions.sh
Executable file
15
home/user/.config/tmux/scripts/list_sessions.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
current_session="$(tmux display-message -p '#S')"
|
||||||
|
readonly current_session
|
||||||
|
|
||||||
|
last_session="$(tmux display-message -p '#{client_last_session}')"
|
||||||
|
readonly last_session
|
||||||
|
|
||||||
|
sessions="$(tmux list-session -F '#S#{?session_attached, (attached) , }')"
|
||||||
|
sessions="$(echo "${sessions}" | sed "s/^${current_session} /${current_session} (current) /")"
|
||||||
|
sessions="$(echo "${sessions}" | sed "s/^${last_session} /${last_session} (last) /")"
|
||||||
|
readonly sessions
|
||||||
|
|
||||||
|
echo "${sessions}"
|
||||||
35
home/user/.config/tmux/scripts/start_projects.sh
Executable file
35
home/user/.config/tmux/scripts/start_projects.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
export FZF_DEFAULT_OPTS="\
|
||||||
|
${FZF_DEFAULT_OPTS}
|
||||||
|
--no-multi
|
||||||
|
--marker=''
|
||||||
|
--border=rounded
|
||||||
|
--border-label-pos=bottom
|
||||||
|
--border-label=' Start session '
|
||||||
|
--color='border:grey,label:grey'
|
||||||
|
"
|
||||||
|
|
||||||
|
|
||||||
|
project_dir="$(find "${HOME}" -xdev -maxdepth 3 -type d -not -path '*/.*' | sed "s%^${HOME}%~%" | fzf | sed "s%^~%${HOME}%")"
|
||||||
|
readonly project_dir
|
||||||
|
|
||||||
|
|
||||||
|
if [ -z "${project_dir}" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "${project_dir}" ]; then
|
||||||
|
printf 'Directory "%s" not found' "${project_dir}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
session="$(basename "${project_dir}" | sed 's/\./_/g')"
|
||||||
|
|
||||||
|
if ! tmux has-session -t="${session}" 2>/dev/null; then
|
||||||
|
tmux new-session -d -n 1 -c "${project_dir}" -s "$(basename "${project_dir}")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux switch-client -t "${session}"
|
||||||
41
home/user/.config/tmux/scripts/start_session.sh
Executable file
41
home/user/.config/tmux/scripts/start_session.sh
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
readonly TMUX_SESSIONS="${HOME}/.tmux"
|
||||||
|
readonly EDITOR="nvim"
|
||||||
|
|
||||||
|
export FZF_DEFAULT_OPTS="\
|
||||||
|
${FZF_DEFAULT_OPTS}
|
||||||
|
--no-multi
|
||||||
|
--marker=''
|
||||||
|
--border=rounded
|
||||||
|
--border-label-pos=bottom
|
||||||
|
--border-label=' Start session '
|
||||||
|
--color='border:green,label:green'
|
||||||
|
--preview='highlight -O ansi '${TMUX_SESSIONS}/{1}''
|
||||||
|
--bind
|
||||||
|
ctrl-e:execute\(${EDITOR}\ \"${TMUX_SESSIONS}/{1}\"\)\
|
||||||
|
"
|
||||||
|
|
||||||
|
|
||||||
|
current_session="$(tmux display-message -p '#S')"
|
||||||
|
readonly current_session
|
||||||
|
|
||||||
|
existing_sessions="$(tmux list-session -F '#S')"
|
||||||
|
readonly existing_sessions
|
||||||
|
|
||||||
|
sessions="$(find "${TMUX_SESSIONS}/" -type f -executable -exec basename {} \;)"
|
||||||
|
sessions="$(echo "${sessions}" | sed "s/^${current_session}/${current_session} (current)/")"
|
||||||
|
|
||||||
|
for _s in $existing_sessions
|
||||||
|
do
|
||||||
|
sessions="$(echo "${sessions}" | sed "s/^${_s}/${_s} (created)/")"
|
||||||
|
done
|
||||||
|
readonly sessions
|
||||||
|
|
||||||
|
session_file="$(echo "${sessions}" | fzf | awk '{printf $1}')"
|
||||||
|
readonly session_file
|
||||||
|
|
||||||
|
if [ -n "${session_file}" ]; then
|
||||||
|
"${TMUX_SESSIONS}/${session_file}"
|
||||||
|
fi
|
||||||
51
home/user/.config/tmux/style.conf
Normal file
51
home/user/.config/tmux/style.conf
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# vim: ft=tmux
|
||||||
|
|
||||||
|
|
||||||
|
_tmux_color_inactive_background="terminal" # "colour236"
|
||||||
|
_tmux_color_inactive_foreground="colour247"
|
||||||
|
_tmux_color_main_background="terminal"
|
||||||
|
_tmux_color_border="colour12"
|
||||||
|
_tmux_color_menu="colour24"
|
||||||
|
_tmux_color_activity_style="colour239"
|
||||||
|
|
||||||
|
# misc
|
||||||
|
set -g bell-action none
|
||||||
|
set -g message-style "fg=black bg=white bold"
|
||||||
|
|
||||||
|
|
||||||
|
set -g window-style "fg=$_tmux_color_inactive_foreground,bg=$_tmux_color_inactive_background"
|
||||||
|
set -g window-active-style "fg=$_tmux_color_main_background,bg=$_tmux_color_main_background"
|
||||||
|
set -g mode-style "fg=default,bg=$_tmux_color_menu"
|
||||||
|
|
||||||
|
|
||||||
|
# status style
|
||||||
|
set -g status-style "bg=default,fg=white"
|
||||||
|
set -g status-justify absolute-centre
|
||||||
|
set -g status-left "[#S@#H]"
|
||||||
|
set -g status-left-length 60
|
||||||
|
set -g status-right "%d.%m.%Y %a %H:%M"
|
||||||
|
set -g status-right-length 200
|
||||||
|
set -g window-status-separator " "
|
||||||
|
set -g window-status-style "bg=colour236"
|
||||||
|
set -g window-status-current-style "bg=$_tmux_color_menu,fg=white bold"
|
||||||
|
set -g window-status-format "#W#{?window_flags,#{window_flags}, }"
|
||||||
|
set -g window-status-current-format "#W#{?window_flags,#{window_flags}, }"
|
||||||
|
set -g window-status-activity-style "bg=$_tmux_color_activity_style"
|
||||||
|
setw -g monitor-activity on
|
||||||
|
|
||||||
|
|
||||||
|
# window title style
|
||||||
|
set -g set-titles on
|
||||||
|
set -g set-titles-string "#S:#I.#P #W"
|
||||||
|
|
||||||
|
|
||||||
|
# clock style
|
||||||
|
setw -g clock-mode-colour white
|
||||||
|
setw -g clock-mode-style 24
|
||||||
|
|
||||||
|
|
||||||
|
# borders
|
||||||
|
set -g pane-border-lines double
|
||||||
|
set -g pane-border-indicators colour
|
||||||
|
set -g pane-border-style "bg=$_tmux_color_inactive_background"
|
||||||
|
set -g pane-active-border-style "bg=$_tmux_color_inactive_background,fg=$_tmux_color_border"
|
||||||
11
home/user/.config/tmux/tmux.conf
Normal file
11
home/user/.config/tmux/tmux.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# vim: ft=tmux
|
||||||
|
|
||||||
|
source-file "$HOME/.config/tmux/options.conf"
|
||||||
|
source-file "$HOME/.config/tmux/aliases.conf"
|
||||||
|
source-file "$HOME/.config/tmux/mappings.conf"
|
||||||
|
source-file "$HOME/.config/tmux/style.conf"
|
||||||
|
|
||||||
|
if-shell 'test -e "$HOME/.config/tmux/local.conf"' 'source-file "$HOME/.config/tmux/local.conf"'
|
||||||
|
|
||||||
|
source-file "$HOME/.config/tmux/plugins.conf"
|
||||||
|
run -b "$HOME/.config/tmux/plugins/tpm/tpm"
|
||||||
42
home/user/.config/waybar/config
Normal file
42
home/user/.config/waybar/config
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"layer": "bottom",
|
||||||
|
"position": "bottom",
|
||||||
|
"modules-left": [
|
||||||
|
"sway/workspaces",
|
||||||
|
"sway/mode",
|
||||||
|
],
|
||||||
|
"modules-center": [],
|
||||||
|
"modules-right": [
|
||||||
|
"sway/language",
|
||||||
|
"clock",
|
||||||
|
"tray"
|
||||||
|
],
|
||||||
|
"sway/workspaces": {
|
||||||
|
"disable-scroll": true
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"format": " {:%F %a %H:%M}",
|
||||||
|
"format-alt": " {:%A, %B %d, %Y (%R)}",
|
||||||
|
"tooltip-format": "<tt><small>{calendar}</small></tt>",
|
||||||
|
"calendar": {
|
||||||
|
"mode" : "year",
|
||||||
|
"mode-mon-col" : 3,
|
||||||
|
"weeks-pos" : "right",
|
||||||
|
"on-scroll" : 1,
|
||||||
|
"format": {
|
||||||
|
"months": "<span color='#ffead3'><b>{}</b></span>",
|
||||||
|
"days": "<span color='#ecc6d9'><b>{}</b></span>",
|
||||||
|
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
|
||||||
|
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
|
||||||
|
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"actions": {
|
||||||
|
"on-click-right": "mode",
|
||||||
|
"on-scroll-up": "tz_up",
|
||||||
|
"on-scroll-down": "tz_down",
|
||||||
|
"on-scroll-up": "shift_up",
|
||||||
|
"on-scroll-down": "shift_down"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
1
home/user/.config/zsh/.zlogout
Normal file
1
home/user/.config/zsh/.zlogout
Normal file
@ -0,0 +1 @@
|
|||||||
|
command -v clear >/dev/null && clear
|
||||||
11
home/user/.config/zsh/.zprofile
Normal file
11
home/user/.config/zsh/.zprofile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
if [[ "${TTY}" =~ /dev/tty* ]]; then
|
||||||
|
setterm -blength=0
|
||||||
|
setfont cyr-sun16
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${TTY}" = "/dev/tty1" ] && [ -z "${WAYLAND_DISPLAY}" ] && [ -z "${DISPLAY}" ]; then
|
||||||
|
wayland_dir="${XDG_STATE_HOME:-${HOME}/.local/state}/wayland"
|
||||||
|
mkdir -p "${wayland_dir}"
|
||||||
|
exec sway >> "${wayland_dir}/sway.log" 2>&1
|
||||||
|
fi
|
||||||
26
home/user/.config/zsh/.zshrc
Normal file
26
home/user/.config/zsh/.zshrc
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# .zshrc by TheK4n
|
||||||
|
# https://github.com/TheK4n/dotfiles
|
||||||
|
|
||||||
|
if \
|
||||||
|
[ "$(tty)" != "/dev/tty3" ] && \
|
||||||
|
command -v tmux &>/dev/null && \
|
||||||
|
[ -z "${TMUX}" ] && \
|
||||||
|
tmux -N -L "${USER}" list-sessions &>/dev/null
|
||||||
|
then
|
||||||
|
if [ -n "${SSH_CLIENT}" ]; then
|
||||||
|
exec tmux -N -L "${USER}" new-session
|
||||||
|
fi
|
||||||
|
exec tmux -N -L "${USER}" new-session -A
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "${ZDOTDIR}/sourcer" ]; then
|
||||||
|
source "${ZDOTDIR}/sourcer"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if \
|
||||||
|
command -v tmux &>/dev/null && \
|
||||||
|
[ -n "${TMUX}" ] && \
|
||||||
|
[ -n "${SSH_CLIENT}" ]
|
||||||
|
then
|
||||||
|
tmux source-file "${XDG_CONFIG_HOME}/tmux/remote.conf"
|
||||||
|
fi
|
||||||
43
home/user/.config/zsh/accept_line
Normal file
43
home/user/.config/zsh/accept_line
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
export ZCALC_HISTFILE="${HOME}/.zcalc_history"
|
||||||
|
|
||||||
|
autoload -U zcalc
|
||||||
|
|
||||||
|
function __format_number() {
|
||||||
|
local num="${1}"
|
||||||
|
local res
|
||||||
|
|
||||||
|
num="$(echo "${num}" | sed 's/\.$//')"
|
||||||
|
res="${num}"
|
||||||
|
|
||||||
|
if [[ "${num}" =~ ^[-]?[0-9]+$ ]]; then
|
||||||
|
res="$(LC_NUMERIC='en_US.UTF-8' printf "%'.20f\n" "${num}" | sed "s/,/_/g")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${res}" | sed 's/\.\([0-9]*[1-9]\)0*$/.\1/; s/\.0*$//'
|
||||||
|
}
|
||||||
|
|
||||||
|
function __calc {
|
||||||
|
local result
|
||||||
|
result="$(ZDOTDIR="${HOME}" zcalc -f -e "$*" 2>/dev/null)"
|
||||||
|
|
||||||
|
__format_number "${result}"
|
||||||
|
}
|
||||||
|
|
||||||
|
aliases[calc]='noglob __calc'
|
||||||
|
aliases[=]='noglob __calc'
|
||||||
|
|
||||||
|
|
||||||
|
function accept-line() {
|
||||||
|
if [[ ${BUFFER} =~ '^[ ]?\(?[-+]?[0-9]+[^a-zA-Z]+' ]]; then
|
||||||
|
echo
|
||||||
|
test "${BUFFER[1]}" != " " && print -S -- "${BUFFER}" # saving the command to history
|
||||||
|
__calc "${BUFFER}"
|
||||||
|
BUFFER=
|
||||||
|
fi
|
||||||
|
|
||||||
|
zle .${WIDGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N accept-line
|
||||||
|
|
||||||
|
# vim: ft=zsh
|
||||||
205
home/user/.config/zsh/aliases
Normal file
205
home/user/.config/zsh/aliases
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
# vim: ft=zsh
|
||||||
|
|
||||||
|
|
||||||
|
_d() { true ; }
|
||||||
|
_f() { true ; }
|
||||||
|
_a() { true ; }
|
||||||
|
|
||||||
|
|
||||||
|
alias ls='ls --classify=auto --human-readable'
|
||||||
|
alias ll='ls -l'
|
||||||
|
alias la='ls --almost-all'
|
||||||
|
alias lla='ls -l --almost-all'
|
||||||
|
alias l.='ls --almost-all --ignore="*"'
|
||||||
|
alias ll.='ls -l --almost-all --ignore="*"'
|
||||||
|
|
||||||
|
if command -v eza &>/dev/null; then
|
||||||
|
alias eza='eza --classify=auto'
|
||||||
|
alias ls='eza'
|
||||||
|
alias ll='eza --long'
|
||||||
|
alias la='eza --all'
|
||||||
|
alias lla='eza --long --all'
|
||||||
|
alias l.='_d() ( cd "${1:-.}" && eza --list-dirs .* ; ); _d'
|
||||||
|
alias ll.='_d() ( cd "${1:-.}" && eza --long --all --list-dirs .* ; ); _d'
|
||||||
|
|
||||||
|
alias tree='eza --tree'
|
||||||
|
fi
|
||||||
|
|
||||||
|
GREP_OPTIONS=(
|
||||||
|
--color=auto
|
||||||
|
--binary-files=without-match
|
||||||
|
--exclude-dir=.git
|
||||||
|
--exclude-dir=.svn
|
||||||
|
)
|
||||||
|
|
||||||
|
alias grep='grep $GREP_OPTIONS'
|
||||||
|
alias g='noglob grep $GREP_OPTIONS --dereference-recursive --line-number'
|
||||||
|
|
||||||
|
alias f='_f() { find . -name "*${1}*" }; noglob _f'
|
||||||
|
|
||||||
|
alias _='sudo'
|
||||||
|
alias root='sudo --login TMOUT=450'
|
||||||
|
|
||||||
|
alias rm='rm --interactive=once --verbose --recursive --one-file-system'
|
||||||
|
alias mkdir='mkdir --parents --verbose'
|
||||||
|
alias md='mkdir --parents --verbose'
|
||||||
|
|
||||||
|
alias q='exit 0'
|
||||||
|
|
||||||
|
alias path='echo -e ${PATH//:/\\n}'
|
||||||
|
|
||||||
|
alias dh='dirs -v'
|
||||||
|
alias pd='popd'
|
||||||
|
|
||||||
|
# shorts
|
||||||
|
alias c='clear'
|
||||||
|
alias h='history -d -D 0'
|
||||||
|
alias j='jobs -l'
|
||||||
|
|
||||||
|
alias zshrc='source "${ZDOTDIR}/.zshrc" >/dev/null'
|
||||||
|
|
||||||
|
if command -v colordiff &>/dev/null; then
|
||||||
|
alias diff='colordiff'
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias tar-it='tar -czf "../${PWD##*/}.tar.gz" .'
|
||||||
|
alias man='MANWIDTH=$((COLUMNS > 80 ? 80 : COLUMNS)) man'
|
||||||
|
|
||||||
|
# time
|
||||||
|
alias now='date +"%T"'
|
||||||
|
alias nowdate='date +"%d-%m-%Y"'
|
||||||
|
alias cal='cal --monday'
|
||||||
|
alias beeptime='beep -D 400 -l 400 -r "$(date +%I)" -f 440 -n -D 1000 -l 0 -n -D 800 -l 200 -f 880 -r "$(($(date +%M)/15+1))"'
|
||||||
|
|
||||||
|
# vim
|
||||||
|
alias vi='nvim'
|
||||||
|
alias svi="sudo --preserve-env nvim"
|
||||||
|
|
||||||
|
# git
|
||||||
|
for al in s d di co col cob ds u ps pst pl pr hs last lastd df amend br fuck sw swl swc swb
|
||||||
|
do
|
||||||
|
alias "g${al}"="git ${al}"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# net
|
||||||
|
alias ports='ss -tlnp'
|
||||||
|
alias wget='wget -c'
|
||||||
|
alias ip='ip -c'
|
||||||
|
alias fastping='ping -c 100 -i 0.1'
|
||||||
|
|
||||||
|
alias www='serveit'
|
||||||
|
|
||||||
|
# hardware
|
||||||
|
alias reboot='sudo /sbin/reboot'
|
||||||
|
alias poweroff='sudo /sbin/poweroff'
|
||||||
|
alias suspend='sudo systemctl suspend'
|
||||||
|
alias halt='sudo /sbin/halt'
|
||||||
|
alias shutdown='sudo /sbin/shutdown now'
|
||||||
|
|
||||||
|
alias meminfo='free -mlth'
|
||||||
|
|
||||||
|
# python
|
||||||
|
alias pipir='pip install -r requirements.txt'
|
||||||
|
alias pipar='pip list --not-required --format freeze | tee requirements.txt'
|
||||||
|
alias vd='deactivate'
|
||||||
|
|
||||||
|
|
||||||
|
# docker
|
||||||
|
alias dc='docker compose'
|
||||||
|
alias dcl='docker compose logs -f'
|
||||||
|
alias drmc='docker container prune'
|
||||||
|
alias drmi='docker image prune'
|
||||||
|
alias dpsa='docker ps -a'
|
||||||
|
|
||||||
|
alias gb='gobuild'
|
||||||
|
|
||||||
|
|
||||||
|
# tmux
|
||||||
|
alias dt='tmux detach'
|
||||||
|
|
||||||
|
# x11
|
||||||
|
alias caps='xdotool key Caps_Lock'
|
||||||
|
alias CAPS='xdotool key Caps_Lock'
|
||||||
|
|
||||||
|
alias colors='for i in {0..255}; do printf "\x1b[38;5;${i}mcolor${i} - ██████████\n"; done'
|
||||||
|
|
||||||
|
|
||||||
|
alias paste.thek4n.ru='curl --data-binary @- "https://paste.thek4n.ru/" 2>/dev/null'
|
||||||
|
alias pastewww='paste.thek4n.ru'
|
||||||
|
|
||||||
|
alias copy='tee /dev/stderr | \copy'
|
||||||
|
|
||||||
|
alias ssh='TERM=xterm-256color ssh'
|
||||||
|
alias sshn='ssh -S none'
|
||||||
|
|
||||||
|
alias black='magick canvas:none PNG:- | feh --class black -YFx -'
|
||||||
|
alias ex='extract'
|
||||||
|
|
||||||
|
# Notes
|
||||||
|
alias notes='note'
|
||||||
|
alias n='note'
|
||||||
|
alias ns='note sync'
|
||||||
|
alias ne='note edit'
|
||||||
|
alias nfe='note fe'
|
||||||
|
alias nfg='note fg'
|
||||||
|
alias ng='note git'
|
||||||
|
alias sn='mdpreview --browser --host localhost --port 0 "$(note --prefix)"'
|
||||||
|
|
||||||
|
|
||||||
|
# Cargo
|
||||||
|
alias cr='cargo run'
|
||||||
|
alias crr='cargo run --release'
|
||||||
|
alias cb='cargo build'
|
||||||
|
alias cbr='cargo build --release'
|
||||||
|
alias ct='cargo test'
|
||||||
|
alias cf='cargo fmt'
|
||||||
|
alias cl='cargo clippy --release'
|
||||||
|
|
||||||
|
|
||||||
|
alias p='player'
|
||||||
|
|
||||||
|
# :)
|
||||||
|
alias PINK='beep -f 233 -l 440 -n -f 349 -l 440 -n -f 196 -l 440 -n -f 330 -l 650'
|
||||||
|
|
||||||
|
alias -g L='2>&1 | $PAGER'
|
||||||
|
alias -g H='| head'
|
||||||
|
alias -g T='| tail'
|
||||||
|
alias -g HL='| highlight -O ansi -S '
|
||||||
|
alias -g JSON='| json HL json'
|
||||||
|
alias -g DI='| diff'
|
||||||
|
alias -g ?='| grep -i'
|
||||||
|
alias -g G='| grep -i'
|
||||||
|
alias -g C='| wc -l'
|
||||||
|
|
||||||
|
alias -g CO='--color=always'
|
||||||
|
|
||||||
|
alias -g ...='../..'
|
||||||
|
alias -g ....='../../..'
|
||||||
|
alias -g .3='../../..'
|
||||||
|
alias -g .....='../../../..'
|
||||||
|
alias -g .4='../../../..'
|
||||||
|
alias -g ......='../../../../..'
|
||||||
|
alias -g .5='../../../../..'
|
||||||
|
|
||||||
|
alias -g D="DISPLAY=:0.0"
|
||||||
|
alias -g XT="TERM=xterm"
|
||||||
|
alias -g GP="GOPROXY=direct"
|
||||||
|
|
||||||
|
alias -g DN=">/dev/null"
|
||||||
|
alias -g 2DN="2>/dev/null"
|
||||||
|
alias -g ADN="&>/dev/null"
|
||||||
|
alias -g BG="&>/dev/null &" # background
|
||||||
|
|
||||||
|
alias -g RED='2> >(while read line; do printf "\033[0;31m${line}\033[0m\n"; done)'
|
||||||
|
|
||||||
|
alias -g BEEP='&& beep -f 800 -l 250 -n -f 1000 -l 500 || beep -f 800 -l 250 -n -f 500 -l 500'
|
||||||
|
|
||||||
|
if [[ "${OSTYPE}" == "linux-android"* ]]; then
|
||||||
|
alias -g BEEP='&& termux-notification --sound --vibrate 500,1000,200'
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias -g WAKE='BEEP; notify-send --urgency normal Wake'
|
||||||
|
|
||||||
|
|
||||||
|
alias -g PROXY='http_proxy="socks5://${SOCKS5_SERVER:-localhost}"'
|
||||||
81
home/user/.config/zsh/autoenv
Normal file
81
home/user/.config/zsh/autoenv
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
: ${AUTOENV_AUTH_FILE:=~/.autoenv_auth}
|
||||||
|
: ${AUTOENV_FILE_ENTER:=.autoenv.zsh}
|
||||||
|
: ${AUTOENV_FILE_LEAVE:=.autoenv_leave.zsh}
|
||||||
|
: ${AUTOENV_DISABLED:=0}
|
||||||
|
: ${AUTOENV_HANDLE_LEAVE:=1}
|
||||||
|
|
||||||
|
|
||||||
|
_autoenv_hash_pair() {
|
||||||
|
local env_file="${1:A}"
|
||||||
|
|
||||||
|
if [ ! -s "${env_file}" ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local env_cksum=${${:-$(cksum "${env_file}")}[1]}
|
||||||
|
printf "%s:%s" "${env_file}" "${env_cksum}"
|
||||||
|
}
|
||||||
|
|
||||||
|
_autoenv_envfile_authorize() {
|
||||||
|
local env_cksum="$(_autoenv_hash_pair "${1}")"
|
||||||
|
|
||||||
|
local line
|
||||||
|
for line in $(<"${AUTOENV_AUTH_FILE}")
|
||||||
|
do
|
||||||
|
if [ "${line}" == "${env_cksum}" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
_autoenv_source_if_authorized() {
|
||||||
|
local file_to_source="${1}"
|
||||||
|
|
||||||
|
if [ ! -s "${file_to_source}" ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! _autoenv_envfile_authorize "${file_to_source}"; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
source "${file_to_source}"
|
||||||
|
}
|
||||||
|
|
||||||
|
_autoenv() {
|
||||||
|
_autoenv_source_if_authorized "${PWD}/${AUTOENV_FILE_ENTER}"
|
||||||
|
}
|
||||||
|
|
||||||
|
_autoenv_leave() {
|
||||||
|
_autoenv_source_if_authorized "${OLDPWD}/${AUTOENV_FILE_LEAVE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ "${AUTOENV_DISABLED}" != 1 ]]; then
|
||||||
|
autoload -U add-zsh-hook
|
||||||
|
add-zsh-hook chpwd _autoenv
|
||||||
|
|
||||||
|
if [[ "${AUTOENV_HANDLE_LEAVE}" == 1 ]]; then
|
||||||
|
add-zsh-hook chpwd _autoenv_leave
|
||||||
|
fi
|
||||||
|
|
||||||
|
_autoenv_source_if_authorized "${PWD}/${AUTOENV_FILE_ENTER}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
autoenv-auth() {
|
||||||
|
echo >> "${AUTOENV_AUTH_FILE}"
|
||||||
|
if [ -s "${PWD}/${AUTOENV_FILE_ENTER}" ]; then
|
||||||
|
_autoenv_hash_pair "${PWD}/${AUTOENV_FILE_ENTER}" >> "${AUTOENV_AUTH_FILE}"
|
||||||
|
echo >> "${AUTOENV_AUTH_FILE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -s "${PWD}/${AUTOENV_FILE_LEAVE}" ]; then
|
||||||
|
_autoenv_hash_pair "${PWD}/${AUTOENV_FILE_LEAVE}" >> "${AUTOENV_AUTH_FILE}"
|
||||||
|
echo >> "${AUTOENV_AUTH_FILE}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# vim: ft=zsh
|
||||||
92
home/user/.config/zsh/completion
Normal file
92
home/user/.config/zsh/completion
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
|
||||||
|
# enable completion features
|
||||||
|
# vim: ft=zsh
|
||||||
|
fpath=(~/.zfunc $fpath)
|
||||||
|
zmodload zsh/complist
|
||||||
|
setopt menucomplete
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit -d ~/.cache/zsh/.zcompdump
|
||||||
|
|
||||||
|
zstyle ':completion:*' use-cache on
|
||||||
|
zstyle ':completion:*' cache-path "${HOME}/.cache/zsh/.zcompcache"
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
zstyle ':completion:*' auto-description 'specify: %d'
|
||||||
|
zstyle ':completion:*' format 'Completing %d'
|
||||||
|
zstyle ':completion:*' group-name ''
|
||||||
|
zstyle ':completion:*' list-colors ''
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
|
||||||
|
zstyle ':completion:*' rehash true
|
||||||
|
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
||||||
|
zstyle ':completion:*' use-compctl false
|
||||||
|
zstyle ':completion:*' verbose true
|
||||||
|
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||||
|
zstyle ':completion:*:*:extract:*' file-patterns '*.tar* *.lzma *.bz2 *.zip *.7z'
|
||||||
|
zstyle ':completion:*' complete-options true
|
||||||
|
zstyle ':completion:*' squeeze-slashes true
|
||||||
|
|
||||||
|
zstyle ':completion:*:match:*' original only
|
||||||
|
zstyle ':completion:*:*:(eza|ls):*' file-sort modification
|
||||||
|
|
||||||
|
zstyle ':completion:*' completer _expand _complete _ignored _prefix _list
|
||||||
|
|
||||||
|
zstyle ':completion:*:correct:*' completer _correct
|
||||||
|
zstyle ':completion:*:approximate:*' completer _approximate
|
||||||
|
zstyle ':completion:*:correct:*' max-errors 1
|
||||||
|
zstyle ':completion:*:approximate:*' max-errors 1 numeric
|
||||||
|
|
||||||
|
|
||||||
|
zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)CVS'
|
||||||
|
zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS'
|
||||||
|
|
||||||
|
zstyle ':completion:*' squeeze-slashes true
|
||||||
|
|
||||||
|
zstyle ':completion:*:cd:*' ignore-parents parent pwd
|
||||||
|
|
||||||
|
zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f'
|
||||||
|
zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
bindkey -M menuselect '^h' vi-backward-char
|
||||||
|
bindkey -M menuselect '^k' vi-up-line-or-history
|
||||||
|
bindkey -M menuselect '^j' vi-down-line-or-history
|
||||||
|
bindkey -M menuselect '^l' vi-forward-char
|
||||||
|
bindkey -M menuselect '^e' undo
|
||||||
|
bindkey -M menuselect '^[' accept
|
||||||
|
bindkey -M menuselect '^M' check-command
|
||||||
|
bindkey -M menuselect '^I' accept-and-infer-next-history
|
||||||
|
bindkey '^l' menu-select
|
||||||
|
|
||||||
|
setopt AUTO_PARAM_SLASH
|
||||||
|
setopt COMPLETE_IN_WORD
|
||||||
|
unsetopt menucomplete
|
||||||
|
|
||||||
|
|
||||||
|
compdef _directories mcd
|
||||||
|
|
||||||
|
|
||||||
|
_gcim_completion() {
|
||||||
|
local -a commit_types
|
||||||
|
|
||||||
|
commit_types=(
|
||||||
|
'fix:Fix errors'
|
||||||
|
'feat:New features'
|
||||||
|
'chore:Routine chore'
|
||||||
|
'docs:Documentation changes'
|
||||||
|
'style:Code style'
|
||||||
|
'refactor:Refactoring'
|
||||||
|
'perf:Performance improvements'
|
||||||
|
'test:Add tests'
|
||||||
|
'revert:Revert changes'
|
||||||
|
'ci:CI/CD changes'
|
||||||
|
'build:Build system changes'
|
||||||
|
)
|
||||||
|
_describe 'commit message type in format CT1: "type(optional-scope): description"' commit_types -S ''
|
||||||
|
}
|
||||||
|
|
||||||
|
function _gcim() {
|
||||||
|
noglob git cim "${*}"
|
||||||
|
}
|
||||||
|
compdef _gcim_completion _gcim
|
||||||
|
|
||||||
|
alias gcim='noglob _gcim'
|
||||||
72
home/user/.config/zsh/functions
Normal file
72
home/user/.config/zsh/functions
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
# vim: ft=zsh
|
||||||
|
|
||||||
|
mcd() {
|
||||||
|
local dir
|
||||||
|
if [ -z "${1}" ]; then
|
||||||
|
dir="$(mktemp -ut "${USER:-user}.XXXX")"
|
||||||
|
else
|
||||||
|
dir="${1}"
|
||||||
|
fi
|
||||||
|
readonly dir
|
||||||
|
|
||||||
|
mkdir -p "${dir}" && cd "${dir}"
|
||||||
|
}
|
||||||
|
|
||||||
|
ve() {
|
||||||
|
local -r venv_name="${1:-venv}"
|
||||||
|
python3 -m venv "${venv_name}" && . "${venv_name}/bin/activate"
|
||||||
|
}
|
||||||
|
|
||||||
|
va() {
|
||||||
|
if [[ -v 1 ]]; then
|
||||||
|
if [[ -f "${1}/bin/activate" ]]; then
|
||||||
|
source "${1}/bin/activate"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
echo "va: error: virtual environment ${1} not found, use 'python3 -m venv ${1}'" >&2
|
||||||
|
return 1$
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -f "./venv/bin/activate" ]]; then
|
||||||
|
source "./venv/bin/activate"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
local activate_venv
|
||||||
|
activate_venv="$(find -P . -maxdepth 3 -type f -wholename '*/bin/activate' | sort | head -n 1)"
|
||||||
|
readonly activate_venv
|
||||||
|
|
||||||
|
if [[ -f "${activate_venv}" ]]; then
|
||||||
|
source "${activate_venv}"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo "va: error: virtual environment not found, use python3 -m venv venv" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
top-commands() {
|
||||||
|
local -r num_args="${1:-1}"
|
||||||
|
|
||||||
|
if ! [[ "${num_args}" =~ ^[1-9][0-9]*$ ]]; then
|
||||||
|
echo "error: usage: top-commands [N]" >&2
|
||||||
|
echo "error: N must be a positive non-zero integer." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
fc -l -n 1 | awk 'NF' | awk -v n="$num_args" '{
|
||||||
|
end = (NF < n) ? NF : n
|
||||||
|
for (i = 1; i <= end; i++) {
|
||||||
|
printf "%s%s", $i, (i == end ? "\n" : OFS)
|
||||||
|
}
|
||||||
|
}' | sort | uniq -c | sort -nr | sed 's/^[[:space:]]*//'
|
||||||
|
}
|
||||||
|
|
||||||
|
cargo-init() {
|
||||||
|
if [[ ! -v 1 ]]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cargo init "${1}" && cd "${1}" && \
|
||||||
|
return "${?}"
|
||||||
|
}
|
||||||
34
home/user/.config/zsh/history
Normal file
34
home/user/.config/zsh/history
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
# History configurations
|
||||||
|
export HISTFILE="$HOME/.zsh_history"
|
||||||
|
export HISTSIZE=100000
|
||||||
|
export SAVEHIST=$HISTSIZE
|
||||||
|
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
|
||||||
|
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
|
||||||
|
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
|
||||||
|
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
|
||||||
|
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
|
||||||
|
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
|
||||||
|
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
|
||||||
|
setopt HIST_REDUCE_BLANKS # Убирать лишние пробелы из командных строк, добавляемых в историю.
|
||||||
|
setopt HIST_NO_STORE # Не хранить записи о командах history.
|
||||||
|
|
||||||
|
|
||||||
|
export HISTSIZE=100000
|
||||||
|
export HISTFILESIZE="${HISTSIZE}"
|
||||||
|
export HISTCONTROL=ignoreboth:erasedups
|
||||||
|
export HISTTIMEFORMAT="%F %T "
|
||||||
|
export HISTIGNORE="&:l[lsa\.]:[bf]g:exit:q:clear:c:history:h"
|
||||||
|
export HISTORY_IGNORE='(cd|c|q|exit|l[sal.]|[bf]g#( *)#|..|lsl|ll[a.]|cd ..)'
|
||||||
|
|
||||||
|
# configure `time` format
|
||||||
|
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
||||||
|
|
||||||
|
zshaddhistory() {
|
||||||
|
emulate -L zsh
|
||||||
|
## uncomment if HISTORY_IGNORE
|
||||||
|
## should use EXTENDED_GLOB syntax
|
||||||
|
setopt extendedglob
|
||||||
|
[[ ${1::-1} != ${~HISTORY_IGNORE} ]]
|
||||||
|
}
|
||||||
0
home/user/.config/zsh/hosts/.gitkeep
Normal file
0
home/user/.config/zsh/hosts/.gitkeep
Normal file
125
home/user/.config/zsh/mappings
Normal file
125
home/user/.config/zsh/mappings
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
# vim: ft=zsh
|
||||||
|
|
||||||
|
KEYTIMEOUT=1
|
||||||
|
# Activate vim mode.
|
||||||
|
bindkey -v
|
||||||
|
|
||||||
|
bindkey -M visual 'i' vi-insert
|
||||||
|
bindkey -M visual 'a' vi-add-next
|
||||||
|
|
||||||
|
|
||||||
|
# Yank to the system clipboard
|
||||||
|
function vi-yank-xclip {
|
||||||
|
zle vi-yank
|
||||||
|
echo -n "$CUTBUFFER" | \copy
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N vi-yank-xclip
|
||||||
|
bindkey -M visual 'y' vi-yank-xclip
|
||||||
|
|
||||||
|
|
||||||
|
bindkey ' ' magic-space
|
||||||
|
|
||||||
|
bindkey '^K' up-line-or-history # C-k
|
||||||
|
bindkey -M vicmd '^K' up-line-or-history # C-k
|
||||||
|
|
||||||
|
bindkey '^J' down-line-or-history # C-j
|
||||||
|
bindkey -M vicmd '^J' down-line-or-history # C-j
|
||||||
|
|
||||||
|
bindkey '^U' kill-whole-line # C-u
|
||||||
|
bindkey -M vicmd '^U' kill-whole-line # C-u
|
||||||
|
|
||||||
|
bindkey -M viins '\e.' insert-last-word # M-.
|
||||||
|
|
||||||
|
bindkey '^[[Z' reverse-menu-complete # S-Tab
|
||||||
|
|
||||||
|
|
||||||
|
bindkey -M viins '`' autosuggest-accept
|
||||||
|
bindkey -M vicmd '`' autosuggest-accept
|
||||||
|
|
||||||
|
bindkey -M viins '^?' backward-delete-char
|
||||||
|
bindkey -M vicmd '^?' backward-delete-char
|
||||||
|
|
||||||
|
bindkey -M viins '^W' backward-delete-word
|
||||||
|
bindkey -M vicmd '^W' backward-delete-word
|
||||||
|
|
||||||
|
bindkey -M viins '^H' backward-delete-char
|
||||||
|
bindkey -M vicmd '^H' backward-delete-char
|
||||||
|
|
||||||
|
|
||||||
|
insert-sudo() {
|
||||||
|
local sudo_template="${SUDO:=sudo} "
|
||||||
|
local template_len="${#sudo_template}"
|
||||||
|
|
||||||
|
if [ -z "${LBUFFER}${RBUFFER}" ]; then
|
||||||
|
zle up-history
|
||||||
|
if [ ! "${LBUFFER::$template_len}" = "$sudo_template" ]; then
|
||||||
|
LBUFFER="${sudo_template}${LBUFFER}"
|
||||||
|
fi
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${LBUFFER::$template_len}" = "$sudo_template" ]; then
|
||||||
|
LBUFFER="${LBUFFER:$template_len}"
|
||||||
|
else
|
||||||
|
LBUFFER="${sudo_template}${LBUFFER}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N insert-sudo
|
||||||
|
|
||||||
|
bindkey -M vicmd '^S' insert-sudo # C-s
|
||||||
|
bindkey -M viins '^S' insert-sudo # C-s
|
||||||
|
|
||||||
|
|
||||||
|
popdquiet() {
|
||||||
|
popd &>/dev/null
|
||||||
|
zle reset-prompt
|
||||||
|
}
|
||||||
|
zle -N popdquiet
|
||||||
|
bindkey "^P" popdquiet
|
||||||
|
bindkey -M vicmd "^P" popdquiet
|
||||||
|
|
||||||
|
|
||||||
|
cddotdot() {
|
||||||
|
cd ..
|
||||||
|
zle reset-prompt
|
||||||
|
}
|
||||||
|
zle -N cddotdot
|
||||||
|
bindkey "^O" cddotdot
|
||||||
|
bindkey -M vicmd "^O" cddotdot
|
||||||
|
|
||||||
|
fzfhistory() {
|
||||||
|
local cmd
|
||||||
|
cmd=$(fc -il 1 | \
|
||||||
|
awk '{
|
||||||
|
original = $0;
|
||||||
|
clean = $0;
|
||||||
|
sub(/^[ ]*[0-9]+[ ]+[0-9]{4}-[0-9]{2}-[0-9]{2}[ ]+[0-9]{2}:[0-9]{2}[ ]*/, "", clean);
|
||||||
|
print clean "\t" original
|
||||||
|
}' | \
|
||||||
|
fzf \
|
||||||
|
--ignore-case \
|
||||||
|
--scheme=history \
|
||||||
|
--no-multi \
|
||||||
|
--tac \
|
||||||
|
--tiebreak=begin,index \
|
||||||
|
--height="$((${LINES}/4))" \
|
||||||
|
--query="${BUFFER}" \
|
||||||
|
--delimiter=$'\t' \
|
||||||
|
--with-nth=1 \
|
||||||
|
--preview="echo {2} | sed 's/\\\n/\\n/g' | highlight -O ansi -S zsh" \
|
||||||
|
--preview-window=wrap:30%:50% | \
|
||||||
|
cut -f1 | sed 's/\\n/\n/g')
|
||||||
|
|
||||||
|
if [[ -n "${cmd}" ]]; then
|
||||||
|
BUFFER="${cmd}"
|
||||||
|
CURSOR=$#BUFFER
|
||||||
|
fi
|
||||||
|
|
||||||
|
zle reset-prompt
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N fzfhistory
|
||||||
|
bindkey "^R" fzfhistory
|
||||||
|
bindkey -M vicmd "^R" fzfhistory
|
||||||
52
home/user/.config/zsh/options
Normal file
52
home/user/.config/zsh/options
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
|
||||||
|
setopt interactivecomments # allow comments in interactive mode
|
||||||
|
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
|
||||||
|
setopt nonomatch # hide error message if there is no match for the pattern
|
||||||
|
setopt notify # report the status of background jobs immediately
|
||||||
|
setopt numericglobsort # sort filenames numerically when it makes sense
|
||||||
|
setopt promptsubst # enable command substitution in prompt
|
||||||
|
setopt noflowcontrol # disable C-s mapping
|
||||||
|
setopt autocd
|
||||||
|
|
||||||
|
DIRSTACKSIZE=8
|
||||||
|
setopt autopushd
|
||||||
|
setopt pushdignoredups
|
||||||
|
|
||||||
|
WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word
|
||||||
|
|
||||||
|
# hide EOL sign ('%')
|
||||||
|
PROMPT_EOL_MARK=""
|
||||||
|
|
||||||
|
|
||||||
|
# Change cursor shape for different vi modes.
|
||||||
|
zle-keymap-select() {
|
||||||
|
if [[ ${KEYMAP} == vicmd ]] || [[ $1 = 'block' ]]; then
|
||||||
|
echo -ne '\e[2 q'
|
||||||
|
elif [[ ${KEYMAP} == main ]] || [[ ${KEYMAP} == viins ]] ||
|
||||||
|
[[ ${KEYMAP} = '' ]] || [[ $1 = 'beam' ]]; then
|
||||||
|
echo -ne '\e[5 q'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N zle-keymap-select
|
||||||
|
|
||||||
|
# Use beam shape cursor on startup.
|
||||||
|
echo -ne '\e[5 q'
|
||||||
|
|
||||||
|
_fix_cursor() {
|
||||||
|
echo -ne '\e[5 q'
|
||||||
|
}
|
||||||
|
|
||||||
|
precmd_functions+=(_fix_cursor)
|
||||||
|
|
||||||
|
# Set cursor style (DECSCUSR), VT520.
|
||||||
|
# 0 -> blinking block.
|
||||||
|
# 1 -> blinking block (default).
|
||||||
|
# 2 -> steady block.
|
||||||
|
# 3 -> blinking underline.
|
||||||
|
# 4 -> steady underline.
|
||||||
|
# 5 -> blinking bar, xterm.
|
||||||
|
# 6 -> steady bar, xterm.
|
||||||
|
|
||||||
|
|
||||||
|
zle_highlight=('paste:bg=24,fg=15', 'region:bg=24,fg=15') # colors of visual select
|
||||||
@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
|
# vim: ft=zsh
|
||||||
|
|
||||||
# enable color support of ls, less and man, and also add handy aliases
|
# enable color support of ls, less and man, and also add handy aliases
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
@ -14,12 +16,4 @@ if [ -x /usr/bin/dircolors ]; then
|
|||||||
# Take advantage of $LS_COLORS for completion as well
|
# Take advantage of $LS_COLORS for completion as well
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# enable auto-suggestions based on the history
|
|
||||||
if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
|
|
||||||
. /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
||||||
# change suggestion color
|
|
||||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999'
|
|
||||||
fi
|
|
||||||
18
home/user/.config/zsh/plugin
Normal file
18
home/user/.config/zsh/plugin
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
# vim ft=zsh
|
||||||
|
|
||||||
|
|
||||||
|
install_if_not_exists() {
|
||||||
|
local path="${HOME}/.config/zsh/plugins/${1}"
|
||||||
|
if [ ! -d "${path}" ]; then
|
||||||
|
/usr/bin/git clone "https://github.com/${1}" "${path}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install_if_not_exists zsh-users/zsh-autosuggestions
|
||||||
|
install_if_not_exists zsh-users/zsh-syntax-highlighting
|
||||||
|
install_if_not_exists hlissner/zsh-autopair
|
||||||
|
|
||||||
|
_so "${HOME}/.config/zsh/plugins/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||||
|
_so "${HOME}/.config/zsh/plugins/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||||
|
_so "${HOME}/.config/zsh/plugins/hlissner/zsh-autopair/autopair.zsh"
|
||||||
@ -1,9 +1,4 @@
|
|||||||
|
|
||||||
# set variable identifying the chroot you work in (used in the prompt below)
|
|
||||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
|
||||||
debian_chroot=$(cat /etc/debian_chroot)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
case "$TERM" in
|
case "$TERM" in
|
||||||
xterm-color|*-256color) color_prompt=yes;;
|
xterm-color|*-256color) color_prompt=yes;;
|
||||||
@ -42,7 +37,49 @@ zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
precmd() { vcs_info }
|
get_current_time() {
|
||||||
|
date +%s
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
preexec() {
|
||||||
|
timer=$(get_current_time)
|
||||||
|
}
|
||||||
|
|
||||||
|
precmd() {
|
||||||
|
unset formatted_elapsed_time
|
||||||
|
vcs_info
|
||||||
|
|
||||||
|
# Print the previously configured title
|
||||||
|
print -Pnr -- "$TERM_TITLE"
|
||||||
|
|
||||||
|
# Print a new line before the prompt, but only if it is not the first line
|
||||||
|
if [ "$NEWLINE_BEFORE_PROMPT" = yes ]; then
|
||||||
|
if [ -z "$_NEW_LINE_BEFORE_PROMPT" ]; then
|
||||||
|
_NEW_LINE_BEFORE_PROMPT=1
|
||||||
|
else
|
||||||
|
print ""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $timer ]; then
|
||||||
|
now=$(get_current_time)
|
||||||
|
elapsed_seconds=$(($now-$timer))
|
||||||
|
local seconds_in_minute=60
|
||||||
|
|
||||||
|
if ((elapsed_seconds >= 1)); then
|
||||||
|
if ((elapsed_seconds >= seconds_in_minute)); then
|
||||||
|
local minuts="$((elapsed_seconds / seconds_in_minute))"
|
||||||
|
local seconds="$((elapsed_seconds % seconds_in_minute))"
|
||||||
|
export formatted_elapsed_time="${minuts}m${seconds}s"
|
||||||
|
else
|
||||||
|
export formatted_elapsed_time="${elapsed_seconds}s"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset timer
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
zstyle ':vcs_info:*' actionformats \
|
zstyle ':vcs_info:*' actionformats \
|
||||||
'-%F{5}(%F{2}%b%F{3}|%F{1}%a%F{5})-%F{5}]%F{3}%u%c%F{5}]%F{3}%f '
|
'-%F{5}(%F{2}%b%F{3}|%F{1}%a%F{5})-%F{5}]%F{3}%u%c%F{5}]%F{3}%f '
|
||||||
@ -67,18 +104,19 @@ configure_prompt() {
|
|||||||
[ "$EUID" -eq 0 ] && prompt_symbol=💀
|
[ "$EUID" -eq 0 ] && prompt_symbol=💀
|
||||||
[[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]] && prompt_symbol='📡'
|
[[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]] && prompt_symbol='📡'
|
||||||
|
|
||||||
|
_bottom_prompt="$(tput cup 999 0)"
|
||||||
|
|
||||||
case "$PROMPT_ALTERNATIVE" in
|
case "$PROMPT_ALTERNATIVE" in
|
||||||
twoline)
|
twoline)
|
||||||
PROMPT=$'%F{%(#.blue.green)}┌──${debian_chroot:+($debian_chroot)─}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))─}(%B%F{%(#.red.blue)}%n$prompt_symbol%m%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}] $(vcs_info_wrapper)%b%F{%(#.blue.green)}\n└─%B%(#.%F{red}#.%F{blue}$)%b%F{reset} '
|
PROMPT=$'%{${_bottom_prompt}%}%F{%(#.blue.green)}┌──${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))─}(%B%F{%(#.red.blue)}%n$prompt_symbol%M%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}] $(vcs_info_wrapper)%b%F{%(#.blue.green)}\n└─%B%(#.%F{red}#.%F{blue}$)%b%F{reset} '
|
||||||
RPROMPT=$'%(?.. %? %F{red}%B⨯%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)'
|
RPROMPT=$'%F{cyan}${formatted_elapsed_time}%F{reset}%(?.. %? %F{red}%B⨯%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)'
|
||||||
;;
|
;;
|
||||||
oneline)
|
oneline)
|
||||||
PROMPT=$'${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{%(#.red.blue)}%n@%m%b%F{reset}:%B%F{%(#.blue.green)}%~%b%F{reset}%(#.#.$) '
|
PROMPT=$'%{${_bottom_prompt}%}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{%(#.red.blue)}%n@%m%b%F{reset}:%B%F{%(#.blue.green)}%~%b%F{reset}%(#.#.$) '
|
||||||
RPROMPT=
|
RPROMPT=
|
||||||
;;
|
;;
|
||||||
backtrack)
|
backtrack)
|
||||||
PROMPT=$'${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{red}%n@%m%b%F{reset}:%B%F{blue}%~%b%F{reset}%(#.#.$) '
|
PROMPT=$'%{${_bottom_prompt}%}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{red}%n@%m%b%F{reset}:%B%F{blue}%~%b%F{reset}%(#.#.$) '
|
||||||
RPROMPT=
|
RPROMPT=
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -86,10 +124,8 @@ configure_prompt() {
|
|||||||
|
|
||||||
# The following block is surrounded by two delimiters.
|
# The following block is surrounded by two delimiters.
|
||||||
# These delimiters must not be modified. Thanks.
|
# These delimiters must not be modified. Thanks.
|
||||||
# START KALI CONFIG VARIABLES
|
|
||||||
PROMPT_ALTERNATIVE=twoline
|
PROMPT_ALTERNATIVE=twoline
|
||||||
NEWLINE_BEFORE_PROMPT=yes
|
NEWLINE_BEFORE_PROMPT=yes
|
||||||
# STOP KALI CONFIG VARIABLES
|
|
||||||
|
|
||||||
if [ "$color_prompt" = yes ]; then
|
if [ "$color_prompt" = yes ]; then
|
||||||
# override default virtualenv indicator in prompt
|
# override default virtualenv indicator in prompt
|
||||||
@ -144,7 +180,7 @@ if [ "$color_prompt" = yes ]; then
|
|||||||
ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout
|
ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PROMPT='${debian_chroot:+($debian_chroot)}%n@%m:%~%# '
|
PROMPT='%n@%m:%~%# '
|
||||||
fi
|
fi
|
||||||
unset color_prompt force_color_prompt
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
@ -163,25 +199,12 @@ bindkey ^P toggle_oneline_prompt
|
|||||||
# If this is an xterm set the title to user@host:dir
|
# If this is an xterm set the title to user@host:dir
|
||||||
case "$TERM" in
|
case "$TERM" in
|
||||||
xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty)
|
xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty)
|
||||||
TERM_TITLE=$'\e]0;${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%n@%m: %~\a'
|
TERM_TITLE=$'\e]0;${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%n@%m: %~\a'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
precmd() {
|
|
||||||
# Print the previously configured title
|
|
||||||
print -Pnr -- "$TERM_TITLE"
|
|
||||||
|
|
||||||
# Print a new line before the prompt, but only if it is not the first line
|
|
||||||
if [ "$NEWLINE_BEFORE_PROMPT" = yes ]; then
|
|
||||||
if [ -z "$_NEW_LINE_BEFORE_PROMPT" ]; then
|
|
||||||
_NEW_LINE_BEFORE_PROMPT=1
|
|
||||||
else
|
|
||||||
print ""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
PS2="> "
|
PS2="> "
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user