Compare commits
945 Commits
1.0.1
...
feature/po
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8c581db297 | ||
![]() |
04bc3f60e4 | ||
![]() |
8ffd3159c8 | ||
![]() |
b19b0bea4b | ||
![]() |
07bee26ddb | ||
![]() |
6dc97a5628 | ||
![]() |
59e47dbbd6 | ||
![]() |
e6d0512ff4 | ||
![]() |
6587a149ce | ||
![]() |
f80a1d616d | ||
![]() |
c391b6abf8 | ||
![]() |
f6d57eae4c | ||
![]() |
06531dd6cc | ||
![]() |
4c2a4993ef | ||
![]() |
572739360e | ||
![]() |
d87802918d | ||
![]() |
e5b2ef8155 | ||
![]() |
7149b4ab24 | ||
![]() |
db61f2d937 | ||
![]() |
19aefd68e0 | ||
![]() |
9fb72c95b1 | ||
![]() |
ec8b0fdc22 | ||
![]() |
1e98cfc29d | ||
![]() |
e92bc37308 | ||
![]() |
14021fbf67 | ||
![]() |
1562096889 | ||
![]() |
c84d13118a | ||
![]() |
bec547bbda | ||
![]() |
724006ef3a | ||
![]() |
ef60bf8a59 | ||
![]() |
44080c25da | ||
![]() |
6fa6d05123 | ||
![]() |
1d1971f7cc | ||
![]() |
eb113125b5 | ||
![]() |
c298bd2b5a | ||
![]() |
e1f1907e46 | ||
![]() |
5d1b1d6598 | ||
![]() |
7375dd78bf | ||
![]() |
e4540afcb5 | ||
![]() |
2490417b85 | ||
![]() |
9a3521d05c | ||
![]() |
32fba15d75 | ||
![]() |
23e2f7018b | ||
![]() |
eeb5cc9ecb | ||
![]() |
4a65034713 | ||
![]() |
3418e6bf3f | ||
![]() |
dbd614783f | ||
![]() |
cf15be6414 | ||
![]() |
87dae12d9b | ||
![]() |
3b5c35f806 | ||
![]() |
cf72e880d5 | ||
![]() |
0bcdb8c9b2 | ||
![]() |
e71fa554d3 | ||
![]() |
2ff2b4c082 | ||
![]() |
2b83e34c3f | ||
![]() |
9af4d29bbf | ||
![]() |
c3337b5682 | ||
![]() |
045598bcd5 | ||
![]() |
32806c956d | ||
![]() |
046c800295 | ||
![]() |
0cbbc94b2d | ||
![]() |
4d9d073997 | ||
![]() |
f0412438b4 | ||
![]() |
44d8be7822 | ||
![]() |
6bc73c1c23 | ||
![]() |
2d3dc5016d | ||
![]() |
5864765ed1 | ||
![]() |
022dedb1dd | ||
![]() |
3e3c27cde3 | ||
![]() |
93b7fe8d49 | ||
![]() |
68c3d23bfe | ||
![]() |
8fe1bc7772 | ||
![]() |
d640ebfce7 | ||
![]() |
1ae096daf5 | ||
![]() |
46354a971c | ||
![]() |
af6f56d2dc | ||
![]() |
fbc630f1d5 | ||
![]() |
e1e9b08442 | ||
![]() |
b0ba86623b | ||
![]() |
a798b736b6 | ||
![]() |
3dc68314f9 | ||
![]() |
5c40258265 | ||
![]() |
1529d90918 | ||
![]() |
56493b4eec | ||
![]() |
974cd13fae | ||
![]() |
d8ad4b874f | ||
![]() |
b532a9891d | ||
![]() |
294ba3b89f | ||
![]() |
c908b00a38 | ||
![]() |
56f4f679e4 | ||
![]() |
ba46c4ff97 | ||
![]() |
980ae6a237 | ||
![]() |
1a57dd9a5e | ||
![]() |
c9810838a1 | ||
![]() |
e60f7cffea | ||
![]() |
c8b169b6a0 | ||
![]() |
81c0c52902 | ||
![]() |
4d697d9cdc | ||
![]() |
307c9bc2d1 | ||
![]() |
7436825c93 | ||
![]() |
d680a58d04 | ||
![]() |
71af27be24 | ||
![]() |
2ce4bbdb82 | ||
![]() |
085485dcfc | ||
![]() |
e7188ca693 | ||
![]() |
4cf795619d | ||
![]() |
588fe1a0dc | ||
![]() |
18ae403188 | ||
![]() |
de8e674027 | ||
![]() |
625f775464 | ||
![]() |
4980c4a35e | ||
![]() |
c09d8b07e4 | ||
![]() |
a34acfb0b5 | ||
![]() |
9f694fd198 | ||
![]() |
4349c4f9dd | ||
![]() |
68395fd91c | ||
![]() |
482de09dcc | ||
![]() |
f075f3a927 | ||
![]() |
00cbd59a4e | ||
![]() |
cbfe1a4141 | ||
![]() |
d44247affb | ||
![]() |
4f1adbc358 | ||
![]() |
a362d704c2 | ||
![]() |
6e2631aa3c | ||
![]() |
4bcdcdea6a | ||
![]() |
f9d7cba452 | ||
![]() |
fb0c476c7f | ||
![]() |
afd7ec47bf | ||
![]() |
06ba71fa67 | ||
![]() |
539d916ae3 | ||
![]() |
6d49644151 | ||
![]() |
4a3877a5fa | ||
![]() |
12efd46dd7 | ||
![]() |
e255cb6727 | ||
![]() |
8e0828aa3b | ||
![]() |
ecbf8a7aed | ||
![]() |
93743cc4c5 | ||
![]() |
34dee0e9ef | ||
![]() |
261befaf7f | ||
![]() |
5410895d0a | ||
![]() |
319b506260 | ||
![]() |
6a8de98bbd | ||
![]() |
9aaac4f356 | ||
![]() |
e9911f3de8 | ||
![]() |
d76dcc9682 | ||
![]() |
6a32f41de4 | ||
![]() |
273d0e2ee4 | ||
![]() |
ce9b137c13 | ||
![]() |
dab65cd8f0 | ||
![]() |
50d53ba77f | ||
![]() |
a285e7ebe9 | ||
![]() |
231060ee5b | ||
![]() |
f693312dce | ||
![]() |
6d2dd55a96 | ||
![]() |
46430e3ec6 | ||
![]() |
d1d020ff80 | ||
![]() |
bc04c87042 | ||
![]() |
dc31e28e16 | ||
![]() |
30a9529940 | ||
![]() |
7c9887237b | ||
![]() |
a090725633 | ||
![]() |
1e694aa65f | ||
![]() |
7f771cb5da | ||
![]() |
20e73a060b | ||
![]() |
3cbb2efa4b | ||
![]() |
39aef1be43 | ||
![]() |
e526dfdda0 | ||
![]() |
c321e51a8f | ||
![]() |
43b4ae3986 | ||
![]() |
8eb14ee96a | ||
![]() |
b76154d046 | ||
![]() |
6fa0ec8ddd | ||
![]() |
c924d91440 | ||
![]() |
e9edc4891c | ||
![]() |
015faa4491 | ||
![]() |
844f03ebc1 | ||
![]() |
2663bfc574 | ||
![]() |
93743a6fa2 | ||
![]() |
74ef2b3a8f | ||
![]() |
b5854eec66 | ||
![]() |
06b235d4ea | ||
![]() |
98d530921f | ||
![]() |
d40fc42e15 | ||
![]() |
78a0d993c4 | ||
![]() |
51f14984d7 | ||
![]() |
096556ef1a | ||
![]() |
26d2acd0fd | ||
![]() |
be09586239 | ||
![]() |
ef238dc94d | ||
![]() |
24e42c1c8a | ||
![]() |
b9d3ddd7c0 | ||
![]() |
1f70fde0e2 | ||
![]() |
07e1d44e7d | ||
![]() |
5f83fa9ba5 | ||
![]() |
a6b318ef87 | ||
![]() |
02aa99f301 | ||
![]() |
36b4264135 | ||
![]() |
4b737f61bf | ||
![]() |
8e11cd0dc4 | ||
![]() |
1b0a2680f6 | ||
![]() |
87d7589d7d | ||
![]() |
d499e338ab | ||
![]() |
3458246fbf | ||
![]() |
75ac498c9d | ||
![]() |
8723fb549b | ||
![]() |
f952c9e569 | ||
![]() |
d62e42ed12 | ||
![]() |
72d5dc7a8f | ||
![]() |
fc84732fd0 | ||
![]() |
cf2353b5a6 | ||
![]() |
fab67177b3 | ||
![]() |
4b51013380 | ||
![]() |
e7d66d36ee | ||
![]() |
3045a424b9 | ||
![]() |
d56db46b67 | ||
![]() |
bfe8d8f039 | ||
![]() |
8ab59cc914 | ||
![]() |
15adc5b96b | ||
![]() |
dd32a6f954 | ||
![]() |
eb96ad08b8 | ||
![]() |
0442bd8b6b | ||
![]() |
5d37e720c7 | ||
![]() |
aa53b7b14d | ||
![]() |
046bee95c3 | ||
![]() |
0c53a7a114 | ||
![]() |
46b8e1ca6e | ||
![]() |
a4f12cbdd8 | ||
![]() |
fe0346ea63 | ||
![]() |
1406e3bea5 | ||
![]() |
e0344eaa72 | ||
![]() |
4eea5c17cc | ||
![]() |
6101213537 | ||
![]() |
c71714e0c2 | ||
![]() |
ef6dc65a20 | ||
![]() |
525aa91cbf | ||
![]() |
b29ec9d936 | ||
![]() |
94595a3324 | ||
![]() |
a9afdac847 | ||
![]() |
39f65c0e2b | ||
![]() |
1aa23c239c | ||
![]() |
b6fb4ba828 | ||
![]() |
9ce8612f54 | ||
![]() |
1419646e9c | ||
![]() |
464ba631cb | ||
![]() |
d709a7de20 | ||
![]() |
80627807f5 | ||
![]() |
cbee0f8f33 | ||
![]() |
f34d9b57f6 | ||
![]() |
969427bf5b | ||
![]() |
adc62fc71b | ||
![]() |
0baef33cf6 | ||
![]() |
0f1f05d379 | ||
![]() |
157ea9a116 | ||
![]() |
3cc1146954 | ||
![]() |
d2ae2a0b1d | ||
![]() |
89701595fb | ||
![]() |
3f573c6d61 | ||
![]() |
6a20ac5932 | ||
![]() |
34a94306ca | ||
![]() |
9adf85cbde | ||
![]() |
18ddc4da01 | ||
![]() |
76e6186d54 | ||
![]() |
b3984244f8 | ||
![]() |
ef385a29f3 | ||
![]() |
1e59d89494 | ||
![]() |
f7c02dc52f | ||
![]() |
bf3ea4e358 | ||
![]() |
07be0f826f | ||
![]() |
21dd05415e | ||
![]() |
ef4b7f8b01 | ||
![]() |
9d57c1f841 | ||
![]() |
6b0801eef6 | ||
![]() |
145e2a45b0 | ||
![]() |
92519e31e8 | ||
![]() |
cb60322517 | ||
![]() |
11c3195c48 | ||
![]() |
5f6c498f90 | ||
![]() |
c7dfbff27f | ||
![]() |
e67f8964a1 | ||
![]() |
7db6862f4f | ||
![]() |
ff58059770 | ||
![]() |
64c96e38c7 | ||
![]() |
f7c0876e83 | ||
![]() |
9b5ae88fe4 | ||
![]() |
87011ddb18 | ||
![]() |
ab4551d22f | ||
![]() |
fc6b590965 | ||
![]() |
91dd44b6ba | ||
![]() |
d7fc4b9277 | ||
![]() |
006a61a242 | ||
![]() |
bafea4cef1 | ||
![]() |
437a2141ff | ||
![]() |
aff4d46abc | ||
![]() |
8460f869a0 | ||
![]() |
05683dad2e | ||
![]() |
1c9302cb7a | ||
![]() |
33e39a8068 | ||
![]() |
d4992fe00a | ||
![]() |
be0cfbce2d | ||
![]() |
7574338d3a | ||
![]() |
a692377c0a | ||
![]() |
1e956287c0 | ||
![]() |
ca76a46372 | ||
![]() |
6f314d44b4 | ||
![]() |
cce00a26a3 | ||
![]() |
64b012ac65 | ||
![]() |
29a77f74de | ||
![]() |
0c1b83ecb7 | ||
![]() |
58a2ac4f35 | ||
![]() |
5f9a6f7a31 | ||
![]() |
b72def92ce | ||
![]() |
0b849d21e8 | ||
![]() |
03029e22dc | ||
![]() |
b87dfdab9c | ||
![]() |
1bdef2f519 | ||
![]() |
f4daa29040 | ||
![]() |
cd9f3042bd | ||
![]() |
139cff181f | ||
![]() |
d642966ba8 | ||
![]() |
dc98778439 | ||
![]() |
5d0454a22f | ||
![]() |
2420518c60 | ||
![]() |
90b27a3e85 | ||
![]() |
b2284aa970 | ||
![]() |
3ad2a7f518 | ||
![]() |
b029d1fbb3 | ||
![]() |
2df52c8e37 | ||
![]() |
fea76528cd | ||
![]() |
0d8310670b | ||
![]() |
e43df230f3 | ||
![]() |
231f537b0d | ||
![]() |
2a396325f2 | ||
![]() |
7fe35cdec3 | ||
![]() |
e702e461ac | ||
![]() |
f7e3011b8c | ||
![]() |
45e637a2a6 | ||
![]() |
a4dca21c22 | ||
![]() |
40c3d68336 | ||
![]() |
9f2815d73b | ||
![]() |
52f2112abd | ||
![]() |
efe01c94d4 | ||
![]() |
0a5c526941 | ||
![]() |
0c7ca8586b | ||
![]() |
b1c361080a | ||
![]() |
b1d5aa68f3 | ||
![]() |
4dd1c26563 | ||
![]() |
c38cccdb44 | ||
![]() |
558e86dd78 | ||
![]() |
463730fe1b | ||
![]() |
79bcdeb89d | ||
![]() |
a84afd5b10 | ||
![]() |
2e99c023bb | ||
![]() |
98a1d8a0f1 | ||
![]() |
72f2f93657 | ||
![]() |
9ea909af33 | ||
![]() |
f37d7d09ec | ||
![]() |
d180b94bd9 | ||
![]() |
f5dc41589d | ||
![]() |
4f562357d5 | ||
![]() |
91b58f0100 | ||
![]() |
8795783d16 | ||
![]() |
be0f2e67bb | ||
![]() |
2270ea5d0d | ||
![]() |
73f2b44c73 | ||
![]() |
dafaaeb2a4 | ||
![]() |
791ab4e94a | ||
![]() |
333c8b387b | ||
![]() |
6da72654ba | ||
![]() |
57d56261ed | ||
![]() |
83aaca7f6b | ||
![]() |
394454aee2 | ||
![]() |
b1d4aad618 | ||
![]() |
77e0a7fe19 | ||
![]() |
52990b5bbe | ||
![]() |
7e69d6c03f | ||
![]() |
6f83fafc66 | ||
![]() |
eab147bd88 | ||
![]() |
0c5a9775ec | ||
![]() |
0df6d85571 | ||
![]() |
03d5df306c | ||
![]() |
c4dcd3febc | ||
![]() |
7c289b7d0c | ||
![]() |
48ef1c596a | ||
![]() |
8c677e8ef0 | ||
![]() |
bd8ea9c4e1 | ||
![]() |
9df95e8b8d | ||
![]() |
e654929d1e | ||
![]() |
f1b37a8cbd | ||
![]() |
f922caff78 | ||
![]() |
68173fb5b6 | ||
![]() |
53f320e0b9 | ||
![]() |
dfec4f7eb1 | ||
![]() |
e8d9ae9e8e | ||
![]() |
d727489d4a | ||
![]() |
619a395b65 | ||
![]() |
1fb5bf2a4b | ||
![]() |
656e2fafc9 | ||
![]() |
3af5eb286d | ||
![]() |
3945d5c29e | ||
![]() |
afefc5b0f1 | ||
![]() |
b66f2c591a | ||
![]() |
e12c51f98f | ||
![]() |
8690436629 | ||
![]() |
0eadd9b3a4 | ||
![]() |
1d6d367c39 | ||
![]() |
1e46a4dc74 | ||
![]() |
7aeb3dc44c | ||
![]() |
6968e08f2f | ||
![]() |
40ea2b6175 | ||
![]() |
367d55b04b | ||
![]() |
2864ae409a | ||
![]() |
e477848b59 | ||
![]() |
26dacc7984 | ||
![]() |
a3d8ac782a | ||
![]() |
acd0b8031e | ||
![]() |
9543eba753 | ||
![]() |
738aee9465 | ||
![]() |
dc826b8454 | ||
![]() |
8bd6ed242f | ||
![]() |
d96e238550 | ||
![]() |
e1948dcb08 | ||
![]() |
7e0680ff75 | ||
![]() |
45d413a1ba | ||
![]() |
a46bb911c9 | ||
![]() |
f4cad2a1e3 | ||
![]() |
ba10ff6ced | ||
![]() |
089fe469a5 | ||
![]() |
f39323071a | ||
![]() |
85d6653261 | ||
![]() |
c7c063ada5 | ||
![]() |
6a866dec54 | ||
![]() |
d52d8cc34f | ||
![]() |
70774c3431 | ||
![]() |
da22daf1f3 | ||
![]() |
918f4bbf94 | ||
![]() |
065dad7ce3 | ||
![]() |
032c317c7e | ||
![]() |
80735aefaa | ||
![]() |
39bd27ec25 | ||
![]() |
f57b02849a | ||
![]() |
da98afe154 | ||
![]() |
bbb1429c8e | ||
![]() |
9a1e66620b | ||
![]() |
d527347bdc | ||
![]() |
efc772d687 | ||
![]() |
7fcd94fda5 | ||
![]() |
5a46aad268 | ||
![]() |
c66dcbca9a | ||
![]() |
72bedf856d | ||
![]() |
3d9d2524a2 | ||
![]() |
8848f8cbea | ||
![]() |
f5318c9807 | ||
![]() |
de42816a01 | ||
![]() |
1acc948fbc | ||
![]() |
7174904434 | ||
![]() |
b5ab41de9d | ||
![]() |
86582466cf | ||
![]() |
cc05da2f59 | ||
![]() |
2b9598c84f | ||
![]() |
7f9ccabf77 | ||
![]() |
2249c4538d | ||
![]() |
fb630a7d33 | ||
![]() |
28e5141079 | ||
![]() |
d29579e0a5 | ||
![]() |
dcd8191bfb | ||
![]() |
5b4269fc1f | ||
![]() |
1fc62a54da | ||
![]() |
4c8d8412b8 | ||
![]() |
6cb66a6b72 | ||
![]() |
7c36021642 | ||
![]() |
3622eeb279 | ||
![]() |
a82632fc63 | ||
![]() |
3d55b232a9 | ||
![]() |
d68ca6226c | ||
![]() |
9d5ac9142b | ||
![]() |
87a4c6934d | ||
![]() |
7b67a4988e | ||
![]() |
f0404299ac | ||
![]() |
894c7b7a69 | ||
![]() |
bcabd5d65b | ||
![]() |
ffab720b50 | ||
![]() |
57d430ae36 | ||
![]() |
49613ec470 | ||
![]() |
7c1f92db5b | ||
![]() |
329e821440 | ||
![]() |
046eaa05cd | ||
![]() |
7c0a431472 | ||
![]() |
1b2e7ab57b | ||
![]() |
ea78de7909 | ||
![]() |
dae728d04a | ||
![]() |
6578065024 | ||
![]() |
8f22bc63ff | ||
![]() |
1ed7fa5f73 | ||
![]() |
c9f7b81796 | ||
![]() |
4f259481f4 | ||
![]() |
3143f11d4b | ||
![]() |
520ea7683b | ||
![]() |
ba1471e397 | ||
![]() |
a00998b1e3 | ||
![]() |
cbb60668e3 | ||
![]() |
1a0c99a763 | ||
![]() |
0275669be1 | ||
![]() |
e741989128 | ||
![]() |
0adc44907c | ||
![]() |
7a2aac9d79 | ||
![]() |
3899fcf596 | ||
![]() |
f3df35662b | ||
![]() |
20c93600e1 | ||
![]() |
1ab00452b0 | ||
![]() |
c0bfec035f | ||
![]() |
712b2e0e69 | ||
![]() |
eb576a6217 | ||
![]() |
06180c3517 | ||
![]() |
8b07fb9037 | ||
![]() |
b34dc4e928 | ||
![]() |
7a07382d30 | ||
![]() |
2ffe639024 | ||
![]() |
8dc05e7ace | ||
![]() |
4c5cb36503 | ||
![]() |
8fdaaf592d | ||
![]() |
6b4c697dd0 | ||
![]() |
e2a767fbec | ||
![]() |
7fe9230b5f | ||
![]() |
1d088b2e1d | ||
![]() |
e63d8ee5b5 | ||
![]() |
e3d42651b7 | ||
![]() |
42c04d062e | ||
![]() |
ca54bf89d6 | ||
![]() |
772413a9c3 | ||
![]() |
bbd7b3fc93 | ||
![]() |
98120062eb | ||
![]() |
637a8fecaa | ||
![]() |
ad53b7034d | ||
![]() |
896c6fd6a1 | ||
![]() |
dbaf02f884 | ||
![]() |
79857af79c | ||
![]() |
53206855f4 | ||
![]() |
6298c6c9cc | ||
![]() |
318efcc3fd | ||
![]() |
2567f5006e | ||
![]() |
fd648d3850 | ||
![]() |
ac34350392 | ||
![]() |
8df691a52d | ||
![]() |
11f8e33fdf | ||
![]() |
7de111726b | ||
![]() |
5a12521b58 | ||
![]() |
ad196c4d6b | ||
![]() |
17a877c693 | ||
![]() |
0c3e03a81b | ||
![]() |
163117d4fb | ||
![]() |
4c8ae68027 | ||
![]() |
ed771f4ae4 | ||
![]() |
9d5c7b6230 | ||
![]() |
b85b786dcc | ||
![]() |
7904be6d5c | ||
![]() |
df5d2d8c0e | ||
![]() |
a556f1afa9 | ||
![]() |
61fe293af8 | ||
![]() |
3ac264ea99 | ||
![]() |
32111fe5a4 | ||
![]() |
dff590e7df | ||
![]() |
bc27f3c205 | ||
![]() |
4c820d9f67 | ||
![]() |
8e6f1962e0 | ||
![]() |
59521772af | ||
![]() |
099b3cea88 | ||
![]() |
e1b3911546 | ||
![]() |
7bf3ccdda3 | ||
![]() |
029d83ad5b | ||
![]() |
5da49257dc | ||
![]() |
b529a5b14a | ||
![]() |
fcb823bb2f | ||
![]() |
69acc58487 | ||
![]() |
50e6dfd863 | ||
![]() |
0843103eda | ||
![]() |
a52bf9959d | ||
![]() |
fbea226894 | ||
![]() |
e6db6a9726 | ||
![]() |
05b0694776 | ||
![]() |
d6c98a345c | ||
![]() |
bf84cb3153 | ||
![]() |
c98268c287 | ||
![]() |
a48246d3e3 | ||
![]() |
ad35946adb | ||
![]() |
3de9a1dd9d | ||
![]() |
6aa77a30a8 | ||
![]() |
376a7edd6f | ||
![]() |
e22cc5b6c7 | ||
![]() |
a7e6ff2374 | ||
![]() |
4cae4d2d6f | ||
![]() |
9d3cd94ca0 | ||
![]() |
9e379363d0 | ||
![]() |
e6b1793348 | ||
![]() |
ae36d7f955 | ||
![]() |
af9036ec24 | ||
![]() |
6a4ad3f92a | ||
![]() |
954049a251 | ||
![]() |
78efb69287 | ||
![]() |
49d9cee349 | ||
![]() |
da711e2421 | ||
![]() |
b2dd812f3f | ||
![]() |
39df46ff5e | ||
![]() |
45801d9ff0 | ||
![]() |
17db80f54c | ||
![]() |
a0cfff7395 | ||
![]() |
650ff78b92 | ||
![]() |
7c0e22e33f | ||
![]() |
48170b9ad7 | ||
![]() |
1626443290 | ||
![]() |
670d948ab0 | ||
![]() |
b5f533a83b | ||
![]() |
31d7c736b0 | ||
![]() |
268a1bdbff | ||
![]() |
c0b12f1627 | ||
![]() |
76e69ecc25 | ||
![]() |
bae786c3af | ||
![]() |
701bf25c69 | ||
![]() |
fc551d265b | ||
![]() |
4e428e79c1 | ||
![]() |
da1e38d751 | ||
![]() |
303023d90f | ||
![]() |
e4d710d5ae | ||
![]() |
3f5064c28c | ||
![]() |
00cc80036c | ||
![]() |
2f3e59b80c | ||
![]() |
ce125d4c1f | ||
![]() |
31baab1b34 | ||
![]() |
c442a0fceb | ||
![]() |
bd84ad9cfc | ||
![]() |
15f9195da6 | ||
![]() |
1743b7d46d | ||
![]() |
496240dfe1 | ||
![]() |
cb6cf4f886 | ||
![]() |
655a5f9027 | ||
![]() |
aff8253831 | ||
![]() |
1113378617 | ||
![]() |
6230c189fa | ||
![]() |
ca153cca93 | ||
![]() |
362c48953e | ||
![]() |
754b18066f | ||
![]() |
d8b1d2b684 | ||
![]() |
5593fdfe5a | ||
![]() |
315a6a0541 | ||
![]() |
0e53a36f99 | ||
![]() |
477d276639 | ||
![]() |
406f57e61b | ||
![]() |
4d5aba930f | ||
![]() |
2eb5a33b93 | ||
![]() |
f0f152e21f | ||
![]() |
696fb6ad7f | ||
![]() |
a66c82d84c | ||
![]() |
f134e9d13b | ||
![]() |
6eedd8b4f7 | ||
![]() |
162aa3e5d0 | ||
![]() |
c1e2db9a2e | ||
![]() |
3b802d1d49 | ||
![]() |
81ecd3f031 | ||
![]() |
a646ae8227 | ||
![]() |
21991b8479 | ||
![]() |
079cb6e54a | ||
![]() |
3f493c0472 | ||
![]() |
059f5bea26 | ||
![]() |
e1745c0362 | ||
![]() |
08e5a01a89 | ||
![]() |
5e0fccae5d | ||
![]() |
ac87e8f144 | ||
![]() |
4cbc665cd3 | ||
![]() |
d11598077d | ||
![]() |
7197b5bb39 | ||
![]() |
543a10884d | ||
![]() |
6c8bcb8d7c | ||
![]() |
7ec0b0ad7e | ||
![]() |
e885fa0033 | ||
![]() |
97e6ed076a | ||
![]() |
e3d693cfcd | ||
![]() |
a06d983b97 | ||
![]() |
eb691d5174 | ||
![]() |
5922e1b5a9 | ||
![]() |
f9e000ef23 | ||
![]() |
eb5e77ffd6 | ||
![]() |
8ae3d3b792 | ||
![]() |
e36fa9216b | ||
![]() |
58d3273f3d | ||
![]() |
0f6cfb95cc | ||
![]() |
d2e5f25c8d | ||
![]() |
6529d3b909 | ||
![]() |
eeb87d3434 | ||
![]() |
fe8b0a2027 | ||
![]() |
4be9043f10 | ||
![]() |
65df97e8bf | ||
![]() |
9f3b4b0072 | ||
![]() |
e35e92fdbd | ||
![]() |
9c87cb2774 | ||
![]() |
3bd45bc627 | ||
![]() |
3b9ce890dc | ||
![]() |
a6688ffc44 | ||
![]() |
94128f7dbf | ||
![]() |
9a451bd93c | ||
![]() |
3dd930d1e5 | ||
![]() |
462ceb578c | ||
![]() |
b958668853 | ||
![]() |
1ae333f0ed | ||
![]() |
0baf62a261 | ||
![]() |
f35f75bd30 | ||
![]() |
e34ff1c86e | ||
![]() |
89500c97c6 | ||
![]() |
d9225a73ef | ||
![]() |
5f75f66852 | ||
![]() |
7e6011a0a9 | ||
![]() |
9608ef95ae | ||
![]() |
ab637704de | ||
![]() |
ed7c68a388 | ||
![]() |
f8f2df0d65 | ||
![]() |
ea70936454 | ||
![]() |
4849fb55ac | ||
![]() |
fb2f6674ad | ||
![]() |
dc2f9c332d | ||
![]() |
42218a3172 | ||
![]() |
6965d81c79 | ||
![]() |
74c66d91cc | ||
![]() |
08c02c2b8f | ||
![]() |
05ead51322 | ||
![]() |
deac0cfb0a | ||
![]() |
087d7a7d0e | ||
![]() |
e755c84b27 | ||
![]() |
1a07a55fa9 | ||
![]() |
192a640e6c | ||
![]() |
ccc081adba | ||
![]() |
336d883b03 | ||
![]() |
61e357b5da | ||
![]() |
407f781af0 | ||
![]() |
4250967d5a | ||
![]() |
c0785ac045 | ||
![]() |
c57b5a3603 | ||
![]() |
4d423de14b | ||
![]() |
ca4f9be6ee | ||
![]() |
a144a47836 | ||
![]() |
afcb4c3a73 | ||
![]() |
2846125c23 | ||
![]() |
25ce34a2fc | ||
![]() |
e1226afad8 | ||
![]() |
ead90abf94 | ||
![]() |
5bf6b06917 | ||
![]() |
e892f045f5 | ||
![]() |
00cfd67996 | ||
![]() |
c1c473c097 | ||
![]() |
969b74adda | ||
![]() |
7e6f872983 | ||
![]() |
b50522c5b1 | ||
![]() |
6a887ebdea | ||
![]() |
d7433092ff | ||
![]() |
d670579db8 | ||
![]() |
3389c512e2 | ||
![]() |
703f6131d4 | ||
![]() |
f3ab1e043b | ||
![]() |
78e537ac71 | ||
![]() |
b1851316de | ||
![]() |
812d2a4bcd | ||
![]() |
997d2dd39f | ||
![]() |
39c40bc315 | ||
![]() |
16f8b237d5 | ||
![]() |
7013d81686 | ||
![]() |
daaa1fd352 | ||
![]() |
87ca8e7566 | ||
![]() |
0e4160622f | ||
![]() |
47037d9619 | ||
![]() |
564360e9fa | ||
![]() |
91e692c76b | ||
![]() |
ce31232015 | ||
![]() |
6c46696bd4 | ||
![]() |
40c8d20513 | ||
![]() |
6b6e448e76 | ||
![]() |
f73a2c8420 | ||
![]() |
c6605c68cf | ||
![]() |
153c5e7b91 | ||
![]() |
548e248515 | ||
![]() |
4a51232b9d | ||
![]() |
4da8f97bf7 | ||
![]() |
bfd363107d | ||
![]() |
6a2948e8a5 | ||
![]() |
16d5531035 | ||
![]() |
5870f6b987 | ||
![]() |
557ba01eac | ||
![]() |
fd2234fae4 | ||
![]() |
21bfb6faae | ||
![]() |
b904235653 | ||
![]() |
36740e4b3e | ||
![]() |
7c74dcca71 | ||
![]() |
8827b37ef3 | ||
![]() |
6631cd25a9 | ||
![]() |
1d59d8d643 | ||
![]() |
c5ff1f2513 | ||
![]() |
f0851a949c | ||
![]() |
332607765e | ||
![]() |
7e676938ee | ||
![]() |
7a706305c1 | ||
![]() |
df9b8d974e | ||
![]() |
e7f0db4107 | ||
![]() |
031eaf7e9f | ||
![]() |
4078094e33 | ||
![]() |
c8ab5eb4ba | ||
![]() |
2c1fb05920 | ||
![]() |
48b3d3f7bd | ||
![]() |
68a2d95b72 | ||
![]() |
89beeb427b | ||
![]() |
d45b8e29dc | ||
![]() |
7cb14dfbf3 | ||
![]() |
19381a5528 | ||
![]() |
4a9ced9478 | ||
![]() |
51e86149bc | ||
![]() |
f9647a5476 | ||
![]() |
92b4315da7 | ||
![]() |
5003d6fa9b | ||
![]() |
4140a06d53 | ||
![]() |
3cf480d724 | ||
![]() |
2a467f2a26 | ||
![]() |
d695c3f734 | ||
![]() |
8c2c53cdcd | ||
![]() |
0f064360a4 | ||
![]() |
998c9bdf28 | ||
![]() |
393f45d1d3 | ||
![]() |
e8a8c0ed56 | ||
![]() |
c4db31bdf0 | ||
![]() |
40b521ce09 | ||
![]() |
c5f1764dfa | ||
![]() |
0196cc323a | ||
![]() |
c8ca073875 | ||
![]() |
0e23aae082 | ||
![]() |
c6292ee34a | ||
![]() |
470541d5f8 | ||
![]() |
5152c0ee6e | ||
![]() |
9b97bd9ea6 | ||
![]() |
3f4b5241eb | ||
![]() |
324e4d83c6 | ||
![]() |
eb49a4859f | ||
![]() |
8086a56b7d | ||
![]() |
bb357f23e6 | ||
![]() |
bdf607e907 | ||
![]() |
b8eb341d62 | ||
![]() |
9060cffbff | ||
![]() |
08d8a90555 | ||
![]() |
d7ef767a18 | ||
![]() |
549e9c3a48 | ||
![]() |
1c51db9078 | ||
![]() |
524fe93d1c | ||
![]() |
4bb6f89a22 | ||
![]() |
3185bc068a | ||
![]() |
c2b8304991 | ||
![]() |
03f4cd5bbe | ||
![]() |
3b4e02525d | ||
![]() |
b8b588e727 | ||
![]() |
f77610e6a1 | ||
![]() |
7007cbefc5 | ||
![]() |
2419511da4 | ||
![]() |
07f74e478b | ||
![]() |
b038d2a065 | ||
![]() |
86a92cf836 | ||
![]() |
38b4521023 | ||
![]() |
2c7f20df63 | ||
![]() |
e014c2bc95 | ||
![]() |
3e9b93dcad | ||
![]() |
d8da8d3b31 | ||
![]() |
ce99f4da23 | ||
![]() |
5207428abd | ||
![]() |
b846b29ff1 | ||
![]() |
1a482e3c8c | ||
![]() |
1e0f7259c1 | ||
![]() |
e6dbd5ea13 | ||
![]() |
6b0f3fc0dd | ||
![]() |
c9bf5c1937 | ||
![]() |
0f0c86af0f | ||
![]() |
ce937065c9 | ||
![]() |
acf6bd9317 | ||
![]() |
19d58a3a05 | ||
![]() |
cf8e78073a | ||
![]() |
86c5715853 | ||
![]() |
4e75cfb047 | ||
![]() |
159d2b63f0 | ||
![]() |
5a2299d8dc | ||
![]() |
83ae169fb7 | ||
![]() |
5c6e42b811 | ||
![]() |
cd57efd89b | ||
![]() |
28bad9ed42 | ||
![]() |
ddfcd57c6b | ||
![]() |
4b4fc7fc3f | ||
![]() |
16c4378c2e | ||
![]() |
9dc026695b | ||
![]() |
c65d68d816 | ||
![]() |
3983107be5 | ||
![]() |
56391169ff | ||
![]() |
ac5c5f6648 | ||
![]() |
778d1df1ba | ||
![]() |
fbe2451a3c | ||
![]() |
5a56ea823f | ||
![]() |
5d5d8de92e | ||
![]() |
086ab8bb35 | ||
![]() |
dc016d9270 | ||
![]() |
8f1795339e | ||
![]() |
4fb65d7025 | ||
![]() |
93daf8707e | ||
![]() |
50885a7e78 | ||
![]() |
ea60bb6db5 | ||
![]() |
4281d97c3d | ||
![]() |
364536b8ea | ||
![]() |
2585ab9f45 | ||
![]() |
7969bd007d | ||
![]() |
5d135afe5e | ||
![]() |
a4fa9b225e | ||
![]() |
eac62fb605 | ||
![]() |
ab679ddf9d | ||
![]() |
f4cef736be | ||
![]() |
2179176881 | ||
![]() |
26f70ccd31 | ||
![]() |
0ff7a42f9b | ||
![]() |
58da4fcd90 | ||
![]() |
20170f0a7d | ||
![]() |
d90829928b | ||
![]() |
6f913538e8 | ||
![]() |
7dfbe884ff | ||
![]() |
3a115f91ae | ||
![]() |
4c218b55bd | ||
![]() |
94cd3ed907 | ||
![]() |
b0bde4fecf | ||
![]() |
b930b96066 | ||
![]() |
2df4920344 | ||
![]() |
ce9c80a02f | ||
![]() |
e599562ec1 | ||
![]() |
b8b81bd907 | ||
![]() |
22e5462fbc | ||
![]() |
72d2007267 | ||
![]() |
3c5b49324c | ||
![]() |
3f37ef6e28 | ||
![]() |
35cfcce748 | ||
![]() |
d288048ed4 | ||
![]() |
a30671b08c | ||
![]() |
2f2afecb6d | ||
![]() |
072249d5d4 | ||
![]() |
a6b9b1ffbb | ||
![]() |
d8c516c13c | ||
![]() |
b763703d70 | ||
![]() |
ecaf413fa4 | ||
![]() |
48e01750e5 | ||
![]() |
5ec8c076a3 | ||
![]() |
c620b299bd | ||
![]() |
496cb4d340 |
3
.gitattributes
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*.py linguist-detectable=true
|
||||
*.json liguist-detectable=false
|
||||
*.c linguist-detectable=true
|
37
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: rbreaves
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Install Type:** Bare Metal or VM
|
||||
**Distro:** Name + Version
|
||||
**DE:** Gnome, XFCE, KDE
|
||||
**Branch:** master, dev
|
||||
**Commit:** git rev-parse --short HEAD
|
||||
|
||||
Logs and status if relevant
|
||||
```
|
||||
# xkeysnail
|
||||
sudo systemctl status xkeysnail
|
||||
sudo journalctl --unit=xkeysnail.service -b
|
||||
|
||||
# xkb
|
||||
systemctl --user status keyswap
|
||||
journalctl --user-unit=keyswap.service -b
|
||||
```
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: rbreaves
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
10
.github/ISSUE_TEMPLATE/gratitude.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Gratitude
|
||||
about: Just wants to give a shout out!
|
||||
title: ''
|
||||
labels: gratitude
|
||||
assignees: rbreaves
|
||||
|
||||
---
|
||||
|
||||
|
10
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Question
|
||||
about: Question about Kinto functionality
|
||||
title: ''
|
||||
labels: question
|
||||
assignees: rbreaves
|
||||
|
||||
---
|
||||
|
||||
|
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
.env/
|
||||
.DS_Store
|
||||
__pycache__/
|
||||
xkeysnail/
|
||||
keybindings_*
|
||||
mutter_*
|
||||
|
@@ -1,5 +0,0 @@
|
||||
partial modifier_keys
|
||||
xkb_symbols "swap_lalt_lctrl" {
|
||||
replace key <LALT> { [ Control_L, Control_L ] };
|
||||
replace key <LCTL> { [ Alt_L, Meta_L ] };
|
||||
};
|
@@ -1,32 +0,0 @@
|
||||
default partial xkb_symbols "mac_levelssym" {
|
||||
// LEFT to Begin Line
|
||||
replace key <LEFT> {
|
||||
type[Group1]= "ONE_LEVEL_CTRL",
|
||||
symbols[Group1]= [ Left, Left, NoSymbol ],
|
||||
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<HOME>,clearmods=Control)]
|
||||
};
|
||||
// Right to End of Line
|
||||
replace key <RGHT> {
|
||||
type[Group1]= "ONE_LEVEL_CTRL",
|
||||
symbols[Group1]= [ Right, Right, NoSymbol ],
|
||||
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<END>,clearmods=Control)]
|
||||
};
|
||||
// Up to Mac Home
|
||||
replace key <UP> {
|
||||
type[Group1]= "ONE_LEVEL_CTRL",
|
||||
symbols[Group1]= [ Up, Up, NoSymbol ],
|
||||
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<HOME>)]
|
||||
};
|
||||
// Down to Mac End
|
||||
replace key <DOWN> {
|
||||
type[Group1]= "ONE_LEVEL_CTRL",
|
||||
symbols[Group1]= [ Down, Down, NoSymbol ],
|
||||
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<END>)]
|
||||
};
|
||||
// CTRL BKSP to DELETE
|
||||
// replace key <BKSP> {
|
||||
// type[Group1]= "TWO_LEVEL_CTRL",
|
||||
// symbols[Group1]= [ BackSpace, BackSpace, NoSymbol ],
|
||||
// actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<DELE>,clearmods=Control)]
|
||||
// };
|
||||
};
|
@@ -1,14 +0,0 @@
|
||||
default partial xkb_symbols "mac_levelssym" {
|
||||
key <LWIN> {
|
||||
repeat= no,
|
||||
type= "ONE_LEVEL",
|
||||
symbols[Group1]= [ Hyper_L ],
|
||||
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
|
||||
};
|
||||
key <RWIN> {
|
||||
repeat= no,
|
||||
type= "ONE_LEVEL",
|
||||
symbols[Group1]= [ Hyper_R ],
|
||||
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
|
||||
};
|
||||
};
|
@@ -1,14 +0,0 @@
|
||||
default partial xkb_symbols "mac_levelssym" {
|
||||
key <LALT> {
|
||||
repeat= no,
|
||||
type= "ONE_LEVEL",
|
||||
symbols[Group1]= [ Hyper_L ],
|
||||
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
|
||||
};
|
||||
key <RALT> {
|
||||
repeat= no,
|
||||
type= "ONE_LEVEL",
|
||||
symbols[Group1]= [ Hyper_R ],
|
||||
actions[group1]=[ SetMods(modifiers=Shift+Control) ]
|
||||
};
|
||||
};
|
@@ -1,20 +0,0 @@
|
||||
default partial xkb_types "addmac_levels" {
|
||||
type "ONE_LEVEL_CTRL" {
|
||||
modifiers= Shift+Control;
|
||||
map[Shift]= Level2;
|
||||
map[Control]= Level3;
|
||||
map[Shift+Control]= Level3;
|
||||
level_name[Level1]= "Base";
|
||||
level_name[Level2]= "Caps";
|
||||
level_name[Level3]= "With Control";
|
||||
};
|
||||
type "TWO_LEVEL_CTRL" {
|
||||
modifiers= Shift+Control;
|
||||
map[Shift]= Level2;
|
||||
map[Control]= Level3;
|
||||
map[Shift+Control]= Level3;
|
||||
level_name[Level1]= "Base";
|
||||
level_name[Level2]= "Caps";
|
||||
level_name[Level3]= "With Control";
|
||||
};
|
||||
};
|
700
README.md
@@ -1,201 +1,645 @@
|
||||
# Kinto
|
||||
# Kinto.sh
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
[](https://github.com/rbreaves/kinto/releases/latest)
|
||||
|
||||

|
||||
\- Mac-style shortcut keys for Linux & Windows. \-
|
||||
|
||||
\- Type in Linux like it's a Mac. \-
|
||||
Seamless copy and paste with all apps and terminals. The zero effort solution.
|
||||
|
||||
Cmd = Ctrl+Shift for all terminals.
|
||||
v1.2 Release - Kinto now includes a system tray and simple wizard to setup the install with minimal effort.
|
||||
|
||||
Note: As of version 1.0 Kinto no longer maps Cmd/Alt to Super while using the Terminal, it is now mapping to Ctrl+Shift by default. Please reset your terminal's keymaps back to their defaults.
|
||||
Kinto is powered by [xkeysnail](https://github.com/mooz/xkeysnail) for Linux & by [Autohotkey](https://github.com/Lexikos/AutoHotkey_L) for Windows 10.
|
||||
|
||||
Gnome-terminal reset
|
||||
Note: If you plan to remote into Linux via VNC, xRDP, Synergy or other remote desktop solutions then remove the current release, or create a new user, & try an earlier [v1.0.7-3](https://github.com/rbreaves/kinto/releases/tag/1.0.7-3) release. It uses xkb so it'll work with virtual xinput devices. Some v1.1-x releases may offer both, but all v1.2.x releases ended support for xkb. I do plan to bring offical support back for virtual input devices.
|
||||
|
||||
Additionally VMware, Virtualbox, KVM and other virtualization technologies work best with the current release - so *this note only applies to remote desktop into Linux* - not virtualization.
|
||||
|
||||
### [Table of Contents ](#Table-of-Contents)
|
||||
|
||||
## Donations
|
||||
|
||||
If you like or appreciate this project then please consider donating.
|
||||
|
||||
|**Wishlists**|[Amazon](https://smile.amazon.com/hz/wishlist/ls/3EVXR21VFKD9Z?ref_=wl_share)|[Adafruit](https://www.adafruit.com/wishlists/515932)|[eBay](https://www.ebay.com/mye/myebay/WatchList?custom_list_id=636668138019)|
|
||||
|---|---|---|---|
|
||||
|
||||
If you would like to send me a keyboard directly then please reach out to me over [twitter](https://twitter.com/gbit86) and send me a DM.
|
||||
|
||||
## How to install (Linux)
|
||||
|
||||
Video Tutorial: [Install Kinto.sh for Linux in less than a minute](https://www.youtube.com/watch?v=kd4al45XD1g)
|
||||
|
||||
[Linux Requirements](#What-does-Kinto-require)
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/10969616/97070698-179c4500-15a0-11eb-8064-c03aa7f4d4a5.png" width="75%">
|
||||
|
||||
### Quick Install Method
|
||||
|
||||
Paste the following into your Terminal
|
||||
```
|
||||
dconf reset -f /org/gnome/terminal/legacy/keybindings/
|
||||
/bin/bash -c "$(wget -qO- https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh || curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh)"
|
||||
```
|
||||
|
||||
## What does this do exactly?
|
||||
Uninstall
|
||||
```
|
||||
/bin/bash <( wget -qO- https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh || curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/HEAD/install/linux.sh ) -r
|
||||
```
|
||||
|
||||
Kinto works for standard Windows, Apple and Chromebook keyboards. The following however describes the dynamic rebinding based on a standard Windows keyboard. (Alt location is Cmd for Apple keyboards)
|
||||
### Old Install Method
|
||||
|
||||
- Normal apps - Alt will be Ctrl, Win/Super will be Alt, Ctrl will be Win/Super
|
||||
|
||||
- Terminal apps - Alt will be Ctrl+Shift, Win/Super will be Alt, Ctrl will be Ctrl
|
||||
|
||||
- Cursor/word-wise shortcut keys have been added to align with macOS keyboard shortcuts.
|
||||
|
||||
## What does Kinto require?
|
||||
|
||||
- Python (initial install only)
|
||||
- systemd
|
||||
- x11
|
||||
- Debian/Ubuntu based distro 16.04+
|
||||
|
||||
If you need kintox11 recompiled for your distro please let me know and I will add a binary for your distro if my binary fails.
|
||||
|
||||
You can also attempt to compile kintox11.c on your system as well, but you will need to compile and install json-c first as its libraries will be required to compile and run the program.
|
||||
|
||||
Wayland support is planned, but not ready yet.
|
||||
|
||||
## How to install
|
||||
|
||||
1. clone this repo
|
||||
```
|
||||
git clone https://github.com/rbreaves/kinto.git
|
||||
```
|
||||
2. Install python3 (If needed)
|
||||
|
||||
Debian or Ubuntu 16.04 or 18.04
|
||||
```
|
||||
cd kinto
|
||||
sudo apt update
|
||||
sudo apt install python3
|
||||
```
|
||||
|
||||
3. Follow the prompts and the script will guide you through the rest of the setup.
|
||||
```
|
||||
./setup.py
|
||||
```
|
||||
|
||||
## JSON config files
|
||||
**Troubleshoot**
|
||||
|
||||
Features
|
||||
- Unlimited keyboard configurations per App/category (user_config.json - config -> create app object)
|
||||
- Dynamic Desktop Environment shortcut capabilities (user_config.json - de -> create DE tweak/remap)
|
||||
If the wizard does not appear then either type in "kinto.sh" in your application overview search bar or run this following command.
|
||||
```
|
||||
~/.config/kinto/gui/kinto-gui.py
|
||||
```
|
||||
|
||||
Located at ~/.config/kinto/ you will find user_config.json which will look like the following after an install. You can modify the defaults.json file in the root directory of kinto to create additional keyboard layout types/support without needing to modify any of the underlying Kinto code.
|
||||
**Issues with Numpad?**
|
||||
|
||||
You can also add additional Desktop Environment related tweaks to user_config.json in the install directory as well and the installer will prompt you to install them. You may also fork and submit any json or additional .xkb configurations to me for approval if you believe it makes Linux more like typing on a Mac.
|
||||
Try toggling numlock on & off (clear key on official mac keyboards). If it still does not work then restart the Kinto service and try toggling the numlock/clear key again, it will likely work after that. #369
|
||||
|
||||
**Uninstall Kinto**
|
||||
|
||||
```
|
||||
{"config":[{
|
||||
"name":"gui",
|
||||
"run":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY",
|
||||
"de":[2],
|
||||
"appnames":[ "" ]
|
||||
},
|
||||
{
|
||||
"name":"term",
|
||||
"run":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY",
|
||||
"de":[2],
|
||||
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm" ]
|
||||
}],
|
||||
"init": [1],
|
||||
"detypes":["gnome2","gnome3","kde4","kde5","xfce","i3wm"],
|
||||
"de":[{
|
||||
"id": 1,
|
||||
"type": ["gnome3"],
|
||||
"active": false,
|
||||
"intent":"init",
|
||||
"name":"gnome-init",
|
||||
"description":"Gnome - Remove Superkey Overlay keybinding to Activities Overview",
|
||||
"run":"gsettings set org.gnome.mutter overlay-key ''",
|
||||
"run_term":"",
|
||||
"run_gui":""
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"type": ["gnome3"],
|
||||
"active": false,
|
||||
"intent":"gui_term",
|
||||
"name":"Gnome Activities Overview",
|
||||
"description":"Cmd+Space activates Activities Overview",
|
||||
"run":"",
|
||||
"run_term":"gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space']\"",
|
||||
"run_gui":"gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Ctrl>Space']\""
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": ["kde5"],
|
||||
"active": false,
|
||||
"intent":"init",
|
||||
"name":"kde-init",
|
||||
"description":"KDE Plasma 5 - Removes Superkey Overlay from the Launcher Menu",
|
||||
"run":"kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta \"\";qdbus org.kde.KWin /KWin reconfigure",
|
||||
"run_term":"",
|
||||
"run_gui":""
|
||||
}]
|
||||
./setup.py -r
|
||||
```
|
||||
|
||||
**Other tips**
|
||||
|
||||
If you want a global menu app similar to what mac users have then I strongly recommend Ubuntu Budgie as it has the Vala Appmenu built in and ready for activation. Short of that Vala-AppMenu can be installed in various distros, mileage will vary. If you try to activate it in the latest 20.xx releases with XFCE then you may need to run the following commands.
|
||||
|
||||
```
|
||||
sudo apt install xfce4-appmenu-plugin vala-panel-appmenu-common appmenu-gtk2-module appmenu-gtk3-module appmenu-gtk-module-common
|
||||
xfconf-query -c xsettings -p /Gtk/Modules -n -t string -s "appmenu-gtk-module"
|
||||
```
|
||||
|
||||
**Perfect HiDPI fractional scaling on Ubuntu Budgie 20.04 under x11**
|
||||
|
||||
https://discourse.ubuntubudgie.org/t/ubuntu-budgie-20-04-fractional-hidpi-for-x11/4777
|
||||
|
||||
## How to Install (Windows)
|
||||
|
||||
Video Tutorial: [How to Install Kinto.sh on Windows 10](https://youtu.be/sRk8A8krz40)
|
||||
|
||||
[Windows 10 Requirements](#Kinto-for-Windows-10-Requirements)
|
||||
|
||||
### Quick install
|
||||
Open Powershell as Administrator and copy and paste the following. This will download & extract Kinto, install chocolatey, python3 and then install Kinto.
|
||||
|
||||
**⚠ NOTE: Please inspect https://raw.githubusercontent.com/rbreaves/kinto/master/install/windows.ps1 and https://chocolatey.org/install.ps1 before running scripts directly. More information about running powershell scripts in this context can be found [here](https://chocolatey.org/install).**
|
||||
|
||||
```
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
iwr https://raw.githubusercontent.com/rbreaves/kinto/master/install/windows.ps1 -UseBasicParsing | iex
|
||||
```
|
||||
|
||||
|
||||
Update system tray to show Kinto icon at all times (optional)
|
||||
```
|
||||
cmd /c "explorer shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}"
|
||||
```
|
||||
|
||||
### Old method
|
||||
|
||||
1. Open Powershell (Right click and Run as Administrator)
|
||||
|
||||
2. clone this repo
|
||||
```
|
||||
git clone https://github.com/rbreaves/kinto.git
|
||||
cd kinto
|
||||
```
|
||||
3. Install - Select keyboard type
|
||||
```
|
||||
py setup.py
|
||||
```
|
||||
|
||||
4. How to make Kinto stay visible in system tray (optional)
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/10969616/85195077-2f338c00-b295-11ea-8aa3-e6aa06a9a279.png" width="50%" height="50%">
|
||||
<img src="https://user-images.githubusercontent.com/10969616/85195079-30fd4f80-b295-11ea-8bcd-257990b77dcb.png" width="50%" height="50%">
|
||||
<img src="https://user-images.githubusercontent.com/10969616/85195082-322e7c80-b295-11ea-8c81-320dab424c3c.png" width="50%" height="50%">
|
||||
|
||||
**Uninstall Kinto**
|
||||
|
||||
```
|
||||
py setup.py
|
||||
```
|
||||
|
||||
Select Uninstall
|
||||
|
||||
## How to use in Remote Desktop Solutions
|
||||
|
||||
RDP fully works as long as the entire keyboard input is being captured. RDP had been working for awhile with Windows but as of 2/14/2021 Linux & macOS is now supported. VNC & other protocols may work, but is likely most dependent on how the keyboard input is captured on the computer running the client.
|
||||
|
||||
|Program|Src/Remote Client ⇒|Dst/Remote Server|Works? |Notes|
|
||||
|---|---|---|---|---|
|
||||
|Official MS RDP (mstsc.exe)| ❖Windows ⇒| 🐧Linux | ✅ Yes| Note: [v1.0.7-3 Only](https://github.com/rbreaves/kinto/releases/tag/1.0.7-3). Should work for xRDP/VNC and other remote server protocols. |
|
||||
|Official MS RDP (mstsc.exe)| ❖Windows ⇒| ❖Windows | ✅ Yes| |
|
||||
|Official MS RDP| ChromeOS 87+⇒| ❖Windows | ✅ Yes|May work on earlier versions as well, if they support Android apps|
|
||||
|Remmina| 🐧Linux*/ChromeOS 87+⇒| ❖Windows | ✅ Yes|*Use hover menu to enable "Grab all keyboard events"|
|
||||
|FreeRDP| 🐧Linux/ChromeOS 87+⇒| ❖Windows | ✅ Yes | |
|
||||
|FreeRDP| 🍎macOS⇒| ❖Windows | ✅ Yes| [FreeRDP for macOS](#FreeRDP-for-macOS)|
|
||||
|Remote Desktop Manager Free|🍎iOS⇒| ❖Windows | ✅ Yes| |
|
||||
|Jump Desktop (RDP)| 🍎macOS*/iOS ⇒| ❖Windows | ✅ Yes|*Preferences -> Keyboard -> Disable "Key Conversions", Enabled "Send macOS Shortcuts" under Keyboard shortcuts|
|
||||
|Official MS RDP| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|
||||
|Remote Desktop Manager Free| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|
||||
|Royal TSX Client| 🍎macOS⇒| ❖Windows | ❌ No|Initial Cmd key press not being passed|
|
||||
|Official MS RDP| 🍎🤖iOS/Android⇒| ❖Windows | ❌ No|No workaround atm|
|
||||
|
||||
## FreeRDP for macOS
|
||||
|
||||
1. Install [brew.sh](https://brew.sh).
|
||||
|
||||
```/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"```
|
||||
|
||||
2. Install XQuartz (x11/xorg)
|
||||
|
||||
```brew install --cask xquartz```
|
||||
|
||||
3. log off and back on.
|
||||
4. Install FreeRDP
|
||||
|
||||
```brew install freerdp```
|
||||
|
||||
5. Disable [NLA](https://kb.parallels.com/en/123661), if it is enabled on the destination.
|
||||
6. Run command to access machine
|
||||
Note: 192.168.x.x = Your IP.
|
||||
|
||||
```xfreerdp /u:your_username /v:192.168.x.x /cert-ignore /auto-reconnect-max-retries:0 /f +clipboard -decorations```
|
||||
|
||||
7. Click on XQuartz -> Preferences and set these checkmarks so that fullscreen can work, may need to quit it and re-run the xfreerdp command from step 6.
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/10969616/108144025-68bfcf80-708e-11eb-96cc-2930b7b1694a.png" width="50%">
|
||||
|
||||
More info here
|
||||
https://medium.com/idomongodb/macos-rdp-to-a-windows-machine-1e0f52f777b
|
||||
|
||||
## Jump Desktop for macOS
|
||||
|
||||
Screenshots of how to configure Jump Desktop for macOS users accessing a Windows PC with Kinto installed. I apologize that it is not a free RDP client - BUT it does work, and at $15 it is reasonable if you plan to use it frequently.
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/10969616/107990246-a2fb7500-6f99-11eb-8c19-0a9b538b996f.png" width="25%">
|
||||
<img src="https://user-images.githubusercontent.com/10969616/107990265-a8f15600-6f99-11eb-9922-bbcfa0b92031.png" width="50%">
|
||||
<img src="https://user-images.githubusercontent.com/10969616/107990256-a68efc00-6f99-11eb-9f31-575ed6016944.png" width="50%">
|
||||
|
||||
|
||||
## Table of Contents
|
||||
|
||||
[How to install (Linux)](#How-to-install-Linux)
|
||||
|
||||
[How to install (Windows)](#How-to-install-Windows)
|
||||
|
||||
[What does this do exactly?](#What-does-this-do-exactly)
|
||||
|
||||
[What's different from other remappers?](#Whats-different)
|
||||
|
||||
[What does Kinto require?](#What-does-Kinto-require)
|
||||
|
||||
[Shortcut Creation](#Shortcut-Creation)
|
||||
|
||||
[How to Upgrade/Control Kinto](#How-to-Upgrade-Kinto)
|
||||
|
||||
[Troubleshooting](#Troubleshooting)
|
||||
|
||||
[Language Support](#Language-Support)
|
||||
|
||||
[Related or Useful Resources](#Related-or-Useful-Resources)
|
||||
|
||||
[Contributing](#Contributing)
|
||||
|
||||
[More information about Kinto](#More-information-about-Kinto)
|
||||
|
||||
[License](#License)
|
||||
|
||||
[Credits and Contributions](#Credits-and-Contributions)
|
||||
|
||||
## What does this do exactly?
|
||||
|
||||
Kinto works for standard Windows, Apple and Chromebook keyboards. The following however describes the dynamic rebinding based on a standard Windows/Mac keyboard.
|
||||
|
||||
- Cursor/word-wise shortcut keys have been added to align with macOS keyboard shortcuts.
|
||||
|
||||
**GUI**
|
||||
|**Physical**| Ctrl | Win/Alt | Alt/Cmd | Spacebar|
|
||||
|---|---|---|---|---|
|
||||
|**Virtual**| Win/Super* | Alt | RCtrl |Spacebar|
|
||||
|
||||
*Win/Super will properly remap to LCtrl when needed to fully support expected keymaps.
|
||||
|
||||
**Terminal**
|
||||
|**Physical**| Ctrl | Win/Alt | Alt/Cmd | Spacebar|
|
||||
|---|---|---|---|---|
|
||||
|**Virtual**| LCtrl | Alt | RCtrl |Spacebar|
|
||||
|
||||
Note: RCtrl for terminals is also adding in Shift most of the time, however it depends on the specific terminal in use and will change itself to the expected keymaps of that terminal application.
|
||||
|
||||
## What's different?
|
||||
|
||||
Compared to most other remappers ***this is a complete system-wide remap of your base level modifier keys***, this saves time. You're not going to die a death of a thousand papercuts from trying to support every shortcut key under the sun.
|
||||
|
||||
It also retains some of the most commonly used system level shortcut keys, such as Cmd-C/V, Cmd-Tab, and Ctrl-Tab among others. You will keep seamless copy & paste between all apps, ability to switch Windows while still using the physical Cmd/Alt key position; switch tabs in your favorite terminals, code editors, or web browsers. Depending on your OS and/or Desktop Environment you may also be able to switch Virtual Desktop environments the same way as well and other basic system level shortcuts.
|
||||
|
||||
If your OS and macOS have similar functionality on the system level, but only differ by a slight difference of a shortcut command then Kinto likely supports it already. If Kinto doesn't have what you need then you can open up a support ticket and it will be added. You can also fork the project to add the fix and I will merge it via a PR you make.
|
||||
|
||||
Additionally, if you are using a cross-platform app and if it happens to have a few shortcut keys that differ then that can very easily be added to either the kinto.py or kinto.ahk configuration files which on Windows is located here `~/.kinto/kinto.ahk` and on Linux it can be found here `~/.config/kinto/kinto.py`. More info can be found here [Shortcut Creation](#Shortcut-Creation)
|
||||
|
||||
## What does Kinto require?
|
||||
|
||||
- Python
|
||||
- systemd or sysvinit
|
||||
- x11
|
||||
- xkeysnail
|
||||
|
||||
### Kinto for Windows 10 Requirements
|
||||
|
||||
- [Git for Windows](https://git-scm.com/download/win)
|
||||
- Powershell - run as Administrator
|
||||
- [Python3](https://www.python.org/downloads/windows/)
|
||||
|
||||
Other programs that will be installed when you run ./setup.py
|
||||
- Chocolatey
|
||||
- Autohotkey
|
||||
- Strawberry Perl
|
||||
|
||||
Note: Sublime Text users should disable screen rotation hotkeys as they will interfere with multi-cursor and possibly other combos. See https://windowsloop.com/disable-screen-rotation-keyboard-shortcut/ for details.
|
||||
|
||||
You may also want to disable the Xbox Game Bar so that Win+G or other shortcuts will not interfer with any of your remaps. Start menu -> Game bar shortcuts -> toggle Off.
|
||||
|
||||
## Shortcut Creation
|
||||
|
||||
[Linux Shortcut Creation (Xkeysnail)](#Linux-Xkeysnail)
|
||||
|
||||
[Windows Shortcut Creation (Autohotkey)](#Windows-Autohotkey)
|
||||
|
||||
|
||||
## Linux (Xkeysnail)
|
||||
|
||||
**GUI Keys**
|
||||
| Value| Description|Mac/Kinto Equivalent|
|
||||
| ----- |:--------:|:--------:|
|
||||
|C,Ctrl|Control|Cmd|
|
||||
|M,Alt| Alt/Option|Alt/Option|
|
||||
|Super | Win/Super|Ctrl|
|
||||
|
||||
**Terminal Keys**
|
||||
| Value| Description|Mac/Kinto Equivalent|
|
||||
| ----- |:--------:|:--------:|
|
||||
|RC,RCtrl|Right Control → Left & Right Alt/Cmd key|Cmd|
|
||||
|M,Alt|Alt/Option|Alt/Option|
|
||||
|LC,LCtrl |Left Control|Ctrl|
|
||||
|
||||
You can define new keymaps for your specific app via this method. You also do not have to cancel out the original keybinding if you do not need or want to, but you can do so with "pass_through_key".
|
||||
|
||||
### Defining Keymaps Per App
|
||||
```
|
||||
# Keybindings for Sublime Text
|
||||
define_keymap(re.compile("Sublime_text"),{
|
||||
K("C-h"): pass_through_key, # cancel replace
|
||||
K("Ctrl-Alt-f"): K("Ctrl-h"), # replace
|
||||
K("C-M-v"): [K("C-k"), K("C-v")], # paste_from_history
|
||||
}
|
||||
```
|
||||
|
||||
In the above example I am also showing that you can define a single shortcut to enact multiple shortcut keys if needed by defining an array of shortcuts to trigger.
|
||||
|
||||
You can also make changes to the file in your /tmp/kinto/xkeysnail/kinto.py location and see them take affect in real time, but for your changes to be permanent you will need to make your changes in the ~/.config/kinto/kinto.py location & restart the xkeysnail service.
|
||||
|
||||
systemd
|
||||
```
|
||||
sudo systemctl restart xkeysnail
|
||||
```
|
||||
|
||||
sysvinit
|
||||
```
|
||||
sudo -E /etc/init.d/kinto restart
|
||||
```
|
||||
|
||||
More information can be seen on the readme page of [xkeysnail](https://github.com/mooz/xkeysnail).
|
||||
|
||||
## Windows (Autohotkey)
|
||||
|
||||
This applies to the Windows version of Kinto and how to add additional support for Applications. The configuration file location is `~/.kinto/kinto.ahk` and after updating it you will want to right click on the tray icon and click on setting your keyboard type again and it will re-apply the latest changes.
|
||||
|
||||
Windows 10 has a couple of ways that you need to be aware of when trying to add a specific application, the typical method of how to add any exe program, but then there is also the newer UWP app format that some applications use which will require a similar but different method, both will be discussed.
|
||||
|
||||
### Defining Keymaps Per App by EXE Name
|
||||
You can use the following legend **but** realize that these remaps reference the Virtual keys in the diagrams mentioned near the beginning of this document, so **do not** confuse it with the physical key unless they happen to be the same key.
|
||||
|
||||
|Autohotkey Symbol|Virtual key|Description|
|
||||
|---|---|---|
|
||||
|^,Ctrl|Control|Primary modifier, 1st rock from the spacebar|
|
||||
|!,Alt|Alt|Secondary modifier, 2nd rock from the spacebar|
|
||||
|#,Win|Win/Super|Tertiary modifier, 3rd rock from the spacebar|
|
||||
|
||||
```
|
||||
...
|
||||
#IfWinActive ahk_exe sublime_text.exe
|
||||
#^Up::send !{O} ; Switch file
|
||||
#^f::send {F11} ; toggle_full_screen
|
||||
^!v::send {Ctrl Down}k{Ctrl Up}{Ctrl Down}v{Ctrl Up} ; paste_from_history
|
||||
...
|
||||
#If
|
||||
...
|
||||
```
|
||||
|
||||
With this being Autohotkey you can easily pull knowledge from the Autohotkey forums for just about any issue you may have as well.
|
||||
|
||||
### Defining Keymaps Per UWP App
|
||||
|
||||
```
|
||||
#If WinActive("- OneNote ahk_class ApplicationFrameWindow", "OneNote")
|
||||
...
|
||||
; Add your keymaps here
|
||||
...
|
||||
#If
|
||||
```
|
||||
|
||||
I don't have too many examples on this one, most developers seem to be shying away from UWP. Kinto currently supports "Fluent Terminal" which is a UWP app, but it is also being grouped with other Terminal apps for hotkey remapping. You may take a look at that, but you may also want to try creating a new Autohotkey file and use the Window Spy feature built into Autohotkey to help you discover the full name and class names of any application.
|
||||
|
||||
## Shortcut Creation (XKB)
|
||||
The older xkb shortcut method info can be read about in ticket [#125](https://github.com/rbreaves/kinto/issues/125).
|
||||
|
||||
## How to Upgrade Kinto
|
||||
|
||||
Simply bring down the latest then you can re-run the setup.py installer, it will stop the service and re-install Kinto.
|
||||
|
||||
Note: If you have made any custom changes to ~/.config/kinto then you will need to backup or rename those directories before running an update.
|
||||
|
||||
```
|
||||
git pull origin master
|
||||
./setup.py
|
||||
```
|
||||
|
||||
## How to Control Kinto
|
||||
|
||||
Under systemd this is how you control Kinto.
|
||||
This info is now superceded by the fact that linux has a full fledge GUI and system tray app that is very easy to use, but I will keep the command line options for those that want to know what they are.
|
||||
|
||||
Status
|
||||
|
||||
systemd
|
||||
```
|
||||
systemctl --user status keyswap
|
||||
sudo systemctl status xkeysnail
|
||||
```
|
||||
|
||||
Stop
|
||||
sysvinit
|
||||
```
|
||||
systemctl --user stop keyswap
|
||||
tail -f /tmp/kinto.log
|
||||
```
|
||||
|
||||
Stop (your keymap will return to normal)
|
||||
|
||||
systemd
|
||||
```
|
||||
sudo systemctl stop xkeysnail
|
||||
```
|
||||
|
||||
sysvinit
|
||||
```
|
||||
sudo -E /etc/init.d/kinto stop
|
||||
```
|
||||
|
||||
Start
|
||||
|
||||
systemd
|
||||
```
|
||||
systemctl --user start keyswap
|
||||
sudo systemctl start xkeysnail
|
||||
```
|
||||
|
||||
sysvinit
|
||||
```
|
||||
sudo -E /etc/init.d/kinto start
|
||||
```
|
||||
|
||||
Restart
|
||||
|
||||
systemd
|
||||
```
|
||||
systemctl --user restart keyswap
|
||||
sudo systemctl restart xkeysnail
|
||||
```
|
||||
|
||||
Enable
|
||||
sysvinit
|
||||
```
|
||||
systemctl --user enable keyswap
|
||||
```
|
||||
|
||||
Disable
|
||||
```
|
||||
systemctl --user disable keyswap
|
||||
```
|
||||
|
||||
## Learning macOS style hotkeys on Linux
|
||||
|
||||
You can use websites like https://www.shortcutfoo.com in Google Chrome while using the terminal style keymap, but Firefox is not compatible due to detecting "cmd" as keycode 224. Chrome detects Win/Super/Cmd as keycode 91 on all OS's.
|
||||
|
||||
To make sure you are in the terminal style keymap you can just simply open the terminal and turn off the kinto service, and then switch back to Chrome.
|
||||
```
|
||||
systemctl --user stop keyswap && setxkbmap -option;setxkbmap -option altwin:swap_alt_win
|
||||
sudo -E /etc/init.d/kinto restart
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Keyswap is not occurring, but it was working.
|
||||
### Installed successfully, but modifier keys are not properly remapped?
|
||||
|
||||
Now that Kinto is using a custom written C program I am not aware of any specific bugs or issues, but you can start here if you having difficulties and please report it if it is reproducible.
|
||||
Are you using a VM on macOS? If so you may need to disable automatic remapping of the Cmd key when using Vmware Fusion of Parallels.
|
||||
|
||||
Disable Parallels Re-mapping:
|
||||
1) Open Parallels and go to Preferences.
|
||||
2) Click Keyboard and disable the Virtual machine shortcuts.
|
||||
3) Close Preferences.
|
||||
|
||||
To disable keyboard mapping:
|
||||
1) From Fusion's menu bar, click VMware Fusion > Preferences...
|
||||
2) Click Keyboard & Mouse.
|
||||
3) Click the Key Mappings tab.
|
||||
4) Deselect Enable Key Mapping.
|
||||
|
||||
### Does not start when you log in or after you reboot?
|
||||
|
||||
You may need to manually set your DISPLAY in the systemd service file. Normally it pulls in the proper DISPLAY value but if it doesn't you can try this.
|
||||
|
||||
Another possibility is the SELinux could be enabled and needs to be set to permissive. (aka /etc/selinux/config)
|
||||
|
||||
To reset the display variable
|
||||
|
||||
1. Restart Kinto
|
||||
```
|
||||
systemctl --user restart keyswap
|
||||
echo $DISPLAY
|
||||
|
||||
# :0.0
|
||||
```
|
||||
2. Check the Status of Kinto and open a ticket with the output.
|
||||
|
||||
You can use the Kinto.sh app or system tray to edit your service file.
|
||||
|
||||
kinto.sh gui
|
||||
1. Edit -> Edit Service
|
||||
kinto tray
|
||||
1. Customize -> Edit Service
|
||||
|
||||
or you can use your terminal.
|
||||
|
||||
sudo nano /etc/systemd/system/xkeysnail.service
|
||||
```
|
||||
systemctl --user status keyswap
|
||||
...
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
Environment=DISPLAY=:0.0
|
||||
...
|
||||
```
|
||||
|
||||
If you continue to have issues then open a ticket and send me the info.
|
||||
|
||||
## Language Support
|
||||
I'd appreciate any help from people with non-US based keyboards, to help ensure that these keymaps and keyswap methods work in all or most languages.
|
||||
|
||||
If you would like to attempt adding additional custom keymaps for other languages then I strongly recommend reading Glen Whitney's post here.
|
||||
https://superuser.com/questions/385748/binding-superc-superv-to-copy-and-paste
|
||||
## Related or Useful Resources
|
||||
|
||||
[Xkeysnail](https://github.com/mooz/xkeysnail) by mooz
|
||||
|
||||
Yet another keyboard remapping tool for X environment
|
||||
|
||||
[libinput-gestures](https://github.com/bulletmark/libinput-gestures)
|
||||
Three finger gesture or other type of gestures for desktop switching or other features within a Linux distro. More info here for quickly setting it up. Make sure you logoff after setting your user to access input. https://www.reddit.com/r/GalliumOS/comments/5lgrxe/psa_multitouch_gestures_on_galliumos/
|
||||
|
||||
[Interception](https://gitlab.com/interception/linux/tools)
|
||||
|
||||
Another low level key remapper, not as easily configurable as Xkeysnail, but does not rely on X11.
|
||||
|
||||
[Wincent](https://github.com/wincent/wincent) by Greg Hurrell
|
||||
|
||||
Dot files and configurations that may help those that want mac-style shortcut keys that work under Wayland, or w/o x11.
|
||||
[Vim #102: macOS keyboard bindings on Linux](https://www.youtube.com/watch?v=TBqTHesnzkI)
|
||||
|
||||
[mac-precision-touchpad](https://github.com/imbushuo/mac-precision-touchpad) by imbushuo
|
||||
|
||||
Windows 10 touchpad to precision touchpad driver
|
||||
|
||||
[macOS-cursors-for-Windows](https://github.com/antiden/macOS-cursors-for-Windows) by antiden
|
||||
|
||||
macOS cursors for Windows
|
||||
|
||||
[QuickLook](https://github.com/QL-Win/QuickLook) for Windows by QL-Win
|
||||
|
||||
It allows users to peek into a file content in lightning speed by just pressing the Space key
|
||||
|
||||
[fusuma](https://github.com/iberianpig/fusuma) by iberianpig
|
||||
|
||||
Multitouch gestures with libinput driver on Linux
|
||||
|
||||
[Facetime HD Camera for Linux](https://github.com/patjak/bcwc_pcie) by patjak
|
||||
|
||||
Linux driver for Facetime HD on macbooks
|
||||
|
||||
[Windows Terminal Preview](https://aka.ms/terminal-preview) by Microsoft
|
||||
|
||||
The best Terminal app built for Windows hands down. I have tried countless, but this one actually seems to get everything right, despite the lack of a GUI to configure all aspects of the program. Custom configurations have to be done via a json file - but given the performance and feature set I feel like it is the a decent trade off.
|
||||
|
||||
I will update Kinto to have custom configurations for this specific Terminal in the future. Will make seamless copy & paste, which already works, work even better (Cmd-C can still trigger sigint - but there is a fix for that that involves updating the json config).
|
||||
|
||||
[PowerToys - Windows only](https://github.com/microsoft/PowerToys) by microsoft
|
||||
|
||||
Windows system utilities to maximize productivity
|
||||
|
||||
[AutoHotKey - Windows only](https://github.com/AutoHotkey/AutoHotkey) by AutoHotkey
|
||||
|
||||
AutoHotkey is a powerful and easy to use scripting language for desktop automation on Windows.
|
||||
|
||||
[pykeymacs](https://github.com/zhanghai/pykeymacs) by zhanghai
|
||||
|
||||
Emacs style keyboard macros implemented in Python
|
||||
|
||||
[Dynamic Wallpapers](https://github.com/adi1090x/dynamic-wallpaper) by adi1090x
|
||||
|
||||
Simple bash script to set a Dynamic Wallpaper according to certain conditions.
|
||||
|
||||
[macify-linux](https://github.com/Jonchun/macify-linux) by JonChun
|
||||
|
||||
Automated setup scripts to transform Linux into macOS. (Uses Kinto for key remaps)
|
||||
|
||||
[ibus-typing-booster](https://github.com/mike-fabian/ibus-typing-booster) by mike-fabian
|
||||
|
||||
ibus-typing-booster is a completion input method for faster typing
|
||||
|
||||
[twemoji color font](https://github.com/eosrei/twemoji-color-font) by eosrei
|
||||
|
||||
Twitter Unicode 12 emoji color SVGinOT font for Linux/MacOS/Windows
|
||||
|
||||
[iTerm2 Color Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes) by mbadolato
|
||||
|
||||
Over 225 terminal color schemes/themes for iTerm/iTerm2. Includes ports to Terminal, Konsole, PuTTY, Xresources, XRDB, Remmina, Termite, XFCE, Tilda, FreeBSD VT, Terminator, Kitty...
|
||||
|
||||
[espanso](https://github.com/federico-terzi/espanso) by federico-terzi
|
||||
|
||||
Cross-platform Text Expander written in Rust
|
||||
|
||||
[GalliumOS](https://github.com/GalliumOS/galliumos-distro) by GalliumOS
|
||||
|
||||
Docs, issues, and artwork sources for GalliumOS
|
||||
|
||||
[eOS-X](https://github.com/ipproductions/eOS-X) by ipproductions
|
||||
|
||||
Dark & Light Theme w/ OSX controls for Elementary OS
|
||||
|
||||
[Autorandr](https://github.com/phillipberndt/autorandr) by phillipberndt
|
||||
|
||||
Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr
|
||||
|
||||
[Barrier](https://github.com/debauchee/barrier) by debauchee (Note: Does not appear to work with Kinto v1.2+, may work w/ Kinto v1.1?)
|
||||
|
||||
Open-source KVM software
|
||||
|
||||
[Synergy Free Binaries](https://github.com/amankhoza/synergy-binaries) by amankhoza
|
||||
|
||||
The latest freely available Synergy binaries
|
||||
|
||||
[Synergy Official](https://symless.com/) by Symless
|
||||
|
||||
Latest Official Synergy
|
||||
|
||||
[Karabiner-Elements](https://github.com/pqrs-org/Karabiner-Elements) by pqrs-org
|
||||
|
||||
Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra (10.12) or later.
|
||||
|
||||
[mbpfan](https://github.com/linux-on-mac/mbpfan) by linux-on-mac
|
||||
|
||||
A simple daemon to control fan speed on all MacBook/MacBook Pros (probably all Apple computers) for Linux Kernel 3 and newer
|
||||
|
||||
[vala-panel](https://github.com/rilian-la-te/vala-panel) by rilian-la-te
|
||||
|
||||
Vala rewrite of SimplePanel - GitHub mirror (Global Menu for XFCE)
|
||||
|
||||
## Contributing
|
||||
|
||||
I welcome any and all contributors who want to contribute something to this project.
|
||||
I welcome any and all contributors who want to add something to this project.
|
||||
|
||||
If you are specifically wanting to contribute additional custom keymaps to help with aligning Kinto's behavior to that of a mac keyboard then I would strongly recommend that you read Glen Whitney's comment on Superuser (the link is below). You may also look at the .xkb directory, mac_wordwise.sh and xactive.sh files to better understand how Kinto operates so that you can test your own keymaps without having to use the systemd service or running the xactive.sh script.
|
||||
|
||||
https://superuser.com/questions/385748/binding-superc-superv-to-copy-and-paste
|
||||
You can read the configuration files and the open issue tickets such as [#44 Shortcut Translation Tables](https://github.com/rbreaves/kinto/issues/44), [#115 Shortcut Creation (xkeysnail)](https://github.com/rbreaves/kinto/issues/115), and [#348 Missing Shortcuts: Post them here](https://github.com/rbreaves/kinto/issues/348) to best understand what's currently happening and how best to contribute.
|
||||
|
||||
## More information about Kinto
|
||||
|
||||
https://medium.com/@benreaves/kinto-v1-0-released-2018e6401d2e
|
||||
https://medium.com/@benreaves/kinto-a-mac-inspired-keyboard-mapping-for-linux-58f731817c0
|
||||
|
||||
## License
|
||||
|
||||
GPL v2
|
||||
|
||||
## Credits and Contributions
|
||||
|
||||
I would just like to thank a few people here directly that have helped me tremendously with completing this project and without their support, direct, indirect or otherwise I would have had difficulty completing this undertaking. I will list these things off in chronological order mostly.
|
||||
|
||||
First off I'd like to thank the Stackoverflow and Stackexchange community. I have probably rubbed some mods the wrong way over there, but the people from the community in general are extremely helpful and gracious and without their contributions would have made this much more difficult. The person I'd like to thank most though from over there is Glen Whitney. Without his detailed explaining of how to rebind keys in xkb this would not have come together at all, as every other remapping solution were non-starters as complexity increases. *Kinto today no longer uses xkb, but Glen Whitney did provide the basis of a workable method that helped me pursue this method and think it was a worthwhile project to pursue, so for that I thank him.*
|
||||
|
||||
Secondarily I'd like to thank Christian Eriksson*, as he provided information that kept me up at night.. literally. Even after I implemented a similar bash script to one he had suggested I knew that fully implementing a c/c++ solution was where Kinto needed to head to and his explaination was better than I remember it being now that I have gone back to read it again. He also never provided a full implementation of a c/c++ solution - he did hit on the pain points pretty well of what one would need to do and watch out for. I am not sure where I got the first example code of implementing a c based solution, but he definitely went over it well.
|
||||
|
||||
|
||||
Kui and his gist file** was really the c based solution that I found had the fewest issues to resolve to making it a reliable solution. It didn't account for all failures very well, aka BadWindow issues, but it made for a great foundation on which Kintox11 is built. I cannot thank him enough for putting it out there for others to work with.
|
||||
|
||||
Lastly these four people were also very helpful to me as well. @probonopd for being one of the first people to install and use Kinto and gave me the initial feedback to include wordwise support! He also has really great articles*** posted on HackerNews & Medium about UI/UX design. Another person I'd like to thank is @owzim, his feedback allowed me to rapidly iterate and fix several bugs to support additional platforms better. The last two are members of the #ubuntu channel in IRC on freenode, tarzeau ( @alexmyczko ) and sarnold. Alex contributing a proper Makefile, so the project can be packaged properly, and sarnold help me find that IBus could resolve an issue I was having with needing to detect the caret status.
|
||||
|
||||
**Updated 6/13/2020**
|
||||
|
||||
I would also like to thank Jonathan Chun for his patience in helping me work through a very difficult problem related to Alt-Tab switching, which led to the current xkeysnail iteration of Kinto for Linux that far exceeds the original xkb implementation. There are also several others that have created issue tickets that have contributed greatly.
|
||||
|
||||
If I left anyone out then I apologize, that was not intentional. I am happy to say that this project is at a state of completion. Bug fixes will primarily be the only activity happening going forward and possibly a rewrite for Wayland at some point. Contributions as mentioned above are welcomed, and will be merged into master if they help with the goal of making typing on linux more like a mac.
|
||||
|
||||
*https://askubuntu.com/questions/1010276/can-i-act-on-the-event-that-a-window-opens-without-polling
|
||||
|
||||
**https://gist.github.com/kui/2622504
|
||||
|
||||
***https://medium.com/@probonopd/make-it-simple-linux-desktop-usability-part-1-5fa0fb369b42
|
||||
|
@@ -1,705 +0,0 @@
|
||||
[
|
||||
/*
|
||||
Custom macOS keymap for Kinto keymap
|
||||
*/
|
||||
{ "keys": ["ctrl+shift+n"], "command": "new_window" },
|
||||
{ "keys": ["ctrl+shift+w"], "command": "close_window" },
|
||||
{ "keys": ["ctrl+o"], "command": "prompt_open" },
|
||||
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
|
||||
{ "keys": ["ctrl+super+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
|
||||
{ "keys": ["ctrl+n"], "command": "new_file" },
|
||||
{ "keys": ["ctrl+s"], "command": "save" },
|
||||
{ "keys": ["ctrl+shift+s"], "command": "prompt_save_as" },
|
||||
{ "keys": ["ctrl+super+s"], "command": "save_all" },
|
||||
{ "keys": ["ctrl+w"], "command": "close" },
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+b"], "command": "toggle_side_bar" },
|
||||
{ "keys": ["ctrl+alt+f"], "command": "toggle_full_screen" },
|
||||
{ "keys": ["ctrl+alt+shift+f"], "command": "toggle_distraction_free" },
|
||||
|
||||
{ "keys": ["ctrl+z"], "command": "undo" },
|
||||
{ "keys": ["ctrl+shift+z"], "command": "redo" },
|
||||
{ "keys": ["ctrl+y"], "command": "redo_or_repeat" },
|
||||
{ "keys": ["ctrl+u"], "command": "soft_undo" },
|
||||
{ "keys": ["ctrl+shift+u"], "command": "soft_redo" },
|
||||
|
||||
{ "keys": ["ctrl+x"], "command": "cut" },
|
||||
{ "keys": ["ctrl+c"], "command": "copy" },
|
||||
{ "keys": ["ctrl+v"], "command": "paste" },
|
||||
{ "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },
|
||||
{ "keys": ["ctrl+k", "ctrl+v"], "command": "paste_from_history" },
|
||||
{ "keys": ["ctrl+option+v"], "command": "paste_from_history" },
|
||||
|
||||
{ "keys": ["alt+super+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
|
||||
{ "keys": ["alt+super+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
|
||||
{ "keys": ["alt+super+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
|
||||
{ "keys": ["alt+super+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
|
||||
|
||||
{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
|
||||
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
|
||||
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
|
||||
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
|
||||
|
||||
{ "keys": ["alt+super+up"], "command": "scroll_lines", "args": {"amount": 1.0} },
|
||||
{ "keys": ["alt+super+down"], "command": "scroll_lines", "args": {"amount": -1.0} },
|
||||
|
||||
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
|
||||
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
|
||||
|
||||
{ "keys": ["ctrl+shift+["], "command": "prev_view" },
|
||||
{ "keys": ["ctrl+shift+]"], "command": "next_view" },
|
||||
{ "keys": ["ctrl+super+left"], "command": "prev_view" },
|
||||
{ "keys": ["ctrl+super+right"], "command": "next_view" },
|
||||
|
||||
{ "keys": ["alt+tab"], "command": "next_view_in_stack" },
|
||||
{ "keys": ["alt+shift+tab"], "command": "prev_view_in_stack" },
|
||||
|
||||
{ "keys": ["ctrl+a"], "command": "select_all" },
|
||||
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
|
||||
{ "keys": ["escape"], "command": "single_selection", "context":
|
||||
[
|
||||
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "clear_fields", "context":
|
||||
[
|
||||
{ "key": "has_next_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "clear_fields", "context":
|
||||
[
|
||||
{ "key": "has_prev_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
|
||||
"context":
|
||||
[
|
||||
{ "key": "panel_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_overlay", "context":
|
||||
[
|
||||
{ "key": "overlay_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_popup", "context":
|
||||
[
|
||||
{ "key": "popup_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_auto_complete", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+]"], "command": "indent" },
|
||||
{ "keys": ["ctrl+["], "command": "unindent" },
|
||||
|
||||
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
|
||||
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
|
||||
"context":
|
||||
[
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
|
||||
[
|
||||
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "reindent", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "indent", "context":
|
||||
[
|
||||
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "next_field", "context":
|
||||
[
|
||||
{ "key": "has_next_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "commit_completion", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible" },
|
||||
{ "key": "setting.auto_complete_commit_on_tab" }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "prev_field", "context":
|
||||
[
|
||||
{ "key": "has_prev_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
|
||||
{ "keys": ["ctrl+d"], "command": "find_under_expand" },
|
||||
{ "keys": ["ctrl+k", "ctrl+d"], "command": "find_under_expand_skip" },
|
||||
{ "keys": ["ctrl+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
|
||||
{ "keys": ["alt+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
|
||||
{ "keys": ["alt+m"], "command": "move_to", "args": {"to": "brackets"} },
|
||||
{ "keys": ["ctrl+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} },
|
||||
{ "keys": ["ctrl+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },
|
||||
|
||||
{ "keys": ["ctrl+super+."], "command": "close_tag" },
|
||||
|
||||
{ "keys": ["alt+q"], "command": "toggle_record_macro" },
|
||||
{ "keys": ["alt+shift+q"], "command": "run_macro" },
|
||||
|
||||
{ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
|
||||
{ "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },
|
||||
{ "keys": ["enter"], "command": "commit_completion", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible" },
|
||||
{ "key": "setting.auto_complete_commit_on_tab", "operand": false }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+t"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
|
||||
{ "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
|
||||
{ "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
|
||||
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" },
|
||||
{ "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
|
||||
{ "keys": ["alt+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
|
||||
{ "keys": ["f12"], "command": "goto_definition" },
|
||||
{ "keys": ["ctrl+super+down"], "command": "goto_definition" },
|
||||
{ "keys": ["ctrl+shift+r"], "command": "goto_symbol_in_project" },
|
||||
{ "keys": ["alt+minus"], "command": "jump_back" },
|
||||
{ "keys": ["alt+shift+minus"], "command": "jump_forward" },
|
||||
|
||||
{ "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": false} },
|
||||
{ "keys": ["ctrl+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": true} },
|
||||
{ "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
|
||||
{ "keys": ["ctrl+super+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
|
||||
{ "keys": ["ctrl+super+e"], "command": "replace_next" },
|
||||
{ "keys": ["ctrl+g"], "command": "find_next" },
|
||||
{ "keys": ["ctrl+shift+g"], "command": "find_prev" },
|
||||
{ "keys": ["ctrl+e"], "command": "slurp_find_string" },
|
||||
{ "keys": ["ctrl+shift+e"], "command": "slurp_replace_string" },
|
||||
|
||||
{ "keys": ["super+ctrl+g"], "command": "find_under" },
|
||||
{ "keys": ["shift+super+ctrl+g"], "command": "find_under_prev" },
|
||||
{ "keys": ["alt+ctrl+g"], "command": "find_all_under" },
|
||||
|
||||
{ "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
|
||||
{ "keys": ["f4"], "command": "next_result" },
|
||||
{ "keys": ["shift+f4"], "command": "prev_result" },
|
||||
|
||||
{ "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
|
||||
{ "keys": ["alt+f6"], "command": "next_misspelling" },
|
||||
{ "keys": ["alt+shift+f6"], "command": "prev_misspelling" },
|
||||
|
||||
{ "keys": ["alt+ctrl+up"], "command": "swap_line_up" },
|
||||
{ "keys": ["alt+ctrl+down"], "command": "swap_line_down" },
|
||||
|
||||
{ "keys": ["alt+backspace"], "command": "delete_word", "args": { "forward": false, "sub_words": true } },
|
||||
{ "keys": ["alt+delete"], "command": "delete_word", "args": { "forward": true, "sub_words": true } },
|
||||
|
||||
{ "keys": ["ctrl+forward_slash"], "command": "toggle_comment", "args": { "block": false } },
|
||||
{ "keys": ["ctrl+super+forward_slash"], "command": "toggle_comment", "args": { "block": true } },
|
||||
|
||||
{ "keys": ["ctrl+j"], "command": "join_lines" },
|
||||
{ "keys": ["ctrl+shift+d"], "command": "duplicate_line" },
|
||||
|
||||
{ "keys": ["alt+backquote"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
|
||||
|
||||
{ "keys": ["alt+space"], "command": "auto_complete" },
|
||||
{ "keys": ["alt+space"], "command": "replace_completion_with_auto_complete", "context":
|
||||
[
|
||||
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
|
||||
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+super+p"], "command": "show_scope_name" },
|
||||
{ "keys": ["alt+shift+p"], "command": "show_scope_name" },
|
||||
|
||||
{ "keys": ["f7"], "command": "build" },
|
||||
{ "keys": ["ctrl+b"], "command": "build" },
|
||||
{ "keys": ["ctrl+shift+b"], "command": "build", "args": {"select": true} },
|
||||
|
||||
{ "keys": ["alt+c"], "command": "cancel_build" },
|
||||
|
||||
{ "keys": ["alt+t"], "command": "transpose" },
|
||||
|
||||
{ "keys": ["f5"], "command": "sort_lines", "args": {"case_sensitive": false} },
|
||||
{ "keys": ["alt+f5"], "command": "sort_lines", "args": {"case_sensitive": true} },
|
||||
|
||||
// Auto-pair quotes
|
||||
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair single quotes
|
||||
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair brackets
|
||||
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair square brackets
|
||||
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair curly brackets
|
||||
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["{"], "command": "wrap_block", "args": {"begin": "{", "end": "}"}, "context":
|
||||
[
|
||||
{ "key": "indented_block", "match_all": true },
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["enter"], "command": "auto_indent_tag", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "auto_indent_tag", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"keys": ["ctrl+super+1"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+2"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.5, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+3"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.33, 0.66, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+4"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.25, 0.5, 0.75, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+shift+2"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 0.5, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+shift+3"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 0.33, 0.66, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+5"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.5, 1.0],
|
||||
"rows": [0.0, 0.5, 1.0],
|
||||
"cells":
|
||||
[
|
||||
[0, 0, 1, 1], [1, 0, 2, 1],
|
||||
[0, 1, 1, 2], [1, 1, 2, 2]
|
||||
]
|
||||
}
|
||||
},
|
||||
{ "keys": ["alt+1"], "command": "focus_group", "args": { "group": 0 } },
|
||||
{ "keys": ["alt+2"], "command": "focus_group", "args": { "group": 1 } },
|
||||
{ "keys": ["alt+3"], "command": "focus_group", "args": { "group": 2 } },
|
||||
{ "keys": ["alt+4"], "command": "focus_group", "args": { "group": 3 } },
|
||||
{ "keys": ["alt+5"], "command": "focus_group", "args": { "group": 4 } },
|
||||
{ "keys": ["alt+6"], "command": "focus_group", "args": { "group": 5 } },
|
||||
{ "keys": ["alt+7"], "command": "focus_group", "args": { "group": 6 } },
|
||||
{ "keys": ["alt+8"], "command": "focus_group", "args": { "group": 7 } },
|
||||
{ "keys": ["alt+9"], "command": "focus_group", "args": { "group": 8 } },
|
||||
{ "keys": ["alt+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
|
||||
{ "keys": ["alt+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
|
||||
{ "keys": ["alt+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
|
||||
{ "keys": ["alt+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
|
||||
{ "keys": ["alt+shift+5"], "command": "move_to_group", "args": { "group": 4 } },
|
||||
{ "keys": ["alt+shift+6"], "command": "move_to_group", "args": { "group": 5 } },
|
||||
{ "keys": ["alt+shift+7"], "command": "move_to_group", "args": { "group": 6 } },
|
||||
{ "keys": ["alt+shift+8"], "command": "move_to_group", "args": { "group": 7 } },
|
||||
{ "keys": ["alt+shift+9"], "command": "move_to_group", "args": { "group": 8 } },
|
||||
{ "keys": ["alt+0"], "command": "focus_side_bar" },
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+up"], "command": "new_pane" },
|
||||
{ "keys": ["ctrl+k", "ctrl+shift+up"], "command": "new_pane", "args": {"move": false} },
|
||||
{ "keys": ["ctrl+k", "ctrl+down"], "command": "close_pane" },
|
||||
{ "keys": ["ctrl+k", "ctrl+left"], "command": "focus_neighboring_group", "args": {"forward": false} },
|
||||
{ "keys": ["ctrl+k", "ctrl+right"], "command": "focus_neighboring_group" },
|
||||
{ "keys": ["ctrl+k", "ctrl+shift+left"], "command": "move_to_neighboring_group", "args": {"forward": false} },
|
||||
{ "keys": ["ctrl+k", "ctrl+shift+right"], "command": "move_to_neighboring_group" },
|
||||
|
||||
{ "keys": ["ctrl+1"], "command": "select_by_index", "args": { "index": 0 } },
|
||||
{ "keys": ["ctrl+2"], "command": "select_by_index", "args": { "index": 1 } },
|
||||
{ "keys": ["ctrl+3"], "command": "select_by_index", "args": { "index": 2 } },
|
||||
{ "keys": ["ctrl+4"], "command": "select_by_index", "args": { "index": 3 } },
|
||||
{ "keys": ["ctrl+5"], "command": "select_by_index", "args": { "index": 4 } },
|
||||
{ "keys": ["ctrl+6"], "command": "select_by_index", "args": { "index": 5 } },
|
||||
{ "keys": ["ctrl+7"], "command": "select_by_index", "args": { "index": 6 } },
|
||||
{ "keys": ["ctrl+8"], "command": "select_by_index", "args": { "index": 7 } },
|
||||
{ "keys": ["ctrl+9"], "command": "select_by_index", "args": { "index": 8 } },
|
||||
{ "keys": ["ctrl+0"], "command": "select_by_index", "args": { "index": 9 } },
|
||||
|
||||
{ "keys": ["f2"], "command": "next_bookmark" },
|
||||
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
|
||||
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
|
||||
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
|
||||
{ "keys": ["super+f2"], "command": "select_all_bookmarks" },
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+u"], "command": "upper_case" },
|
||||
{ "keys": ["ctrl+k", "ctrl+l"], "command": "lower_case" },
|
||||
{ "keys": ["ctrl+k", "ctrl+space"], "command": "set_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+a"], "command": "select_to_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+w"], "command": "delete_to_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+x"], "command": "swap_with_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
|
||||
|
||||
{ "keys": ["ctrl+equals"], "command": "increase_font_size" },
|
||||
{ "keys": ["ctrl+plus"], "command": "increase_font_size" },
|
||||
{ "keys": ["ctrl+minus"], "command": "decrease_font_size" },
|
||||
|
||||
{ "keys": ["alt+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/Snippets/long-tag.sublime-snippet" } },
|
||||
|
||||
{ "keys": ["alt+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
|
||||
|
||||
{ "keys": ["ctrl+super+q"], "command": "wrap_lines" },
|
||||
|
||||
{ "keys": ["ctrl+super+["], "command": "fold" },
|
||||
{ "keys": ["ctrl+super+]"], "command": "unfold" },
|
||||
{ "keys": ["ctrl+k", "ctrl+1"], "command": "fold_by_level", "args": {"level": 1} },
|
||||
{ "keys": ["ctrl+k", "ctrl+2"], "command": "fold_by_level", "args": {"level": 2} },
|
||||
{ "keys": ["ctrl+k", "ctrl+3"], "command": "fold_by_level", "args": {"level": 3} },
|
||||
{ "keys": ["ctrl+k", "ctrl+4"], "command": "fold_by_level", "args": {"level": 4} },
|
||||
{ "keys": ["ctrl+k", "ctrl+5"], "command": "fold_by_level", "args": {"level": 5} },
|
||||
{ "keys": ["ctrl+k", "ctrl+6"], "command": "fold_by_level", "args": {"level": 6} },
|
||||
{ "keys": ["ctrl+k", "ctrl+7"], "command": "fold_by_level", "args": {"level": 7} },
|
||||
{ "keys": ["ctrl+k", "ctrl+8"], "command": "fold_by_level", "args": {"level": 8} },
|
||||
{ "keys": ["ctrl+k", "ctrl+9"], "command": "fold_by_level", "args": {"level": 9} },
|
||||
{ "keys": ["ctrl+k", "ctrl+0"], "command": "unfold_all" },
|
||||
{ "keys": ["ctrl+k", "ctrl+j"], "command": "unfold_all" },
|
||||
{ "keys": ["ctrl+k", "ctrl+t"], "command": "fold_tag_attributes" },
|
||||
|
||||
{ "keys": ["ctrl+super+o"], "command": "toggle_overwrite" },
|
||||
|
||||
{ "keys": ["super+f2"], "command": "context_menu" },
|
||||
|
||||
{ "keys": ["ctrl+super+c"], "command": "toggle_case_sensitive", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["ctrl+super+r"], "command": "toggle_regex", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["ctrl+super+w"], "command": "toggle_whole_word", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["ctrl+super+a"], "command": "toggle_preserve_case", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Find panel key bindings
|
||||
{ "keys": ["enter"], "command": "find_next", "context":
|
||||
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
// Replace panel key bindings
|
||||
{ "keys": ["enter"], "command": "find_next", "context":
|
||||
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["alt+super+enter"], "command": "replace_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
// Incremental find panel key bindings
|
||||
{ "keys": ["enter"], "command": "hide_panel", "context":
|
||||
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+,"], "command": "edit_settings", "args":
|
||||
{
|
||||
"base_file": "${packages}/Default/Preferences.sublime-settings",
|
||||
"default": "// Settings in here override those in \"Default/Preferences.sublime-settings\",\n// and are overridden in turn by syntax-specific settings.\n{\n\t$0\n}\n"
|
||||
}
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+y"], "command": "yank" },
|
||||
{ "keys": ["ctrl+k", "ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
{ "keys": ["ctrl+k", "ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
|
||||
{ "keys": ["ctrl+k", "ctrl+c"], "command": "show_at_center" },
|
||||
|
||||
// These are OS X built in commands, and don't need to be listed here, but
|
||||
// doing so lets them show up in the menu
|
||||
{ "keys": ["alt+y"], "command": "yank" },
|
||||
{ "keys": ["ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
|
||||
// ctrl+delete isn't a built in command, but makes sense anyway
|
||||
{ "keys": ["ctrl+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
{ "keys": ["alt+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
{ "keys": ["alt+l"], "command": "show_at_center" },
|
||||
{ "keys": ["alt+o"], "command": "insert_snippet", "args": { "contents": "$0\n" } },
|
||||
{ "keys": ["alt+ctrl+d"], "command": "noop" },
|
||||
{ "keys": ["alt+ctrl+shift+d"], "command": "noop" },
|
||||
|
||||
// HTML, XML close tag
|
||||
{ "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
|
||||
[
|
||||
{ "key": "selector", "operator": "equal", "operand": "(text.html, text.xml) - string - comment", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
|
||||
{ "key": "setting.auto_close_tags" }
|
||||
]
|
||||
}
|
||||
]
|
@@ -1,706 +0,0 @@
|
||||
/*
|
||||
On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings,
|
||||
and don't need to be repeated here. Anything listed here will take precedence, however.
|
||||
*/
|
||||
[
|
||||
{ "keys": ["ctrl+shift+n"], "command": "new_window" },
|
||||
{ "keys": ["ctrl+shift+w"], "command": "close_window" },
|
||||
{ "keys": ["ctrl+o"], "command": "prompt_open" },
|
||||
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
|
||||
{ "keys": ["ctrl+super+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
|
||||
{ "keys": ["ctrl+n"], "command": "new_file" },
|
||||
{ "keys": ["ctrl+s"], "command": "save" },
|
||||
{ "keys": ["ctrl+shift+s"], "command": "prompt_save_as" },
|
||||
{ "keys": ["ctrl+super+s"], "command": "save_all" },
|
||||
{ "keys": ["ctrl+w"], "command": "close" },
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+b"], "command": "toggle_side_bar" },
|
||||
{ "keys": ["ctrl+alt+f"], "command": "toggle_full_screen" },
|
||||
{ "keys": ["ctrl+alt+shift+f"], "command": "toggle_distraction_free" },
|
||||
|
||||
{ "keys": ["ctrl+z"], "command": "undo" },
|
||||
{ "keys": ["ctrl+shift+z"], "command": "redo" },
|
||||
{ "keys": ["ctrl+y"], "command": "redo_or_repeat" },
|
||||
{ "keys": ["ctrl+u"], "command": "soft_undo" },
|
||||
{ "keys": ["ctrl+shift+u"], "command": "soft_redo" },
|
||||
|
||||
{ "keys": ["ctrl+x"], "command": "cut" },
|
||||
{ "keys": ["ctrl+c"], "command": "copy" },
|
||||
{ "keys": ["ctrl+v"], "command": "paste" },
|
||||
{ "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },
|
||||
{ "keys": ["ctrl+k", "ctrl+v"], "command": "paste_from_history" },
|
||||
{ "keys": ["ctrl+option+v"], "command": "paste_from_history" },
|
||||
|
||||
{ "keys": ["alt+super+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
|
||||
{ "keys": ["alt+super+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
|
||||
{ "keys": ["alt+super+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
|
||||
{ "keys": ["alt+super+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
|
||||
|
||||
{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
|
||||
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
|
||||
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
|
||||
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
|
||||
|
||||
{ "keys": ["alt+super+up"], "command": "scroll_lines", "args": {"amount": 1.0} },
|
||||
{ "keys": ["alt+super+down"], "command": "scroll_lines", "args": {"amount": -1.0} },
|
||||
|
||||
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
|
||||
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
|
||||
|
||||
{ "keys": ["ctrl+shift+["], "command": "prev_view" },
|
||||
{ "keys": ["ctrl+shift+]"], "command": "next_view" },
|
||||
{ "keys": ["ctrl+super+left"], "command": "prev_view" },
|
||||
{ "keys": ["ctrl+super+right"], "command": "next_view" },
|
||||
|
||||
{ "keys": ["alt+tab"], "command": "next_view_in_stack" },
|
||||
{ "keys": ["alt+shift+tab"], "command": "prev_view_in_stack" },
|
||||
|
||||
{ "keys": ["ctrl+a"], "command": "select_all" },
|
||||
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
|
||||
{ "keys": ["escape"], "command": "single_selection", "context":
|
||||
[
|
||||
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "clear_fields", "context":
|
||||
[
|
||||
{ "key": "has_next_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "clear_fields", "context":
|
||||
[
|
||||
{ "key": "has_prev_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
|
||||
"context":
|
||||
[
|
||||
{ "key": "panel_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_overlay", "context":
|
||||
[
|
||||
{ "key": "overlay_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_popup", "context":
|
||||
[
|
||||
{ "key": "popup_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_auto_complete", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+]"], "command": "indent" },
|
||||
{ "keys": ["ctrl+["], "command": "unindent" },
|
||||
|
||||
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
|
||||
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
|
||||
"context":
|
||||
[
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
|
||||
[
|
||||
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "reindent", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "indent", "context":
|
||||
[
|
||||
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "next_field", "context":
|
||||
[
|
||||
{ "key": "has_next_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "commit_completion", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible" },
|
||||
{ "key": "setting.auto_complete_commit_on_tab" }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "prev_field", "context":
|
||||
[
|
||||
{ "key": "has_prev_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
|
||||
{ "keys": ["ctrl+d"], "command": "find_under_expand" },
|
||||
{ "keys": ["ctrl+k", "ctrl+d"], "command": "find_under_expand_skip" },
|
||||
{ "keys": ["ctrl+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
|
||||
{ "keys": ["alt+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
|
||||
{ "keys": ["alt+m"], "command": "move_to", "args": {"to": "brackets"} },
|
||||
{ "keys": ["ctrl+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} },
|
||||
{ "keys": ["ctrl+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },
|
||||
|
||||
{ "keys": ["ctrl+super+."], "command": "close_tag" },
|
||||
|
||||
{ "keys": ["alt+q"], "command": "toggle_record_macro" },
|
||||
{ "keys": ["alt+shift+q"], "command": "run_macro" },
|
||||
|
||||
{ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
|
||||
{ "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },
|
||||
{ "keys": ["enter"], "command": "commit_completion", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible" },
|
||||
{ "key": "setting.auto_complete_commit_on_tab", "operand": false }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+t"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
|
||||
{ "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
|
||||
{ "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
|
||||
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" },
|
||||
{ "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
|
||||
{ "keys": ["alt+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
|
||||
{ "keys": ["f12"], "command": "goto_definition" },
|
||||
{ "keys": ["ctrl+super+down"], "command": "goto_definition" },
|
||||
{ "keys": ["ctrl+shift+r"], "command": "goto_symbol_in_project" },
|
||||
{ "keys": ["alt+minus"], "command": "jump_back" },
|
||||
{ "keys": ["alt+shift+minus"], "command": "jump_forward" },
|
||||
|
||||
{ "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": false} },
|
||||
{ "keys": ["ctrl+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": true} },
|
||||
{ "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
|
||||
{ "keys": ["ctrl+super+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
|
||||
{ "keys": ["ctrl+super+e"], "command": "replace_next" },
|
||||
{ "keys": ["ctrl+g"], "command": "find_next" },
|
||||
{ "keys": ["ctrl+shift+g"], "command": "find_prev" },
|
||||
{ "keys": ["ctrl+e"], "command": "slurp_find_string" },
|
||||
{ "keys": ["ctrl+shift+e"], "command": "slurp_replace_string" },
|
||||
|
||||
{ "keys": ["super+ctrl+g"], "command": "find_under" },
|
||||
{ "keys": ["shift+super+ctrl+g"], "command": "find_under_prev" },
|
||||
{ "keys": ["alt+ctrl+g"], "command": "find_all_under" },
|
||||
|
||||
{ "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
|
||||
{ "keys": ["f4"], "command": "next_result" },
|
||||
{ "keys": ["shift+f4"], "command": "prev_result" },
|
||||
|
||||
{ "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
|
||||
{ "keys": ["alt+f6"], "command": "next_misspelling" },
|
||||
{ "keys": ["alt+shift+f6"], "command": "prev_misspelling" },
|
||||
|
||||
{ "keys": ["alt+ctrl+up"], "command": "swap_line_up" },
|
||||
{ "keys": ["alt+ctrl+down"], "command": "swap_line_down" },
|
||||
|
||||
{ "keys": ["alt+backspace"], "command": "delete_word", "args": { "forward": false, "sub_words": true } },
|
||||
{ "keys": ["alt+delete"], "command": "delete_word", "args": { "forward": true, "sub_words": true } },
|
||||
|
||||
{ "keys": ["ctrl+forward_slash"], "command": "toggle_comment", "args": { "block": false } },
|
||||
{ "keys": ["ctrl+super+forward_slash"], "command": "toggle_comment", "args": { "block": true } },
|
||||
|
||||
{ "keys": ["ctrl+j"], "command": "join_lines" },
|
||||
{ "keys": ["ctrl+shift+d"], "command": "duplicate_line" },
|
||||
|
||||
{ "keys": ["alt+backquote"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
|
||||
|
||||
{ "keys": ["alt+space"], "command": "auto_complete" },
|
||||
{ "keys": ["alt+space"], "command": "replace_completion_with_auto_complete", "context":
|
||||
[
|
||||
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
|
||||
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+super+p"], "command": "show_scope_name" },
|
||||
{ "keys": ["alt+shift+p"], "command": "show_scope_name" },
|
||||
|
||||
{ "keys": ["f7"], "command": "build" },
|
||||
{ "keys": ["ctrl+b"], "command": "build" },
|
||||
{ "keys": ["ctrl+shift+b"], "command": "build", "args": {"select": true} },
|
||||
|
||||
{ "keys": ["alt+c"], "command": "cancel_build" },
|
||||
|
||||
{ "keys": ["alt+t"], "command": "transpose" },
|
||||
|
||||
{ "keys": ["f5"], "command": "sort_lines", "args": {"case_sensitive": false} },
|
||||
{ "keys": ["alt+f5"], "command": "sort_lines", "args": {"case_sensitive": true} },
|
||||
|
||||
// Auto-pair quotes
|
||||
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair single quotes
|
||||
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair brackets
|
||||
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair square brackets
|
||||
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair curly brackets
|
||||
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["{"], "command": "wrap_block", "args": {"begin": "{", "end": "}"}, "context":
|
||||
[
|
||||
{ "key": "indented_block", "match_all": true },
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["enter"], "command": "auto_indent_tag", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "auto_indent_tag", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"keys": ["ctrl+super+1"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+2"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.5, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+3"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.33, 0.66, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+4"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.25, 0.5, 0.75, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+shift+2"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 0.5, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+shift+3"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 0.33, 0.66, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+super+5"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.5, 1.0],
|
||||
"rows": [0.0, 0.5, 1.0],
|
||||
"cells":
|
||||
[
|
||||
[0, 0, 1, 1], [1, 0, 2, 1],
|
||||
[0, 1, 1, 2], [1, 1, 2, 2]
|
||||
]
|
||||
}
|
||||
},
|
||||
{ "keys": ["alt+1"], "command": "focus_group", "args": { "group": 0 } },
|
||||
{ "keys": ["alt+2"], "command": "focus_group", "args": { "group": 1 } },
|
||||
{ "keys": ["alt+3"], "command": "focus_group", "args": { "group": 2 } },
|
||||
{ "keys": ["alt+4"], "command": "focus_group", "args": { "group": 3 } },
|
||||
{ "keys": ["alt+5"], "command": "focus_group", "args": { "group": 4 } },
|
||||
{ "keys": ["alt+6"], "command": "focus_group", "args": { "group": 5 } },
|
||||
{ "keys": ["alt+7"], "command": "focus_group", "args": { "group": 6 } },
|
||||
{ "keys": ["alt+8"], "command": "focus_group", "args": { "group": 7 } },
|
||||
{ "keys": ["alt+9"], "command": "focus_group", "args": { "group": 8 } },
|
||||
{ "keys": ["alt+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
|
||||
{ "keys": ["alt+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
|
||||
{ "keys": ["alt+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
|
||||
{ "keys": ["alt+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
|
||||
{ "keys": ["alt+shift+5"], "command": "move_to_group", "args": { "group": 4 } },
|
||||
{ "keys": ["alt+shift+6"], "command": "move_to_group", "args": { "group": 5 } },
|
||||
{ "keys": ["alt+shift+7"], "command": "move_to_group", "args": { "group": 6 } },
|
||||
{ "keys": ["alt+shift+8"], "command": "move_to_group", "args": { "group": 7 } },
|
||||
{ "keys": ["alt+shift+9"], "command": "move_to_group", "args": { "group": 8 } },
|
||||
{ "keys": ["alt+0"], "command": "focus_side_bar" },
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+up"], "command": "new_pane" },
|
||||
{ "keys": ["ctrl+k", "ctrl+shift+up"], "command": "new_pane", "args": {"move": false} },
|
||||
{ "keys": ["ctrl+k", "ctrl+down"], "command": "close_pane" },
|
||||
{ "keys": ["ctrl+k", "ctrl+left"], "command": "focus_neighboring_group", "args": {"forward": false} },
|
||||
{ "keys": ["ctrl+k", "ctrl+right"], "command": "focus_neighboring_group" },
|
||||
{ "keys": ["ctrl+k", "ctrl+shift+left"], "command": "move_to_neighboring_group", "args": {"forward": false} },
|
||||
{ "keys": ["ctrl+k", "ctrl+shift+right"], "command": "move_to_neighboring_group" },
|
||||
|
||||
{ "keys": ["ctrl+1"], "command": "select_by_index", "args": { "index": 0 } },
|
||||
{ "keys": ["ctrl+2"], "command": "select_by_index", "args": { "index": 1 } },
|
||||
{ "keys": ["ctrl+3"], "command": "select_by_index", "args": { "index": 2 } },
|
||||
{ "keys": ["ctrl+4"], "command": "select_by_index", "args": { "index": 3 } },
|
||||
{ "keys": ["ctrl+5"], "command": "select_by_index", "args": { "index": 4 } },
|
||||
{ "keys": ["ctrl+6"], "command": "select_by_index", "args": { "index": 5 } },
|
||||
{ "keys": ["ctrl+7"], "command": "select_by_index", "args": { "index": 6 } },
|
||||
{ "keys": ["ctrl+8"], "command": "select_by_index", "args": { "index": 7 } },
|
||||
{ "keys": ["ctrl+9"], "command": "select_by_index", "args": { "index": 8 } },
|
||||
{ "keys": ["ctrl+0"], "command": "select_by_index", "args": { "index": 9 } },
|
||||
|
||||
{ "keys": ["f2"], "command": "next_bookmark" },
|
||||
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
|
||||
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
|
||||
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
|
||||
{ "keys": ["super+f2"], "command": "select_all_bookmarks" },
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+u"], "command": "upper_case" },
|
||||
{ "keys": ["ctrl+k", "ctrl+l"], "command": "lower_case" },
|
||||
{ "keys": ["ctrl+k", "ctrl+space"], "command": "set_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+a"], "command": "select_to_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+w"], "command": "delete_to_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+x"], "command": "swap_with_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
|
||||
|
||||
{ "keys": ["ctrl+equals"], "command": "increase_font_size" },
|
||||
{ "keys": ["ctrl+plus"], "command": "increase_font_size" },
|
||||
{ "keys": ["ctrl+minus"], "command": "decrease_font_size" },
|
||||
|
||||
{ "keys": ["alt+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/Snippets/long-tag.sublime-snippet" } },
|
||||
|
||||
{ "keys": ["alt+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
|
||||
|
||||
{ "keys": ["ctrl+super+q"], "command": "wrap_lines" },
|
||||
|
||||
{ "keys": ["ctrl+super+["], "command": "fold" },
|
||||
{ "keys": ["ctrl+super+]"], "command": "unfold" },
|
||||
{ "keys": ["ctrl+k", "ctrl+1"], "command": "fold_by_level", "args": {"level": 1} },
|
||||
{ "keys": ["ctrl+k", "ctrl+2"], "command": "fold_by_level", "args": {"level": 2} },
|
||||
{ "keys": ["ctrl+k", "ctrl+3"], "command": "fold_by_level", "args": {"level": 3} },
|
||||
{ "keys": ["ctrl+k", "ctrl+4"], "command": "fold_by_level", "args": {"level": 4} },
|
||||
{ "keys": ["ctrl+k", "ctrl+5"], "command": "fold_by_level", "args": {"level": 5} },
|
||||
{ "keys": ["ctrl+k", "ctrl+6"], "command": "fold_by_level", "args": {"level": 6} },
|
||||
{ "keys": ["ctrl+k", "ctrl+7"], "command": "fold_by_level", "args": {"level": 7} },
|
||||
{ "keys": ["ctrl+k", "ctrl+8"], "command": "fold_by_level", "args": {"level": 8} },
|
||||
{ "keys": ["ctrl+k", "ctrl+9"], "command": "fold_by_level", "args": {"level": 9} },
|
||||
{ "keys": ["ctrl+k", "ctrl+0"], "command": "unfold_all" },
|
||||
{ "keys": ["ctrl+k", "ctrl+j"], "command": "unfold_all" },
|
||||
{ "keys": ["ctrl+k", "ctrl+t"], "command": "fold_tag_attributes" },
|
||||
|
||||
{ "keys": ["ctrl+super+o"], "command": "toggle_overwrite" },
|
||||
|
||||
{ "keys": ["super+f2"], "command": "context_menu" },
|
||||
|
||||
{ "keys": ["ctrl+super+c"], "command": "toggle_case_sensitive", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["ctrl+super+r"], "command": "toggle_regex", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["ctrl+super+w"], "command": "toggle_whole_word", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["ctrl+super+a"], "command": "toggle_preserve_case", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Find panel key bindings
|
||||
{ "keys": ["enter"], "command": "find_next", "context":
|
||||
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
// Replace panel key bindings
|
||||
{ "keys": ["enter"], "command": "find_next", "context":
|
||||
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["alt+super+enter"], "command": "replace_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
// Incremental find panel key bindings
|
||||
{ "keys": ["enter"], "command": "hide_panel", "context":
|
||||
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["super+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+,"], "command": "edit_settings", "args":
|
||||
{
|
||||
"base_file": "${packages}/Default/Preferences.sublime-settings",
|
||||
"default": "// Settings in here override those in \"Default/Preferences.sublime-settings\",\n// and are overridden in turn by syntax-specific settings.\n{\n\t$0\n}\n"
|
||||
}
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+y"], "command": "yank" },
|
||||
{ "keys": ["ctrl+k", "ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
{ "keys": ["ctrl+k", "ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
|
||||
{ "keys": ["ctrl+k", "ctrl+c"], "command": "show_at_center" },
|
||||
|
||||
// These are OS X built in commands, and don't need to be listed here, but
|
||||
// doing so lets them show up in the menu
|
||||
{ "keys": ["alt+y"], "command": "yank" },
|
||||
{ "keys": ["ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
|
||||
// ctrl+delete isn't a built in command, but makes sense anyway
|
||||
{ "keys": ["ctrl+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
{ "keys": ["alt+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
{ "keys": ["alt+l"], "command": "show_at_center" },
|
||||
{ "keys": ["alt+o"], "command": "insert_snippet", "args": { "contents": "$0\n" } },
|
||||
{ "keys": ["alt+ctrl+d"], "command": "noop" },
|
||||
{ "keys": ["alt+ctrl+shift+d"], "command": "noop" },
|
||||
|
||||
// HTML, XML close tag
|
||||
{ "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
|
||||
[
|
||||
{ "key": "selector", "operator": "equal", "operand": "(text.html, text.xml) - string - comment", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
|
||||
{ "key": "setting.auto_close_tags" }
|
||||
]
|
||||
}
|
||||
]
|
@@ -1,734 +0,0 @@
|
||||
[
|
||||
{ "keys": ["ctrl+q"], "command": "exit" },
|
||||
|
||||
{ "keys": ["ctrl+shift+n"], "command": "new_window" },
|
||||
{ "keys": ["ctrl+shift+w"], "command": "close_window" },
|
||||
{ "keys": ["ctrl+o"], "command": "prompt_open_file" },
|
||||
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
|
||||
{ "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
|
||||
{ "keys": ["ctrl+n"], "command": "new_file" },
|
||||
{ "keys": ["ctrl+s"], "command": "save" },
|
||||
{ "keys": ["ctrl+shift+s"], "command": "prompt_save_as" },
|
||||
{ "keys": ["ctrl+f4"], "command": "close_file" },
|
||||
{ "keys": ["ctrl+w"], "command": "close" },
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+b"], "command": "toggle_side_bar" },
|
||||
{ "keys": ["f11"], "command": "toggle_full_screen" },
|
||||
{ "keys": ["shift+f11"], "command": "toggle_distraction_free" },
|
||||
|
||||
{ "keys": ["backspace"], "command": "left_delete" },
|
||||
{ "keys": ["shift+backspace"], "command": "left_delete" },
|
||||
{ "keys": ["ctrl+shift+backspace"], "command": "left_delete" },
|
||||
{ "keys": ["delete"], "command": "right_delete" },
|
||||
{ "keys": ["enter"], "command": "insert", "args": {"characters": "\n"} },
|
||||
{ "keys": ["shift+enter"], "command": "insert", "args": {"characters": "\n"} },
|
||||
{ "keys": ["keypad_enter"], "command": "insert", "args": {"characters": "\n"} },
|
||||
{ "keys": ["shift+keypad_enter"], "command": "insert", "args": {"characters": "\n"} },
|
||||
|
||||
{ "keys": ["ctrl+z"], "command": "undo" },
|
||||
{ "keys": ["ctrl+shift+z"], "command": "redo" },
|
||||
{ "keys": ["ctrl+y"], "command": "redo_or_repeat" },
|
||||
{ "keys": ["ctrl+u"], "command": "soft_undo" },
|
||||
{ "keys": ["ctrl+shift+u"], "command": "soft_redo" },
|
||||
|
||||
{ "keys": ["shift+delete"], "command": "cut" },
|
||||
{ "keys": ["ctrl+insert"], "command": "copy" },
|
||||
{ "keys": ["shift+insert"], "command": "paste" },
|
||||
|
||||
// These two key bindings should replace the above three if you'd prefer
|
||||
// the traditional X11 behavior of shift+insert pasting from the primary
|
||||
// selection. The above CUA keys are the default, to match most GTK
|
||||
// applications.
|
||||
//{ "keys": ["shift+insert"], "command": "paste", "args": {"clipboard": "selection"} },
|
||||
//{ "keys": ["shift+delete"], "command": "right_delete" },
|
||||
|
||||
{ "keys": ["ctrl+x"], "command": "cut" },
|
||||
{ "keys": ["ctrl+c"], "command": "copy" },
|
||||
{ "keys": ["ctrl+v"], "command": "paste" },
|
||||
{ "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },
|
||||
{ "keys": ["ctrl+k", "ctrl+v"], "command": "paste_from_history" },
|
||||
|
||||
{ "keys": ["left"], "command": "move", "args": {"by": "characters", "forward": false} },
|
||||
{ "keys": ["right"], "command": "move", "args": {"by": "characters", "forward": true} },
|
||||
{ "keys": ["up"], "command": "move", "args": {"by": "lines", "forward": false} },
|
||||
{ "keys": ["down"], "command": "move", "args": {"by": "lines", "forward": true} },
|
||||
{ "keys": ["shift+left"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true} },
|
||||
{ "keys": ["shift+right"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true} },
|
||||
{ "keys": ["shift+up"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true} },
|
||||
{ "keys": ["shift+down"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true} },
|
||||
|
||||
{ "keys": ["ctrl+left"], "command": "move", "args": {"by": "words", "forward": false} },
|
||||
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "word_ends", "forward": true} },
|
||||
{ "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} },
|
||||
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true} },
|
||||
|
||||
{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
|
||||
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
|
||||
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
|
||||
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
|
||||
|
||||
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
|
||||
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
|
||||
|
||||
{ "keys": ["pageup"], "command": "move", "args": {"by": "pages", "forward": false} },
|
||||
{ "keys": ["pagedown"], "command": "move", "args": {"by": "pages", "forward": true} },
|
||||
{ "keys": ["shift+pageup"], "command": "move", "args": {"by": "pages", "forward": false, "extend": true} },
|
||||
{ "keys": ["shift+pagedown"], "command": "move", "args": {"by": "pages", "forward": true, "extend": true} },
|
||||
|
||||
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol", "extend": false} },
|
||||
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol", "extend": false} },
|
||||
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true} },
|
||||
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
|
||||
{ "keys": ["ctrl+home"], "command": "move_to", "args": {"to": "bof", "extend": false} },
|
||||
{ "keys": ["ctrl+end"], "command": "move_to", "args": {"to": "eof", "extend": false} },
|
||||
{ "keys": ["ctrl+shift+home"], "command": "move_to", "args": {"to": "bof", "extend": true} },
|
||||
{ "keys": ["ctrl+shift+end"], "command": "move_to", "args": {"to": "eof", "extend": true} },
|
||||
|
||||
{ "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 1.0 } },
|
||||
{ "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -1.0 } },
|
||||
|
||||
{ "keys": ["ctrl+pagedown"], "command": "next_view" },
|
||||
{ "keys": ["ctrl+pageup"], "command": "prev_view" },
|
||||
|
||||
{ "keys": ["ctrl+tab"], "command": "next_view_in_stack" },
|
||||
{ "keys": ["ctrl+shift+tab"], "command": "prev_view_in_stack" },
|
||||
|
||||
{ "keys": ["ctrl+a"], "command": "select_all" },
|
||||
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
|
||||
{ "keys": ["escape"], "command": "single_selection", "context":
|
||||
[
|
||||
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "clear_fields", "context":
|
||||
[
|
||||
{ "key": "has_next_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "clear_fields", "context":
|
||||
[
|
||||
{ "key": "has_prev_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
|
||||
"context":
|
||||
[
|
||||
{ "key": "panel_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_overlay", "context":
|
||||
[
|
||||
{ "key": "overlay_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_popup", "context":
|
||||
[
|
||||
{ "key": "popup_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_auto_complete", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
|
||||
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
|
||||
"context":
|
||||
[
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
|
||||
[
|
||||
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "reindent", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "indent", "context":
|
||||
[
|
||||
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "next_field", "context":
|
||||
[
|
||||
{ "key": "has_next_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "commit_completion", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible" },
|
||||
{ "key": "setting.auto_complete_commit_on_tab" }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "prev_field", "context":
|
||||
[
|
||||
{ "key": "has_prev_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+]"], "command": "indent" },
|
||||
{ "keys": ["ctrl+["], "command": "unindent" },
|
||||
|
||||
{ "keys": ["insert"], "command": "toggle_overwrite" },
|
||||
|
||||
{ "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
|
||||
{ "keys": ["ctrl+d"], "command": "find_under_expand" },
|
||||
{ "keys": ["ctrl+k", "ctrl+d"], "command": "find_under_expand_skip" },
|
||||
{ "keys": ["ctrl+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
|
||||
{ "keys": ["ctrl+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
|
||||
{ "keys": ["ctrl+m"], "command": "move_to", "args": {"to": "brackets"} },
|
||||
{ "keys": ["ctrl+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} },
|
||||
{ "keys": ["ctrl+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },
|
||||
|
||||
{ "keys": ["alt+."], "command": "close_tag" },
|
||||
|
||||
{ "keys": ["ctrl+alt+q"], "command": "toggle_record_macro" },
|
||||
{ "keys": ["ctrl+alt+shift+q"], "command": "run_macro" },
|
||||
|
||||
{ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
|
||||
{ "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },
|
||||
{ "keys": ["enter"], "command": "commit_completion", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible" },
|
||||
{ "key": "setting.auto_complete_commit_on_tab", "operand": false }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
|
||||
{ "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
|
||||
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" },
|
||||
{ "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
|
||||
{ "keys": ["ctrl+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
|
||||
{ "keys": ["ctrl+;"], "command": "show_overlay", "args": {"overlay": "goto", "text": "#"} },
|
||||
{ "keys": ["f12"], "command": "goto_definition" },
|
||||
{ "keys": ["shift+f12"], "command": "goto_reference" },
|
||||
{ "keys": ["ctrl+shift+r"], "command": "goto_symbol_in_project" },
|
||||
{ "keys": ["alt+-"], "command": "jump_back" },
|
||||
{ "keys": ["alt+shift+-"], "command": "jump_forward" },
|
||||
{ "keys": ["alt+keypad_minus"], "command": "jump_back" },
|
||||
{ "keys": ["alt+shift+keypad_minus"], "command": "jump_forward" },
|
||||
|
||||
{ "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": false} },
|
||||
{ "keys": ["ctrl+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": true} },
|
||||
{ "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
|
||||
{ "keys": ["ctrl+h"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
|
||||
{ "keys": ["ctrl+shift+h"], "command": "replace_next" },
|
||||
{ "keys": ["f3"], "command": "find_next" },
|
||||
{ "keys": ["shift+f3"], "command": "find_prev" },
|
||||
{ "keys": ["ctrl+f3"], "command": "find_under" },
|
||||
{ "keys": ["ctrl+shift+f3"], "command": "find_under_prev" },
|
||||
{ "keys": ["alt+f3"], "command": "find_all_under" },
|
||||
{ "keys": ["ctrl+e"], "command": "slurp_find_string" },
|
||||
{ "keys": ["ctrl+shift+e"], "command": "slurp_replace_string" },
|
||||
{ "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
|
||||
{ "keys": ["f4"], "command": "next_result" },
|
||||
{ "keys": ["shift+f4"], "command": "prev_result" },
|
||||
|
||||
{ "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
|
||||
{ "keys": ["ctrl+f6"], "command": "next_misspelling" },
|
||||
{ "keys": ["ctrl+shift+f6"], "command": "prev_misspelling" },
|
||||
|
||||
{ "keys": ["ctrl+shift+up"], "command": "swap_line_up" },
|
||||
{ "keys": ["ctrl+shift+down"], "command": "swap_line_down" },
|
||||
|
||||
{ "keys": ["ctrl+backspace"], "command": "delete_word", "args": { "forward": false } },
|
||||
{ "keys": ["ctrl+shift+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
|
||||
|
||||
{ "keys": ["ctrl+delete"], "command": "delete_word", "args": { "forward": true } },
|
||||
{ "keys": ["ctrl+shift+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
|
||||
{ "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": false } },
|
||||
{ "keys": ["ctrl+shift+/"], "command": "toggle_comment", "args": { "block": true } },
|
||||
|
||||
{ "keys": ["ctrl+j"], "command": "join_lines" },
|
||||
{ "keys": ["ctrl+shift+d"], "command": "duplicate_line" },
|
||||
|
||||
{ "keys": ["ctrl+`"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
|
||||
|
||||
{ "keys": ["alt+/"], "command": "auto_complete" },
|
||||
{ "keys": ["alt+/"], "command": "replace_completion_with_auto_complete", "context":
|
||||
[
|
||||
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
|
||||
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["ctrl+alt+shift+p"], "command": "show_scope_name" },
|
||||
|
||||
{ "keys": ["f7"], "command": "build" },
|
||||
{ "keys": ["ctrl+b"], "command": "build" },
|
||||
{ "keys": ["ctrl+shift+b"], "command": "build", "args": {"select": true} },
|
||||
{ "keys": ["ctrl+break"], "command": "cancel_build" },
|
||||
|
||||
{ "keys": ["ctrl+t"], "command": "transpose" },
|
||||
|
||||
{ "keys": ["f9"], "command": "sort_lines", "args": {"case_sensitive": false} },
|
||||
{ "keys": ["ctrl+f9"], "command": "sort_lines", "args": {"case_sensitive": true} },
|
||||
|
||||
// Auto-pair quotes
|
||||
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair single quotes
|
||||
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair brackets
|
||||
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair square brackets
|
||||
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair curly brackets
|
||||
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["{"], "command": "wrap_block", "args": {"begin": "{", "end": "}"}, "context":
|
||||
[
|
||||
{ "key": "indented_block", "match_all": true },
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["enter"], "command": "auto_indent_tag", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "auto_indent_tag", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"keys": ["alt+shift+1"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+shift+2"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.5, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+shift+3"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.33, 0.66, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+shift+4"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.25, 0.5, 0.75, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+shift+8"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 0.5, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+shift+9"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 0.33, 0.66, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+shift+5"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.5, 1.0],
|
||||
"rows": [0.0, 0.5, 1.0],
|
||||
"cells":
|
||||
[
|
||||
[0, 0, 1, 1], [1, 0, 2, 1],
|
||||
[0, 1, 1, 2], [1, 1, 2, 2]
|
||||
]
|
||||
}
|
||||
},
|
||||
{ "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
|
||||
{ "keys": ["ctrl+2"], "command": "focus_group", "args": { "group": 1 } },
|
||||
{ "keys": ["ctrl+3"], "command": "focus_group", "args": { "group": 2 } },
|
||||
{ "keys": ["ctrl+4"], "command": "focus_group", "args": { "group": 3 } },
|
||||
{ "keys": ["ctrl+5"], "command": "focus_group", "args": { "group": 4 } },
|
||||
{ "keys": ["ctrl+6"], "command": "focus_group", "args": { "group": 5 } },
|
||||
{ "keys": ["ctrl+7"], "command": "focus_group", "args": { "group": 6 } },
|
||||
{ "keys": ["ctrl+8"], "command": "focus_group", "args": { "group": 7 } },
|
||||
{ "keys": ["ctrl+9"], "command": "focus_group", "args": { "group": 8 } },
|
||||
{ "keys": ["ctrl+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
|
||||
{ "keys": ["ctrl+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
|
||||
{ "keys": ["ctrl+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
|
||||
{ "keys": ["ctrl+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
|
||||
{ "keys": ["ctrl+shift+5"], "command": "move_to_group", "args": { "group": 4 } },
|
||||
{ "keys": ["ctrl+shift+6"], "command": "move_to_group", "args": { "group": 5 } },
|
||||
{ "keys": ["ctrl+shift+7"], "command": "move_to_group", "args": { "group": 6 } },
|
||||
{ "keys": ["ctrl+shift+8"], "command": "move_to_group", "args": { "group": 7 } },
|
||||
{ "keys": ["ctrl+shift+9"], "command": "move_to_group", "args": { "group": 8 } },
|
||||
{ "keys": ["ctrl+0"], "command": "focus_side_bar" },
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+up"], "command": "new_pane" },
|
||||
{ "keys": ["ctrl+k", "ctrl+shift+up"], "command": "new_pane", "args": {"move": false} },
|
||||
{ "keys": ["ctrl+k", "ctrl+down"], "command": "close_pane" },
|
||||
{ "keys": ["ctrl+k", "ctrl+left"], "command": "focus_neighboring_group", "args": {"forward": false} },
|
||||
{ "keys": ["ctrl+k", "ctrl+right"], "command": "focus_neighboring_group" },
|
||||
{ "keys": ["ctrl+k", "ctrl+shift+left"], "command": "move_to_neighboring_group", "args": {"forward": false} },
|
||||
{ "keys": ["ctrl+k", "ctrl+shift+right"], "command": "move_to_neighboring_group" },
|
||||
|
||||
{ "keys": ["alt+1"], "command": "select_by_index", "args": { "index": 0 } },
|
||||
{ "keys": ["alt+2"], "command": "select_by_index", "args": { "index": 1 } },
|
||||
{ "keys": ["alt+3"], "command": "select_by_index", "args": { "index": 2 } },
|
||||
{ "keys": ["alt+4"], "command": "select_by_index", "args": { "index": 3 } },
|
||||
{ "keys": ["alt+5"], "command": "select_by_index", "args": { "index": 4 } },
|
||||
{ "keys": ["alt+6"], "command": "select_by_index", "args": { "index": 5 } },
|
||||
{ "keys": ["alt+7"], "command": "select_by_index", "args": { "index": 6 } },
|
||||
{ "keys": ["alt+8"], "command": "select_by_index", "args": { "index": 7 } },
|
||||
{ "keys": ["alt+9"], "command": "select_by_index", "args": { "index": 8 } },
|
||||
{ "keys": ["alt+0"], "command": "select_by_index", "args": { "index": 9 } },
|
||||
|
||||
{ "keys": ["f2"], "command": "next_bookmark" },
|
||||
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
|
||||
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
|
||||
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
|
||||
{ "keys": ["alt+f2"], "command": "select_all_bookmarks" },
|
||||
|
||||
{ "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
|
||||
|
||||
{ "keys": ["alt+q"], "command": "wrap_lines" },
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+u"], "command": "upper_case" },
|
||||
{ "keys": ["ctrl+k", "ctrl+l"], "command": "lower_case" },
|
||||
|
||||
{ "keys": ["ctrl+k", "ctrl+space"], "command": "set_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+a"], "command": "select_to_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+w"], "command": "delete_to_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+x"], "command": "swap_with_mark" },
|
||||
{ "keys": ["ctrl+k", "ctrl+y"], "command": "yank" },
|
||||
{ "keys": ["ctrl+k", "ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
{ "keys": ["ctrl+k", "ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
|
||||
{ "keys": ["ctrl+k", "ctrl+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
|
||||
{ "keys": ["ctrl+k", "ctrl+c"], "command": "show_at_center" },
|
||||
|
||||
{ "keys": ["ctrl++"], "command": "increase_font_size" },
|
||||
{ "keys": ["ctrl+="], "command": "increase_font_size" },
|
||||
{ "keys": ["ctrl+-"], "command": "decrease_font_size" },
|
||||
|
||||
{ "keys": ["alt+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/Snippets/long-tag.sublime-snippet" } },
|
||||
|
||||
{ "keys": ["ctrl+shift+["], "command": "fold" },
|
||||
{ "keys": ["ctrl+shift+]"], "command": "unfold" },
|
||||
{ "keys": ["ctrl+k", "ctrl+1"], "command": "fold_by_level", "args": {"level": 1} },
|
||||
{ "keys": ["ctrl+k", "ctrl+2"], "command": "fold_by_level", "args": {"level": 2} },
|
||||
{ "keys": ["ctrl+k", "ctrl+3"], "command": "fold_by_level", "args": {"level": 3} },
|
||||
{ "keys": ["ctrl+k", "ctrl+4"], "command": "fold_by_level", "args": {"level": 4} },
|
||||
{ "keys": ["ctrl+k", "ctrl+5"], "command": "fold_by_level", "args": {"level": 5} },
|
||||
{ "keys": ["ctrl+k", "ctrl+6"], "command": "fold_by_level", "args": {"level": 6} },
|
||||
{ "keys": ["ctrl+k", "ctrl+7"], "command": "fold_by_level", "args": {"level": 7} },
|
||||
{ "keys": ["ctrl+k", "ctrl+8"], "command": "fold_by_level", "args": {"level": 8} },
|
||||
{ "keys": ["ctrl+k", "ctrl+9"], "command": "fold_by_level", "args": {"level": 9} },
|
||||
{ "keys": ["ctrl+k", "ctrl+0"], "command": "unfold_all" },
|
||||
{ "keys": ["ctrl+k", "ctrl+j"], "command": "unfold_all" },
|
||||
{ "keys": ["ctrl+k", "ctrl+t"], "command": "fold_tag_attributes" },
|
||||
|
||||
{ "keys": ["context_menu"], "command": "context_menu" },
|
||||
|
||||
{ "keys": ["alt+c"], "command": "toggle_case_sensitive", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["alt+r"], "command": "toggle_regex", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["alt+w"], "command": "toggle_whole_word", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["alt+a"], "command": "toggle_preserve_case", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Find panel key bindings
|
||||
{ "keys": ["enter"], "command": "find_next", "context":
|
||||
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
// Replace panel key bindings
|
||||
{ "keys": ["enter"], "command": "find_next", "context":
|
||||
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["ctrl+alt+enter"], "command": "replace_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
// Incremental find panel key bindings
|
||||
{ "keys": ["enter"], "command": "hide_panel", "context":
|
||||
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
// Find in Files panel key bindings
|
||||
{ "keys": ["alt+enter"], "command": "find_all",
|
||||
"context": [{"key": "panel", "operand": "find_in_files"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["ctrl+alt+enter"], "command": "replace_all",
|
||||
"context": [{"key": "panel", "operand": "find_in_files"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
// HTML, XML close tag
|
||||
{ "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
|
||||
[
|
||||
{ "key": "selector", "operator": "equal", "operand": "(text.html, text.xml) - string - comment", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
|
||||
{ "key": "setting.auto_close_tags" }
|
||||
]
|
||||
}
|
||||
]
|
@@ -1,706 +0,0 @@
|
||||
/*
|
||||
On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings,
|
||||
and don't need to be repeated here. Anything listed here will take precedence, however.
|
||||
*/
|
||||
[
|
||||
{ "keys": ["super+shift+n"], "command": "new_window" },
|
||||
{ "keys": ["super+shift+w"], "command": "close_window" },
|
||||
{ "keys": ["super+o"], "command": "prompt_open" },
|
||||
{ "keys": ["super+shift+t"], "command": "reopen_last_file" },
|
||||
{ "keys": ["super+alt+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
|
||||
{ "keys": ["super+n"], "command": "new_file" },
|
||||
{ "keys": ["super+s"], "command": "save" },
|
||||
{ "keys": ["super+shift+s"], "command": "prompt_save_as" },
|
||||
{ "keys": ["super+alt+s"], "command": "save_all" },
|
||||
{ "keys": ["super+w"], "command": "close" },
|
||||
|
||||
{ "keys": ["super+k", "super+b"], "command": "toggle_side_bar" },
|
||||
{ "keys": ["super+ctrl+f"], "command": "toggle_full_screen" },
|
||||
{ "keys": ["super+ctrl+shift+f"], "command": "toggle_distraction_free" },
|
||||
|
||||
{ "keys": ["super+z"], "command": "undo" },
|
||||
{ "keys": ["super+shift+z"], "command": "redo" },
|
||||
{ "keys": ["super+y"], "command": "redo_or_repeat" },
|
||||
{ "keys": ["super+u"], "command": "soft_undo" },
|
||||
{ "keys": ["super+shift+u"], "command": "soft_redo" },
|
||||
|
||||
{ "keys": ["super+x"], "command": "cut" },
|
||||
{ "keys": ["super+c"], "command": "copy" },
|
||||
{ "keys": ["super+v"], "command": "paste" },
|
||||
{ "keys": ["super+shift+v"], "command": "paste_and_indent" },
|
||||
{ "keys": ["super+k", "super+v"], "command": "paste_from_history" },
|
||||
{ "keys": ["super+option+v"], "command": "paste_from_history" },
|
||||
|
||||
{ "keys": ["ctrl+alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
|
||||
{ "keys": ["ctrl+alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
|
||||
{ "keys": ["ctrl+alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
|
||||
{ "keys": ["ctrl+alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
|
||||
|
||||
{ "keys": ["ctrl+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
|
||||
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
|
||||
{ "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
|
||||
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
|
||||
|
||||
{ "keys": ["ctrl+alt+up"], "command": "scroll_lines", "args": {"amount": 1.0} },
|
||||
{ "keys": ["ctrl+alt+down"], "command": "scroll_lines", "args": {"amount": -1.0} },
|
||||
|
||||
{ "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} },
|
||||
{ "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} },
|
||||
|
||||
{ "keys": ["super+shift+["], "command": "prev_view" },
|
||||
{ "keys": ["super+shift+]"], "command": "next_view" },
|
||||
{ "keys": ["super+alt+left"], "command": "prev_view" },
|
||||
{ "keys": ["super+alt+right"], "command": "next_view" },
|
||||
|
||||
{ "keys": ["ctrl+tab"], "command": "next_view_in_stack" },
|
||||
{ "keys": ["ctrl+shift+tab"], "command": "prev_view_in_stack" },
|
||||
|
||||
{ "keys": ["super+a"], "command": "select_all" },
|
||||
{ "keys": ["super+shift+l"], "command": "split_selection_into_lines" },
|
||||
{ "keys": ["escape"], "command": "single_selection", "context":
|
||||
[
|
||||
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "clear_fields", "context":
|
||||
[
|
||||
{ "key": "has_next_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "clear_fields", "context":
|
||||
[
|
||||
{ "key": "has_prev_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
|
||||
"context":
|
||||
[
|
||||
{ "key": "panel_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_overlay", "context":
|
||||
[
|
||||
{ "key": "overlay_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_popup", "context":
|
||||
[
|
||||
{ "key": "popup_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["escape"], "command": "hide_auto_complete", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["super+]"], "command": "indent" },
|
||||
{ "keys": ["super+["], "command": "unindent" },
|
||||
|
||||
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
|
||||
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
|
||||
"context":
|
||||
[
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
|
||||
[
|
||||
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "reindent", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "indent", "context":
|
||||
[
|
||||
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "next_field", "context":
|
||||
[
|
||||
{ "key": "has_next_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["tab"], "command": "commit_completion", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible" },
|
||||
{ "key": "setting.auto_complete_commit_on_tab" }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "unindent", "context":
|
||||
[
|
||||
{ "key": "text", "operator": "regex_contains", "operand": "\n" }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+tab"], "command": "prev_field", "context":
|
||||
[
|
||||
{ "key": "has_prev_field", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["super+l"], "command": "expand_selection", "args": {"to": "line"} },
|
||||
{ "keys": ["super+d"], "command": "find_under_expand" },
|
||||
{ "keys": ["super+k", "super+d"], "command": "find_under_expand_skip" },
|
||||
{ "keys": ["super+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
|
||||
{ "keys": ["ctrl+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
|
||||
{ "keys": ["ctrl+m"], "command": "move_to", "args": {"to": "brackets"} },
|
||||
{ "keys": ["super+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} },
|
||||
{ "keys": ["super+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },
|
||||
|
||||
{ "keys": ["super+alt+."], "command": "close_tag" },
|
||||
|
||||
{ "keys": ["ctrl+q"], "command": "toggle_record_macro" },
|
||||
{ "keys": ["ctrl+shift+q"], "command": "run_macro" },
|
||||
|
||||
{ "keys": ["super+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
|
||||
{ "keys": ["super+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },
|
||||
{ "keys": ["enter"], "command": "commit_completion", "context":
|
||||
[
|
||||
{ "key": "auto_complete_visible" },
|
||||
{ "key": "setting.auto_complete_commit_on_tab", "operand": false }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["super+t"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
|
||||
{ "keys": ["super+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
|
||||
{ "keys": ["super+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
|
||||
{ "keys": ["super+ctrl+p"], "command": "prompt_select_workspace" },
|
||||
{ "keys": ["super+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
|
||||
{ "keys": ["ctrl+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
|
||||
{ "keys": ["f12"], "command": "goto_definition" },
|
||||
{ "keys": ["super+alt+down"], "command": "goto_definition" },
|
||||
{ "keys": ["super+shift+r"], "command": "goto_symbol_in_project" },
|
||||
{ "keys": ["ctrl+minus"], "command": "jump_back" },
|
||||
{ "keys": ["ctrl+shift+minus"], "command": "jump_forward" },
|
||||
|
||||
{ "keys": ["super+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": false} },
|
||||
{ "keys": ["super+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": true} },
|
||||
{ "keys": ["super+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
|
||||
{ "keys": ["super+alt+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
|
||||
{ "keys": ["super+alt+e"], "command": "replace_next" },
|
||||
{ "keys": ["super+g"], "command": "find_next" },
|
||||
{ "keys": ["super+shift+g"], "command": "find_prev" },
|
||||
{ "keys": ["super+e"], "command": "slurp_find_string" },
|
||||
{ "keys": ["super+shift+e"], "command": "slurp_replace_string" },
|
||||
|
||||
{ "keys": ["alt+super+g"], "command": "find_under" },
|
||||
{ "keys": ["shift+alt+super+g"], "command": "find_under_prev" },
|
||||
{ "keys": ["ctrl+super+g"], "command": "find_all_under" },
|
||||
|
||||
{ "keys": ["super+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
|
||||
{ "keys": ["f4"], "command": "next_result" },
|
||||
{ "keys": ["shift+f4"], "command": "prev_result" },
|
||||
|
||||
{ "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
|
||||
{ "keys": ["ctrl+f6"], "command": "next_misspelling" },
|
||||
{ "keys": ["ctrl+shift+f6"], "command": "prev_misspelling" },
|
||||
|
||||
{ "keys": ["ctrl+super+up"], "command": "swap_line_up" },
|
||||
{ "keys": ["ctrl+super+down"], "command": "swap_line_down" },
|
||||
|
||||
{ "keys": ["ctrl+backspace"], "command": "delete_word", "args": { "forward": false, "sub_words": true } },
|
||||
{ "keys": ["ctrl+delete"], "command": "delete_word", "args": { "forward": true, "sub_words": true } },
|
||||
|
||||
{ "keys": ["super+forward_slash"], "command": "toggle_comment", "args": { "block": false } },
|
||||
{ "keys": ["super+alt+forward_slash"], "command": "toggle_comment", "args": { "block": true } },
|
||||
|
||||
{ "keys": ["super+j"], "command": "join_lines" },
|
||||
{ "keys": ["super+shift+d"], "command": "duplicate_line" },
|
||||
|
||||
{ "keys": ["ctrl+backquote"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
|
||||
|
||||
{ "keys": ["ctrl+space"], "command": "auto_complete" },
|
||||
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
|
||||
[
|
||||
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
|
||||
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
|
||||
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["super+alt+p"], "command": "show_scope_name" },
|
||||
{ "keys": ["ctrl+shift+p"], "command": "show_scope_name" },
|
||||
|
||||
{ "keys": ["f7"], "command": "build" },
|
||||
{ "keys": ["super+b"], "command": "build" },
|
||||
{ "keys": ["super+shift+b"], "command": "build", "args": {"select": true} },
|
||||
|
||||
{ "keys": ["ctrl+c"], "command": "cancel_build" },
|
||||
|
||||
{ "keys": ["ctrl+t"], "command": "transpose" },
|
||||
|
||||
{ "keys": ["f5"], "command": "sort_lines", "args": {"case_sensitive": false} },
|
||||
{ "keys": ["ctrl+f5"], "command": "sort_lines", "args": {"case_sensitive": true} },
|
||||
|
||||
// Auto-pair quotes
|
||||
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair single quotes
|
||||
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
|
||||
{ "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
|
||||
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair brackets
|
||||
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair square brackets
|
||||
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Auto-pair curly brackets
|
||||
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["{"], "command": "wrap_block", "args": {"begin": "{", "end": "}"}, "context":
|
||||
[
|
||||
{ "key": "indented_block", "match_all": true },
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
|
||||
]
|
||||
},
|
||||
|
||||
{ "keys": ["enter"], "command": "auto_indent_tag", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
|
||||
]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "auto_indent_tag", "context":
|
||||
[
|
||||
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"keys": ["super+alt+1"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+alt+2"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.5, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+alt+3"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.33, 0.66, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+alt+4"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.25, 0.5, 0.75, 1.0],
|
||||
"rows": [0.0, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+alt+shift+2"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 0.5, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+alt+shift+3"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 1.0],
|
||||
"rows": [0.0, 0.33, 0.66, 1.0],
|
||||
"cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+alt+5"],
|
||||
"command": "set_layout",
|
||||
"args":
|
||||
{
|
||||
"cols": [0.0, 0.5, 1.0],
|
||||
"rows": [0.0, 0.5, 1.0],
|
||||
"cells":
|
||||
[
|
||||
[0, 0, 1, 1], [1, 0, 2, 1],
|
||||
[0, 1, 1, 2], [1, 1, 2, 2]
|
||||
]
|
||||
}
|
||||
},
|
||||
{ "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
|
||||
{ "keys": ["ctrl+2"], "command": "focus_group", "args": { "group": 1 } },
|
||||
{ "keys": ["ctrl+3"], "command": "focus_group", "args": { "group": 2 } },
|
||||
{ "keys": ["ctrl+4"], "command": "focus_group", "args": { "group": 3 } },
|
||||
{ "keys": ["ctrl+5"], "command": "focus_group", "args": { "group": 4 } },
|
||||
{ "keys": ["ctrl+6"], "command": "focus_group", "args": { "group": 5 } },
|
||||
{ "keys": ["ctrl+7"], "command": "focus_group", "args": { "group": 6 } },
|
||||
{ "keys": ["ctrl+8"], "command": "focus_group", "args": { "group": 7 } },
|
||||
{ "keys": ["ctrl+9"], "command": "focus_group", "args": { "group": 8 } },
|
||||
{ "keys": ["ctrl+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
|
||||
{ "keys": ["ctrl+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
|
||||
{ "keys": ["ctrl+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
|
||||
{ "keys": ["ctrl+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
|
||||
{ "keys": ["ctrl+shift+5"], "command": "move_to_group", "args": { "group": 4 } },
|
||||
{ "keys": ["ctrl+shift+6"], "command": "move_to_group", "args": { "group": 5 } },
|
||||
{ "keys": ["ctrl+shift+7"], "command": "move_to_group", "args": { "group": 6 } },
|
||||
{ "keys": ["ctrl+shift+8"], "command": "move_to_group", "args": { "group": 7 } },
|
||||
{ "keys": ["ctrl+shift+9"], "command": "move_to_group", "args": { "group": 8 } },
|
||||
{ "keys": ["ctrl+0"], "command": "focus_side_bar" },
|
||||
|
||||
{ "keys": ["super+k", "super+up"], "command": "new_pane" },
|
||||
{ "keys": ["super+k", "super+shift+up"], "command": "new_pane", "args": {"move": false} },
|
||||
{ "keys": ["super+k", "super+down"], "command": "close_pane" },
|
||||
{ "keys": ["super+k", "super+left"], "command": "focus_neighboring_group", "args": {"forward": false} },
|
||||
{ "keys": ["super+k", "super+right"], "command": "focus_neighboring_group" },
|
||||
{ "keys": ["super+k", "super+shift+left"], "command": "move_to_neighboring_group", "args": {"forward": false} },
|
||||
{ "keys": ["super+k", "super+shift+right"], "command": "move_to_neighboring_group" },
|
||||
|
||||
{ "keys": ["super+1"], "command": "select_by_index", "args": { "index": 0 } },
|
||||
{ "keys": ["super+2"], "command": "select_by_index", "args": { "index": 1 } },
|
||||
{ "keys": ["super+3"], "command": "select_by_index", "args": { "index": 2 } },
|
||||
{ "keys": ["super+4"], "command": "select_by_index", "args": { "index": 3 } },
|
||||
{ "keys": ["super+5"], "command": "select_by_index", "args": { "index": 4 } },
|
||||
{ "keys": ["super+6"], "command": "select_by_index", "args": { "index": 5 } },
|
||||
{ "keys": ["super+7"], "command": "select_by_index", "args": { "index": 6 } },
|
||||
{ "keys": ["super+8"], "command": "select_by_index", "args": { "index": 7 } },
|
||||
{ "keys": ["super+9"], "command": "select_by_index", "args": { "index": 8 } },
|
||||
{ "keys": ["super+0"], "command": "select_by_index", "args": { "index": 9 } },
|
||||
|
||||
{ "keys": ["f2"], "command": "next_bookmark" },
|
||||
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
|
||||
{ "keys": ["super+f2"], "command": "toggle_bookmark" },
|
||||
{ "keys": ["super+shift+f2"], "command": "clear_bookmarks" },
|
||||
{ "keys": ["alt+f2"], "command": "select_all_bookmarks" },
|
||||
|
||||
{ "keys": ["super+k", "super+u"], "command": "upper_case" },
|
||||
{ "keys": ["super+k", "super+l"], "command": "lower_case" },
|
||||
{ "keys": ["super+k", "super+space"], "command": "set_mark" },
|
||||
{ "keys": ["super+k", "super+a"], "command": "select_to_mark" },
|
||||
{ "keys": ["super+k", "super+w"], "command": "delete_to_mark" },
|
||||
{ "keys": ["super+k", "super+x"], "command": "swap_with_mark" },
|
||||
{ "keys": ["super+k", "super+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
|
||||
|
||||
{ "keys": ["super+equals"], "command": "increase_font_size" },
|
||||
{ "keys": ["super+plus"], "command": "increase_font_size" },
|
||||
{ "keys": ["super+minus"], "command": "decrease_font_size" },
|
||||
|
||||
{ "keys": ["ctrl+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/Snippets/long-tag.sublime-snippet" } },
|
||||
|
||||
{ "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
|
||||
|
||||
{ "keys": ["super+alt+q"], "command": "wrap_lines" },
|
||||
|
||||
{ "keys": ["super+alt+["], "command": "fold" },
|
||||
{ "keys": ["super+alt+]"], "command": "unfold" },
|
||||
{ "keys": ["super+k", "super+1"], "command": "fold_by_level", "args": {"level": 1} },
|
||||
{ "keys": ["super+k", "super+2"], "command": "fold_by_level", "args": {"level": 2} },
|
||||
{ "keys": ["super+k", "super+3"], "command": "fold_by_level", "args": {"level": 3} },
|
||||
{ "keys": ["super+k", "super+4"], "command": "fold_by_level", "args": {"level": 4} },
|
||||
{ "keys": ["super+k", "super+5"], "command": "fold_by_level", "args": {"level": 5} },
|
||||
{ "keys": ["super+k", "super+6"], "command": "fold_by_level", "args": {"level": 6} },
|
||||
{ "keys": ["super+k", "super+7"], "command": "fold_by_level", "args": {"level": 7} },
|
||||
{ "keys": ["super+k", "super+8"], "command": "fold_by_level", "args": {"level": 8} },
|
||||
{ "keys": ["super+k", "super+9"], "command": "fold_by_level", "args": {"level": 9} },
|
||||
{ "keys": ["super+k", "super+0"], "command": "unfold_all" },
|
||||
{ "keys": ["super+k", "super+j"], "command": "unfold_all" },
|
||||
{ "keys": ["super+k", "super+t"], "command": "fold_tag_attributes" },
|
||||
|
||||
{ "keys": ["super+alt+o"], "command": "toggle_overwrite" },
|
||||
|
||||
{ "keys": ["alt+f2"], "command": "context_menu" },
|
||||
|
||||
{ "keys": ["super+alt+c"], "command": "toggle_case_sensitive", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["super+alt+r"], "command": "toggle_regex", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["super+alt+w"], "command": "toggle_whole_word", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["super+alt+a"], "command": "toggle_preserve_case", "context":
|
||||
[
|
||||
{ "key": "setting.is_widget", "operator": "equal", "operand": true }
|
||||
]
|
||||
},
|
||||
|
||||
// Find panel key bindings
|
||||
{ "keys": ["enter"], "command": "find_next", "context":
|
||||
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
// Replace panel key bindings
|
||||
{ "keys": ["enter"], "command": "find_next", "context":
|
||||
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["ctrl+alt+enter"], "command": "replace_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
// Incremental find panel key bindings
|
||||
{ "keys": ["enter"], "command": "hide_panel", "context":
|
||||
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["shift+enter"], "command": "find_prev", "context":
|
||||
[{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
{ "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
|
||||
"context": [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
|
||||
},
|
||||
|
||||
{ "keys": ["super+,"], "command": "edit_settings", "args":
|
||||
{
|
||||
"base_file": "${packages}/Default/Preferences.sublime-settings",
|
||||
"default": "// Settings in here override those in \"Default/Preferences.sublime-settings\",\n// and are overridden in turn by syntax-specific settings.\n{\n\t$0\n}\n"
|
||||
}
|
||||
},
|
||||
|
||||
{ "keys": ["super+k", "super+y"], "command": "yank" },
|
||||
{ "keys": ["super+k", "super+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
{ "keys": ["super+k", "super+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
|
||||
{ "keys": ["super+k", "super+c"], "command": "show_at_center" },
|
||||
|
||||
// These are OS X built in commands, and don't need to be listed here, but
|
||||
// doing so lets them show up in the menu
|
||||
{ "keys": ["ctrl+y"], "command": "yank" },
|
||||
{ "keys": ["super+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
|
||||
// super+delete isn't a built in command, but makes sense anyway
|
||||
{ "keys": ["super+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
{ "keys": ["ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
|
||||
{ "keys": ["ctrl+l"], "command": "show_at_center" },
|
||||
{ "keys": ["ctrl+o"], "command": "insert_snippet", "args": { "contents": "$0\n" } },
|
||||
{ "keys": ["ctrl+super+d"], "command": "noop" },
|
||||
{ "keys": ["ctrl+super+shift+d"], "command": "noop" },
|
||||
|
||||
// HTML, XML close tag
|
||||
{ "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
|
||||
[
|
||||
{ "key": "selector", "operator": "equal", "operand": "(text.html, text.xml) - string - comment", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
|
||||
{ "key": "setting.auto_close_tags" }
|
||||
]
|
||||
}
|
||||
]
|
BIN
assets/kinto-black-invert.ico
Normal file
After Width: | Height: | Size: 99 KiB |
BIN
assets/kinto-black.ico
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
assets/kinto-color-black-invert.ico
Normal file
After Width: | Height: | Size: 105 KiB |
BIN
assets/kinto-color-black.ico
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
assets/kinto-color-invert-border.ico
Normal file
After Width: | Height: | Size: 104 KiB |
BIN
assets/kinto-color-invert.ico
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
assets/kinto-color-white-invert.ico
Normal file
After Width: | Height: | Size: 105 KiB |
BIN
assets/kinto-color.ico
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
assets/kinto-white-invert.ico
Normal file
After Width: | Height: | Size: 101 KiB |
BIN
assets/kinto-white.ico
Normal file
After Width: | Height: | Size: 102 KiB |
@@ -1,86 +0,0 @@
|
||||
{"defaultapps":[{
|
||||
"name":"term",
|
||||
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm" ]
|
||||
}],
|
||||
"defaulttypes":["windows","mac","chromebook"],
|
||||
"defaults":[{
|
||||
"id": 1,
|
||||
"name":"Windows",
|
||||
"type":"windows",
|
||||
"active": false,
|
||||
"description":"Standard Windows 104 Keyboards",
|
||||
"gui":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY",
|
||||
"term":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY",
|
||||
"xkb_symbols_gui":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)",
|
||||
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term(mac_levelssym)",
|
||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||
"xkb_types_term":""
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name":"Mac - hid driver",
|
||||
"type":"mac",
|
||||
"active": false,
|
||||
"description":"Standard Mac Keyboards with Apple driver",
|
||||
"gui":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY",
|
||||
"term":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY",
|
||||
"xkb_symbols_gui":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)",
|
||||
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term(mac_levelssym)",
|
||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||
"xkb_types_term":"",
|
||||
"hack": "echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name":"Mac Only",
|
||||
"type":"mac",
|
||||
"active": true,
|
||||
"description":"Standard Mac Keyboards",
|
||||
"gui":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY",
|
||||
"term":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY",
|
||||
"xkb_symbols_gui":"+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)+mac_gui(mac_levelssym)",
|
||||
"xkb_symbols_term":"+altwin(alt_super_win)+mac_term(mac_levelssym)",
|
||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||
"xkb_types_term":""
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name":"Chromebook",
|
||||
"type":"chromebook",
|
||||
"active": false,
|
||||
"description":"Standard Chromebook Keyboards",
|
||||
"gui":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY",
|
||||
"term":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY",
|
||||
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)",
|
||||
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||
"xkb_types_term":""
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name":"Chromebook - Windows",
|
||||
"type":"chromebook",
|
||||
"active": false,
|
||||
"description":"Chromebook with Windows 104 Keyboard",
|
||||
"gui":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY; setxkbmap -device $usbid -option altwin:ctrl_alt_win",
|
||||
"term":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY",
|
||||
"fallbackgui":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY",
|
||||
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)",
|
||||
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||
"xkb_types_term":""
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name":"Chromebook - Mac",
|
||||
"type":"chromebook",
|
||||
"active": false,
|
||||
"description":"Chromebook with Mac Keyboard",
|
||||
"gui":"setxkbmap -option;setxkbmap -option ctrl:swap_lwin_lctl; xkbcomp -w0 -i $internalid -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY",
|
||||
"term":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY",
|
||||
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)",
|
||||
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||
"xkb_types_term":""
|
||||
}]
|
||||
}
|
21
install/linux.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/master/install/linux.sh)"
|
||||
|
||||
wget https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -O ~/Downloads/kinto.zip || curl https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -J -L -o ~/Downloads/kinto.zip
|
||||
unzip ~/Downloads/kinto.zip -d ~/Downloads/
|
||||
cd ~/Downloads/kinto-master/
|
||||
|
||||
kintorelease=`wget -qO- https://api.github.com/repos/rbreaves/kinto/releases/latest | awk -F'tag_name": ' '{if ($2) print $2}' | tr -d \", || curl -s https://api.github.com/repos/rbreaves/kinto/releases/latest | awk -F'tag_name": ' '{if ($2) print $2}' | tr -d \",`
|
||||
kintohash=`unzip -z ~/Downloads/kinto.zip | tail -n1`
|
||||
kintoshort=${kintohash::7}
|
||||
|
||||
echo "$kintorelease" "build" "$kintoshort" > ./dl_version
|
||||
|
||||
if [ $# -eq 0 ];then
|
||||
echo "Installing Kinto..."
|
||||
./setup.py
|
||||
elif [ $1 == "-r" ];then
|
||||
echo "Uninstall Kinto..."
|
||||
./setup.py -r
|
||||
fi
|
7
install/windows.ps1
Normal file
@@ -0,0 +1,7 @@
|
||||
Invoke-WebRequest -Uri https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -OutFile $env:USERPROFILE\Downloads\kinto.zip
|
||||
Expand-Archive -LiteralPath "$env:USERPROFILE\Downloads\kinto.zip" -DestinationPath "$env:USERPROFILE\Downloads" -Force
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
|
||||
choco install -y python3
|
||||
cd "$env:USERPROFILE\Downloads\kinto-master"
|
||||
py .\setup.py
|
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
swapcmd="\/bin\/bash\ \/home\/`whoami`\/.config\/kinto\/xactive.sh"
|
||||
mkdir -p ~/.config/systemd/user
|
||||
mkdir -p ~/.config/autostart
|
||||
cp ./system-config/keyswap.service ~/.config/systemd/user/keyswap.service
|
||||
cp ./system-config/keyswap.sh ~/.config/autostart/keyswap.sh
|
||||
cp ./kintox11/binary/kintox11 ~/.config/kinto/kintox11
|
||||
cp ./system-config/xactive.sh ~/.config/kinto/xactive.sh
|
||||
sed -i "s/{username}/`whoami`/g" ~/.config/systemd/user/keyswap.service
|
||||
sed -i "s/ExecStart=/ExecStart=${swapcmd}/g" ~/.config/systemd/user/keyswap.service
|
||||
systemctl --user enable keyswap
|
||||
systemctl --user start keyswap
|
BIN
kinto-demo.gif
Before Width: | Height: | Size: 116 KiB |
@@ -1,340 +0,0 @@
|
||||
// -*- coding:utf-8-unix; mode:c; -*-
|
||||
// Kinto x11 command line
|
||||
/*
|
||||
Reference material
|
||||
get the active window on X window system
|
||||
http://k-ui.jp/blog/2012/05/07/get-active-window-on-x-window-system/
|
||||
*/
|
||||
// To compile without static libraries
|
||||
// gcc kintox11.c -lX11 -lXmu -ljson-c
|
||||
//
|
||||
// To compile with static library json-c
|
||||
// Make sure archive with object files exist ar -t /usr/local/lib/libjson-c.a
|
||||
// gcc -L/usr/local/lib/ kintox11.c -ljson-c -lXmu -lXt -lX11 -o kintox11
|
||||
//
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <X11/Xlib.h> // `apt-get install libx11-dev`
|
||||
#include <X11/Xmu/WinUtil.h> // `apt-get install libxmu-dev`
|
||||
#include <json-c/json.h> // `apt install libjson-c-dev`
|
||||
|
||||
Bool xerror = False;
|
||||
|
||||
int in_int(int a[],int size,int item)
|
||||
{
|
||||
int i,pos=-1;
|
||||
for(i=0;i< size;i++)
|
||||
{
|
||||
if(a[i]==item)
|
||||
{
|
||||
pos=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
int in(const char **arr, int len, char *target) {
|
||||
int i;
|
||||
for(i = 0; i < len; i++) {
|
||||
if(strncmp(arr[i], target, strlen(target)) == 0) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int strcicmp(char const *a, char const *b)
|
||||
{
|
||||
for (;; a++, b++) {
|
||||
int d = tolower((unsigned char)*a) - tolower((unsigned char)*b);
|
||||
if (d != 0 || !*a)
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
Display* open_display(){
|
||||
Display* d = XOpenDisplay(NULL);
|
||||
if(d == NULL){
|
||||
printf("fail to open X server display...\n");
|
||||
exit(1);
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
int handle_error(Display* display, XErrorEvent* error){
|
||||
// printf("X11 error: type=%d, serial=%lu, code=%d\n",
|
||||
// error->type, error->serial, (int)error->error_code);
|
||||
// xerror = True;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Window get_focus_window(Display* d){
|
||||
Window w;
|
||||
int revert_to;
|
||||
XGetInputFocus(d, &w, &revert_to); // see man
|
||||
if(xerror){
|
||||
printf("Error getting focused window\n");
|
||||
exit(1);
|
||||
}else if(w == None){
|
||||
printf("no focus window\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
|
||||
const char * str_window_class(Display* d, Window w, char *prior_app ){
|
||||
Status s;
|
||||
XClassHint* class;
|
||||
|
||||
class = XAllocClassHint(); // see man
|
||||
if(xerror){
|
||||
// printf("ERROR: XAllocClassHint\n");
|
||||
}
|
||||
|
||||
s = XGetClassHint(d, w, class); // see man
|
||||
if(xerror || s){
|
||||
char * app_class;
|
||||
app_class = malloc(sizeof(char)*100);
|
||||
strcpy(app_class,class->res_class);
|
||||
// printf("\tname: %s\n\tclass: %s\n", class->res_name, class->res_class);
|
||||
return app_class;
|
||||
}else{
|
||||
// char * error_msg;
|
||||
// error_msg = malloc(sizeof(char)*50);
|
||||
// strcpy(error_msg, "ERROR: XGetClassHint");
|
||||
return prior_app;
|
||||
}
|
||||
}
|
||||
|
||||
int main(void){
|
||||
|
||||
FILE *fp;
|
||||
char buffer[10240];
|
||||
struct json_object *parsed_json, *config, *config_obj,
|
||||
*config_obj_name, *config_obj_run, *config_obj_de,
|
||||
*config_obj_appnames, *appnames_obj, *init, *de,
|
||||
*de_obj, *de_obj_id, *de_obj_active, *de_obj_run,
|
||||
*de_obj_runterm,*de_obj_rungui;
|
||||
|
||||
int arraylen;
|
||||
int appnames_len, init_len, de_len, config_de_len;
|
||||
int system(const char *command);
|
||||
|
||||
size_t i,n,r;
|
||||
|
||||
fp = fopen("user_config.json","r");
|
||||
fread(buffer, 10240, 1, fp);
|
||||
fclose(fp);
|
||||
|
||||
parsed_json = json_tokener_parse(buffer);
|
||||
|
||||
config = json_object_object_get(parsed_json, "config");
|
||||
init = json_object_object_get(parsed_json, "init");
|
||||
de = json_object_object_get(parsed_json, "de");
|
||||
|
||||
arraylen = json_object_array_length(config);
|
||||
init_len = json_object_array_length(init);
|
||||
de_len = json_object_array_length(de);
|
||||
|
||||
const char *name_array[arraylen];
|
||||
const char *run_array[arraylen];
|
||||
int init_array[init_len];
|
||||
|
||||
int de_id_array[de_len];
|
||||
Bool de_active_array[de_len];
|
||||
const char *de_run_array[de_len];
|
||||
const char *de_runterm_array[de_len];
|
||||
const char *de_rungui_array[de_len];
|
||||
|
||||
// Grab all de variable info needed
|
||||
for (i = 0; i < de_len; i++) {
|
||||
de_obj = json_object_array_get_idx(de, i);
|
||||
de_obj_id = json_object_object_get(de_obj, "id");
|
||||
de_id_array[i] = json_object_get_int(de_obj_id);
|
||||
de_obj_active = json_object_object_get(de_obj, "active");
|
||||
de_active_array[i] = json_object_get_int(de_obj_active);
|
||||
de_obj_run = json_object_object_get(de_obj, "run");
|
||||
de_run_array[i] = json_object_get_string(de_obj_run);
|
||||
de_obj_runterm = json_object_object_get(de_obj, "run_term");
|
||||
de_runterm_array[i] = json_object_get_string(de_obj_runterm);
|
||||
de_obj_rungui = json_object_object_get(de_obj, "run_gui");
|
||||
de_rungui_array[i] = json_object_get_string(de_obj_rungui);
|
||||
// printf("de_run_array[%ld]: %s\n",i,de_run_array[i]);
|
||||
}
|
||||
// de ends
|
||||
|
||||
int appnames_max = 0;
|
||||
int config_de_max = 0;
|
||||
|
||||
for (i = 0; i < arraylen; i++) {
|
||||
config_obj = json_object_array_get_idx(config, i);
|
||||
config_obj_appnames = json_object_object_get(config_obj, "appnames");
|
||||
config_obj_de = json_object_object_get(config_obj, "de");
|
||||
|
||||
appnames_len = json_object_array_length(config_obj_appnames);
|
||||
if (appnames_len > appnames_max){
|
||||
appnames_max = appnames_len;
|
||||
}
|
||||
config_de_len = json_object_array_length(config_obj_de);
|
||||
if(config_de_len > config_de_max){
|
||||
config_de_max = config_de_len;
|
||||
}
|
||||
}
|
||||
|
||||
const char *appnames_array[arraylen][appnames_max];
|
||||
int config_de_array[arraylen][config_de_max];
|
||||
|
||||
for (i = 0; i < arraylen; i++) {
|
||||
config_obj = json_object_array_get_idx(config, i);
|
||||
config_obj_name = json_object_object_get(config_obj, "name");
|
||||
config_obj_run = json_object_object_get(config_obj, "run");
|
||||
name_array[i] = json_object_get_string(config_obj_name);
|
||||
run_array[i] = json_object_get_string(config_obj_run);
|
||||
// printf("%s\n%s\n", json_object_get_string(config_obj_name), json_object_get_string(config_obj_run));
|
||||
|
||||
config_obj_appnames = json_object_object_get(config_obj, "appnames");
|
||||
appnames_len = json_object_array_length(config_obj_appnames);
|
||||
for (n = 0; n < appnames_len; n++) {
|
||||
// printf("name_array[i]: %s\n",name_array[i]);
|
||||
if(!strcicmp(name_array[i], "gui")){
|
||||
appnames_array[i][n] = NULL;
|
||||
// printf("%s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
|
||||
}
|
||||
else{
|
||||
appnames_array[i][n] = json_object_get_string(json_object_array_get_idx(config_obj_appnames, n));
|
||||
// printf("%s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
|
||||
}
|
||||
}
|
||||
if(appnames_max > appnames_len){
|
||||
for (n = appnames_len; n < appnames_max; n++){
|
||||
appnames_array[i][n] = NULL;
|
||||
// printf("%s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
|
||||
}
|
||||
}
|
||||
|
||||
config_obj_de = json_object_object_get(config_obj, "de");
|
||||
config_de_len = json_object_array_length(config_obj_de);
|
||||
for (n = 0; n < config_de_max; n++) {
|
||||
if(n < config_de_len){
|
||||
// printf("de value: %d\n",json_object_get_int(json_object_array_get_idx(config_obj_de, n)));
|
||||
config_de_array[i][n] = json_object_get_int(json_object_array_get_idx(config_obj_de, n));
|
||||
}
|
||||
else{
|
||||
// printf("de -1 value: %d\n",json_object_get_int(json_object_array_get_idx(config_obj_de, n)));
|
||||
config_de_array[i][n] = -1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < init_len; i++) {
|
||||
init_array[i] = json_object_get_int(json_object_array_get_idx(init, i));
|
||||
int de_id_idx = in_int(de_id_array, de_len, init_array[i]);
|
||||
printf("Running init command: %s\n",de_run_array[de_id_idx]);
|
||||
system(de_run_array[de_id_idx]);
|
||||
}
|
||||
|
||||
Display* d;
|
||||
Window w;
|
||||
|
||||
// for XmbTextPropertyToTextList
|
||||
setlocale(LC_ALL, ""); // see man locale
|
||||
|
||||
d = open_display();
|
||||
XSelectInput(d, DefaultRootWindow(d), SubstructureNotifyMask);
|
||||
XSetErrorHandler(handle_error);
|
||||
|
||||
char * prior_app;
|
||||
prior_app = malloc(sizeof(char)*100);
|
||||
strcpy(prior_app,"none");
|
||||
|
||||
int remap_bool = 2;
|
||||
|
||||
// get active window
|
||||
w = get_focus_window(d);
|
||||
|
||||
int breakouter;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
breakouter = 0;
|
||||
// printf("%s\n","1");
|
||||
// printf("%s\n",str_window_class(d, w,prior_app));
|
||||
if(strcmp(str_window_class(d, w,prior_app),prior_app)){
|
||||
// printf("%s\n","2");
|
||||
for(i = 0; i < arraylen; ++i){
|
||||
if(breakouter == 0){
|
||||
if(strcmp(name_array[i],"gui")){
|
||||
// printf("%s\n","3");
|
||||
for(n = 0; n < appnames_max; ++n){
|
||||
if (appnames_array[i][n] != NULL){
|
||||
// printf("%s\n",appnames_array[i][n]);
|
||||
// If statement for triggering terminal config
|
||||
if((strcicmp(appnames_array[i][n], str_window_class(d, w,prior_app)) == 0 && (remap_bool == 1 || remap_bool == 2))) {
|
||||
// printf("1st if %s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
|
||||
printf("%s\n",name_array[i]);
|
||||
system(run_array[i]);
|
||||
for(r = 0; r < config_de_max; r++){
|
||||
if(config_de_array[i][r] != -1){
|
||||
int de_id_idx = in_int(de_id_array, de_len, config_de_array[i][r]);
|
||||
// printf("Running de command: %s\n",de_run_array[de_id_idx]);
|
||||
system(de_runterm_array[de_id_idx]);
|
||||
}
|
||||
}
|
||||
remap_bool = 0;
|
||||
fflush(stdout);
|
||||
breakouter = 1;
|
||||
break;
|
||||
} // Else command for ignoring similar app category based on config
|
||||
else if((strcicmp(appnames_array[i][n], str_window_class(d, w,prior_app)) == 0 && remap_bool == 0)){
|
||||
// printf("2nd elseif %s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
|
||||
// printf("%s\n","4");
|
||||
breakouter = 1;
|
||||
break;
|
||||
} // Else command for triggering gui config
|
||||
else if ((i == arraylen-1 || appnames_array[i][n+1] == NULL) && (remap_bool == 0 || remap_bool == 2)){
|
||||
char *find = "gui";
|
||||
int gui_idx = in(name_array, arraylen, find);
|
||||
|
||||
if(gui_idx >= 0) {
|
||||
printf("%s\n",name_array[gui_idx]);
|
||||
system(run_array[gui_idx]);
|
||||
}
|
||||
for(r = 0; r < config_de_max; r++){
|
||||
if(config_de_array[gui_idx][r] != -1){
|
||||
int de_id_idx = in_int(de_id_array, de_len, config_de_array[gui_idx][r]);
|
||||
// printf("Running de command: %s\n",de_run_array[de_id_idx]);
|
||||
system(de_rungui_array[de_id_idx]);
|
||||
}
|
||||
}
|
||||
// printf("3rd elseif %s i:%ld n:%ld %s\n",name_array[i],i,n,appnames_array[i][n]);
|
||||
remap_bool = 1;
|
||||
fflush(stdout);
|
||||
breakouter = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// printf("%s\n","5");
|
||||
strcpy(prior_app,str_window_class(d, w, prior_app));
|
||||
|
||||
XEvent e;
|
||||
XNextEvent(d, &e);
|
||||
w = get_focus_window(d);
|
||||
|
||||
}
|
||||
}
|
7
linux/gnome_logoff.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
dbus-monitor --session "type='signal',interface='org.gnome.SessionManager.Logout'" | grep '1' |
|
||||
while read x; do
|
||||
# echo "$x"
|
||||
sudo systemctl stop xkeysnail
|
||||
exit 0
|
||||
done
|
BIN
linux/gui/capslock_1200x720.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
linux/gui/keys_1200x720.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
1484
linux/gui/kinto-gui.py
Executable file
11
linux/gui/kinto.desktop
Executable file
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
# /.local/share/applications
|
||||
Name=Kinto.sh
|
||||
GenericName=Kinto.sh
|
||||
Categories=Utility;
|
||||
Type=Application
|
||||
Exec={homedir}/.config/kinto/gui/kinto-gui.py
|
||||
Icon={homedir}/.config/kinto/kinto-color-48.svg
|
||||
# Icon=/usr/share/icons/Pocillo/kinto-color.svg
|
||||
Terminal=false
|
||||
NoDisplay=false
|
BIN
linux/gui/tuxbg.png
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
linux/gui/tuxcry4.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
linux/gui/tuxerror.png
Normal file
After Width: | Height: | Size: 172 KiB |
BIN
linux/gui/tuxuninstall.png
Normal file
After Width: | Height: | Size: 94 KiB |
40
linux/initkb
Normal file
@@ -0,0 +1,40 @@
|
||||
kbtype = ask
|
||||
rightmod = true
|
||||
vsc2st3 = false
|
||||
capslock = default
|
||||
systray = true
|
||||
autostart = true
|
||||
|
||||
#
|
||||
# kbtype - ask|win|mac|ibm|cbk|wmk
|
||||
#
|
||||
# What physical keyboard type does the user have?
|
||||
# ask - Prompt the user
|
||||
# win - Standard layout Ctrl, Win, Alt, Spacebar
|
||||
# mac - Mac layout Ctrl, Alt, Cmd, Spacebar
|
||||
# ibm - Model M layout Ctrl, Alt, Spacebar (Capslock is Capslock)
|
||||
# cbk - Chromebook layout Ctrl, Alt, Spacebar (Capslock is Search (Win))
|
||||
# wmk - WinMac layout
|
||||
# wmk - Uses Apple driver to swap Cmd & Alt so
|
||||
# swapping between Win & Mac keyboards is seamless.
|
||||
#
|
||||
# rightmod - Remap modifiers on right
|
||||
# true (default)
|
||||
#
|
||||
# ^ Note: Useful to set to false for multi-language users (aka AltGr)
|
||||
#
|
||||
# vsc2st3 - Remap VS Code to use Sublime Text keymap
|
||||
# false (default)
|
||||
#
|
||||
# capslock - esc_cmd|cmd|default
|
||||
# esc_cmd - escape if tapped, cmd if held
|
||||
# cmd - remaps to cmd
|
||||
# default - no remap
|
||||
#
|
||||
# systray - Sets whether the system tray will show
|
||||
# true - default
|
||||
# false - only defaults on gnome3 and kde
|
||||
#
|
||||
# autostart - Sets whether or not kinto will automatically start
|
||||
# true - deefault
|
||||
#
|
20
linux/killdups.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
xkeycount=$(pgrep 'xkeysnail' | wc -l)
|
||||
|
||||
if [[ $xkeycount -le 1 ]]; then
|
||||
# No dups found
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while ! zenity --entry --title="Kinto Duplicates" --text="Type Password to end duplicates:" --hide-text| sudo -S cat /dev/null >/dev/null; do
|
||||
if ! $(zenity --question --text="Wrong password, try again?"); then
|
||||
# Dups still exist
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
# pgrep 'xkeysnail' | head -n -1 | xargs -r -n1 sudo kill
|
||||
pgrep 'xkeysnail' | xargs -r -n1 sudo kill
|
||||
sudo -K # remove privilege
|
||||
# No dups should exist
|
||||
exit 0
|
57
linux/kinto-service.sh
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# chkconfig: 35 90 12
|
||||
# description: Kinto service
|
||||
#
|
||||
|
||||
# Get function from functions library
|
||||
# . /etc/init.d/functions
|
||||
|
||||
# Start the service
|
||||
start() {
|
||||
echo -n "Starting Kinto (xkeynsail)" | logger
|
||||
xkeycount=$(pgrep 'xkeysnail' | wc -l)
|
||||
|
||||
if [[ $xkeycount -eq 0 ]]; then
|
||||
/usr/bin/xhost +SI:localuser:root && script -q -c "xkeysnail --quiet --watch `echo $HOME`/.config/kinto/kinto.py" /dev/null | tee -a /tmp/kinto.log &
|
||||
### Create the lock file ###
|
||||
touch /var/lock/subsys/kinto
|
||||
success $"Kinto (xkeynsail) started"
|
||||
else
|
||||
echo "Kinto (xkeynsail) service is already running."
|
||||
fi
|
||||
|
||||
echo
|
||||
}
|
||||
|
||||
# Restart the service
|
||||
stop() {
|
||||
echo -n "Stopping Kinto (xkeynsail)" | logger
|
||||
sudo pkill -f bin/xkeysnail >/dev/null 2>&1
|
||||
### Now, delete the lock file ###
|
||||
rm -f /var/lock/subsys/kinto
|
||||
echo
|
||||
}
|
||||
|
||||
### main logic ###
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
restart|reload|condrestart)
|
||||
stop
|
||||
sleep 5
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart|reload|status}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
719
linux/kinto.py
Executable file
@@ -0,0 +1,719 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# autostart = true
|
||||
|
||||
import re
|
||||
from xkeysnail.transform import *
|
||||
|
||||
# Use the following for testing terminal keymaps
|
||||
# terminals = [ "", ... ]
|
||||
# xbindkeys -mk
|
||||
terminals = [
|
||||
"alacritty",
|
||||
"deepin-terminal",
|
||||
"eterm",
|
||||
"gnome-terminal",
|
||||
"guake",
|
||||
"hyper",
|
||||
"io.elementary.terminal",
|
||||
"kinto-gui.py",
|
||||
"kitty",
|
||||
"konsole",
|
||||
"lxterminal",
|
||||
"mate-terminal",
|
||||
"qterminal",
|
||||
"st",
|
||||
"sakura",
|
||||
"station",
|
||||
"terminator",
|
||||
"termite",
|
||||
"tilda",
|
||||
"tilix",
|
||||
"urxvt",
|
||||
"xfce4-terminal",
|
||||
"xterm",
|
||||
]
|
||||
terminals = [term.casefold() for term in terminals]
|
||||
termStr = "|".join(str('^'+x+'$') for x in terminals)
|
||||
|
||||
mscodes = ["code","vscodium"]
|
||||
codeStr = "|".join(str('^'+x+'$') for x in mscodes)
|
||||
|
||||
# Add remote desktop clients & VM software here
|
||||
# Ideally we'd only exclude the client window,
|
||||
# but that may not be easily done.
|
||||
remotes = [
|
||||
"Gnome-boxes",
|
||||
"org.remmina.Remmina",
|
||||
"qemu-system-.*",
|
||||
"Virt-manager",
|
||||
"VirtualBox",
|
||||
"VirtualBox Machine",
|
||||
"xfreerdp",
|
||||
]
|
||||
remotes = [client.casefold() for client in remotes]
|
||||
|
||||
# Add remote desktop clients & VMs for no remapping
|
||||
terminals.extend(remotes)
|
||||
mscodes.extend(remotes)
|
||||
|
||||
# Use for browser specific hotkeys
|
||||
browsers = [
|
||||
"Chromium",
|
||||
"Chromium-browser",
|
||||
"Discord",
|
||||
"Epiphany",
|
||||
"Firefox",
|
||||
"Google-chrome",
|
||||
"microsoft-edge",
|
||||
"microsoft-edge-dev",
|
||||
]
|
||||
browsers = [browser.casefold() for browser in browsers]
|
||||
browserStr = "|".join(str('^'+x+'$') for x in browsers)
|
||||
|
||||
chromes = [
|
||||
"Chromium",
|
||||
"Chromium-browser",
|
||||
"Google-chrome",
|
||||
"microsoft-edge",
|
||||
"microsoft-edge-dev",
|
||||
]
|
||||
chromes = [chrome.casefold() for chrome in chromes]
|
||||
chromeStr = "|".join(str('^'+x+'$') for x in chromes)
|
||||
|
||||
# edges = ["microsoft-edge-dev","microsoft-edge"]
|
||||
# edges = [edge.casefold() for edge in edges]
|
||||
# edgeStr = "|".join(str('^'+x+'$') for x in edges)
|
||||
|
||||
define_multipurpose_modmap(
|
||||
# {Key.ENTER: [Key.ENTER, Key.RIGHT_CTRL] # Enter2Cmd
|
||||
# {Key.CAPSLOCK: [Key.ESC, Key.RIGHT_CTRL] # Caps2Esc
|
||||
# {Key.LEFT_META: [Key.ESC, Key.RIGHT_CTRL] # Caps2Esc - Chromebook
|
||||
{ # Placeholder
|
||||
})
|
||||
|
||||
# Fix for avoiding modmapping when using Synergy keyboard/mouse sharing.
|
||||
# Synergy doesn't set a wm_class, so this may cause issues with other
|
||||
# applications that also don't set the wm_class.
|
||||
# Enable only if you use Synergy.
|
||||
# define_conditional_modmap(lambda wm_class: wm_class == '', {})
|
||||
|
||||
# [Global modemap] Change modifier keys as in xmodmap
|
||||
define_conditional_modmap(lambda wm_class: wm_class.casefold() not in terminals,{
|
||||
|
||||
# Key.CAPSLOCK: Key.RIGHT_CTRL, # Caps2Cmd
|
||||
# Key.LEFT_META: Key.RIGHT_CTRL, # Caps2Cmd - Chromebook
|
||||
|
||||
# - IBM
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # IBM
|
||||
# Key.LEFT_CTRL: Key.LEFT_ALT, # IBM
|
||||
# Key.CAPSLOCK: Key.LEFT_META, # IBM
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # IBM - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # IBM - Multi-language (Remove)
|
||||
|
||||
# - Chromebook
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
|
||||
# Key.LEFT_CTRL: Key.LEFT_ALT, # Chromebook
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook - Multi-language (Remove)
|
||||
|
||||
# - Default Mac/Win
|
||||
# - Default Win
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
|
||||
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
|
||||
# Key.LEFT_CTRL: Key.LEFT_META, # WinMac
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
|
||||
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_META, # WinMac - Multi-language (Remove)
|
||||
|
||||
# - Mac Only
|
||||
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
|
||||
# Key.LEFT_CTRL: Key.LEFT_META, # Mac
|
||||
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_META, # Mac - Multi-language (Remove)
|
||||
})
|
||||
|
||||
# [Conditional modmap] Change modifier keys in certain applications
|
||||
define_conditional_modmap(re.compile(termStr, re.IGNORECASE), {
|
||||
# - IBM
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # IBM
|
||||
# # Left Ctrl Stays Left Ctrl
|
||||
# Key.CAPSLOCK: Key.LEFT_ALT, # IBM
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # IBM - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # IBM
|
||||
# # Right Meta does not exist on chromebooks
|
||||
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # IBM - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # IBM - Multi-language (Remove)
|
||||
|
||||
# - Chromebook
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # Chromebook
|
||||
# # Left Ctrl Stays Left Ctrl
|
||||
# Key.LEFT_META: Key.LEFT_ALT, # Chromebook
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # Chromebook - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.RIGHT_ALT, # Chromebook
|
||||
# # Right Meta does not exist on chromebooks
|
||||
|
||||
# - Default Mac/Win
|
||||
# - Default Win
|
||||
# Key.LEFT_ALT: Key.RIGHT_CTRL, # WinMac
|
||||
# Key.LEFT_META: Key.LEFT_ALT, # WinMac
|
||||
# Key.LEFT_CTRL: Key.LEFT_CTRL, # WinMac
|
||||
# Key.RIGHT_ALT: Key.RIGHT_CTRL, # WinMac - Multi-language (Remove)
|
||||
# Key.RIGHT_META: Key.RIGHT_ALT, # WinMac - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # WinMac - Multi-language (Remove)
|
||||
|
||||
# - Mac Only
|
||||
# Key.LEFT_META: Key.RIGHT_CTRL, # Mac
|
||||
# # Left Ctrl Stays Left Ctrl
|
||||
# Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove)
|
||||
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac - Multi-language (Remove)
|
||||
})
|
||||
|
||||
# Keybindings for IntelliJ
|
||||
define_keymap(re.compile("^jetbrains-(?!.*toolbox).*$", re.IGNORECASE),{
|
||||
# General
|
||||
K("C-Key_0"): K("M-Key_0"), # Open corresponding tool window
|
||||
K("C-Key_1"): K("M-Key_1"), # Open corresponding tool window
|
||||
K("C-Key_2"): K("M-Key_2"), # Open corresponding tool window
|
||||
K("C-Key_3"): K("M-Key_3"), # Open corresponding tool window
|
||||
K("C-Key_4"): K("M-Key_4"), # Open corresponding tool window
|
||||
K("C-Key_5"): K("M-Key_5"), # Open corresponding tool window
|
||||
K("C-Key_6"): K("M-Key_6"), # Open corresponding tool window
|
||||
K("C-Key_7"): K("M-Key_7"), # Open corresponding tool window
|
||||
K("C-Key_8"): K("M-Key_8"), # Open corresponding tool window
|
||||
K("C-Key_9"): K("M-Key_9"), # Open corresponding tool window
|
||||
K("Super-Grave"): K("C-Grave"), # Quick switch current scheme
|
||||
K("C-Comma"): K("C-M-s"), # Open Settings dialog
|
||||
K("C-Semicolon"): K("C-M-Shift-s"), # Open Project Structure dialog
|
||||
# Debugging
|
||||
K("C-M-r"): K("F9"), # Resume program
|
||||
# Search/Replace
|
||||
K("C-g"): K("F3"), # Find next
|
||||
K("C-Shift-F3"): K("Shift-F3"), # Find previous
|
||||
K("Super-g"): K("M-j"), # Select next occurrence
|
||||
K("C-Super-g"): K("C-M-Shift-j"), # Select all occurrences
|
||||
K("Super-Shift-g"): K("M-Shift-j"), # Unselect occurrence
|
||||
# Editing
|
||||
K("Super-Space"): K("LC-Space"), # Basic code completion
|
||||
K("Super-Shift-Space"): K("LC-Shift-Space"),# Smart code completion
|
||||
K("Super-j"): K("C-q"), # Quick documentation lookup
|
||||
K("C-n"): K("M-Insert"), # Generate code...
|
||||
K("Super-o"): K("C-o"), # Override methods
|
||||
K("Super-i"): K("C-i"), # Implement methods
|
||||
K("M-Up"): K("C-w"), # Extend selection
|
||||
K("M-Down"): K("C-Shift-w"), # Shrink selection
|
||||
K("Super-Shift-q"): K("M-q"), # Context info
|
||||
K("Super-M-o"): K("C-M-o"), # Optimize imports
|
||||
K("Super-M-i"): K("C-M-i"), # Auto-indent line(s)
|
||||
K("C-Backspace"): K("C-y"), # Delete line at caret
|
||||
K("Super-Shift-j"): K("C-Shift-j"), # Smart line join
|
||||
K("M-Delete"): K("C-Delete"), # Delete to word end
|
||||
K("M-Backspace"): K("C-Backspace"), # Delete to word start
|
||||
K("C-Shift-Equal"): K("C-KPPLUS"), # Expand code block
|
||||
K("C-Minus"): K("C-KPMINUS"), # Collapse code block
|
||||
K("C-Shift-Equal"): K("C-Shift-KPPLUS"), # Expand all
|
||||
K("C-Shift-Minus"): K("C-Shift-KPMINUS"), # Collapse all
|
||||
K("C-w"): K("C-F4"), # Close active editor tab
|
||||
# Refactoring
|
||||
K("C-Delete"): K("M-Delete"), # Safe Delete
|
||||
K("C-T"): K("C-M-Shift-t"), # Refactor this
|
||||
# Navigation
|
||||
K("C-o"): K("C-n"), # Go to class
|
||||
K("C-Shift-o"): K("C-Shift-n"), # Go to file
|
||||
K("C-M-o"): K("C-M-Shift-n"), # Go to symbol
|
||||
K("Super-Right"): K("M-Right"), # Go to next editor tab
|
||||
K("Super-Left"): K("M-Left"), # Go to previous editor tab
|
||||
K("C-l"): K("C-g"), # Go to line
|
||||
K("M-Space"): K("C-Shift-i"), # Open quick definition lookup
|
||||
K("C-Y"): K("C-Shift-i"), # Open quick definition lookup
|
||||
K("Super-Shift-b"): K("C-Shift-b"), # Go to type declaration
|
||||
K("Super-Up"): K("M-Up"), # Go to previous
|
||||
K("Super-Down"): K("M-Down"), # Go to next method
|
||||
K("Super-h"): K("C-h"), # Type hierarchy
|
||||
K("Super-M-h"): K("C-M-h"), # Call hierarchy
|
||||
K("C-Down"): K("C-Enter"), # Edit source/View source
|
||||
K("M-Home"): K("M-Home"), # Show navigation bar
|
||||
K("F2"): K("F11"), # Toggle bookmark
|
||||
K("Super-F3"): K("C-F11"), # Toggle bookmark with mnemonic
|
||||
K("Super-Key_0"): K("C-Key_0"), # Go to numbered bookmark
|
||||
K("Super-Key_1"): K("C-Key_1"), # Go to numbered bookmark
|
||||
K("Super-Key_2"): K("C-Key_2"), # Go to numbered bookmark
|
||||
K("Super-Key_3"): K("C-Key_3"), # Go to numbered bookmark
|
||||
K("Super-Key_4"): K("C-Key_4"), # Go to numbered bookmark
|
||||
K("Super-Key_5"): K("C-Key_5"), # Go to numbered bookmark
|
||||
K("Super-Key_6"): K("C-Key_6"), # Go to numbered bookmark
|
||||
K("Super-Key_7"): K("C-Key_7"), # Go to numbered bookmark
|
||||
K("Super-Key_8"): K("C-Key_8"), # Go to numbered bookmark
|
||||
K("Super-Key_9"): K("C-Key_9"), # Go to numbered bookmark
|
||||
K("C-F3"): K("Shift-F11"), # Show bookmarks
|
||||
# Compile and Run
|
||||
K("Super-M-r"): K("M-Shift-F10"), # Select configuration and run
|
||||
K("Super-M-d"): K("M-Shift-F9"), # Select configuration and debug
|
||||
K("Super-r"): K("Shift-F10"), # Run
|
||||
K("Super-d"): K("Shift-F9"), # Debug
|
||||
K("Super-Shift-r"): K("C-Shift-F10"), # Run context configuration from editor
|
||||
K("Super-Shift-d"): K("C-Shift-F9"), # Debug context configuration from editor
|
||||
# VCS/Local History
|
||||
K("Super-v"): K("M-Grave"), # VCS quick popup
|
||||
K("Super-c"): K("LC-c"), # Sigints - interrupt
|
||||
},"Jetbrains")
|
||||
|
||||
##############################################
|
||||
### START OF FILE MANAGER GROUP OF KEYMAPS ###
|
||||
##############################################
|
||||
|
||||
# Keybindings overrides for Caja
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("caja", re.IGNORECASE),{
|
||||
# K("RC-Super-o"): K("RC-Shift-Enter"), # Open in new tab
|
||||
K("RC-Super-o"): K("RC-Shift-W"), # Open in new window
|
||||
},"Overrides for Caja - Finder")
|
||||
|
||||
# Keybindings overrides for DDE (Deepin) File Manager
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("dde-file-manager", re.IGNORECASE),{
|
||||
K("RC-i"): K("RC-i"), # File properties dialog (Get Info)
|
||||
K("RC-comma"): None, # Disable preferences shortcut (no shortcut available)
|
||||
K("RC-Up"): K("RC-Up"), # Go Up dir
|
||||
},"Overrides for DDE File Manager - Finder")
|
||||
|
||||
# Keybindings overrides for Dolphin
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("dolphin", re.IGNORECASE),{
|
||||
##########################################################################################
|
||||
### "Open in new window" requires manually setting custom shortcut of Ctrl+Shift+o
|
||||
### in Dolphin's keyboard shortcuts. There is no default shortcut set for this function.
|
||||
##########################################################################################
|
||||
### "Open in new tab" requires manually setting custom shortcut of Ctrl+Shift+o in
|
||||
### Dolphin's keyboard shortcuts. There is no default shortcut set for this function.
|
||||
##########################################################################################
|
||||
K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or new tab, user's choice, see above)
|
||||
K("RC-Shift-N"): K("F10"), # Create new folder
|
||||
K("RC-comma"): K("RC-Shift-comma"), # Open preferences dialog
|
||||
},"Overrides for Dolphin - Finder")
|
||||
|
||||
# Keybindings overrides for elementary OS Files
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("io.elementary.files", re.IGNORECASE),{
|
||||
# K("RC-Super-o"): K("Shift-Enter"), # Open folder in new tab
|
||||
K("RC-Comma"): None, # Disable preferences shortcut since none available
|
||||
},"Overrides for Pantheon - Finder")
|
||||
|
||||
# Keybindings overrides for Nautilus
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("org.gnome.nautilus|nautilus", re.IGNORECASE),{
|
||||
K("RC-Super-o"): K("Shift-Enter"), # Open in new window
|
||||
# K("RC-Super-o"): K("RC-Enter"), # Open in new tab
|
||||
K("RC-comma"): K("RC-comma"), # Overrides "Open preferences dialog" shortcut below
|
||||
},"Overrides for Nautilus - Finder")
|
||||
|
||||
# Keybindings overrides for PCManFM and PCManFM-Qt
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("pcmanfm|pcmanfm-qt", re.IGNORECASE),{
|
||||
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
|
||||
},"Overrides for PCManFM - Finder")
|
||||
|
||||
# Keybindings overrides for SpaceFM
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("spacefm", re.IGNORECASE),{
|
||||
K("RC-Shift-N"): [K("RC-F")], # Create new folder is Ctrl+F by default
|
||||
K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog)
|
||||
K("RC-comma"): [K("M-V"),K("p")], # Overrides "Open preferences dialog" shortcut below
|
||||
# This shortcut ^^^^^^^^^^^^^^^ is not fully working in SpaceFM. Opens "View" menu but not Preferences.
|
||||
# SpaceFM seems to be doing some nasty binding that blocks things like Alt+Tab while the menu is open.
|
||||
},"Overrides for SpaceFM - Finder")
|
||||
|
||||
# Keybindings overrides for Thunar
|
||||
# (overrides some bindings from general file manager code block below)
|
||||
define_keymap(re.compile("thunar", re.IGNORECASE),{
|
||||
K("RC-Super-o"): K("RC-Shift-P"), # Open in new tab
|
||||
K("RC-comma"): [K("M-E"),K("E")], # Overrides "Open preferences dialog" shortcut below
|
||||
},"Overrides for Thunar - Finder")
|
||||
|
||||
filemanagers = [
|
||||
"caja",
|
||||
"dde-file-manager",
|
||||
"dolphin",
|
||||
"io.elementary.files",
|
||||
"nautilus",
|
||||
"nemo",
|
||||
"org.gnome.nautilus",
|
||||
"pcmanfm",
|
||||
"pcmanfm-qt",
|
||||
"spacefm",
|
||||
"thunar",
|
||||
]
|
||||
filemanagers = [filemanager.casefold() for filemanager in filemanagers]
|
||||
filemanagerStr = "|".join(str('^'+x+'$') for x in filemanagers)
|
||||
|
||||
# Currently supported Linux file managers (file browsers):
|
||||
#
|
||||
# Caja File Browser (MATE file manager, fork of Nautilus)
|
||||
# DDE File Manager (Deepin Linux file manager)
|
||||
# Dolphin (KDE file manager)
|
||||
# Nautilus (GNOME file manager, may be named "Files")
|
||||
# Nemo (Cinnamon file manager, fork of Nautilus, may be named "Files")
|
||||
# Pantheon Files (elementary OS file manager, may be named "Files")
|
||||
# PCManFM (LXDE file manager)
|
||||
# PCManFM-Qt (LXQt file manager)
|
||||
# SpaceFM (Fork of PCManFM file manager)
|
||||
# Thunar File Manager (Xfce file manager)
|
||||
#
|
||||
# Keybindings for general Linux file managers group:
|
||||
define_keymap(re.compile(filemanagerStr, re.IGNORECASE),{
|
||||
###########################################################################################################
|
||||
### Show Properties (Get Info) | Open Settings/Preferences | Show/Hide hidden files ###
|
||||
###########################################################################################################
|
||||
K("RC-i"): K("M-Enter"), # File properties dialog (Get Info)
|
||||
K("RC-comma"): [K("M-E"),K("N")], # Open preferences dialog
|
||||
K("RC-Shift-dot"): K("RC-H"), # Show/hide hidden files ("dot" files)
|
||||
###########################################################################################################
|
||||
### Navigation ###
|
||||
###########################################################################################################
|
||||
K("RC-Left"): K("M-Left"), # Go Back
|
||||
K("RC-Right"): K("M-Right"), # Go Forward
|
||||
K("RC-Up"): K("M-Up"), # Go Up dir
|
||||
# K("RC-Down"): K("M-Down"), # Go Down dir (only works on folders) [not universal]
|
||||
# K("RC-Down"): K("RC-O"), # Go Down dir (open folder/file) [not universal]
|
||||
K("RC-Down"): K("Enter"), # Go Down dir (open folder/file) [universal]
|
||||
###########################################################################################################
|
||||
### Open in New Window | Move to Trash | Duplicate file/folder ###
|
||||
###########################################################################################################
|
||||
K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or tab, depends on FM setup) [not universal]
|
||||
K("RC-Backspace"): K("Delete"), # Move to Trash (delete)
|
||||
K("RC-D"): [K("RC-C"),K("RC-V")], # Mimic Finder's Duplicate command (Copy, then Paste)
|
||||
###########################################################################################################
|
||||
### To enable renaming files with the Enter key, uncomment the two keymapping lines just below this. ###
|
||||
### Use Ctrl+Shift+Enter to escape or activate text fields such as "[F]ind" and "[L]ocation" fields. ###
|
||||
###########################################################################################################
|
||||
# K("Enter"): K("F2"), # Rename with Enter key
|
||||
# K("RC-Shift-Enter"): K("Enter"), # Remap alternative "Enter" key to easily activate/exit text fields
|
||||
},"File Managers - Finder")
|
||||
|
||||
############################################
|
||||
### END OF FILE MANAGER GROUP OF KEYMAPS ###
|
||||
############################################
|
||||
|
||||
# Keybindings for Browsers
|
||||
define_keymap(re.compile(browserStr, re.IGNORECASE),{
|
||||
K("RC-Q"): K("RC-Q"), # Close all browsers Instances
|
||||
K("M-RC-I"): K("RC-Shift-I"), # Dev tools
|
||||
K("M-RC-J"): K("RC-Shift-J"), # Dev tools
|
||||
K("RC-Key_1"): K("M-Key_1"), # Jump to Tab #1-#8
|
||||
K("RC-Key_2"): K("M-Key_2"),
|
||||
K("RC-Key_3"): K("M-Key_3"),
|
||||
K("RC-Key_4"): K("M-Key_4"),
|
||||
K("RC-Key_5"): K("M-Key_5"),
|
||||
K("RC-Key_6"): K("M-Key_6"),
|
||||
K("RC-Key_7"): K("M-Key_7"),
|
||||
K("RC-Key_8"): K("M-Key_8"),
|
||||
K("RC-Key_9"): K("M-Key_9"), # Jump to last tab
|
||||
K("C-Left_Brace"): K("C-Page_Up"),
|
||||
K("C-Right_Brace"): K("C-Page_Down"),
|
||||
})
|
||||
|
||||
# Open preferences in browsers
|
||||
define_keymap(re.compile("Firefox", re.IGNORECASE),{
|
||||
K("C-comma"): [
|
||||
K("C-T"),K("a"),K("b"),K("o"),K("u"),K("t"),
|
||||
K("Shift-SEMICOLON"),K("p"),K("r"),K("e"),K("f"),
|
||||
K("e"),K("r"),K("e"),K("n"),K("c"),K("e"),K("s"),K("Enter")
|
||||
],
|
||||
})
|
||||
define_keymap(re.compile(chromeStr, re.IGNORECASE),{
|
||||
K("C-comma"): [K("M-e"), K("s"),K("Enter")],
|
||||
}, "Browsers")
|
||||
# Opera C-F12
|
||||
|
||||
# Note: terminals extends to remotes as well
|
||||
define_keymap(lambda wm_class: wm_class.casefold() not in terminals,{
|
||||
K("RC-Dot"): K("Esc"), # Mimic macOS Cmd+dot = Escape key (not in terminals)
|
||||
})
|
||||
|
||||
# None referenced here originally
|
||||
# - but remote clients and VM software ought to be set here
|
||||
# These are the typical remaps for ALL GUI based apps
|
||||
define_keymap(lambda wm_class: wm_class.casefold() not in remotes,{
|
||||
K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde)
|
||||
K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos)
|
||||
K("RC-Super-f"):K("M-F10"), # Default SL - Maximize app (gnome/kde)
|
||||
# K("Super-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
|
||||
# K("Super-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
|
||||
K("RC-Q"): K("M-F4"), # Default SL - not-popos
|
||||
K("RC-H"):K("Super-h"), # Default SL - Minimize app (gnome/budgie/popos/fedora)
|
||||
K("M-Tab"): pass_through_key, # Default - Cmd Tab - App Switching Default
|
||||
K("RC-Tab"): K("M-Tab"), # Default - Cmd Tab - App Switching Default
|
||||
K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default - Cmd Tab - App Switching Default
|
||||
K("RC-Grave"): K("M-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
|
||||
K("RC-Shift-Grave"): K("M-Shift-Grave"), # Default not-xfce4 - Cmd ` - Same App Switching
|
||||
# K("RC-Grave"): K("Super-Tab"), # xfce4 Switch within app group
|
||||
# K("RC-Shift-Grave"): K("Super-Shift-Tab"), # xfce4 Switch within app group
|
||||
# K("Super-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
|
||||
# K("Super-Left"):K("Super-C-Down"), # SL - Change workspace (popos)
|
||||
# K("RC-Q"):K("Super-q"), # SL - Close Apps (popos)
|
||||
# K("RC-Space"): K("Super-Space"), # SL - Launch Application Menu (eos)
|
||||
# K("RC-H"): K("Super-Page_Down"), # SL - Minimize app (kde_neon)
|
||||
# SL - Default SL - Change workspace (kde_neon)
|
||||
# K("RC-Space"): K("LC-Esc"), # SL- Launch Application Menu xfce4
|
||||
# K("RC-F3"):K("C-M-d"), # SL- Show Desktop xfce4
|
||||
# K("RC-LC-f"):K("Super-Up"), # SL- Maximize app eos
|
||||
# K("RC-LC-f"):K("Super-PAGE_UP"), # SL- Maximize app manjaro
|
||||
# Basic App hotkey functions
|
||||
# K("RC-H"):K("M-F9"), # SL - Minimize app xfce4
|
||||
# K("RC-LC-f"):K("Super-PAGE_DOWN"), # SL - Minimize app manjaro
|
||||
# In-App Tab switching
|
||||
# K("M-Tab"): K("C-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||
# K("M-Shift-Tab"): K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||
# K("M-Grave") : K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching
|
||||
K("Super-Tab"): K("LC-Tab"), # Default not-chromebook
|
||||
K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook
|
||||
|
||||
# Fn to Alt style remaps
|
||||
K("RM-Enter"): K("insert"), # Insert
|
||||
|
||||
# emacs style
|
||||
K("Super-a"): K("Home"), # Beginning of Line
|
||||
K("Super-e"): K("End"), # End of Line
|
||||
K("Super-b"): K("Left"),
|
||||
K("Super-f"): K("Right"),
|
||||
K("Super-n"): K("Down"),
|
||||
K("Super-p"): K("Up"),
|
||||
K("Super-k"): [K("Shift-End"), K("Backspace")],
|
||||
K("Super-d"): K("Delete"),
|
||||
|
||||
# K("M-RC-Space"): K(""), # Open Finder - Placeholder
|
||||
|
||||
# Wordwise
|
||||
K("RC-Left"): K("Home"), # Beginning of Line
|
||||
K("RC-Shift-Left"): K("Shift-Home"), # Select all to Beginning of Line
|
||||
K("RC-Right"): K("End"), # End of Line
|
||||
K("RC-Shift-Right"): K("Shift-End"), # Select all to End of Line
|
||||
# K("RC-Left"): K("C-LEFT_BRACE"), # Firefox-nw - Back
|
||||
# K("RC-Right"): K("C-RIGHT_BRACE"), # Firefox-nw - Forward
|
||||
# K("RC-Left"): K("M-LEFT"), # Chrome-nw - Back
|
||||
# K("RC-Right"): K("M-RIGHT"), # Chrome-nw - Forward
|
||||
K("RC-Up"): K("C-Home"), # Beginning of File
|
||||
K("RC-Shift-Up"): K("C-Shift-Home"), # Select all to Beginning of File
|
||||
K("RC-Down"): K("C-End"), # End of File
|
||||
K("RC-Shift-Down"): K("C-Shift-End"), # Select all to End of File
|
||||
# K("RM-Backspace"): K("Delete"), # Chromebook/IBM - Delete
|
||||
K("Super-Backspace"): K("C-Backspace"), # Delete Left Word of Cursor
|
||||
K("Super-Delete"): K("C-Delete"), # Delete Right Word of Cursor
|
||||
# K("LM-Backspace"): K("C-Backspace"), # Chromebook/IBM - Delete Left Word of Cursor
|
||||
K("M-Backspace"): K("C-Backspace"), # Default not-chromebook
|
||||
K("RC-Backspace"): K("C-Shift-Backspace"), # Delete Entire Line Left of Cursor
|
||||
K("Alt-Delete"): K("C-Delete"), # Delete Right Word of Cursor
|
||||
# K(""): pass_through_key, # cancel
|
||||
# K(""): K(""), #
|
||||
}, "General GUI")
|
||||
|
||||
define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{
|
||||
# Wordwise remaining - for Everything but VS Code
|
||||
K("M-Left"): K("C-Left"), # Left of Word
|
||||
K("M-Shift-Left"): K("C-Shift-Left"), # Select Left of Word
|
||||
K("M-Right"): K("C-Right"), # Right of Word
|
||||
K("M-Shift-Right"): K("C-Shift-Right"), # Select Right of Word
|
||||
K("M-Shift-g"): K("C-Shift-g"), # View source control
|
||||
# ** VS Code fix **
|
||||
# Electron issue precludes normal keybinding fix.
|
||||
# Alt menu auto-focus/toggle gets in the way.
|
||||
#
|
||||
# refer to ./xkeysnail-config/vscode_keybindings.json
|
||||
# **
|
||||
#
|
||||
# ** Firefox fix **
|
||||
# User will need to set "ui.key.menuAccessKeyFocuses"
|
||||
# under about:config to false.
|
||||
#
|
||||
# https://superuser.com/questions/770301/pentadactyl-how-to-disable-menu-bar-toggle-by-alt
|
||||
# **
|
||||
#
|
||||
}, "Wordwise - not vscode")
|
||||
|
||||
# Keybindings for VS Code
|
||||
define_keymap(re.compile(codeStr, re.IGNORECASE),{
|
||||
K("Super-Space"): K("LC-Space"), # Basic code completion
|
||||
# Wordwise remaining - for VS Code
|
||||
# Alt-F19 hack fixes Alt menu activation
|
||||
K("M-Left"): [K("M-F19"),K("C-Left")], # Left of Word
|
||||
K("M-Right"): [K("M-F19"),K("C-Right")], # Right of Word
|
||||
K("M-Shift-Left"): [K("M-F19"),K("C-Shift-Left")], # Select Left of Word
|
||||
K("M-Shift-Right"): [K("M-F19"),K("C-Shift-Right")], # Select Right of Word
|
||||
|
||||
# K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
|
||||
# K("C-PAGE_UP"): pass_through_key, # cancel prev_view
|
||||
K("C-M-Left"): K("C-PAGE_UP"), # next_view
|
||||
K("C-M-Right"): K("C-PAGE_DOWN"), # prev_view
|
||||
|
||||
# VS Code Shortcuts
|
||||
K("C-g"): pass_through_key, # cancel Go to Line...
|
||||
K("Super-g"): K("C-g"), # Go to Line...
|
||||
K("F3"): pass_through_key, # cancel Find next
|
||||
K("C-h"): pass_through_key, # cancel replace
|
||||
K("C-M-f"): K("C-h"), # replace
|
||||
K("C-Shift-h"): pass_through_key, # cancel replace_next
|
||||
K("C-M-e"): K("C-Shift-h"), # replace_next
|
||||
K("f3"): pass_through_key, # cancel find_next
|
||||
K("C-g"): K("f3"), # find_next
|
||||
K("Shift-f3"): pass_through_key, # cancel find_prev
|
||||
K("C-Shift-g"): K("Shift-f3"), # find_prev
|
||||
# K("Super-c"): K("LC-c"), # Default - Terminal - Sigint
|
||||
# K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano
|
||||
# K("M-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint
|
||||
# K("M-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano
|
||||
# K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under
|
||||
# K("C-M-g"): K("C-f2"), # Chromebook/IBM - Sublime - find_all_under
|
||||
# K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up - Sublime
|
||||
# K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down - Sublime
|
||||
# K(""): pass_through_key, # cancel
|
||||
# K(""): K(""), #
|
||||
}, "Code")
|
||||
|
||||
# Keybindings for Sublime Text
|
||||
define_keymap(re.compile("Sublime_text", re.IGNORECASE),{
|
||||
# K("Super-c"): K("LC-c"), # Default - Terminal - Sigint
|
||||
# K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano
|
||||
# K("M-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint
|
||||
# K("M-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano
|
||||
K("Super-Space"): K("C-Space"), # Basic code completion
|
||||
K("C-Super-up"): K("M-o"), # Switch file
|
||||
K("Super-RC-f"): K("f11"), # toggle_full_screen
|
||||
K("C-M-v"): [K("C-k"), K("C-v")], # paste_from_history
|
||||
K("C-up"): pass_through_key, # cancel scroll_lines up
|
||||
K("C-M-up"): K("C-up"), # scroll_lines up
|
||||
K("C-down"): pass_through_key, # cancel scroll_lines down
|
||||
K("C-M-down"): K("C-down"), # scroll_lines down
|
||||
K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up
|
||||
K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down
|
||||
K("C-PAGE_DOWN"): pass_through_key, # cancel next_view
|
||||
K("C-PAGE_UP"): pass_through_key, # cancel prev_view
|
||||
K("C-Shift-left_brace"): K("C-PAGE_DOWN"), # next_view
|
||||
K("C-Shift-right_brace"): K("C-PAGE_UP"), # prev_view
|
||||
K("C-M-right"): K("C-PAGE_DOWN"), # next_view
|
||||
K("C-M-left"): K("C-PAGE_UP"), # prev_view
|
||||
K("insert"): pass_through_key, # cancel toggle_overwrite
|
||||
K("C-M-o"): K("insert"), # toggle_overwrite
|
||||
K("M-c"): pass_through_key, # cancel toggle_case_sensitive
|
||||
K("C-M-c"): K("M-c"), # toggle_case_sensitive
|
||||
K("C-h"): pass_through_key, # cancel replace
|
||||
K("C-M-f"): K("C-h"), # replace
|
||||
K("C-Shift-h"): pass_through_key, # cancel replace_next
|
||||
K("C-M-e"): K("C-Shift-h"), # replace_next
|
||||
K("f3"): pass_through_key, # cancel find_next
|
||||
K("C-g"): K("f3"), # find_next
|
||||
K("Shift-f3"): pass_through_key, # cancel find_prev
|
||||
K("C-Shift-g"): K("Shift-f3"), # find_prev
|
||||
K("C-f3"): pass_through_key, # cancel find_under
|
||||
K("Super-M-g"): K("C-f3"), # find_under
|
||||
K("C-Shift-f3"): pass_through_key, # cancel find_under_prev
|
||||
K("Super-M-Shift-g"): K("C-Shift-f3"), # find_under_prev
|
||||
K("M-f3"): pass_through_key, # Default - cancel find_all_under
|
||||
# K("M-Refresh"): pass_through_key, # Chromebook/IBM - cancel find_all_under
|
||||
# K("M-C-g"): K("M-Refresh"), # Chromebook/IBM - find_all_under
|
||||
K("Super-C-g"): K("M-f3"), # Default - find_all_under
|
||||
K("C-Shift-up"): pass_through_key, # cancel swap_line_up
|
||||
K("Super-M-up"): K("C-Shift-up"), # swap_line_up
|
||||
K("C-Shift-down"): pass_through_key, # cancel swap_line_down
|
||||
K("Super-M-down"): K("C-Shift-down"), # swap_line_down
|
||||
K("C-Pause"): pass_through_key, # cancel cancel_build
|
||||
K("Super-c"): K("C-Pause"), # cancel_build
|
||||
K("f9"): pass_through_key, # cancel sort_lines case_s false
|
||||
K("f5"): K("f9"), # sort_lines case_s false
|
||||
K("Super-f9"): pass_through_key, # cancel sort_lines case_s true
|
||||
K("Super-f5"): K("Super-f9"), # sort_lines case_s true
|
||||
K("M-Shift-Key_1"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Key_1"): K("M-Shift-Key_1"), # set_layout
|
||||
K("M-Shift-Key_2"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Key_2"): K("M-Shift-Key_2"), # set_layout
|
||||
K("M-Shift-Key_3"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Key_3"): K("M-Shift-Key_3"), # set_layout
|
||||
K("M-Shift-Key_4"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Key_4"): K("M-Shift-Key_4"), # set_layout
|
||||
K("M-Shift-Key_8"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Shift-Key_2"): K("M-Shift-Key_8"), # set_layout
|
||||
K("M-Shift-Key_9"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Shift-Key_3"): K("M-Shift-Key_9"), # set_layout
|
||||
K("M-Shift-Key_5"): pass_through_key, # cancel set_layout
|
||||
K("C-M-Shift-Key_5"): K("M-Shift-Key_5"), # set_layout
|
||||
# K(""): pass_through_key, # cancel
|
||||
# K(""): K(""), #
|
||||
}, "Sublime Text")
|
||||
|
||||
define_keymap(re.compile("konsole", re.IGNORECASE),{
|
||||
# Ctrl Tab - In App Tab Switching
|
||||
K("LC-Tab") : K("Shift-Right"),
|
||||
K("LC-Shift-Tab") : K("Shift-Left"),
|
||||
K("LC-Grave") : K("Shift-Left"),
|
||||
|
||||
}, "Konsole tab switching")
|
||||
|
||||
define_keymap(re.compile("Io.elementary.terminal|kitty", re.IGNORECASE),{
|
||||
# Ctrl Tab - In App Tab Switching
|
||||
K("LC-Tab") : K("LC-Shift-Right"),
|
||||
K("LC-Shift-Tab") : K("LC-Shift-Left"),
|
||||
K("LC-Grave") : K("LC-Shift-Left"),
|
||||
|
||||
}, "Elementary Terminal tab switching")
|
||||
|
||||
define_keymap(re.compile(termStr, re.IGNORECASE),{
|
||||
K("LC-RC-f"): K("M-F10"), # Toggle window maximized state
|
||||
# K("RC-Grave"): K("Super-Tab"), # xfce4 Switch within app group
|
||||
# K("RC-Shift-Grave"): K("Super-Shift-Tab"), # xfce4 Switch within app group
|
||||
# K("LC-Right"):K("C-M-Right"), # Default SL - Change workspace (budgie)
|
||||
# K("LC-Left"):K("C-M-Left"), # Default SL - Change workspace (budgie)
|
||||
# K("LC-Left"):K("C-M-End"), # SL - Change workspace xfce4
|
||||
# K("LC-Left"):K("Super-Left"), # SL - Change workspace eos
|
||||
# K("LC-Right"):K("C-M-Home"), # SL - Change workspace xfce4
|
||||
# K("LC-Right"):K("Super-Right"), # SL - Change workspace eos
|
||||
# K("LC-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("LC-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora)
|
||||
# K("LC-Right"):K("Super-C-Up"), # SL - Change workspace (popos)
|
||||
# K("LC-Left"):K("Super-C-Down"), # SL - Change workspace (popos)
|
||||
# Ctrl Tab - In App Tab Switching
|
||||
K("LC-Tab") : K("LC-PAGE_DOWN"),
|
||||
K("LC-Shift-Tab") : K("LC-PAGE_UP"),
|
||||
K("LC-Grave") : K("LC-PAGE_UP"),
|
||||
# K("M-Tab"): pass_through_key, # Default - Cmd Tab - App Switching Default
|
||||
# K("RC-Tab"): K("M-Tab"), # Default - Cmd Tab - App Switching Default
|
||||
# K("RC-Shift-Tab"): K("M-Shift-Tab"), # Default - Cmd Tab - App Switching Default
|
||||
# Converts Cmd to use Ctrl-Shift
|
||||
K("RC-MINUS"): K("C-MINUS"),
|
||||
K("RC-EQUAL"): K("C-Shift-EQUAL"),
|
||||
K("RC-BACKSPACE"): K("C-Shift-BACKSPACE"),
|
||||
K("RC-W"): K("C-Shift-W"),
|
||||
K("RC-E"): K("C-Shift-E"),
|
||||
K("RC-R"): K("C-Shift-R"),
|
||||
K("RC-T"): K("C-Shift-t"),
|
||||
K("RC-Y"): K("C-Shift-Y"),
|
||||
K("RC-U"): K("C-Shift-U"),
|
||||
K("RC-I"): K("C-Shift-I"),
|
||||
K("RC-O"): K("C-Shift-O"),
|
||||
K("RC-P"): K("C-Shift-P"),
|
||||
K("RC-LEFT_BRACE"): K("C-Shift-LEFT_BRACE"),
|
||||
K("RC-RIGHT_BRACE"): K("C-Shift-RIGHT_BRACE"),
|
||||
K("RC-A"): K("C-Shift-A"),
|
||||
K("RC-S"): K("C-Shift-S"),
|
||||
K("RC-D"): K("C-Shift-D"),
|
||||
K("RC-F"): K("C-Shift-F"),
|
||||
K("RC-G"): K("C-Shift-G"),
|
||||
K("RC-H"): K("C-Shift-H"),
|
||||
K("RC-J"): K("C-Shift-J"),
|
||||
K("RC-K"): K("C-Shift-K"),
|
||||
K("RC-L"): K("C-Shift-L"),
|
||||
K("RC-SEMICOLON"): K("C-Shift-SEMICOLON"),
|
||||
K("RC-APOSTROPHE"): K("C-Shift-APOSTROPHE"),
|
||||
K("RC-GRAVE"): K("C-Shift-GRAVE"),
|
||||
K("RC-Z"): K("C-Shift-Z"),
|
||||
K("RC-X"): K("C-Shift-X"),
|
||||
K("RC-C"): K("C-Shift-C"),
|
||||
K("RC-V"): K("C-Shift-V"),
|
||||
K("RC-B"): K("C-Shift-B"),
|
||||
K("RC-N"): K("C-Shift-N"),
|
||||
K("RC-M"): K("C-Shift-M"),
|
||||
K("RC-COMMA"): K("C-Shift-COMMA"),
|
||||
K("RC-Dot"): K("LC-c"),
|
||||
K("RC-SLASH"): K("C-Shift-SLASH"),
|
||||
K("RC-KPASTERISK"): K("C-Shift-KPASTERISK"),
|
||||
}, "terminals")
|
13
linux/limitedadmins
Normal file
@@ -0,0 +1,13 @@
|
||||
# /etc/sudoers.d/limitedadmins
|
||||
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11/bin"
|
||||
Defaults!/etc/init.d/kinto setenv,env_reset,env_delete+=PATH,env_delete+=LD_PRELOAD,env_delete+=LD_LIBRARY_PATH,env_delete+=SSH_AUTH_SOCK,env_delete+=PYTHONPATH,env_delete+=PERL5LIB
|
||||
%{username} ALL=NOPASSWD: /etc/init.d/kinto *
|
||||
%{username} ALL=NOPASSWD: {systemctl} restart xkeysnail
|
||||
%{username} ALL=NOPASSWD: {systemctl} start xkeysnail
|
||||
%{username} ALL=NOPASSWD: {systemctl} stop xkeysnail
|
||||
%{username} ALL=NOPASSWD: {systemctl} status xkeysnail
|
||||
%{username} ALL=(root) NOPASSWD: /usr/local/bin/logoff.sh
|
||||
%{username} ALL=NOPASSWD: {pkill} -f logoff
|
||||
%{username} ALL=NOPASSWD: {pkill} -f bin/xkeysnail
|
||||
%{username} ALL=NOPASSWD: {xkeysnail} *
|
||||
%{username} ALL=NOPASSWD: {systemctl} is-active --quiet xkeysnail
|
13
linux/prexk.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
if [ -f {homedir}/.config/systemd/user/keyswap.timer ]; then
|
||||
systemctl --user stop keyswap.timer >/dev/null 2>&1
|
||||
systemctl --user disable keyswap.timer >/dev/null 2>&1
|
||||
fi
|
||||
if [ -f {homedir}/.config/systemd/user/keyswap.service ]; then
|
||||
systemctl --user stop keyswap >/dev/null 2>&1
|
||||
systemctl --user disable keyswap >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# export DISPLAY={displayid};/usr/bin/xhost +SI:localuser:root
|
||||
mkdir -p /tmp/kinto/xkeysnail
|
||||
cp {homedir}/.config/kinto/kinto.py /tmp/kinto/xkeysnail/kinto.py
|
6
linux/root_logoff.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# /usr/local/bin/logoff.sh
|
||||
while true; do
|
||||
w | grep -E "$1.*$2" > /dev/null 2>&1 || (sudo systemctl stop xkeysnail && sudo pkill -f logoff)
|
||||
sleep 5
|
||||
done
|
182
linux/system-config/dename.sh
Executable file
@@ -0,0 +1,182 @@
|
||||
#!/bin/bash
|
||||
|
||||
function detect_budgie()
|
||||
{
|
||||
ps -e | grep -E '^.* budgie-wm' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`dpkg-query -l | grep budgie-core | awk '{print $3}'`
|
||||
DESKTOP="budgie"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_gnome()
|
||||
{
|
||||
ps -e | grep -E '^.* gnome-session' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`gnome-session --version | awk '{print $2}'`
|
||||
DESKTOP="gnome"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_kde4()
|
||||
{
|
||||
ps -e | grep -E '^.* kded4$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
else
|
||||
VERSION=`kded4 --version | grep -m 1 'KDE' | awk -F ':' '{print $2}' | awk '{print $1}'`
|
||||
DESKTOP="KDE"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function detect_kde()
|
||||
{
|
||||
ps -e | grep -E '^.* kded5$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
else
|
||||
VERSION=`kded5 --version | grep -m 1 'KDE' | awk -F ':' '{print $2}' | awk '{print $1}'`
|
||||
DESKTOP="KDE"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function detect_unity()
|
||||
{
|
||||
ps -e | grep -E 'unity-panel' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`unity --version | awk '{print $2}'`
|
||||
DESKTOP="unity"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_xfce()
|
||||
{
|
||||
ps -e | grep -E '^.* xfce4-session$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`xfce4-session --version | grep xfce4-session | awk '{print $2}'`
|
||||
DESKTOP="xfce"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_cinnamon()
|
||||
{
|
||||
ps -e | grep -E '^.* cinnamon$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`cinnamon --version | awk '{print $2}'`
|
||||
DESKTOP="cinnamon"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_mate()
|
||||
{
|
||||
ps -e | grep -E '^.* mate-panel$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
VERSION=`mate-about --version | awk '{print $4}'`
|
||||
DESKTOP="mate"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_lxde()
|
||||
{
|
||||
ps -e | grep -E '^.* lxsession$' > /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# We can detect LXDE version only thru package manager
|
||||
which apt-cache > /dev/null 2> /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
which yum > /dev/null 2> /dev/null
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
VERSION='unknown'
|
||||
else
|
||||
# For Fedora
|
||||
VERSION=`yum list lxde-common | grep lxde-common | awk '{print $2}' | awk -F '-' '{print $1}'`
|
||||
fi
|
||||
else
|
||||
# For Lubuntu and Knoppix
|
||||
VERSION=`apt-cache show lxde-common /| grep 'Version:' | awk '{print $2}' | awk -F '-' '{print $1}'`
|
||||
fi
|
||||
DESKTOP="lxde"
|
||||
return 1
|
||||
}
|
||||
|
||||
function detect_sugar()
|
||||
{
|
||||
if [ "$DESKTOP_SESSION" == "sugar" ];
|
||||
then
|
||||
VERSION=`python -c "from jarabe import config; print config.version"`
|
||||
DESKTOP="sugar"
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
DESKTOP="unknown"
|
||||
if detect_unity;
|
||||
then
|
||||
if detect_kde;
|
||||
then
|
||||
if detect_kde4;
|
||||
then
|
||||
if detect_budgie;
|
||||
then
|
||||
if detect_gnome;
|
||||
then
|
||||
if detect_xfce;
|
||||
then
|
||||
if detect_cinnamon;
|
||||
then
|
||||
if detect_mate;
|
||||
then
|
||||
if detect_lxde;
|
||||
then
|
||||
detect_sugar
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ "$1" == '-v' ];
|
||||
then
|
||||
echo $VERSION
|
||||
else
|
||||
if [ "$1" == '-n' ];
|
||||
then
|
||||
echo $DESKTOP
|
||||
else
|
||||
echo $DESKTOP $VERSION
|
||||
fi
|
||||
fi
|
21
linux/system-config/unipkg.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
if pkgmgr="$( which apt-get )" 2> /dev/null; then
|
||||
echo "Debian"
|
||||
$pkgmgr update
|
||||
$pkgmgr --yes --force-yes install $1
|
||||
elif pkgmgr="$( which dnf )" 2> /dev/null; then
|
||||
echo "dnf"
|
||||
$pkgmgr check-update; $pkgmgr install -y $1
|
||||
elif pkgmgr="$( which pacman )" 2> /dev/null; then
|
||||
echo "Arch-based"
|
||||
$pkgmgr -Syy;yes | $pkgmgr -S $1
|
||||
else
|
||||
echo "Package manager not found, please install $1" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ 1 -ne $# ]]; then
|
||||
echo "Syntax: $0 PACKAGE"
|
||||
exit 1
|
||||
fi
|
||||
exit $?
|
41
linux/trayapps/appindicator/icons/kinto-color-16.svg
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#61BB46;}
|
||||
.st1{fill:#FDB827;}
|
||||
.st2{fill:#F5821F;}
|
||||
.st3{fill:#E03A3E;}
|
||||
.st4{fill:#963D97;}
|
||||
.st5{fill:#009DDC;}
|
||||
.st6{fill:#FFFFFF;}
|
||||
</style>
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<title>kinto-final</title>
|
||||
<path id="Green" class="st0" d="M13.5,3.6H4.7c-1,0-1.9,0.9-1.9,1.9v0.2h12.6V5.5C15.4,4.5,14.5,3.6,13.5,3.6z"/>
|
||||
<rect id="Yellow" x="2.8" y="5.7" class="st1" width="12.6" height="2.2"/>
|
||||
<rect id="Orange" x="2.8" y="7.8" class="st2" width="12.6" height="2.2"/>
|
||||
<rect id="Red" x="2.8" y="10" class="st3" width="12.6" height="2.2"/>
|
||||
<path id="Purple" class="st4" d="M2.8,14.3L2.8,14.3h12.6l0,0v-2.1H2.8V14.3z"/>
|
||||
<path id="Blue" class="st5" d="M4.7,16.2h9c1-0.1,1.7-1,1.7-1.9H2.8C2.8,15.3,3.7,16.2,4.7,16.2z"/>
|
||||
<g id="Border">
|
||||
<path class="st6" d="M16.2,2.8c-0.6-0.6-1.4-1-2.2-0.9H4.3c-0.9,0-1.7,0.3-2.2,0.9c-0.6,0.6-1,1.4-1,2.2v9.7c0,0.9,0.3,1.7,1,2.2
|
||||
c0.5,0.6,1.3,1,2.2,1h2.1l0,0h2.3l0,0h3.5l0,0l0,0H14c1.7,0,3.1-1.4,3.1-3.1V5C17.2,4.2,16.8,3.4,16.2,2.8z M15.4,14.3
|
||||
c0,1-0.7,1.8-1.7,1.9L11,11.6l2.8-2.9h-2.5l-2.5,3V5.9H6.7v10.3H4.7c-1,0-1.9-0.9-1.9-1.9V5.5c0-1,0.9-1.9,1.9-1.9h8.7
|
||||
c1,0,1.9,0.9,1.9,1.9L15.4,14.3z M8.7,16.2V14l0.9-0.9l1.7,3.1L8.7,16.2z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
41
linux/trayapps/appindicator/icons/kinto-color.svg
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#61BB46;}
|
||||
.st1{fill:#FDB827;}
|
||||
.st2{fill:#F5821F;}
|
||||
.st3{fill:#E03A3E;}
|
||||
.st4{fill:#963D97;}
|
||||
.st5{fill:#009DDC;}
|
||||
.st6{fill:#FFFFFF;}
|
||||
</style>
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<title>kinto-final</title>
|
||||
<path id="Green" class="st0" d="M14.1,2.7h-10c-1.2,0-2.2,1-2.2,2.2v0.2h14.4V4.9C16.3,3.7,15.3,2.7,14.1,2.7z"/>
|
||||
<rect id="Yellow" x="1.9" y="5.1" class="st1" width="14.4" height="2.5"/>
|
||||
<rect id="Orange" x="1.9" y="7.5" class="st2" width="14.4" height="2.5"/>
|
||||
<rect id="Red" x="1.9" y="10" class="st3" width="14.4" height="2.5"/>
|
||||
<path id="Purple" class="st4" d="M1.9,14.9C1.9,14.9,1.9,14.9,1.9,14.9l14.4,0c0,0,0,0,0,0v-2.4H1.9V14.9z"/>
|
||||
<path id="Blue" class="st5" d="M4.1,17.1l10.3,0c1.1-0.1,1.9-1.1,1.9-2.2H1.9C1.9,16.1,2.9,17.1,4.1,17.1z"/>
|
||||
<g id="Border">
|
||||
<path class="st6" d="M17.2,1.8c-0.7-0.7-1.6-1.1-2.5-1H3.6c-1,0-1.9,0.4-2.5,1C0.4,2.5,0,3.4,0,4.3v11.1c0,1,0.4,1.9,1.1,2.5
|
||||
C1.7,18.6,2.6,19,3.6,19H6v0h2.6v0h4l0,0l0,0h2.1c2,0,3.6-1.6,3.6-3.6V4.3C18.3,3.4,17.9,2.5,17.2,1.8z M16.3,14.9
|
||||
c0,1.1-0.8,2.1-1.9,2.2l-3.1-5.3l3.2-3.3h-2.9l-2.9,3.4V5.3H6.3v11.8H4.1c-1.2,0-2.2-1-2.2-2.2v-10c0-1.2,1-2.2,2.2-2.2h10
|
||||
c1.2,0,2.2,1,2.2,2.2L16.3,14.9z M8.6,17.1v-2.5l1-1l2,3.6L8.6,17.1z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
28
linux/trayapps/appindicator/icons/kinto-invert-16.svg
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
</style>
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<g id="White_K">
|
||||
<path class="st0" d="M16.1,2.9c-0.6-0.6-1.4-1-2.2-1H4.2C3.3,2,2.5,2.3,2,2.9S1,4.3,1,5.1v9.7c0,0.9,0.4,1.7,1,2.2
|
||||
c0.5,0.7,1.3,1,2.2,1h2.1V5.6h2.3V12l2.9-3.3h2.8l-3.2,3.2l3.6,6c0.5-0.2,1.1-0.4,1.4-0.8c0.6-0.6,1-1.4,1-2.2V5.1
|
||||
C17,4.3,16.7,3.6,16.1,2.9z"/>
|
||||
<polygon class="st0" points="8.5,14.6 8.5,18 11.9,18 9.4,13.6 "/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
28
linux/trayapps/appindicator/icons/kinto-invert.svg
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
</style>
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<g id="White_K">
|
||||
<path class="st0" d="M17.2,1.8c-0.7-0.7-1.6-1.1-2.5-1.1H3.6c-1,0-1.9,0.4-2.5,1.1S0,3.4,0,4.3v11.1c0,1,0.4,1.9,1.1,2.5
|
||||
C1.7,18.7,2.6,19,3.6,19H6V4.8h2.6v7.3l3.3-3.8h3.2L11.5,12l4.1,6.9c0.6-0.2,1.2-0.5,1.6-0.9c0.7-0.7,1.1-1.6,1.1-2.5V4.3
|
||||
C18.3,3.4,17.9,2.5,17.2,1.8z"/>
|
||||
<polygon class="st0" points="8.6,15.1 8.6,19 12.5,19 9.6,14 "/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
24
linux/trayapps/appindicator/icons/kinto-solid-16.svg
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<g id="White_K">
|
||||
<path d="M16.1,2.9c-0.6-0.6-1.4-1-2.2-1H4.2C3.3,2,2.5,2.3,2,2.9S1,4.3,1,5.1v9.7c0,0.9,0.4,1.7,1,2.2c0.5,0.7,1.3,1,2.2,1h2.1
|
||||
V5.6h2.3V12l2.9-3.3h2.8l-3.2,3.2l3.6,6c0.5-0.2,1.1-0.4,1.4-0.8c0.6-0.6,1-1.4,1-2.2V5.1C17,4.3,16.7,3.6,16.1,2.9z"/>
|
||||
<polygon points="8.5,14.6 8.5,18 11.9,18 9.4,13.6 "/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
25
linux/trayapps/appindicator/icons/kinto-solid.svg
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<g id="White_K">
|
||||
<path d="M17.2,1.8c-0.7-0.7-1.6-1.1-2.5-1.1H3.6c-1,0-1.9,0.4-2.5,1.1S0,3.4,0,4.3v11.1c0,1,0.4,1.9,1.1,2.5
|
||||
C1.7,18.7,2.6,19,3.6,19H6V4.8h2.6v7.3l3.3-3.8h3.2L11.5,12l4.1,6.9c0.6-0.2,1.2-0.5,1.6-0.9c0.7-0.7,1.1-1.6,1.1-2.5V4.3
|
||||
C18.3,3.4,17.9,2.5,17.2,1.8z"/>
|
||||
<polygon points="8.6,15.1 8.6,19 12.5,19 9.6,14 "/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
27
linux/trayapps/appindicator/icons/kinto.svg
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1"
|
||||
id="svg5082" inkscape:version="0.92.2 5c3e80d, 2017-08-06" sodipodi:docname="budgie-restart2.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.3 19.8"
|
||||
style="enable-background:new 0 0 18.3 19.8;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
</style>
|
||||
<title id="title5087">Symbolic Icons</title>
|
||||
<sodipodi:namedview bordercolor="#000000" borderopacity="0.34509804" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer2" inkscape:cx="3.6222888" inkscape:cy="4.1549938" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:object-nodes="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="740" inkscape:window-maximized="1" inkscape:window-width="1360" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="33.811791" pagecolor="#37474f" showborder="false" showgrid="false">
|
||||
<inkscape:grid empspacing="4" id="grid5636" originx="-0.28935368" originy="-119.88235" type="xygrid"></inkscape:grid>
|
||||
</sodipodi:namedview>
|
||||
<g id="layer4" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="status">
|
||||
</g>
|
||||
<g id="layer3" transform="translate(-0.28935366,-60.349598)" inkscape:groupmode="layer" inkscape:label="actions">
|
||||
</g>
|
||||
<g id="layer2">
|
||||
<path class="st0" d="M17.3,1.8c-0.7-0.7-1.6-1.1-2.5-1.1H3.6C1.6,0.7,0,2.3,0,4.3v11.1c0,2,1.6,3.6,3.6,3.6H6v0h2.6v0h4l0,0l0,0
|
||||
h2.1c2,0,3.6-1.6,3.6-3.6V4.3C18.3,3.4,17.9,2.5,17.3,1.8z M17.2,15.4C17.2,15.5,17.2,15.5,17.2,15.4c0,1.3-1,2.3-2.2,2.5l-1.4-2.4
|
||||
L12,12.8L11.5,12l1.9-2l1.6-1.7h-3.2L10.4,10l-1.8,2v-2V7.3V4.8H6v2.5V10v2.8v2.7v2.4H3.6c-1.4,0-2.5-1.1-2.5-2.4c0,0,0,0,0-0.1
|
||||
v-2.7V10V7.3V4.5V4.3c0-1.4,1.1-2.5,2.5-2.5h11.1c1.4,0,2.5,1.1,2.5,2.5v0.2v2.7V10v2.8V15.4z M8.6,15.5v-0.4L9.6,14l0.9,1.5
|
||||
l1.4,2.4H8.6V15.5z"/>
|
||||
</g>
|
||||
<g id="layer1">
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
8
linux/trayapps/appindicator/kintotray.desktop
Normal file
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Kinto Tray
|
||||
GenericName=Kintotray
|
||||
Comment=Make Linux Type Like it's a Mac
|
||||
Exec=/bin/bash -c "{homedir}/.config/kinto/kintotray.py"
|
||||
Terminal=false
|
||||
Type=Application
|
||||
X-GNOME-Autostart-enabled=true
|
752
linux/trayapps/appindicator/kintotray.py
Executable file
@@ -0,0 +1,752 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version('Gtk', '3.0')
|
||||
gi.require_version('AppIndicator3', '0.1')
|
||||
gi.require_version('Notify', '0.7')
|
||||
|
||||
import signal,time,os,fcntl,datetime,re
|
||||
from subprocess import Popen, PIPE, CalledProcessError
|
||||
from shutil import which
|
||||
from gi.repository import Gtk,GLib,GdkPixbuf
|
||||
from gi.repository import AppIndicator3 as appindicator
|
||||
from gi.repository import Notify as notify
|
||||
|
||||
import signal
|
||||
|
||||
def kill_child():
|
||||
if child_pid is None:
|
||||
pass
|
||||
else:
|
||||
os.kill(child_pid, signal.SIGTERM)
|
||||
|
||||
import atexit
|
||||
atexit.register(kill_child)
|
||||
|
||||
APPINDICATOR_ID = 'Kinto'
|
||||
|
||||
class Indicator():
|
||||
|
||||
global child_pid
|
||||
global sysv
|
||||
try:
|
||||
sysv = int(Popen("pidof systemd >/dev/null 2>&1 && echo '0' || echo '1'", stdout=PIPE, shell=True).communicate()[0].strip().decode('UTF-8'))
|
||||
except:
|
||||
sysv = 2
|
||||
if sysv:
|
||||
kinto_status = Popen("export TERM=xterm-color;while :; do clear; pgrep 'xkeysnail' && echo 'active'; sleep 2; done", stdout=PIPE, shell=True)
|
||||
else:
|
||||
kinto_status = Popen("export TERM=xterm-color;while :; do clear; systemctl is-active xkeysnail; sleep 2; done", stdout=PIPE, shell=True)
|
||||
child_pid = kinto_status.pid
|
||||
|
||||
homedir = os.path.expanduser("~")
|
||||
kconfig = homedir+"/.config/kinto/kinto.py"
|
||||
ostype = os.environ.get('XDG_CURRENT_DESKTOP')
|
||||
|
||||
enable_id = 0
|
||||
winmac_id = 0
|
||||
chkautostart_id = 0
|
||||
autostart_bool = False
|
||||
menu = Gtk.Menu()
|
||||
menukb = Gtk.Menu()
|
||||
checkbox_autostart = Gtk.CheckMenuItem(label='Autostart')
|
||||
restart = Gtk.MenuItem(label='Restart')
|
||||
stop = Gtk.MenuItem(label='Stop')
|
||||
keyboards = Gtk.MenuItem(label='Keyboard Types')
|
||||
keyboards.set_submenu(menukb)
|
||||
winkb = Gtk.RadioMenuItem(label='Windows')
|
||||
mackb = Gtk.RadioMenuItem(label='Apple',group=winkb)
|
||||
chromekb = Gtk.RadioMenuItem(label='Chromebook',group=winkb)
|
||||
ibmkb = Gtk.RadioMenuItem(label='IBM (No Super/Win key)',group=winkb)
|
||||
winmackb = Gtk.RadioMenuItem(label='Windows & Apple*',group=winkb)
|
||||
edit = Gtk.MenuItem(label='Customize')
|
||||
edit_submenu = Gtk.Menu()
|
||||
edit.set_submenu(edit_submenu)
|
||||
tweaks = Gtk.MenuItem(label='Tweaks')
|
||||
rightmod = Gtk.CheckButton(label='AltGr on Right Cmd')
|
||||
vsc2st3 = Gtk.CheckButton(label='ST3 hotkeys for VS Code')
|
||||
caps2esc = Gtk.CheckButton(label='Capslock is Escape when tapped, Cmd when held')
|
||||
caps2cmd = Gtk.CheckButton(label='Capslock is Cmd')
|
||||
button_config = Gtk.MenuItem(label='Kinto Config (shortcuts)')
|
||||
service = Gtk.MenuItem(label='Kinto Service')
|
||||
# Keyboard type set below
|
||||
button_syskb = Gtk.MenuItem(label='System Shortcuts')
|
||||
button_region = Gtk.MenuItem(label='Change Language')
|
||||
systray = Gtk.CheckMenuItem(label='Tray Enabled')
|
||||
helpm = Gtk.MenuItem(label='Help')
|
||||
help_submenu = Gtk.Menu()
|
||||
helpm.set_submenu(help_submenu)
|
||||
debug = Gtk.MenuItem(label='Debug')
|
||||
opengui = Gtk.MenuItem(label='Open Kinto')
|
||||
support = Gtk.MenuItem(label='Support')
|
||||
about = Gtk.MenuItem(label='About')
|
||||
global restartsvc
|
||||
restartsvc = False
|
||||
unixts = int(time.time())
|
||||
last_status = ''
|
||||
|
||||
def __init__(self):
|
||||
global sysv
|
||||
try:
|
||||
sysv = int(Popen("pidof systemd >/dev/null 2>&1 && echo '0' || echo '1'", stdout=PIPE, shell=True).communicate()[0].strip().decode('UTF-8'))
|
||||
except:
|
||||
sysv = 1
|
||||
if sysv:
|
||||
res = Popen(['pgrep','xkeysnail'])
|
||||
else:
|
||||
res = Popen(['sudo', 'systemctl','is-active','--quiet','xkeysnail'])
|
||||
res.wait()
|
||||
|
||||
if res.returncode == 0:
|
||||
self.last_status = 'active'
|
||||
self.indicator = appindicator.Indicator.new(APPINDICATOR_ID, os.environ['HOME']+'/.config/kinto/kinto-invert.svg', appindicator.IndicatorCategory.SYSTEM_SERVICES)
|
||||
else:
|
||||
self.last_status = 'inactive'
|
||||
self.indicator = appindicator.Indicator.new(APPINDICATOR_ID, os.environ['HOME']+'/.config/kinto/kinto.svg', appindicator.IndicatorCategory.SYSTEM_SERVICES)
|
||||
|
||||
self.indicator.set_status(appindicator.IndicatorStatus.ACTIVE)
|
||||
self.indicator.set_menu(self.build_menu(res))
|
||||
notify.init(APPINDICATOR_ID)
|
||||
|
||||
GLib.timeout_add(2000, self.update_terminal)
|
||||
|
||||
def build_menu(self,res):
|
||||
|
||||
with open(self.kconfig) as configfile:
|
||||
autostart_line = configfile.read().split('\n')[1]
|
||||
|
||||
# Autostart
|
||||
if "autostart = true" in autostart_line.casefold():
|
||||
autostart_bool = True
|
||||
|
||||
if autostart_bool:
|
||||
# Popen(['sudo', 'systemctl','restart','xkeysnail'])
|
||||
self.checkbox_autostart.set_active(True)
|
||||
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,False)
|
||||
else:
|
||||
self.checkbox_autostart.set_active(False)
|
||||
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,True)
|
||||
|
||||
self.restart.connect('activate',self.runRestart)
|
||||
self.menu.append(self.restart)
|
||||
self.stop.connect('activate',self.runStop)
|
||||
self.menu.append(self.stop)
|
||||
|
||||
self.refreshKB()
|
||||
|
||||
self.mackb.signal_id = self.mackb.connect('activate',self.setKB,"mac")
|
||||
self.winkb.signal_id = self.winkb.connect('activate',self.setKB,"win")
|
||||
self.chromekb.signal_id = self.chromekb.connect('activate',self.setKB,"chrome")
|
||||
self.ibmkb.signal_id = self.ibmkb.connect('activate',self.setKB,"ibm")
|
||||
self.winmackb.signal_id = self.winmackb.connect('activate',self.setKB,"winmac")
|
||||
|
||||
self.menukb.append(self.winkb)
|
||||
self.menukb.append(self.mackb)
|
||||
self.menukb.append(self.chromekb)
|
||||
self.menukb.append(self.ibmkb)
|
||||
self.menukb.append(self.winmackb)
|
||||
self.menu.append(self.keyboards)
|
||||
|
||||
self.tweaks.connect('activate',self.setTweaks)
|
||||
self.edit_submenu.append(self.tweaks)
|
||||
self.button_config.connect('activate',self.setConfig)
|
||||
self.edit_submenu.append(self.button_config)
|
||||
self.service.connect('activate',self.setService)
|
||||
self.edit_submenu.append(self.service)
|
||||
# Set System Keyboard Shortcuts
|
||||
self.button_syskb.connect('activate',self.setSysKB)
|
||||
self.edit_submenu.append(self.button_syskb)
|
||||
# Set Language
|
||||
self.button_region.connect('activate',self.setRegion)
|
||||
self.edit_submenu.append(self.button_region)
|
||||
self.edit_submenu.append(self.checkbox_autostart)
|
||||
if os.path.exists(os.environ['HOME']+'/.config/autostart/kintotray.desktop'):
|
||||
self.systray.set_active(True)
|
||||
self.systray.signal_id = self.systray.connect('activate',self.checkTray,False)
|
||||
else:
|
||||
self.systray.signal_id = self.systray.connect('activate',self.checkTray,True)
|
||||
self.edit_submenu.append(self.systray)
|
||||
self.menu.append(self.edit)
|
||||
|
||||
self.debug.connect('activate',self.runDebug,1)
|
||||
self.help_submenu.append(self.debug)
|
||||
self.opengui.connect('activate',self.runDebug,0)
|
||||
self.help_submenu.append(self.opengui)
|
||||
self.support.connect('activate',self.openSupport)
|
||||
self.help_submenu.append(self.support)
|
||||
self.about.connect('activate',self.runAbout)
|
||||
self.help_submenu.append(self.about)
|
||||
self.menu.append(self.helpm)
|
||||
|
||||
self.keyboards.connect('activate',self.refresh)
|
||||
|
||||
# self.debug.connect('activate',self.runDebug)
|
||||
# self.menu.append(self.debug)
|
||||
|
||||
# self.tweaks.connect('activate',self.setTweaks)
|
||||
# self.menu.append(self.tweaks)
|
||||
|
||||
# Edit Config
|
||||
# self.button_config.connect('activate',self.setConfig)
|
||||
# self.menu.append(self.button_config)
|
||||
|
||||
# # Set System Keyboard Shortcuts
|
||||
# self.button_syskb.connect('activate',self.setSysKB)
|
||||
# self.menu.append(self.button_syskb)
|
||||
|
||||
# # Set Language
|
||||
# self.button_region.connect('activate',self.setRegion)
|
||||
# self.menu.append(self.button_region)
|
||||
|
||||
item_quit = Gtk.MenuItem(label='Close')
|
||||
item_quit.connect('activate', quit)
|
||||
self.menu.append(item_quit)
|
||||
self.menu.show_all()
|
||||
|
||||
return self.menu
|
||||
|
||||
# def refresh(self, widget, event):
|
||||
# print('refresh!!!')
|
||||
# if event.button != 1:
|
||||
# return False #only intercept left mouse button
|
||||
# md = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, "herp derp, I only needed one click")
|
||||
# md.run()
|
||||
# md.destroy()
|
||||
# return True
|
||||
|
||||
def checkTray(self,button,tray_bool):
|
||||
# path.exists('.config/autostart/kintotray.py')
|
||||
if tray_bool:
|
||||
Popen(['cp',os.environ['HOME']+'/.config/kinto/kintotray.desktop',os.environ['HOME']+'/.config/autostart/kintotray.desktop'])
|
||||
self.systray.disconnect(self.systray.signal_id)
|
||||
self.systray.set_active(True)
|
||||
self.systray.signal_id = self.systray.connect('activate',self.checkTray,False)
|
||||
else:
|
||||
Popen(['rm',os.environ['HOME']+'/.config/autostart/kintotray.desktop'])
|
||||
Gtk.main_quit()
|
||||
self.systray.disconnect(self.systray.signal_id)
|
||||
self.systray.set_active(False)
|
||||
self.systray.signal_id = self.systray.connect('activate',self.checkTray,True)
|
||||
return
|
||||
|
||||
def refresh(self,button):
|
||||
self.refreshKB()
|
||||
|
||||
def refreshKB(self):
|
||||
# Keyboard Types
|
||||
ismac = "perl -ne 'print if /^(\s{4})((?!#).*)(# Mac\n)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
iswin = "perl -ne 'print if /^(\s{4})(# -- Default Win)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
ischrome = "perl -ne 'print if /^(\s{4})((?!#).*)(# Chromebook\n)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
iswinmac = "perl -ne 'print if /^(\s{4})(# -- Default Mac)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
isibm = "perl -ne 'print if /^(\s{4})((?!#).*)(# IBM\n)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
mac_result = int(self.queryConfig(ismac))
|
||||
win_result = int(self.queryConfig(iswin))
|
||||
chrome_result = int(self.queryConfig(ischrome))
|
||||
ibm_result = int(self.queryConfig(isibm))
|
||||
winmac_result = int(self.queryConfig(iswinmac))
|
||||
|
||||
countkb = 0
|
||||
|
||||
if mac_result:
|
||||
self.mackb.set_active(True)
|
||||
countkb += 1
|
||||
if win_result:
|
||||
self.winkb.set_active(True)
|
||||
countkb += 1
|
||||
if chrome_result:
|
||||
self.chromekb.set_active(True)
|
||||
countkb += 1
|
||||
if winmac_result:
|
||||
self.winmackb.set_active(True)
|
||||
countkb += 1
|
||||
if ibm_result:
|
||||
ibmkb.set_active(True)
|
||||
countkb += 1
|
||||
|
||||
if countkb > 1:
|
||||
Popen(['notify-send','Kinto: Remove ' + str(countkb-1) + ' kb type(s)'])
|
||||
|
||||
return
|
||||
|
||||
def non_block_read(self):
|
||||
''' even in a thread, a normal read with block until the buffer is full '''
|
||||
output = self.kinto_status.stdout
|
||||
# with open('goodlines.txt') as f:
|
||||
# mylist = list(f)
|
||||
# output = '\n'.join(self.kinto_status.stdout.splitlines()[-1:])
|
||||
# '\n'.join(stderr.splitlines()[-N:])
|
||||
# .splitlines()[-1:]
|
||||
fd = output.fileno()
|
||||
fl = fcntl.fcntl(fd, fcntl.F_GETFL)
|
||||
fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
|
||||
op = output.read()
|
||||
if op == None:
|
||||
return ''
|
||||
status = op.decode('utf-8').rstrip()
|
||||
if "inactive" in status or "failed" in status or "deactivating" in status or "activating" in status:
|
||||
stats = "inactive"
|
||||
elif "active" in status:
|
||||
stats = "active"
|
||||
else:
|
||||
stats = "inactive"
|
||||
return stats
|
||||
|
||||
def update_terminal(self):
|
||||
status = self.non_block_read().strip()
|
||||
nowts = int(time.time())
|
||||
if (nowts - self.unixts) > 5 and (status=='active' and self.indicator.get_icon() != os.environ['HOME']+'/.config/kinto/kinto-invert.svg'):
|
||||
self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto-invert.svg')
|
||||
elif (nowts - self.unixts) > 5 and (status == 'inactive' and self.indicator.get_icon() != os.environ['HOME']+'/.config/kinto/kinto.svg'):
|
||||
self.indicator.set_icon(os.environ['HOME']+'/.config/kinto/kinto.svg')
|
||||
self.last_status = status
|
||||
|
||||
return self.kinto_status.poll() is None
|
||||
|
||||
def openSupport(self,button):
|
||||
Gtk.show_uri_on_window(None, "https://github.com/rbreaves/kinto#table-of-contents", Gtk.get_current_event_time())
|
||||
return
|
||||
|
||||
def runAbout(self,button):
|
||||
win = Gtk.Window()
|
||||
|
||||
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
|
||||
width = -1
|
||||
height = 128
|
||||
preserve_aspect_ratio = True
|
||||
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(path, width, height, preserve_aspect_ratio)
|
||||
win.set_default_icon_list([pixbuf])
|
||||
|
||||
win.set_title("About")
|
||||
win.set_default_size(350, 200)
|
||||
win.set_position(Gtk.WindowPosition.CENTER)
|
||||
|
||||
context = win.get_style_context()
|
||||
default_background = str(context.get_background_color(Gtk.StateType.NORMAL))
|
||||
|
||||
tokenValue = re.search('red=(\d.\d+), green=(\d.\d+), blue=(\d.\d+), alpha=(\d.\d+)', default_background)
|
||||
red = float(tokenValue.group(1))
|
||||
green = float(tokenValue.group(2))
|
||||
blue = float(tokenValue.group(3))
|
||||
alpha = float(tokenValue.group(4))
|
||||
|
||||
bgAvg = (red + green + blue)/3
|
||||
|
||||
if(bgAvg > 0.5):
|
||||
theme = "light"
|
||||
else:
|
||||
theme = "dark"
|
||||
|
||||
vbox = Gtk.VBox()
|
||||
# innervbox = Gtk.VBox()
|
||||
|
||||
if theme == "dark":
|
||||
path = os.environ['HOME']+'/.config/kinto/kinto-invert.svg'
|
||||
else:
|
||||
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
|
||||
width = -1
|
||||
height = 128
|
||||
preserve_aspect_ratio = True
|
||||
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(path, width, height, preserve_aspect_ratio)
|
||||
image = Gtk.Image()
|
||||
image.set_from_pixbuf(pixbuf)
|
||||
|
||||
with open(os.environ['HOME']+'/.config/kinto/version', 'r') as file:
|
||||
verdata = file.read().replace('\n', '')
|
||||
|
||||
version = Gtk.Label('Kinto v' + verdata)
|
||||
|
||||
credits = Gtk.Label("Author: Ben Reaves")
|
||||
spacer = Gtk.Label(" ")
|
||||
copy = Gtk.Label("© 2019, 2020 - GPLv2")
|
||||
url = Gtk.LinkButton("http://kinto.sh", label="kinto.sh")
|
||||
|
||||
vbox.add(image)
|
||||
vbox.add(version)
|
||||
vbox.add(spacer)
|
||||
vbox.add(credits)
|
||||
vbox.add(copy)
|
||||
vbox.add(url)
|
||||
win.add(vbox)
|
||||
|
||||
win.show_all()
|
||||
|
||||
version.set_selectable(True)
|
||||
win.connect('delete-event', self.on_delete_event)
|
||||
|
||||
return
|
||||
|
||||
def setTweaks(self,button):
|
||||
win = Gtk.Window()
|
||||
|
||||
path = os.environ['HOME']+'/.config/kinto/kinto-color.svg'
|
||||
width = -1
|
||||
height = 128
|
||||
preserve_aspect_ratio = True
|
||||
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(path, width, height, preserve_aspect_ratio)
|
||||
win.set_default_icon_list([pixbuf])
|
||||
|
||||
win.set_title("Kinto Tweaks")
|
||||
win.set_default_size(350, 200)
|
||||
win.set_position(Gtk.WindowPosition.CENTER)
|
||||
|
||||
# Check AltGr - commented out is enabled
|
||||
is_rightmod = "perl -ne 'print if /^(\s{4})(Key.*)(Multi-language)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
rightmod_result = int(self.queryConfig(is_rightmod))
|
||||
|
||||
# Sublime enabled for vscode
|
||||
is_vsc2st3 = "perl -ne 'print if /^(\s{4}\w.*)(- Sublime)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
vsc2st3_result = int(self.queryConfig(is_vsc2st3))
|
||||
|
||||
# Caps2Esc enabled
|
||||
is_caps2esc = "perl -ne 'print if /^(\s{4}{\w.*)(# Caps2Esc)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
caps2esc_result = int(self.queryConfig(is_caps2esc))
|
||||
|
||||
# Caps2Cmd enabled
|
||||
is_caps2cmd = "perl -ne 'print if /^(\s{4}\w.*)(# Caps2Cmd)/' ~/.config/kinto/kinto.py | wc -l"
|
||||
caps2cmd_result = int(self.queryConfig(is_caps2cmd))
|
||||
|
||||
# Enter2Cmd enabled
|
||||
# (\s{4}{\w.*)(# Enter2Cmd)
|
||||
|
||||
vbox = Gtk.VBox()
|
||||
|
||||
self.lbl = Gtk.Label()
|
||||
global restartsvc
|
||||
restartsvc = False
|
||||
self.rightmod = Gtk.CheckButton(label='AltGr on Right Cmd')
|
||||
self.vsc2st3 = Gtk.CheckButton(label='ST3 hotkeys for VS Code')
|
||||
self.caps2esc = Gtk.CheckButton(label='Capslock is Escape when tapped, Cmd when held')
|
||||
self.caps2cmd = Gtk.CheckButton(label='Capslock is Cmd')
|
||||
|
||||
if rightmod_result == 0:
|
||||
self.rightmod.set_active(True)
|
||||
|
||||
if vsc2st3_result > 0:
|
||||
self.vsc2st3.set_active(True)
|
||||
|
||||
if caps2esc_result > 0:
|
||||
self.caps2esc.set_active(True)
|
||||
self.caps2cmd.set_sensitive(False)
|
||||
|
||||
if caps2cmd_result > 0:
|
||||
self.caps2cmd.set_active(True)
|
||||
self.caps2esc.set_sensitive(False)
|
||||
|
||||
self.rightmod.signal_id = self.rightmod.connect('toggled',self.setRightMod)
|
||||
self.vsc2st3.signal_id = self.vsc2st3.connect('toggled',self.setVSC2ST3)
|
||||
self.caps2esc.signal_id = self.caps2esc.connect('toggled',self.setCaps2Esc)
|
||||
self.caps2cmd.signal_id = self.caps2cmd.connect('toggled',self.setCaps2Cmd)
|
||||
|
||||
vbox.add(self.rightmod)
|
||||
vbox.add(self.vsc2st3)
|
||||
vbox.add(self.caps2esc)
|
||||
vbox.add(self.caps2cmd)
|
||||
vbox.add(self.lbl)
|
||||
win.add(vbox)
|
||||
|
||||
win.show_all()
|
||||
|
||||
win.connect('delete-event', self.on_delete_event)
|
||||
|
||||
return
|
||||
|
||||
__gsignals__ = {
|
||||
"delete-event" : "override"
|
||||
}
|
||||
|
||||
def on_delete_event(event, self, widget):
|
||||
global restartsvc
|
||||
if restartsvc == True:
|
||||
try:
|
||||
if sysv:
|
||||
restartcmd = ['sudo', '-E','/etc/init.d/kinto','restart']
|
||||
else:
|
||||
restartcmd = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
Popen(restartcmd)
|
||||
restartsvc = False
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error restarting Kinto after setting tweaks!'])
|
||||
|
||||
self.hide()
|
||||
self.destroy()
|
||||
return True
|
||||
|
||||
def setRightMod(self,button):
|
||||
global restartsvc
|
||||
try:
|
||||
if self.winkb.get_active() or self.winmackb.get_active():
|
||||
# print('winkb true')
|
||||
setkb = 's/^(\s{4})((# )(.*)(# )(WinMac - Multi-language.*)|(K)(.*)(# )(WinMac - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
|
||||
if self.mackb.get_active():
|
||||
# print('mackb true')
|
||||
setkb = 's/^(\s{4})((# )(.*)(# )(Mac - Multi-language.*)|(K)(.*)(# )(Mac - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
|
||||
if self.chromekb.get_active():
|
||||
# print('chromekb true')
|
||||
setkb = 's/^(\s{4})((# )(.*)(# )(Chromebook - Multi-language.*)|(K)(.*)(# )(Chromebook - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
|
||||
if self.ibmkb.get_active():
|
||||
# print('ibmkb true')
|
||||
setkb = 's/^(\s{4})((# )(.*)(# )(IBM - Multi-language.*)|(K)(.*)(# )(IBM - Multi-language.*))/ $4$5$6$9$7$8$9$10/g'
|
||||
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
|
||||
cmdsTerm = Popen(cmds)
|
||||
|
||||
restartsvc = True
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error Resetting AltGr!'])
|
||||
|
||||
return
|
||||
|
||||
def setVSC2ST3(self,button):
|
||||
global restartsvc
|
||||
|
||||
try:
|
||||
if self.chromekb.get_active() or self.ibmkb.get_active():
|
||||
setkb = 's/^(\s{4})(\w.*)(# )(Chromebook/IBM - Sublime)|^(\s{4})(# )(\w.*)(# Chromebook/IBM - Sublime)/$5$7$8$1$3$2$3$4/g'
|
||||
else:
|
||||
setkb = 's/^(\s{4})(\w.*)(# )(Default - Sublime)|^(\s{4})(# )(\w.*)(# Default - Sublime)/$5$7$8$1$3$2$3$4/g'
|
||||
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
|
||||
cmdsTerm = Popen(cmds)
|
||||
|
||||
restartsvc = True
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error Resetting SublimeText remaps for VSCode!'])
|
||||
return
|
||||
|
||||
def setCaps2Esc(self,button):
|
||||
|
||||
global restartsvc
|
||||
try:
|
||||
if self.winkb.get_active() or self.winmackb.get_active() or self.ibmkb.get_active() or self.mackb.get_active():
|
||||
setkb = 's/^(\s{4})((# )(\{\w.*)(# Caps2Esc\n)|(\{\w.*)(# )(Caps2Esc - Chrome.*)|(\{.*)(# )(Caps2Esc\n|Placeholder)|(\w.*)(# )(Caps2Cmd.*)|(# )(\{.*)(# )(Placeholder))/ $4$5$7$6$7$8$10$9$10$11$13$12$13$14$16$17$18/g'
|
||||
if self.chromekb.get_active():
|
||||
setkb = 's/^(\s{4})((# )(\{\w.*)(# Caps2Esc - Chrome.*)|(\{\w.*)(# )(Caps2Esc\n)|(\{.*)(# )(Caps2Esc - Chrome.*|Placeholder)|(\w.*)(# )(Caps2Cmd.*)|(# )(\{.*)(# )(Placeholder))/ $4$5$7$6$7$8$10$9$10$11$13$12$13$14$16$17$18/g'
|
||||
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
|
||||
if self.caps2esc.get_active():
|
||||
self.caps2cmd.set_sensitive(False)
|
||||
else:
|
||||
self.caps2cmd.set_sensitive(True)
|
||||
|
||||
cmdsTerm = Popen(cmds)
|
||||
|
||||
restartsvc = True
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error resetting caps2esc!'])
|
||||
|
||||
return
|
||||
|
||||
def setCaps2Cmd(self,button):
|
||||
|
||||
global restartsvc
|
||||
|
||||
try:
|
||||
if self.winkb.get_active() or self.winmackb.get_active() or self.ibmkb.get_active() or self.mackb.get_active():
|
||||
setkb = 's/^(\s{4})((\w.*)(# )(Caps2Cmd\n)|(\w.*)(# )(Caps2Cmd - Chrome.*)|(# )(\w.*)(# )(Caps2Cmd\n)|(\{\w.*)(# )(Caps2Esc.*)|(# )(\{.*)(# )(Placeholder))/ $4$3$4$5$7$6$7$8$10$11$12$14$13$14$15$17$18$19/g'
|
||||
if self.chromekb.get_active():
|
||||
setkb = 's/^(\s{4})((\w.*)(# )(Caps2Cmd - Chrome.*)|(\w.*)(# )(Caps2Cmd\n)|(# )(\w.*)(# )(Caps2Cmd - Chrome.*)|(\{\w.*)(# )(Caps2Esc.*)|(# )(\{.*)(# )(Placeholder))/ $4$3$4$5$7$6$7$8$10$11$12$14$13$14$15$17$18$19/g'
|
||||
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
|
||||
if self.caps2cmd.get_active():
|
||||
self.caps2esc.set_sensitive(False)
|
||||
else:
|
||||
self.caps2esc.set_sensitive(True)
|
||||
|
||||
cmdsTerm = Popen(cmds)
|
||||
|
||||
restartsvc = True
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error resetting caps2cmd!'])
|
||||
|
||||
return
|
||||
|
||||
def runRestart(self,button):
|
||||
global sysv
|
||||
try:
|
||||
if sysv:
|
||||
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
|
||||
else:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
stop.wait()
|
||||
time.sleep(1)
|
||||
res = Popen(['pgrep','xkeysnail'])
|
||||
res.wait()
|
||||
|
||||
if res.returncode == 0:
|
||||
# Popen(['notify-send','Kinto: Ending Debug'])
|
||||
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
|
||||
pkillxkey.wait()
|
||||
|
||||
if sysv:
|
||||
Popen(['sudo', '-E','/etc/init.d/kinto','start'])
|
||||
else:
|
||||
Popen(['sudo', 'systemctl','start','xkeysnail'])
|
||||
except:
|
||||
Popen(['notify-send','Kinto: Error restarting Kinto!'])
|
||||
|
||||
def runStop(self,button):
|
||||
global sysv
|
||||
try:
|
||||
if sysv:
|
||||
stop = Popen(['sudo', '-E','/etc/init.d/kinto','stop'])
|
||||
else:
|
||||
stop = Popen(['sudo', 'systemctl','stop','xkeysnail'])
|
||||
stop.wait()
|
||||
time.sleep(1)
|
||||
res = Popen(['pgrep','xkeysnail'])
|
||||
res.wait()
|
||||
|
||||
if res.returncode == 0:
|
||||
# Popen(['notify-send','Kinto: Ending Debug'])
|
||||
pkillxkey = Popen(['sudo', 'pkill','-f','bin/xkeysnail'])
|
||||
pkillxkey.wait()
|
||||
except:
|
||||
Popen(['notify-send','Kinto: Error stopping Kinto!'])
|
||||
|
||||
def runDebug(self,button,opendebug):
|
||||
try:
|
||||
if opendebug:
|
||||
Popen([os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py','-d'])
|
||||
else:
|
||||
Popen([os.environ['HOME']+'/.config/kinto/gui/kinto-gui.py'])
|
||||
except:
|
||||
Popen(['notify-send','Kinto: Error opening Kinto!'])
|
||||
|
||||
def queryConfig(self,query):
|
||||
res = Popen(query, stdout=PIPE, stderr=None, shell=True)
|
||||
res.wait()
|
||||
return res.communicate()[0].strip().decode('UTF-8')
|
||||
|
||||
def setAutostart(self,button,autostart):
|
||||
try:
|
||||
if autostart == False:
|
||||
Popen(['perl','-pi','-e','s/autostart = true/autostart = false/g',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
self.checkbox_autostart.set_active(False)
|
||||
self.checkbox_autostart.disconnect(self.chkautostart_id)
|
||||
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,True)
|
||||
else:
|
||||
Popen(['perl','-pi','-e','s/autostart = false/autostart = true/g',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
self.checkbox_autostart.set_active(True)
|
||||
self.checkbox_autostart.disconnect(self.chkautostart_id)
|
||||
self.chkautostart_id = self.checkbox_autostart.connect('activate',self.setAutostart,False)
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error setting autostart!'])
|
||||
|
||||
def setConfig(self,button):
|
||||
try:
|
||||
if os.path.exists('/opt/sublime_text/sublime_text'):
|
||||
Popen(['/opt/sublime_text/sublime_text',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
elif which('gedit') is not None:
|
||||
Popen(['gedit',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
elif which('mousepad') is not None:
|
||||
Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
elif which('kate') is not None:
|
||||
Popen(['kate',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
elif which('kwrite') is not None:
|
||||
Popen(['kwrite',os.environ['HOME']+'/.config/kinto/kinto.py'])
|
||||
|
||||
except CalledProcessError: # Notify user about error on running restart commands.
|
||||
Popen(['notify-send','Kinto: Error could not open config file!'])
|
||||
|
||||
def setService(self,button):
|
||||
try:
|
||||
if os.path.exists('/opt/sublime_text/sublime_text'):
|
||||
Popen(['/opt/sublime_text/sublime_text','/lib/systemd/system/xkeysnail.service'])
|
||||
elif which('gedit') is not None:
|
||||
Popen(['gedit','/lib/systemd/system/xkeysnail.service'])
|
||||
elif which('mousepad') is not None:
|
||||
Popen(['mousepad','/lib/systemd/system/xkeysnail.service'])
|
||||
elif which('kate') is not None:
|
||||
Popen(['kate','/lib/systemd/system/xkeysnail.service'])
|
||||
elif which('kwrite') is not None:
|
||||
Popen(['kwrite','/lib/systemd/system/xkeysnail.service'])
|
||||
|
||||
except CalledProcessError: # Notify user about error on running restart commands.
|
||||
Popen(['notify-send','Kinto: Error could not open config file!'])
|
||||
|
||||
def setKB(self,button,kbtype):
|
||||
try:
|
||||
if kbtype == "win":
|
||||
setkb = 's/^(\s{3})(\s{1}#)(.*# WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)( Default Win)|^(\s{3})(\s{1}# )(-)(- Default Mac*)/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$21$21$22$24$26/g'
|
||||
elif kbtype == "winmac":
|
||||
setkb = 's/^(\s{3})(\s{1}#)(.*# WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)( Default Mac.*)|^(\s{3})(\s{1}# )(-)(- Default Win)/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$21$21$22$24$26/g'
|
||||
if os.path.isfile('/sys/module/hid_apple/parameters/swap_opt_cmd'):
|
||||
with open('/sys/module/applespi/parameters/swap_opt_cmd', 'r') as ocval:
|
||||
optcmd = ocval.read().replace('\n', '')
|
||||
if optcmd == '0':
|
||||
# print("found hid_apple")
|
||||
self.queryConfig("echo '1' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all")
|
||||
if os.path.isfile('/sys/module/applespi/parameters/swap_opt_cmd'):
|
||||
with open('/sys/module/applespi/parameters/swap_opt_cmd', 'r') as ocval:
|
||||
optcmd = ocval.read().replace('\n', '')
|
||||
if optcmd == '0':
|
||||
# print("found applespi")
|
||||
self.queryConfig("echo '1' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=1' | sudo tee /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all")
|
||||
elif kbtype == "mac":
|
||||
if os.path.isfile('/sys/module/hid_apple/parameters/swap_opt_cmd'):
|
||||
with open('/sys/module/hid_apple/parameters/swap_opt_cmd', 'r') as ocval:
|
||||
optcmd = ocval.read().replace('\n', '')
|
||||
if optcmd == '1':
|
||||
# print("found hid_apple - remove")
|
||||
self.queryConfig("echo '0' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=0' | sudo tee /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all")
|
||||
if os.path.isfile('/sys/module/applespi/parameters/swap_opt_cmd'):
|
||||
with open('/sys/module/applespi/parameters/swap_opt_cmd', 'r') as ocval:
|
||||
optcmd = ocval.read().replace('\n', '')
|
||||
if optcmd == '1':
|
||||
# print("found applespi - remove")
|
||||
self.queryConfig("echo '0' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=0' | sudo tee /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all")
|
||||
setkb = 's/^(\s{3})(\s{1}#)(.*# Mac\n|.*# Mac -)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)(- Default (Win|Mac.*))/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$22/g'
|
||||
elif kbtype == "chrome":
|
||||
setkb = 's/^(\s{3})(\s{1}#)(.*# Chromebook.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(IBM.*)|^(\s{3})(\s{1}# )(-)(- Default (Win|Mac.*))/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$22/g'
|
||||
elif kbtype == "ibm":
|
||||
setkb ='s/^(\s{3})(\s{1}#)(.*# IBM.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(WinMac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Mac.*)|^(?!\s{4}#)(\s{3})(\s{1})(.*)( # )(Chromebook.*)|^(\s{3})(\s{1}# )(-)(- Default (Win|Mac.*))/ $3$7$6$7$8$12$11$12$13$17$16$17$18$20$22/g'
|
||||
|
||||
cmds = ['perl','-pi','-e',setkb,self.kconfig]
|
||||
cmdsTerm = Popen(cmds)
|
||||
cmdsTerm.wait()
|
||||
|
||||
if sysv:
|
||||
restart = ['sudo', '-E','/etc/init.d/kinto','restart']
|
||||
else:
|
||||
restart = ['sudo', 'systemctl','restart','xkeysnail']
|
||||
Popen(restart)
|
||||
|
||||
except CalledProcessError:
|
||||
Popen(['notify-send','Kinto: Error Resetting KB Type!'])
|
||||
|
||||
def setSysKB(self,button):
|
||||
if self.ostype == "XFCE":
|
||||
Popen(['xfce4-keyboard-settings'])
|
||||
elif self.ostype == "KDE":
|
||||
self.queryConfig('systemsettings >/dev/null 2>&1 || systemsettings5 >/dev/null 2>&1')
|
||||
else:
|
||||
Popen(['gnome-control-center','keyboard'])
|
||||
|
||||
def setRegion(self,button):
|
||||
if self.ostype == "XFCE":
|
||||
Popen(['gnome-language-selector'])
|
||||
elif self.ostype == "KDE":
|
||||
self.queryConfig('kcmshell4 kcm_translations >/dev/null 2>&1 || kcmshell5 kcm_translations >/dev/null 2>&1')
|
||||
else:
|
||||
Popen(['gnome-control-center','region'])
|
||||
|
||||
def quit(source):
|
||||
Gtk.main_quit()
|
||||
|
||||
Indicator()
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
Gtk.main()
|
31
linux/vscode_keybindings.json
Normal file
@@ -0,0 +1,31 @@
|
||||
// Place your key bindings in this file to override the defaultsauto[]
|
||||
[
|
||||
{
|
||||
"key": "alt+left",
|
||||
"command": "-workbench.action.terminal.focusPreviousPane",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+right",
|
||||
"command": "-workbench.action.terminal.focusNextPane",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+right",
|
||||
"command": "cursorWordRight"
|
||||
},
|
||||
{
|
||||
"key": "alt+left",
|
||||
"command": "cursorWordLeft"
|
||||
},
|
||||
{
|
||||
"key": "shift+alt+left",
|
||||
"command": "cursorWordStartLeftSelect",
|
||||
"when": "textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "shift+alt+right",
|
||||
"command": "cursorWordEndRightSelect",
|
||||
"when": "textInputFocus"
|
||||
}
|
||||
]
|
11
linux/xkeysnail.desktop
Executable file
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=Kinto_xkey
|
||||
GenericName=Kinto_xkey
|
||||
Comment=Make Linux Type Like it's a Mac
|
||||
Exec=/bin/bash -c "grep -q 'autostart = true' {homedir}/.config/kinto/kinto.py && {xhost} +SI:localuser:root && sudo {systemctl} restart xkeysnail"
|
||||
# Budgie logoff fix to avoid key input loss
|
||||
# ;{homedir}/.config/kinto/logoff.sh
|
||||
# ;sudo /usr/local/bin/logoff.sh $USER $DISPLAY
|
||||
Terminal=false
|
||||
Type=Application
|
||||
X-GNOME-Autostart-enabled=true
|
14
linux/xkeysnail.service
Executable file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=xkeysnail
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
KillMode=process
|
||||
ExecStart=/usr/bin/sudo /bin/bash -c '/usr/bin/xhost +SI:localuser:root && {homedir}/.config/kinto/killdups.sh && {xkeysnail} --quiet --watch {homedir}/.config/kinto/kinto.py'
|
||||
ExecStop=/usr/bin/sudo /bin/bash -c '/usr/bin/sudo pkill -f bin/xkeysnail && exit 0'
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
Environment=DISPLAY={displayid}
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical.target
|
8
linux/xkeysnail_sysv.desktop
Executable file
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Kinto_xkey
|
||||
GenericName=Kinto_xkey
|
||||
Comment=Make Linux Type Like it's a Mac
|
||||
Exec=/bin/bash -c "grep -q 'autostart = true' {homedir}/.config/kinto/kinto.py && sudo -E /etc/init.d/kinto restart"
|
||||
Terminal=false
|
||||
Type=Application
|
||||
X-GNOME-Autostart-enabled=true
|
19
linux/xkeystart.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# >/dev/null 2>&1
|
||||
|
||||
if [ -f /usr/local/bin/xkeysnail ];then
|
||||
xkeyfullpath="/usr/local/bin/xkeysnail"
|
||||
elif [ -f /usr/bin/xkeysnail ];then
|
||||
xkeyfullpath="/usr/bin/xkeysnail"
|
||||
else
|
||||
xkeyfullpath=`which xkeysnail`
|
||||
fi
|
||||
|
||||
"$xkeyfullpath" --quiet --watch "$1" &
|
||||
|
||||
inotifywait -m -e close_write,moved_to,create,modify /tmp/kinto/xkeysnail |
|
||||
|
||||
while read -r path; do
|
||||
/usr/bin/killall xkeysnail
|
||||
"$xkeyfullpath" --quiet --watch "$1" &
|
||||
done
|
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
mkdir -p ~/.xkb/{keymap,symbols,types}
|
||||
cp ./.xkb/symbols/chromebook ~/.xkb/symbols/chromebook
|
||||
cp ./.xkb/symbols/mac_gui ~/.xkb/symbols/mac_gui
|
||||
cp ./.xkb/types/mac_gui ~/.xkb/types/mac_gui
|
||||
setxkbmap -option
|
||||
setxkbmap -print > ~/.xkb/keymap/kbd.chromebook.gui
|
||||
setxkbmap -print > ~/.xkb/keymap/kbd.chromebook.term
|
||||
line=$(cat ~/.xkb/keymap/kbd.chromebook.gui | grep -n 'xkb_symbols' | cut -f1 -d:)
|
||||
sed -ie "${line}s/\"/+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.chromebook.gui
|
||||
sleep 1
|
||||
line=$(cat ~/.xkb/keymap/kbd.chromebook.gui | grep -n 'xkb_types' | cut -f1 -d:)
|
||||
sed -ie "${line}s/\"/+mac_gui(addmac_levels)\"/2" ~/.xkb/keymap/kbd.chromebook.gui
|
||||
sleep 1
|
||||
line=$(cat ~/.xkb/keymap/kbd.chromebook.term | grep -n 'xkb_symbols' | cut -f1 -d:)
|
||||
sed -ie "${line}s/\"/+altwin(swap_alt_win)+mac_term(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.chromebook.term
|
@@ -1,176 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import os, platform, sysconfig, sys, subprocess, time
|
||||
|
||||
yellow = "\033[1;33m"
|
||||
green = "\033[0;32m"
|
||||
red = "\033[1;31m"
|
||||
italic = "\033[3m"
|
||||
reset = "\033[0;0m"
|
||||
|
||||
platform_name = platform.system()
|
||||
# print sysconfig.get_platform()
|
||||
|
||||
sys.stdout.write(yellow)
|
||||
cloud = '\u2601'
|
||||
circleo = '\u25CE'
|
||||
clocko = '\u2B6E'
|
||||
syme = '\u0250'
|
||||
syma = '\u0251'
|
||||
# bang = '\u1F589'.decode('unicode-escape')
|
||||
|
||||
internalid = 0
|
||||
usbid = 0
|
||||
|
||||
def keyboard_detect():
|
||||
global internalid, usbid, chromeswap, system_type
|
||||
internal_kbname = ""
|
||||
usb_kbname = ""
|
||||
|
||||
# If chromebook
|
||||
if system_type == "2":
|
||||
print()
|
||||
print("Looking for keyboards...")
|
||||
print()
|
||||
result = subprocess.check_output('xinput list | grep -iv "Virtual\|USB" | grep -i "keyboard.*keyboard" | grep -o -P "(?<=↳).*(?=id\=)";exit 0', shell=True).decode('utf-8')
|
||||
if result != "":
|
||||
internal_kbname = result.strip()
|
||||
internalid = subprocess.check_output('xinput list | grep -iv "Virtual\|USB" | grep -i "keyboard.*keyboard" | cut -d "=" -f 2- | awk \'{print $1}\' | tail -1;exit 0', shell=True).decode('utf-8')
|
||||
print("Internal Keyboard\nName: " + internal_kbname + "\nID: " + internalid)
|
||||
|
||||
result = subprocess.check_output('udevadm info -e | grep -o -P "(?<=by-id/usb-).*(?=-event-kbd)" | head -1;exit 0', shell=True).decode('utf-8')
|
||||
if result != "":
|
||||
usb_kbname = result.strip()
|
||||
|
||||
# Loop the following to ensure the id is picked up after 5-10 tries
|
||||
usbid = ""
|
||||
usbcount=0
|
||||
while usbid == "":
|
||||
usbid = subprocess.check_output('udevadm info -e | stdbuf -oL grep -o -P "(?<=event-kbd /dev/input/by-path/pci-0000:00:).*(?=.0-usb) | head -n 1";exit 0', shell=True).decode('utf-8')
|
||||
if usbid == "":
|
||||
usbcount += 1
|
||||
# print('usbid not found '+ str(usbcount))
|
||||
if usbcount == 5:
|
||||
usbid = "0"
|
||||
time.sleep(1)
|
||||
print("\nUSB Keyboard\n" + "Name: " + usb_kbname + "\nID: " + usbid)
|
||||
|
||||
if system_type == "1":
|
||||
system_type = "windows"
|
||||
elif system_type == "2":
|
||||
system_type = "chromebook"
|
||||
elif system_type == "3":
|
||||
result = subprocess.check_output('lsmod | grep hid_apple 1>/dev/null; echo $?', shell=True).decode('utf-8')
|
||||
if result.strip() == "0":
|
||||
system_type = "mac"
|
||||
else:
|
||||
system_type = "mac_only"
|
||||
print("Apple hid_apple driver is not loaded, a keymap that is specific for only Apple keyboards will be used.")
|
||||
|
||||
if system_type == "windows" or system_type == "mac":
|
||||
subprocess.check_output('/bin/bash -c ./mac_wordwise.sh', shell=True).decode('utf-8')
|
||||
cmdgui = '"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"'
|
||||
elif system_type == "mac_only":
|
||||
subprocess.check_output('/bin/bash -c ./mac_only.sh', shell=True).decode('utf-8')
|
||||
cmdgui = '"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"'
|
||||
elif system_type == "chromebook":
|
||||
subprocess.check_output('/bin/bash -c ./chromebook.sh', shell=True).decode('utf-8')
|
||||
cmdgui = '"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"'
|
||||
|
||||
# password = getpass("Please enter your password to complete the keyswap: ")
|
||||
# proc = Popen("echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd".split(), stdin=PIPE, stdout=PIPE, stderr=PIPE)
|
||||
# proc.communicate(password.encode())
|
||||
|
||||
if swap_behavior == 1:
|
||||
print("Setting up " + system_type + " keyswap as a service.")
|
||||
print("You can disable and remove the service by using the following command in the Kinto directory.")
|
||||
print("./uninstall.sh")
|
||||
|
||||
keyswapcmd = '/bin/bash -c "./keyswap_service.sh 1 0 ' + system_type + ' ' + str(internalid).strip() + ' ' + str(usbid).strip() + ' ' + str(chromeswap) + '"'
|
||||
# print(keyswapcmd)
|
||||
subprocess.check_output(keyswapcmd, shell=True).decode('utf-8')
|
||||
else:
|
||||
print("Setting up " + system_type + " keyswap inside your profiles ~/.Xsession file.")
|
||||
print("You can modify or remove the file if you want you want to remove the modification.")
|
||||
keyswapcmd = '/bin/bash -c \'./keyswap_service.sh 0 ' + cmdgui + '\''
|
||||
subprocess.check_output(keyswapcmd, shell=True).decode('utf-8')
|
||||
|
||||
if system_type == "mac":
|
||||
print()
|
||||
print("An Apple keyboard with the hid_apple driver was detected.")
|
||||
print("Please run the following commands to swap alt/option and Command.")
|
||||
print("Your Kinto keymapping will not work right on Apple keyboards without it.")
|
||||
print()
|
||||
print("echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd")
|
||||
print('echo "options hid_apple swap_opt_cmd=1" | sudo tee -a /etc/modprobe.d/hid_apple.conf')
|
||||
print('sudo update-initramfs -u -k all')
|
||||
|
||||
|
||||
|
||||
def os_detect():
|
||||
print()
|
||||
print("Checking for OS and system information...")
|
||||
print()
|
||||
print("OS Type")
|
||||
# print(" Platform: " + platform_name)
|
||||
if platform_name == 'Linux':
|
||||
result = subprocess.check_output("lsb_release -a | grep -v LSB ", shell=True).decode('ascii')
|
||||
print(result)
|
||||
|
||||
def hwinfo():
|
||||
print("Requires user password to display hardware information...")
|
||||
result = subprocess.check_output('sudo dmidecode | grep -A 9 "System Information" | grep -v "UUID\|Serial\|SKU\|Wake"', shell=True).decode('ascii')
|
||||
print(result)
|
||||
|
||||
def kblist():
|
||||
result = subprocess.check_output('xinput list', shell=True).decode('ascii')
|
||||
print(result)
|
||||
|
||||
print()
|
||||
print()
|
||||
print(" Kint" + circleo)
|
||||
sys.stdout.write(reset)
|
||||
print(italic + " - F!x the d" + syma + "mn k" + syme + "yb" + circleo + syma + "rd. - ")
|
||||
sys.stdout.write(reset)
|
||||
print()
|
||||
input("Press Enter to begin...")
|
||||
|
||||
system_type = input("\nWhat type of keyboard are you using? (If Mac and Windows then select Mac)\n\
|
||||
1) Windows\n\
|
||||
2) Chromebook\n\
|
||||
3) Mac\n")
|
||||
|
||||
swap_behavior = 1
|
||||
chromeswap = 0
|
||||
# Chromebook
|
||||
if system_type == "2":
|
||||
if not input("\nWould you like to swap Alt to Super/Win and Search key to Ctrl when using terminal applications? (y/n)\n\
|
||||
Note: For a more mac like experience & less issues with terminal based interactions y is recommended.\n").lower().strip()[:1] == "y":
|
||||
swap_behavior = 0
|
||||
# Windows
|
||||
if system_type == "1":
|
||||
if not input("\nWould you like to swap Alt to Super/Win and Ctrl key back to Ctrl when using terminal applications? (y/n)\n\
|
||||
Note: For a more mac like experience & less issues with terminal based interactions y is recommended.\n").lower().strip()[:1] == "y":
|
||||
swap_behavior = 0
|
||||
# Mac
|
||||
if system_type == "3":
|
||||
if not input("\nWould you like to swap Command back to Super/Win and Ctrl key back to Ctrl when using terminal applications? (y/n)\n\
|
||||
Note: For a more mac like experience & less issues with terminal based interactions y is recommended.\n").lower().strip()[:1] == "y":
|
||||
swap_behavior = 0
|
||||
|
||||
if int(system_type) == 2 and swap_behavior == 1:
|
||||
chromeswap = input("\nIf the keyswap is applied on a chromebook with both an internal and external Apple keyboard\n\
|
||||
you may need to press a key on the external Apple keyboard any time you switch between the terminal and gui based apps.\n\
|
||||
Are you ok with that, or would you like to only apply the keyswap on one keyboard type?\n\
|
||||
1) Built-in\n\
|
||||
2) Both - (Chromebook & Windows)\n\
|
||||
3) Both - (Chromebook & Mac)\n\
|
||||
4) USB External - (Mac)\n")
|
||||
|
||||
if chromeswap == "1":
|
||||
chromeswap = "none"
|
||||
elif chromeswap == "2":
|
||||
chromeswap = "both_win"
|
||||
elif chromeswap == "3" or chromeswap == "4":
|
||||
chromeswap = "both_mac"
|
||||
|
||||
keyboard_detect()
|
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
mkdir -p ~/.xkb/{keymap,symbols,types}
|
||||
cp ./.xkb/symbols/mac_gui ~/.xkb/symbols/mac_gui
|
||||
cp ./.xkb/types/mac_gui ~/.xkb/types/mac_gui
|
||||
setxkbmap -option
|
||||
setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui
|
||||
setxkbmap -print > ~/.xkb/keymap/kbd.mac.term
|
||||
line=$(cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_symbols' | cut -f1 -d:)
|
||||
sed -ie "${line}s/\"/+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)+mac_gui(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.mac.gui
|
||||
sleep 1
|
||||
line=$(cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_types' | cut -f1 -d:)
|
||||
sed -ie "${line}s/\"/+mac_gui(addmac_levels)\"/2" ~/.xkb/keymap/kbd.mac.gui
|
||||
sleep 1
|
||||
line=$(cat ~/.xkb/keymap/kbd.mac.term | grep -n 'xkb_symbols' | cut -f1 -d:)
|
||||
sed -ie "${line}s/\"/+altwin(alt_super_win)+mac_term(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.mac.term
|
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
mkdir -p ~/.xkb/{keymap,symbols,types}
|
||||
cp ./.xkb/symbols/mac_gui ~/.xkb/symbols/mac_gui
|
||||
cp ./.xkb/types/mac_gui ~/.xkb/types/mac_gui
|
||||
setxkbmap -option
|
||||
setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui
|
||||
setxkbmap -print > ~/.xkb/keymap/kbd.mac.term
|
||||
line=$(cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_symbols' | cut -f1 -d:)
|
||||
sed -ie "${line}s/\"/+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.mac.gui
|
||||
sleep 1
|
||||
line=$(cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_types' | cut -f1 -d:)
|
||||
sed -ie "${line}s/\"/+mac_gui(addmac_levels)\"/2" ~/.xkb/keymap/kbd.mac.gui
|
||||
sleep 1
|
||||
line=$(cat ~/.xkb/keymap/kbd.mac.term | grep -n 'xkb_symbols' | cut -f1 -d:)
|
||||
sed -ie "${line}s/\"/+altwin(swap_alt_win)+mac_term(mac_levelssym)\"/2" ~/.xkb/keymap/kbd.mac.term
|
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
systemctl --user stop keyswap
|
||||
systemctl --user disable keyswap
|
||||
rm -rf ~/.config/autostart/keyswap.sh
|
||||
rm -rf ~/.config/xactive.sh
|
||||
rm -rf ~/.xkb
|
||||
|
||||
sed -i '/xkb/d' ~/.Xsession
|
@@ -1,316 +0,0 @@
|
||||
# pip3 install pynput
|
||||
# pip3 install --no-deps pynput
|
||||
|
||||
from pynput.keyboard import Key, Listener
|
||||
import sys, subprocess
|
||||
|
||||
uitype=sys.argv[1]
|
||||
apply_rules=sys.argv[2]
|
||||
windows=sys.argv[3]
|
||||
chromebook=sys.argv[4]
|
||||
mac=sys.argv[5]
|
||||
|
||||
class color:
|
||||
PURPLE = '\033[95m'
|
||||
CYAN = '\033[96m'
|
||||
DARKCYAN = '\033[36m'
|
||||
BLUE = '\033[94m'
|
||||
GREEN = '\033[92m'
|
||||
YELLOW = '\033[93m'
|
||||
RED = '\033[91m'
|
||||
BOLD = '\033[1m'
|
||||
UNDERLINE = '\033[4m'
|
||||
END = '\033[0m'
|
||||
|
||||
def on_press(key):
|
||||
print('{0} pressed'.format(key))
|
||||
|
||||
def on_release(key):
|
||||
# print('{0} release'.format(key))
|
||||
if key == Key.esc:
|
||||
# Stop listener
|
||||
return False
|
||||
|
||||
def is_ctrl_winchrome(key):
|
||||
if key == Key.ctrl:
|
||||
# print(str(key).replace("Key.", "").title() +' successfully mapped to physical Alt key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Alt is now Ctrl')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Alt key.'.format(key))
|
||||
return False
|
||||
|
||||
def is_ctrl_mac(key):
|
||||
if key == Key.ctrl:
|
||||
# print(str(key).replace("Key.", "").title() +' successfully mapped to physical Alt key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Command is now Ctrl')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Command key.'.format(key))
|
||||
return False
|
||||
|
||||
def is_ctrl_terminal(key):
|
||||
if key == Key.ctrl:
|
||||
# print(str(key).replace("Key.", "").title() +' successfully mapped to physical Ctrl key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Ctrl remains Ctrl,\nwhile in terminal apps.')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Ctrl key.'.format(key))
|
||||
return False
|
||||
|
||||
def is_alt_chromebook(key):
|
||||
if key == Key.alt:
|
||||
# print(str(key).replace("Key.", "").title() +' successfully mapped to the physical Ctrl key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Ctrl is now Alt')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Ctrl key.'.format(key))
|
||||
return False
|
||||
|
||||
def is_alt_windows(key):
|
||||
if key == Key.alt:
|
||||
# print(str(key).replace("Key.", "").title() +' successfully mapped to the physical Ctrl key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Win/Super is now Alt')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Win/Super key.'.format(key))
|
||||
return False
|
||||
|
||||
def is_alt_mac(key):
|
||||
if key == Key.alt:
|
||||
# print(str(key).replace("Key.", "").title() +' successfully mapped to the physical Ctrl key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Alt remains Alt')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Alt key.'.format(key))
|
||||
return False
|
||||
|
||||
def is_alt_chromebook_terminal(key):
|
||||
if key == Key.alt:
|
||||
# print(str(key).replace("Key.", "").title() +' successfully mapped to the physical Search key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Search is now Alt,\nwhile in terminals apps.')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Search key.'.format(key))
|
||||
return False
|
||||
|
||||
def is_super_winmac(key):
|
||||
if key == Key.cmd:
|
||||
# print('Super/Win successfully mapped to the physical Search key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Ctrl key is Super/Win')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Ctrl key.'.format(key))
|
||||
return False
|
||||
|
||||
def is_super_chromebook(key):
|
||||
if key == Key.cmd:
|
||||
# print('Super/Win successfully mapped to the physical Search key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Search key is Super/Win')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Search key.'.format(key))
|
||||
return False
|
||||
|
||||
def is_super_terminal(key):
|
||||
if key == Key.cmd:
|
||||
# print('Super/Win successfully mapped to the physical Alt key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Alt is now Super/Win,\nwhile in terminal apps.')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Alt key.'.format(key))
|
||||
return False
|
||||
|
||||
def is_super_mac_terminal(key):
|
||||
if key == Key.cmd:
|
||||
# print('Super/Win successfully mapped to the physical Alt key.'.format(key))
|
||||
print(color.GREEN + 'Success' + color.END + ' Command is now Super/Win,\nwhile in terminal apps.')
|
||||
return False
|
||||
elif key == Key.esc:
|
||||
return False
|
||||
else:
|
||||
print('keymap failure, ' + str(key).replace("Key.", "").title() + ' may have been mapped to the physical Command key.'.format(key))
|
||||
return False
|
||||
|
||||
def chromebook_keys_gui():
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm the new keymapping to Ctrl..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_ctrl_winchrome) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm the new keymapping to Alt..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_alt_chromebook) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Search" + color.END + " key to confirm the new keymapping to Super/Win..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_super_chromebook) as listener:
|
||||
listener.join()
|
||||
|
||||
def chromebook_keys_terminal():
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm the new keymapping to Super/Win..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_super_terminal) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm the new keymapping to Ctrl..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_ctrl_terminal) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Search" + color.END + " key to confirm the new keymapping to Alt..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_alt_chromebook_terminal) as listener:
|
||||
listener.join()
|
||||
|
||||
def windows_keys_gui():
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm the new keymapping to Ctrl..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_ctrl_winchrome) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Win/Super" + color.END + " key to confirm the new keymapping to Alt..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_alt_windows) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm the new keymapping to Win/Super..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_super_winmac) as listener:
|
||||
listener.join()
|
||||
|
||||
def windows_keys_terminal():
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm the new keymapping to Super/Win..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_super_terminal) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Win/Super" + color.END + " key to confirm the new keymapping to Alt..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_alt_windows) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm the new keymapping to Ctrl..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_ctrl_terminal) as listener:
|
||||
listener.join()
|
||||
|
||||
def mac_keys_gui():
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Command" + color.END + " key to confirm the new keymapping to Ctrl..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_ctrl_mac) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm it remains Alt..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_alt_mac) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm the new keymapping to Win/Super..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_super_winmac) as listener:
|
||||
listener.join()
|
||||
|
||||
def mac_keys_terminal():
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Command" + color.END + " key to confirm the new keymapping to Super/Win..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_super_mac_terminal) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Alt" + color.END + " key to confirm it remains Alt..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_alt_mac) as listener:
|
||||
listener.join()
|
||||
print()
|
||||
print(color.UNDERLINE + color.YELLOW + "Press the physical Ctrl" + color.END + " key to confirm it remains Ctrl..")
|
||||
with Listener(
|
||||
# on_press=on_press,
|
||||
on_release=is_ctrl_terminal) as listener:
|
||||
listener.join()
|
||||
|
||||
if uitype == 'gui':
|
||||
if chromebook == '1':
|
||||
if apply_rules == '1':
|
||||
subprocess.check_output('setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY', shell=True).decode('utf-8')
|
||||
print()
|
||||
print("Testing chromebook - GUI apps - Kinto keymapping...")
|
||||
chromebook_keys_gui()
|
||||
|
||||
if windows == '1':
|
||||
if apply_rules == '1':
|
||||
subprocess.check_output('setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY', shell=True).decode('utf-8')
|
||||
print()
|
||||
print ("Testing windows keyboard - GUI apps - Kinto keymapping...")
|
||||
windows_keys_gui()
|
||||
|
||||
if mac == '1':
|
||||
if apply_rules == '1':
|
||||
subprocess.check_output('setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY', shell=True).decode('utf-8')
|
||||
print ("Testing mac keyboard - GUI apps - Kinto keymapping...")
|
||||
mac_keys_gui()
|
||||
|
||||
if uitype == 'term':
|
||||
if chromebook == '1':
|
||||
if apply_rules == '1':
|
||||
subprocess.check_output('setxkbmap -option;setxkbmap -option altwin:swap_lalt_lwin', shell=True).decode('utf-8')
|
||||
print("Testing chromebook - terminal - Kinto keymapping...")
|
||||
chromebook_keys_terminal()
|
||||
|
||||
if windows == '1':
|
||||
if apply_rules == '1':
|
||||
subprocess.check_output('setxkbmap -option;setxkbmap -option altwin:swap_alt_win', shell=True).decode('utf-8')
|
||||
print ("Testing windows keyboard - terminal - Kinto keymapping...")
|
||||
windows_keys_terminal()
|
||||
|
||||
if mac == '1':
|
||||
if apply_rules == '1':
|
||||
subprocess.check_output('setxkbmap -option;setxkbmap -option altwin:swap_alt_win', shell=True).decode('utf-8')
|
||||
print ("Testing mac keyboard - terminal - Kinto keymapping...")
|
||||
mac_keys_terminal()
|
||||
|
||||
if apply_rules == '1':
|
||||
subprocess.run('setxkbmap -option', shell=True)
|
244
setup.py
@@ -1,10 +1,91 @@
|
||||
#!/usr/bin/env python3
|
||||
import json, time, os
|
||||
import json, time, os, sys, subprocess, shlex, platform,argparse
|
||||
from shutil import copyfile
|
||||
from subprocess import PIPE, Popen
|
||||
from prekinto import *
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument('-r', dest='uninstall', action='store_true', help="uninstall kinto")
|
||||
parser.add_argument('--remove', dest='uninstall', action='store_true', help="uninstall kinto")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
homedir = os.path.expanduser("~")
|
||||
kintotype = 0
|
||||
|
||||
def windows_setup():
|
||||
keymaps = ["Apple keyboard standard", "Windows keyboard standard","Chromebook","IBM - No Super/Win","Uninstall"]
|
||||
for index, item in enumerate(keymaps):
|
||||
print(" %i. %s" % (index+1, item))
|
||||
default = 0
|
||||
while not int(default) in range(1,len(keymaps)+1):
|
||||
default = int(input("\nPlease enter your desired keymap (1 - " + str(len(keymaps)) + ") : "))
|
||||
print("")
|
||||
# Short DOS path notation
|
||||
path= cmdline('echo ''%cd%''')[:-1]
|
||||
if default > 0 and default < 5:
|
||||
print("Will now install chocolatey and autohotkey with elevated privileges...")
|
||||
print("This install will fail if you are not running with elevated privileges")
|
||||
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
|
||||
print("Copying autohotkey combinations for Terminals & Editors...")
|
||||
os.system('copy /Y "' + path + '\\windows\\kinto.ahk" "' + path + '\\windows\\kinto-new.ahk"')
|
||||
if default < 3:
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default)(?!( - ST2CODE))(.*)/$2$3$5/g" .\\windows\\kinto-new.ahk')
|
||||
if default == 1:
|
||||
kbtype = "mac"
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
elif default == 2:
|
||||
kbtype = "win"
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
elif default == 5:
|
||||
print("Removing any old registry keys from prior versions...")
|
||||
p = subprocess.Popen(['powershell.exe', "Remove-ItemProperty -Path HKLM:'SYSTEM\CurrentControlSet\Control\Keyboard Layout' -Name 'Scancode Map' -ErrorAction SilentlyContinue"], stdout=sys.stdout)
|
||||
print("Removing Kinto from Startup folder...")
|
||||
os.system("(del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\") 2> nul")
|
||||
os.system('(del "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs") 2> nul')
|
||||
print("Ending any running Kinto tasks...")
|
||||
os.system("(taskkill /IM autohotkey.exe) 2> nul")
|
||||
print("Removing Kinto from users profile directory...")
|
||||
os.system('(rd /s /q "%userprofile%\\.kinto") 2> nul')
|
||||
print("")
|
||||
print("Uninstall of Kinto is Complete.")
|
||||
if default == 3:
|
||||
kbtype = "chrome"
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Chromebook)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers/CB)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
if default == 3 or default == 4:
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB\/IBM)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB\/IBM)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
if default == 4:
|
||||
kbtype = "ibm"
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; IBM)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
if default > 0 and default < 5:
|
||||
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
|
||||
print("\nWill now install Ubuntu Terminal Theme as default...")
|
||||
os.system('regedit "' + path + '\\windows\\theme_ubuntu.reg"')
|
||||
os.system('robocopy "'+ path + '\\assets" "%userprofile%\\.kinto\\assets" /E')
|
||||
if (stvscode and (default > 0 or default < 3)):
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default - ST2CODE)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
elif (stvscode and (default == 3 or default == 4 )):
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB/IBM - ST2CODE)/$2$3/g" .\\windows\\kinto-new.ahk')
|
||||
os.system('copy /Y "' + path + '\\windows\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/{kbtype}/' + kbtype + '/g" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||
os.system('copy /Y "' + path + '\\windows\\usb.vbs" "%userprofile%\\.kinto\\usb.vbs"')
|
||||
os.system('copy /Y "' + path + '\\windows\\detectUSB.ahk" "%userprofile%\\.kinto\\detectUSB.ahk"')
|
||||
os.system('mklink "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
|
||||
os.system('copy /Y "'+ path + '\\windows\\NoShell.vbs" "%userprofile%\\.kinto\\NoShell.vbs"')
|
||||
os.system('copy /Y "'+ path + '\\windows\\toggle_kb.bat" "%userprofile%\\.kinto\\toggle_kb.bat"')
|
||||
os.system('copy /Y "'+ path + '\\windows\\kinto-new.ahk" "%userprofile%\\.kinto\\kinto.ahk"')
|
||||
os.system("del /f .\\windows\\kinto-new.ahk")
|
||||
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\" 2> nul")
|
||||
userpath = cmdline('cmd /c for %A in ("%userprofile%") do @echo %~sA')[:-1]
|
||||
print('Starting... "' + userpath + '\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')
|
||||
os.system('"' + userpath + '\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')
|
||||
# # print("\nPlease log off and back on for changes to take full effect.")
|
||||
print("If using WSL then please remember to right click on title bar -> Properties -> Edit Options -> Use Ctrl+Shift+C/V as Copy/Paste and enable it.")
|
||||
else:
|
||||
os.system("(del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\") 2> nul")
|
||||
|
||||
def cmdline(command):
|
||||
process = Popen(
|
||||
@@ -15,151 +96,44 @@ def cmdline(command):
|
||||
)
|
||||
return process.communicate()[0]
|
||||
|
||||
try:
|
||||
f = open("defaults.json")
|
||||
except IOError:
|
||||
print("defaults.json file is missing. Will exit.\n")
|
||||
exit()
|
||||
f.close()
|
||||
if platform.system() == 'Windows':
|
||||
print("\nYou are detected as running Windows.")
|
||||
windows_setup()
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
f = open("user_config.json")
|
||||
except IOError:
|
||||
print("user_config.json file is missing. Will exit.\n")
|
||||
exit()
|
||||
f.close()
|
||||
check_x11 = cmdline("(env | grep -i x11 || loginctl show-session \"$XDG_SESSION_ID\" -p Type) | awk -F= '{print $2}'").strip()
|
||||
|
||||
if len(check_x11) == 0:
|
||||
if os.name != 'nt':
|
||||
print("You are not using x11, please logout and back in using x11/Xorg")
|
||||
sys.exit()
|
||||
else:
|
||||
print("\nYou are detected as running Windows.")
|
||||
windows_setup()
|
||||
sys.exit()
|
||||
|
||||
distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").replace('"','').strip().split(" ")[0]
|
||||
dename = cmdline("./linux/system-config/dename.sh").replace('"','').strip().split(" ")[0].lower()
|
||||
|
||||
run_pkg = ""
|
||||
|
||||
if os.path.isdir(homedir + "/.config/kinto") == False:
|
||||
os.mkdir(homedir + "/.config/kinto")
|
||||
time.sleep(0.5)
|
||||
|
||||
try:
|
||||
f = open(homedir + "/.config/kinto/user_config.json")
|
||||
rewrite = yn_choice("~/.config/kinto/user_config.json already exists. Do you want to overwrite it with a new config?")
|
||||
print("")
|
||||
if(rewrite):
|
||||
copyfile("user_config.json", homedir + "/.config/kinto/user_config.json")
|
||||
else:
|
||||
exit()
|
||||
except IOError:
|
||||
pass
|
||||
copyfile("user_config.json", homedir + "/.config/kinto/user_config.json")
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
with open('defaults.json') as json_file:
|
||||
data = json.load(json_file)
|
||||
cmdline("git fetch")
|
||||
|
||||
color_arr = [bcolors.CBLUE,bcolors.CRED,bcolors.CGREEN]
|
||||
color_arr = [bcolors.CBEIGE,bcolors.CRED2,bcolors.CGREEN,bcolors.CYELLOW ]
|
||||
|
||||
print("\nKinto - Type in Linux like it's a Mac.\n")
|
||||
kintover = cmdline('echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)"')
|
||||
|
||||
for index, item in enumerate(data['defaulttypes']):
|
||||
ossym = ""
|
||||
if item == "windows":
|
||||
ossym = u'\u2756'
|
||||
elif item == "mac":
|
||||
ossym = u'\u2318'
|
||||
elif item == "chromebook":
|
||||
ossym = u'\u2707'
|
||||
print("%s %i. %s %s %s" % (color_arr[index], index+1, ossym, item.capitalize(), bcolors.ENDC))
|
||||
print("\nKinto " + kintover + "Type in Linux like it's a Mac.\n")
|
||||
|
||||
default = 0
|
||||
while not int(default) in range(1,len(data['defaulttypes'])+1):
|
||||
default = int(input(bcolors.CYELLOW + "\nPlease enter your keyboard type (1 - " + str(len(data['defaulttypes'])) + ") : " + bcolors.ENDC))
|
||||
print("")
|
||||
if args.uninstall:
|
||||
subprocess.check_call(shlex.split("./xkeysnail_service.sh uninstall"))
|
||||
exit()
|
||||
|
||||
keyboardconfigs = [obj for obj in data['defaults'] if(obj['type'] == data['defaulttypes'][default-1])]
|
||||
|
||||
# for k in keyboardconfigs:
|
||||
for index, k in enumerate(keyboardconfigs):
|
||||
print(color_arr[default-1] + bcolors.BOLD + str(index+1) + '. ' + k['name'] + bcolors.ENDC)
|
||||
print(bcolors.CYELLOW + 'Description: ' + k['description'] + bcolors.ENDC)
|
||||
|
||||
print("")
|
||||
defaultkb = 0
|
||||
while not int(defaultkb) in range(1,len(keyboardconfigs)+1):
|
||||
defaultkb = int(input(bcolors.CYELLOW + "Please enter your keyboard config (1 - " + str(len(keyboardconfigs)) + ") : " + bcolors.ENDC))
|
||||
print("")
|
||||
|
||||
if 'hack' in keyboardconfigs[defaultkb-1]:
|
||||
print(bcolors.CYELLOW + "You have selected a keyboard config that needs the following command to be ran.\n" + bcolors.ENDC)
|
||||
print(keyboardconfigs[defaultkb-1]['hack'].replace(";", "\n") + "\n")
|
||||
runhack = yn_choice(bcolors.CYELLOW + "Would you like to run it now? (Will require sudo privileges. Will exit on No.)" + bcolors.ENDC)
|
||||
if(runhack):
|
||||
os.system(keyboardconfigs[defaultkb-1]['hack'])
|
||||
|
||||
# Setup the selected keyboards config
|
||||
os.system("cp -rf ./.xkb ~/.xkb")
|
||||
if os.path.isdir(homedir + "/.xkb/keymap") == False:
|
||||
os.mkdir(homedir + "/.xkb/keymap")
|
||||
time.sleep(0.5)
|
||||
os.system('setxkbmap -option')
|
||||
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui')
|
||||
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.term')
|
||||
time.sleep(0.5)
|
||||
|
||||
symbols_gui_line = cmdline("cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_symbols' | cut -f1 -d:").strip()
|
||||
types_gui_line = cmdline("cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_types' | cut -f1 -d:").strip()
|
||||
symbols_term_line = cmdline("cat ~/.xkb/keymap/kbd.mac.term | grep -n 'xkb_symbols' | cut -f1 -d:").strip()
|
||||
|
||||
cmdline('sed -i '' -e "' + symbols_gui_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui')
|
||||
cmdline('sed -i '' -e "' + types_gui_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui')
|
||||
cmdline('sed -i '' -e "' + symbols_term_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_term'] + '\\"/2" ~/.xkb/keymap/kbd.mac.term')
|
||||
subprocess.check_call(shlex.split("./xkeysnail_service.sh"))
|
||||
|
||||
|
||||
user_file = homedir + '/.config/kinto/user_config.json'
|
||||
with open(user_file, 'r') as f:
|
||||
user_config = json.load(f)
|
||||
|
||||
onetime = yn_choice("One time initialization tweaks are available. Would you like to view them?")
|
||||
print("")
|
||||
if(onetime):
|
||||
intents = [obj for obj in user_config['de'] if(obj['intent'] == "init")]
|
||||
|
||||
for index, k in enumerate(intents):
|
||||
print(color_arr[default-1] + bcolors.BOLD + str(index+1) + '. ' + k['name'] + bcolors.ENDC)
|
||||
print(bcolors.CYELLOW + 'Description: ' + k['description'] + bcolors.ENDC)
|
||||
print(bcolors.CYELLOW + 'run: ' + k['run'].replace(";", "\n") + bcolors.ENDC + '\n')
|
||||
|
||||
print(bcolors.CYELLOW + "Please enter your init tweak(s) (eg 1 or 1 2 3 - leave blank to skip): " + bcolors.ENDC)
|
||||
defaultinit = [int(i) for i in input().split()]
|
||||
if len(defaultinit) != 0:
|
||||
user_config['init'] = defaultinit
|
||||
|
||||
print("\nDynamic shortcut tweaks\n")
|
||||
|
||||
intents = [obj for obj in user_config['de'] if(obj['intent'] == "gui_term")]
|
||||
|
||||
for index, k in enumerate(intents):
|
||||
print(color_arr[default-1] + bcolors.BOLD + str(index+1) + '. ' + k['name'] + bcolors.ENDC)
|
||||
print(bcolors.CYELLOW + 'Description: ' + k['description'] + bcolors.ENDC)
|
||||
print(bcolors.CYELLOW + 'run in gui mode: ' + k['run_gui'].replace(";", "\n") + bcolors.ENDC)
|
||||
print(bcolors.CYELLOW + 'run in terminal mode: ' + k['run_term'].replace(";", "\n") + bcolors.ENDC + '\n')
|
||||
|
||||
print(bcolors.CYELLOW + "Please enter your dynamic shortcut tweak(s) (eg 1 or 1 2 3 - leave blank to skip): " + bcolors.ENDC)
|
||||
defaultde = [int(i) for i in input().split()]
|
||||
if len(defaultde) != 0:
|
||||
# gui
|
||||
user_config['config'][0]['de'] = defaultde
|
||||
# term
|
||||
user_config['config'][1]['de'] = defaultde
|
||||
|
||||
for d in defaultde:
|
||||
user_config['de'][d-1]['active'] = True
|
||||
|
||||
user_config['config'][0]['run'] = keyboardconfigs[defaultkb-1]['gui']
|
||||
user_config['config'][1]['run'] = keyboardconfigs[defaultkb-1]['term']
|
||||
|
||||
os.remove(user_file)
|
||||
with open(user_file, 'w') as f:
|
||||
json.dump(user_config, f, indent=4)
|
||||
print("Saved configuration to ~/.config/kinto/user_config.json\n")
|
||||
print("Now running keyswap_service.sh to setup the keyswap service...")
|
||||
print("Keyswap will be configured to run on user login\n")
|
||||
print("You may start, stop, restart or view the status of the service with following commands\n")
|
||||
print("systemctl --user start keyswap")
|
||||
print("systemctl --user stop keyswap")
|
||||
print("systemctl --user restart keyswap")
|
||||
print("systemctl --user status keyswap")
|
||||
os.system("./keyswap_service.sh")
|
BIN
splash.png
Before Width: | Height: | Size: 40 KiB |
@@ -1,15 +0,0 @@
|
||||
[Unit]
|
||||
Description=keyswap for Terminal and GUI
|
||||
PartOf=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
#User={username}
|
||||
#Group={username}
|
||||
Environment=DISPLAY=:0
|
||||
Restart=always
|
||||
WorkingDirectory=/home/{username}/.config/kinto
|
||||
ExecStart=
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
@@ -1,3 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
systemctl --user start keyswap
|
@@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Manual keyswap
|
||||
systemtype=$1
|
||||
internalid=$2
|
||||
usbid=$3
|
||||
swapbehavior=$4
|
||||
|
||||
swapcmd_term="setxkbmap -option;setxkbmap -option altwin:swap_alt_win"
|
||||
fallbackcmd_gui=""
|
||||
if [[ "$systemtype" == "windows" || "$systemtype" == "mac" ]]; then
|
||||
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"
|
||||
elif [[ "$systemtype" == "mac_only" ]]; then
|
||||
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"
|
||||
# Chromebook keyboard options
|
||||
elif [[ "$swapbehavior" == "both_mac" ]]; then
|
||||
swapcmd_gui="setxkbmap -option;setxkbmap -option ctrl:swap_lwin_lctl; xkbcomp -w0 -i $internalid -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
|
||||
swapcmd_term="setxkbmap -option;setxkbmap -device $internalid -option 'altwin:swap_alt_win'"
|
||||
elif [[ "$swapbehavior" == "both_win" ]]; then
|
||||
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY; setxkbmap -device $usbid -option altwin:ctrl_alt_win"
|
||||
fallbackcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
|
||||
elif [[ "$swapbehavior" == "none" ]]; then
|
||||
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.chromebook.gui $DISPLAY"
|
||||
fi
|
||||
|
||||
if [[ "$systemtype" == "mac_only" ]]; then
|
||||
check=`setxkbmap -query | grep -c 'alt_super_win'`
|
||||
elif [[ "$swapbehavior" == "both_win" ]]; then
|
||||
check=`setxkbmap -query | grep -q 'ctrl_alt_win'; echo $?`
|
||||
else
|
||||
check=`setxkbmap -query | grep -c 'swap_alt_win'`
|
||||
fi
|
||||
|
||||
echo $check
|
||||
if [ $check -eq 0 ]; then
|
||||
echo "internal gui to term"
|
||||
eval "$swapcmd_term"
|
||||
else
|
||||
echo "internal term to gui"
|
||||
eval "$swapcmd_gui"
|
||||
fi
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
./kintox11
|
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
systemctl --user stop keyswap
|
||||
systemctl --user disable keyswap
|
||||
rm -rf ~/.config/autostart/keyswap.sh
|
||||
rm -rf ~/.config/kinto
|
||||
rm -rf ~/.xkb
|
||||
|
||||
sed -i '/xkb/d' ~/.Xsession
|
@@ -1,48 +0,0 @@
|
||||
{"config":[{
|
||||
"name":"gui",
|
||||
"run":"",
|
||||
"de":[],
|
||||
"appnames":[ "" ]
|
||||
},
|
||||
{
|
||||
"name":"term",
|
||||
"run":"",
|
||||
"de":[],
|
||||
"appnames":[ "Gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm" ]
|
||||
}],
|
||||
"init": [],
|
||||
"detypes":["gnome2","gnome3","kde4","kde5","xfce","i3wm"],
|
||||
"de":[{
|
||||
"id": 1,
|
||||
"type": ["gnome3"],
|
||||
"active": false,
|
||||
"intent":"init",
|
||||
"name":"gnome-init",
|
||||
"description":"Gnome - Remove Superkey Overlay keybinding to Activities Overview",
|
||||
"run":"gsettings set org.gnome.mutter overlay-key ''",
|
||||
"run_term":"",
|
||||
"run_gui":""
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"type": ["gnome3"],
|
||||
"active": false,
|
||||
"intent":"gui_term",
|
||||
"name":"Gnome Activities Overview",
|
||||
"description":"Cmd+Space activates Activities Overview",
|
||||
"run":"",
|
||||
"run_term":"gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space']\"",
|
||||
"run_gui":"gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Ctrl>Space']\""
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": ["kde5"],
|
||||
"active": false,
|
||||
"intent":"init",
|
||||
"name":"kde-init",
|
||||
"description":"KDE Plasma 5 - Removes Superkey Overlay from the Launcher Menu",
|
||||
"run":"kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta \"\";qdbus org.kde.KWin /KWin reconfigure",
|
||||
"run_term":"",
|
||||
"run_gui":""
|
||||
}]
|
||||
}
|
14
windows/NoShell.vbs
Normal file
@@ -0,0 +1,14 @@
|
||||
If WScript.Arguments.Count >= 1 Then
|
||||
ReDim arr(WScript.Arguments.Count-1)
|
||||
prog = WScript.Arguments(0)
|
||||
For i = 1 To WScript.Arguments.Count-1
|
||||
Arg = WScript.Arguments(i)
|
||||
If InStr(Arg, " ") > 1 Then Arg = """" & Arg & """"
|
||||
arr(i) = Arg
|
||||
Next
|
||||
|
||||
RunCmd = Join(arr)
|
||||
' CreateObject("Wscript.Shell").Run RunCmd, 0, True
|
||||
Set oShell = CreateObject("Shell.Application")
|
||||
oShell.ShellExecute prog, RunCmd, , "runas", 0
|
||||
End If
|
22
windows/autohotkey.ps1
Normal file
@@ -0,0 +1,22 @@
|
||||
if(-not(Get-Command "choco" -errorAction SilentlyContinue)){
|
||||
Write-Output "Seems Chocolatey is not installed, installing now"
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||
refreshenv
|
||||
}
|
||||
else{
|
||||
Write-Output "Chocolatey is already installed"
|
||||
}
|
||||
|
||||
if(-not(test-path "C:\Program Files\AutoHotkey\AutoHotkey.exe")){
|
||||
choco install autohotkey.install
|
||||
}
|
||||
else{
|
||||
Write-Output "Autohotkey is already installed"
|
||||
}
|
||||
if(-not(test-path "C:\Strawberry\")){
|
||||
choco install strawberryperl
|
||||
refreshenv
|
||||
}
|
||||
else{
|
||||
Write-Output "Perl is already installed"
|
||||
}
|
38
windows/detectUSB.ahk
Normal file
@@ -0,0 +1,38 @@
|
||||
#SingleInstance, force
|
||||
#NoTrayIcon
|
||||
OnMessage(0x219, "notify_change")
|
||||
Return
|
||||
|
||||
lastkb = ""
|
||||
|
||||
DllCall("AllocConsole")
|
||||
WinHide % "ahk_id " DllCall("GetConsoleWindow", "ptr")
|
||||
|
||||
notify_change(wParam, lParam, msg, hwnd)
|
||||
{
|
||||
global lastkb
|
||||
DetectHiddenWindows On
|
||||
Run %ComSpec%,, Hide, pid
|
||||
WinWait ahk_pid %pid%
|
||||
DllCall("AttachConsole", "UInt", pid)
|
||||
WshShell := ComObjCreate("Wscript.Shell")
|
||||
exec := WshShell.Exec("cscript /nologo ""%userprofile%\.kinto\usb.vbs""")
|
||||
kbtype := exec.StdOut.ReadAll()
|
||||
DllCall("FreeConsole")
|
||||
Process Close, %pid%
|
||||
if lastkb != %kbtype%
|
||||
{
|
||||
|
||||
if InStr(kbtype, "Apple")
|
||||
{
|
||||
; MsgBox, Apple
|
||||
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" mac, "%A_ScriptDir%"
|
||||
}
|
||||
else{
|
||||
; MsgBox, Windows
|
||||
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" win, "%A_ScriptDir%"
|
||||
}
|
||||
; MsgBox % kbtype
|
||||
}
|
||||
lastkb = %kbtype%
|
||||
}
|
7
windows/kinto-start.vbs
Normal file
@@ -0,0 +1,7 @@
|
||||
Set oShell = CreateObject("Shell.Application")
|
||||
Set wShell = WScript.CreateObject("WScript.Shell")
|
||||
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||
|
||||
path = wShell.ExpandEnvironmentStrings("""%userprofile%")
|
||||
strFolder = fso.BuildPath( path, "\.kinto\kinto.ahk"" {kbtype}")
|
||||
oShell.ShellExecute "C:\Program Files\AutoHotkey\AutoHotkey.exe", strFolder, , "runas", 0
|
847
windows/kinto.ahk
Normal file
@@ -0,0 +1,847 @@
|
||||
#SingleInstance force
|
||||
#NoEnv
|
||||
#Persistent
|
||||
|
||||
; DetectHiddenWindows, On ; Autodetect
|
||||
; Run, %A_ScriptDir%\detectUSB.ahk ; Autodetect
|
||||
|
||||
; Enable Left clicks on Kinto Icon
|
||||
; https://www.autohotkey.com/boards/viewtopic.php?t=9501
|
||||
OnMessage(0x404, "AHK_NOTIFYICON")
|
||||
|
||||
AHK_NOTIFYICON(wParam, lParam)
|
||||
{
|
||||
if (lParam = 0x202) { ; user left-clicked tray icon
|
||||
;ADD ANY SUBROUTINE OR FUNCTION HERE
|
||||
Menu, Tray, Show
|
||||
return
|
||||
}
|
||||
else if (lParam = 0x203) { ; user double left-clicked tray icon
|
||||
;ADD ANY SUBROUTINE OR FUNCTION HERE
|
||||
Menu, Tray, Show
|
||||
return
|
||||
}
|
||||
}
|
||||
; End Enable Left clicks
|
||||
|
||||
; I_Icon = %A_ScriptDir%\assets\kinto-white-invert.ico ; MacModifiers
|
||||
; IfExist, %I_Icon% ; MacModifiers
|
||||
; Menu, Tray, Icon, %I_Icon%,, 1 ; MacModifiers
|
||||
; Menu, Tray, Tip, Mac - Kinto ; MacModifiers
|
||||
|
||||
; I_Icon = %A_ScriptDir%\assets\kinto-white-invert.ico ; WinModifiers/CB/IBM
|
||||
; IfExist, %I_Icon% ; WinModifiers/CB/IBM
|
||||
; Menu, Tray, Icon, %I_Icon%,, 1 ; WinModifiers/CB/IBM
|
||||
; Menu, Tray, Tip, Windows - Kinto ; WinModifiers
|
||||
; Menu, Tray, Tip, Chromebook - Kinto ; Chromebook
|
||||
; Menu, Tray, Tip, IBM - Kinto ; IBM
|
||||
|
||||
Menu, Keyboards, Add, Windows, winkb
|
||||
Menu, Keyboards, Add, Apple, mackb
|
||||
Menu, Keyboards, Add, Chromebook, chromekb
|
||||
Menu, Keyboards, Add, IBM (No Super/Win key), ibmkb
|
||||
|
||||
paramkb=%1%
|
||||
|
||||
if paramkb = mac
|
||||
checkKB = Apple
|
||||
if paramkb = win
|
||||
checkKB = Windows
|
||||
if paramkb = chrome
|
||||
checkKB = Chromebook
|
||||
if paramkb = ibm
|
||||
checkKB = IBM (No Super/Win key)
|
||||
|
||||
menu, Keyboards, check, %checkKB%
|
||||
|
||||
; Set Tray menu
|
||||
; Menu, Tray, Standard
|
||||
Menu, Tray, NoStandard ; to remove default menu
|
||||
Menu, Tray, Add, Keyboard Types, :Keyboards
|
||||
Menu, Tray, Add, Autodetect Keyboards, autodetect
|
||||
; Menu, Tray, check, Autodetect Keyboards ; Autodetect
|
||||
; Menu, Tray, disable, Autodetect Keyboards ; CB/IBM
|
||||
Menu, Tray, Add, Suspend Kinto, tray_suspend
|
||||
; Menu, Tray, Add, Returns to Desktop, min
|
||||
Menu, Tray, Add
|
||||
Menu, Tray, Add, Close, Exit
|
||||
Menu, Tray, Click, 1
|
||||
|
||||
winkb(){
|
||||
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" win, "%A_ScriptDir%"
|
||||
}
|
||||
|
||||
mackb(){
|
||||
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" mac, "%A_ScriptDir%"
|
||||
}
|
||||
|
||||
chromekb(){
|
||||
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" chrome, "%A_ScriptDir%"
|
||||
}
|
||||
|
||||
ibmkb(){
|
||||
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" ibm, "%A_ScriptDir%"
|
||||
}
|
||||
|
||||
autodetect(){
|
||||
IfWinExist, detectUSB.ahk
|
||||
WinClose
|
||||
Run, "%A_ScriptDir%\NoShell.vbs" "%A_ScriptDir%\toggle_kb.bat" auto, "%A_ScriptDir%"
|
||||
}
|
||||
|
||||
min(){
|
||||
; Refocus last active Window
|
||||
Send {LAlt down}{tab}{LAlt up}
|
||||
}
|
||||
|
||||
tray_suspend(){
|
||||
suspend toggle
|
||||
if (a_isSuspended = 1){
|
||||
Gosub ReleaseModifiers
|
||||
menu, tray, check , Suspend Kinto
|
||||
I_Icon = %A_ScriptDir%\assets\kinto-white.ico
|
||||
Menu, Tray, Icon, %I_Icon%,, 1
|
||||
Menu, Tray, Tip, Suspended - Kinto
|
||||
IfWinExist, detectUSB.ahk
|
||||
WinClose
|
||||
}
|
||||
else{
|
||||
menu, tray, unCheck, Suspend Kinto
|
||||
; I_Icon = %A_ScriptDir%\assets\kinto-white-invert.ico ; MacModifiers
|
||||
; I_Icon = %A_ScriptDir%\assets\kinto-white-invert.ico ; WinModifiers/CB/IBM
|
||||
; Menu, Tray, Tip, Mac - Kinto ; MacModifiers
|
||||
; Menu, Tray, Tip, Windows - Kinto ; WinModifiers
|
||||
; Menu, Tray, Tip, Chromebook - Kinto ; Chromebook
|
||||
; Menu, Tray, Tip, IBM - Kinto ; IBM
|
||||
Menu, Tray, Icon, %I_Icon%,,1
|
||||
Run, %A_ScriptDir%\detectUSB.ahk
|
||||
}
|
||||
; Refocus last active Window
|
||||
Send {LAlt down}{tab}{LAlt up}
|
||||
}
|
||||
|
||||
Exit() {
|
||||
Gosub ReleaseModifiers
|
||||
IfWinExist, detectUSB.ahk
|
||||
WinClose
|
||||
|
||||
ExitApp
|
||||
}
|
||||
|
||||
SetTitleMatchMode, 2
|
||||
|
||||
GroupAdd, terminals, ahk_exe ubuntu.exe
|
||||
GroupAdd, terminals, ahk_exe ubuntu2004.exe
|
||||
GroupAdd, terminals, ahk_exe ConEmu.exe
|
||||
GroupAdd, terminals, ahk_exe ConEmu64.exe
|
||||
GroupAdd, terminals, ahk_exe powershell.exe
|
||||
GroupAdd, terminals, ahk_exe WindowsTerminal.exe
|
||||
GroupAdd, terminals, ahk_exe Hyper.exe
|
||||
GroupAdd, terminals, ahk_exe mintty.exe
|
||||
GroupAdd, terminals, ahk_exe Cmd.exe
|
||||
GroupAdd, terminals, ahk_exe box.exe
|
||||
GroupAdd, terminals, ahk_exe Terminus.exe
|
||||
GroupAdd, terminals, Fluent Terminal ahk_class ApplicationFrameWindow
|
||||
GroupAdd, terminals, ahk_class Console_2_Main
|
||||
|
||||
GroupAdd, posix, ahk_exe ubuntu.exe
|
||||
GroupAdd, posix, ahk_exe ubuntu2004.exe
|
||||
GroupAdd, posix, ahk_exe ConEmu.exe
|
||||
GroupAdd, posix, ahk_exe ConEmu64.exe
|
||||
GroupAdd, posix, ahk_exe Hyper.exe
|
||||
GroupAdd, posix, ahk_exe mintty.exe
|
||||
GroupAdd, posix, ahk_exe Terminus.exe
|
||||
GroupAdd, posix, Fluent Terminal ahk_class ApplicationFrameWindow
|
||||
GroupAdd, posix, ahk_class Console_2_Main
|
||||
GroupAdd, posix, ahk_exe WindowsTerminal.exe
|
||||
|
||||
GroupAdd, ConEmu, ahk_exe ConEmu.exe
|
||||
GroupAdd, ConEmu, ahk_exe ConEmu64.exe
|
||||
|
||||
GroupAdd, ExcPaste, ahk_exe Cmd.exe
|
||||
GroupAdd, ExcPaste, ahk_exe mintty.exe
|
||||
|
||||
GroupAdd, editors, ahk_exe sublime_text.exe
|
||||
GroupAdd, editors, ahk_exe VSCodium.exe
|
||||
GroupAdd, editors, ahk_exe Code.exe
|
||||
|
||||
GroupAdd, browsers, ahk_exe chrome.exe
|
||||
GroupAdd, browsers, ahk_exe opera.exe
|
||||
GroupAdd, browsers, ahk_exe firefox.exe
|
||||
GroupAdd, browsers, ahk_exe msedge.exe
|
||||
|
||||
; Disable Key Remapping for Virtual Machines
|
||||
; Disable for Remote desktop solutions too
|
||||
GroupAdd, remotes, ahk_exe VirtualBoxVM.exe
|
||||
GroupAdd, remotes, ahk_exe mstsc.exe
|
||||
GroupAdd, remotes, ahk_exe msrdc.exe
|
||||
GroupAdd, remotes, ahk_exe nxplayer.bin
|
||||
|
||||
; Disabled Edge for now - no ability to close all instances
|
||||
; GroupAdd, browsers, Microsoft Edge ahk_class ApplicationFrameWindow
|
||||
|
||||
GroupAdd, vscode, ahk_exe VSCodium.exe
|
||||
GroupAdd, vscode, ahk_exe Code.exe
|
||||
|
||||
GroupAdd, vstudio, ahk_exe devenv.exe
|
||||
|
||||
GroupAdd, intellij, ahk_exe idea.exe
|
||||
GroupAdd, intellij, ahk_exe idea64.exe
|
||||
|
||||
; SetCapsLockState, AlwaysOff ; CB/IBM
|
||||
|
||||
; Keyboards w/o media keys can use this Remap
|
||||
; This will replace unneeded dedicated keys
|
||||
; with most commonly used media keys
|
||||
;
|
||||
; Insert::SoundSet, +1, , mute ; Toggles Speaker
|
||||
; +Insert::Insert ; Shift Insert maps to Insert
|
||||
; Home::SoundSetWaveVolume, -10 ; Decrease volume
|
||||
; PgUp::SoundSetWaveVolume, +10 ; Increase volume
|
||||
; Delete::Send {Media_Prev} ; Previous
|
||||
; End::Send {Media_Play_Pause} ; Pause/Play
|
||||
; PgDn::Send {Media_Next} ; Next
|
||||
|
||||
; Temporary fix that allows for full remapping via Powertoys
|
||||
; useful for destinations where you cannot install Kinto
|
||||
; and you are using a Mac based keyboard
|
||||
; NOTE: Do not fully maximize the RDP window for this to work.
|
||||
#IfWinActive ahk_group remotes ; MacOnly
|
||||
; #IfWinActive ahk_exe msrdc.exe ; MacOnly
|
||||
$LWin::LAlt ; MacOnly
|
||||
$LAlt::RAlt ; MacOnly
|
||||
$LWin up::Send {LWin up}{LAlt up}{LCtrl up} ; MacOnly
|
||||
#If ; MacOnly
|
||||
|
||||
#IfWinNotActive ahk_group remotes
|
||||
|
||||
; New AltTab and CtrlTab fix
|
||||
*tab::
|
||||
{
|
||||
; Tertiary
|
||||
if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P") = false) {
|
||||
; Secondary
|
||||
; Send {LCtrl down}{Secondary up}{tab}
|
||||
; Send {LCtrl down}{LWin up}{tab} ; WinModifiers
|
||||
; Send {LCtrl down}{LAlt up}{tab} ; MacModifiers
|
||||
; Send {LCtrl down}{CapsLock up}{tab} ; CB/IBM
|
||||
KeyWait, tab
|
||||
; Tertiary
|
||||
} else if (GetKeyState("LCtrl", "P") AND GetKeyState("LShift", "P")) {
|
||||
; Secondary
|
||||
; Send {LCtrl down}{Secondary up}{LShift down}{tab}
|
||||
; Send {LCtrl down}{LWin up}{LShift down}{tab} ; WinModifiers/CB
|
||||
; Send {LCtrl down}{LAlt up}{LShift down}{tab} ; MacModifiers
|
||||
; Send {LCtrl down}{CapsLock up}{LShift down}{tab} ; IBM
|
||||
KeyWait, tab
|
||||
; Primary
|
||||
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) { ; WinModifiers/CB/IBM
|
||||
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P") = false) { ; MacModifiers
|
||||
Send {LAlt down}{tab}
|
||||
KeyWait, tab
|
||||
; Primary
|
||||
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) { ; WinModifiers/CB/IBM
|
||||
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) { ; MacModifiers
|
||||
Send {LAlt down}{LShift down}{tab}
|
||||
KeyWait, tab
|
||||
; Secondary
|
||||
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) = false { ; WinModifiers/CB
|
||||
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P") = false) { ; MacModifiers
|
||||
; } else if (GetKeyState("CapsLock", "P") AND GetKeyState("LShift", "P")) = false { ; IBM
|
||||
return
|
||||
; Secondary
|
||||
; } else if (GetKeyState("LWin", "P") AND GetKeyState("LShift", "P")) { ; WinModifiers/CB
|
||||
; } else if (GetKeyState("LAlt", "P") AND GetKeyState("LShift", "P")) { ; MacModifiers
|
||||
; } else if (GetKeyState("CapsLock", "P") AND GetKeyState("LShift", "P")) { ; IBM
|
||||
return
|
||||
} else {
|
||||
send {Blind}{tab}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
tab::Send {tab}
|
||||
|
||||
+tab::Send {Shift down}{tab}{Shift up}
|
||||
|
||||
; Basic Remap
|
||||
;
|
||||
; Primary::LCtrl
|
||||
; Secondary::LAlt
|
||||
; Tertiary::LWin
|
||||
|
||||
; $LAlt::LCtrl ; CB/IBM
|
||||
; $RAlt::RCtrl ; IBM
|
||||
; $RCtrl::RAlt ; CB/IBM
|
||||
; $CapsLock::LWin ; IBM
|
||||
; $LCtrl::LAlt ; CB/IBM
|
||||
|
||||
; $LAlt::LCtrl ; WinModifiers
|
||||
; $RAlt::RCtrl ; WinModifiers
|
||||
; $RCtrl::RAlt ; WinModifiers
|
||||
; $LWin::LAlt ; WinModifiers
|
||||
; $LCtrl::LWin ; WinModifiers
|
||||
|
||||
; $LWin::LCtrl ; MacModifiers
|
||||
; $RWin::RCtrl ; MacModifiers
|
||||
; $LCtrl::LWin ; MacModifiers
|
||||
|
||||
; Hack to disable start menu on winkey
|
||||
; Static - Does not apply to IBM or Chromebooks
|
||||
; $LCtrl up::Send {Ctrl down}{LWin up}{Ctrl up} ; Default
|
||||
; LWin::return ; Chromebook
|
||||
; RWin::return ; Chromebook
|
||||
; RAlt::return ; Chromebook
|
||||
|
||||
; Disable Win-Up/Down - interferes with Sublime text 3 multi-cursors
|
||||
#Down::return
|
||||
#Up::return
|
||||
|
||||
; temporary hack to ensure keys don't get stuck
|
||||
; impacts Alt-Tab fix
|
||||
; Primary
|
||||
; $LAlt up::Send {LWin up}{LAlt up}{LCtrl up} ; WinModifiers
|
||||
; $LWin up::Send {LWin up}{LAlt up}{LCtrl up} ; MacModifiers
|
||||
; $LAlt up::Send {LWin up}{CapsLock up}{LAlt up}{LCtrl up} ; CB/IBM
|
||||
|
||||
!Enter::
|
||||
{
|
||||
if (GetKeyState("RAlt", "P")) {
|
||||
Send {Insert}
|
||||
}
|
||||
else{
|
||||
Send {Alt down}{Enter}{Alt up}
|
||||
}
|
||||
Return
|
||||
}
|
||||
|
||||
; Remap Alt+Esc to Break/Pause
|
||||
!Esc::SendInput, {Pause}
|
||||
|
||||
; Go up or down a page
|
||||
$!Down::Send {PgDn};
|
||||
$!Up::Send {PgUp};
|
||||
|
||||
; Close Apps
|
||||
^q::Send !{F4}
|
||||
|
||||
; Minimize specific Window
|
||||
^m::WinMinimize, A
|
||||
|
||||
; Minimize all but Active Window
|
||||
!^m::
|
||||
WinGet, winid ,, A
|
||||
WinMinimizeAll
|
||||
WinActivate ahk_id %winid%
|
||||
return
|
||||
|
||||
; hide all instances of active Program
|
||||
^h::
|
||||
WinGetClass, class, A
|
||||
WinGet, AllWindows, List
|
||||
loop %AllWindows% {
|
||||
WinGetClass, WinClass, % "ahk_id " AllWindows%A_Index%
|
||||
if(InStr(WinClass,class)){
|
||||
WinMinimize, % "ahk_id " AllWindows%A_Index%
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
; hide all but active program
|
||||
!^h::
|
||||
WinGetClass, class, A
|
||||
WinMinimizeAll
|
||||
WinGet, AllWindows, List
|
||||
loop %AllWindows% {
|
||||
WinGetClass, WinClass, % "ahk_id " AllWindows%A_Index%
|
||||
if(InStr(WinClass,class)){
|
||||
WinRestore, % "ahk_id " AllWindows%A_Index%
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
; Show Desktop
|
||||
^F3::Send #d
|
||||
|
||||
; Emoji Panel
|
||||
; #^Space::Send {LWin down};{LWin up} ; Default
|
||||
; !^Space::Send {LWin down};{LWin up} ; CB/IBM
|
||||
|
||||
; Full Screenshot
|
||||
^+3::Send {PrintScreen}
|
||||
|
||||
; Region Screenshot
|
||||
^+4::Send #+{S}
|
||||
|
||||
; Open File Browser
|
||||
; !^space::Send #e ; Default
|
||||
; #^space::Send #e ; CB/IBM
|
||||
|
||||
; wordwise support
|
||||
^Up::Send ^{Home}
|
||||
^+Up::Send ^+{Home}
|
||||
^Down::Send ^{End}
|
||||
^+Down::Send ^+{End}
|
||||
$^Backspace::Send +{Home}{Delete}
|
||||
!Backspace::Send ^{Backspace}
|
||||
!Left::Send ^{Left}
|
||||
!+Left::Send ^+{Left}
|
||||
!Right::Send ^{Right}
|
||||
!+Right::Send ^+{Right}
|
||||
$^Left::Send {Home}
|
||||
$^+Left::Send +{Home}
|
||||
$^Right::Send {End}
|
||||
$^+Right::Send +{End}
|
||||
|
||||
; #if GetKeyState("LWin", "P") || GetKeyState("RAlt", "P") ; Chromebook
|
||||
; Space::Send ^{Esc} ; Chromebook
|
||||
; 0::Send #0 ; Chromebook
|
||||
; 1::Send #1 ; Chromebook
|
||||
; 2::Send #2 ; Chromebook
|
||||
; 3::Send #3 ; Chromebook
|
||||
; 4::Send #4 ; Chromebook
|
||||
; 5::Send #5 ; Chromebook
|
||||
; 6::Send #6 ; Chromebook
|
||||
; 7::Send #7 ; Chromebook
|
||||
; 8::Send #8 ; Chromebook
|
||||
; 9::Send #9 ; Chromebook
|
||||
; -::Send #- ; Chromebook
|
||||
; =::Send #= ; Chromebook
|
||||
; `::Send #` ; Chromebook
|
||||
; `;::Send #; ; Chromebook
|
||||
; a::Send #a ; Chromebook
|
||||
; b::Send #b ; Chromebook
|
||||
; c::Send #c ; Chromebook
|
||||
; d::Send #d ; Chromebook
|
||||
; e::Send #e ; Chromebook
|
||||
; f::Send #f ; Chromebook
|
||||
; g::Send #g ; Chromebook
|
||||
; h::Send #h ; Chromebook
|
||||
; i::Send #i ; Chromebook
|
||||
; j::Send #j ; Chromebook
|
||||
; k::Send #k ; Chromebook
|
||||
; l::Send #l ; Chromebook
|
||||
; m::Send #m ; Chromebook
|
||||
; n::Send #n ; Chromebook
|
||||
; o::Send #o ; Chromebook
|
||||
; p::Send #p ; Chromebook
|
||||
; q::Send #q ; Chromebook
|
||||
; r::Send #r ; Chromebook
|
||||
; s::Send #s ; Chromebook
|
||||
; t::Send #t ; Chromebook
|
||||
; u::Send #u ; Chromebook
|
||||
; v::Send #v ; Chromebook
|
||||
; w::Send #w ; Chromebook
|
||||
; x::Send #x ; Chromebook
|
||||
; y::Send #y ; Chromebook
|
||||
; z::Send #z ; Chromebook
|
||||
; #If ; Chromebook
|
||||
|
||||
#IfWinNotActive ahk_group terminals
|
||||
^.::Send {Esc}
|
||||
; emacs style
|
||||
#n::Send {Down}
|
||||
#p::Send {Up}
|
||||
#f::Send {Right}
|
||||
#b::Send {Left}
|
||||
#a::Send {Home}
|
||||
#e::Send {End}
|
||||
#d::Send {Delete}
|
||||
#k::Send +{End}{Backspace}
|
||||
#If
|
||||
|
||||
; Cmd+Space Alternative
|
||||
$^Space::Send ^{Esc}
|
||||
|
||||
#IfWinActive ahk_group intellij
|
||||
; $#c::Send ^{c} ; Default - Sigints interrupt
|
||||
; $!c::Send ^{c} ; CB/IBM
|
||||
; General
|
||||
^0::Send !{0} ;Open corresponding tool window
|
||||
^1::Send !{1} ;Open corresponding tool window
|
||||
^2::Send !{2} ;Open corresponding tool window
|
||||
^3::Send !{3} ;Open corresponding tool window
|
||||
^4::Send !{4} ;Open corresponding tool window
|
||||
^5::Send !{5} ;Open corresponding tool window
|
||||
^6::Send !{6} ;Open corresponding tool window
|
||||
^7::Send !{7} ;Open corresponding tool window
|
||||
^8::Send !{8} ;Open corresponding tool window
|
||||
^9::Send !{9} ;Open corresponding tool window
|
||||
#`::Send ^` ;Quick switch current scheme
|
||||
^,::Send ^!s ;Open Settings dialog
|
||||
^;::Send ^!+s ;Open Project Structure dialog
|
||||
; Debugging
|
||||
^!r::Send {F9} ;Resume program
|
||||
; Search/Replace
|
||||
^g::Send {F3} ;Find next
|
||||
^+F3::Send +{F3} ;Find previous
|
||||
#g::Send !j ;Select next occurrence
|
||||
^#g::Send ^!+j ;Select all occurrences
|
||||
#+g::Send !+j ;Unselect occurrence
|
||||
; Editing
|
||||
; #Space::Send ^{Space} ; Default - Basic code completion
|
||||
; !Space::Send ^{Space} ; CB/IBM - Basic code completion
|
||||
#+Space::Send ^+{Space} ;Smart code completion
|
||||
#j::Send ^q ;Quick documentation lookup
|
||||
^n::Send !{Insert} ;Generate code...
|
||||
#o::Send ^o ;Override methods
|
||||
#i::Send ^i ;Implement methods
|
||||
!Up::Send ^w ;Extend selection
|
||||
!Down::Send ^+w ;Shrink selection
|
||||
#+q::Send !q ;Context info
|
||||
#!o::Send ^!o ;Optimize imports
|
||||
#!i::Send ^!i ;Auto-indent line(s)
|
||||
$^Backspace::Send ^y ;Delete line at caret
|
||||
#+j::Send ^+j ;Smart line join
|
||||
!Delete::Send ^{Delete} ;Delete to word end
|
||||
!Backspace::Send ^{Backspace} ;Delete to word start
|
||||
^+::Send ^{NumpadAdd} ;Expand code block
|
||||
^-::Send ^{NumpadSub} ;Collapse code block
|
||||
^++::Send ^+{NumpadAdd} ;Expand all
|
||||
^+-::Send ^+{NumpadSub} ;Collapse all
|
||||
^w::Send ^{F4} ;Close active editor tab
|
||||
; Refactoring
|
||||
^Delete::Send !{Delete} ;Safe Delete
|
||||
^T::Send ^!+T ;Refactor this
|
||||
; Navigation
|
||||
^o::Send ^n ;Go to class
|
||||
^+o::Send ^+n ;Go to file
|
||||
^!o::Send ^!+n ;Go to symbol
|
||||
#Right::Send !{Right} ;Go to next editor tab
|
||||
#Left::Send !{Left} ;Go to previous editor tab
|
||||
#l::Send ^g ;Go to line
|
||||
#e::Send ^e ;Recent files popup
|
||||
; !Space::Send ^+i ; Default - Open quick definition lookup
|
||||
; #Space::Send ^+i ; CB/IBM - Open quick definition lookup
|
||||
^Y::Send ^+i ;Open quick definition lookup
|
||||
#+b::Send ^+b ;Go to type declaration
|
||||
#Up::Send !{Up} ;Go to previous
|
||||
#Down::Send !{Down} ;Go to next method
|
||||
#h::Send ^h ;Type hierarchy
|
||||
#!h::Send ^!h ;Call hierarchy
|
||||
^Down::Send ^{Enter} ;Edit source/View source
|
||||
!Home::Send !{Home} ;Show navigation bar
|
||||
F2::Send {F11} ;Toggle bookmark
|
||||
#F3::Send ^{F11} ;Toggle bookmark with mnemonic
|
||||
#0::Send ^{0} ;Go to numbered bookmark
|
||||
#1::Send ^{1} ;Go to numbered bookmark
|
||||
#2::Send ^{2} ;Go to numbered bookmark
|
||||
#3::Send ^{3} ;Go to numbered bookmark
|
||||
#4::Send ^{4} ;Go to numbered bookmark
|
||||
#5::Send ^{5} ;Go to numbered bookmark
|
||||
#6::Send ^{6} ;Go to numbered bookmark
|
||||
#7::Send ^{7} ;Go to numbered bookmark
|
||||
#8::Send ^{8} ;Go to numbered bookmark
|
||||
#9::Send ^{9} ;Go to numbered bookmark
|
||||
^F3::Send +{F11} ;Show bookmarks
|
||||
; Compile and Run
|
||||
#!r::Send !+{F10} ;Select configuration and run
|
||||
#!d::Send !+{F9} ;Select configuration and debug
|
||||
#r::Send +{F10} ;Run
|
||||
#d::Send +{F9} ;Debug
|
||||
#+r::Send ^+{F10} ;Run context configuration from editor
|
||||
#+d::Send ^+{F9} ;Debug context configuration from editor
|
||||
; VCS/Local History
|
||||
#v::Send !` ;VCS quick popup
|
||||
#If
|
||||
|
||||
; Close all browsers
|
||||
#IfWinActive ahk_group browsers
|
||||
^q::send {Alt Down}f{Alt Up}x ; exit all windows
|
||||
; Dev Tools
|
||||
!^i::send {Ctrl Down}{Shift Down}i{Shift Up}{Ctrl Up}
|
||||
!^j::send {Ctrl Down}{Shift Down}j{Shift Up}{Ctrl Up}
|
||||
; Open preferences
|
||||
#IfWinActive ahk_exe firefox.exe
|
||||
^,::send, {Ctrl Down}t{Ctrl Up}about:preferences{Enter}
|
||||
#If
|
||||
#IfWinActive ahk_exe chrome.exe
|
||||
^,::send {Alt Down}e{Alt Up}s{Enter}
|
||||
#If
|
||||
#IfWinActive ahk_exe msedge.exe
|
||||
^,::send {Alt Down}e{Alt Up}s{Enter}
|
||||
#If
|
||||
#IfWinActive ahk_exe opera.exe
|
||||
^,::send {Ctrl Down}{F12}{Ctrl Up}
|
||||
#If
|
||||
#If
|
||||
|
||||
; Sublime Text Remaps for VS Code
|
||||
#IfWinActive ahk_group vscode
|
||||
#p::send {Up} ; Allow for traversing quick list
|
||||
#n::send {Down} ; Allow for traversing quick list
|
||||
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
||||
; Will extend cursor to multiple lines
|
||||
; #+Up::send ^!{Up} ; Default - ST2CODE
|
||||
; !+Up::send ^!{Up} ; CB/IBM - ST2CODE
|
||||
; #+Down::send ^!{Down} ; Default - ST2CODE
|
||||
; !+Down::send ^!{Down} ; CB/IBM - ST2CODE
|
||||
; Remap Ctrl+Cmd+G to select all matches
|
||||
; #^g::send ^+{L} ; Default - ST2CODE
|
||||
; !^g::send ^+{L} ; CB/IBM - ST2CODE
|
||||
!+g::send ^+{G} ; View source control
|
||||
; $#c::Send {Ctrl down}c{Ctrl up} ; Default - Sigints interrupt
|
||||
; $!c::Send {Ctrl down}c{Ctrl up} ; CB/IBM
|
||||
; $#x::Send {Ctrl down}x{Ctrl up} ; Default - Sigints interrupt
|
||||
; $!x::Send {Ctrl down}x{Ctrl up} ; CB/IBM
|
||||
|
||||
; #Space::Send ^{Space} ; Default - Basic code completion
|
||||
; !Space::Send ^{Space} ; CB/IBM - Basic code completion
|
||||
#If
|
||||
|
||||
#IfWinActive ahk_exe sublime_text.exe
|
||||
; #x::Send ^{x} ; Default - Terminal - Ctrl-x
|
||||
; #c::Send ^{c} ; Default - Terminal - Ctrl-c sigint
|
||||
; !x::Send ^{x} ; CB/IBM
|
||||
; !c::Send ^{c} ; CB/IBM
|
||||
; #c::send ^{Pause} ; cancel_build
|
||||
; #Space::Send ^{Space} ; Default - Basic code completion
|
||||
; !Space::Send ^{Space} ; CB/IBM - Basic code completion
|
||||
#^Up::send !{O} ; Switch file
|
||||
#^f::send {F11} ; toggle_full_screen
|
||||
^!v::send {Ctrl Down}k{Ctrl Up}{Ctrl Down}v{Ctrl Up} ; paste_from_history
|
||||
^Up::Return ; cancel scroll_lines up
|
||||
^!Up::send ^{Up} ; scroll_lines up
|
||||
^Down::Return ; cancel scroll_lines down
|
||||
^!Down::send ^{Down} ; scroll_lines down
|
||||
; #+Up::send {shift up}^!{Up} ; Default - multi-cursor up
|
||||
; #+Down::send {shift up}^!{Down} ; Default - multi-cursor down
|
||||
; !+Up::send {shift up}^!{Up} ; CB/IBM - multi-cursor up
|
||||
; !+Down::send {shift up}^!{Down} ; CB/IBM - multi-cursor down
|
||||
^PgDn::Return ; cancel next_view
|
||||
^PgUp::Return ; cancel prev_view
|
||||
^+{::send ^{PgDn} ; next_view
|
||||
^+}::send ^{PgUp} ; prev_view
|
||||
^!Right::send ^{PgDn} ; next_view
|
||||
^!Left::send ^{PgUp} ; prev_view
|
||||
Insert::Return ; cancel toggle_overwrite
|
||||
^!O::send {Insert} ; toggle_overwrite
|
||||
; !c::Return ; Default - cancel toggle_case_sensitive
|
||||
; $!c::send ^{c} ; CB/IBM - Sigint
|
||||
^!c::send !{c} ; toggle_case_sensitive
|
||||
; ^h::Return ; cancel replace
|
||||
^!f::send ^{h} ; replace
|
||||
^+h::Return ; cancel replace_next
|
||||
^!e::send ^+{h} ; replace_next
|
||||
F3::Return ; cancel find_next
|
||||
^g::send {F3} ; find_next
|
||||
*F3::Return ; cancel find_prev, find_under, find_all_under
|
||||
^+g::send +{F3} ; find_prev
|
||||
#!g::send ^{F3} ; find_under
|
||||
#!+g::send ^+{F3} ; find_under_prev
|
||||
; #^g::send !{F3} ; Default - find_all_under
|
||||
; !^g::send !{F3} ; CB/IBM - find_all_under
|
||||
^+Up::Return ; cancel swap_line_up
|
||||
#!Up::send ^+{Up} ; swap_line_up
|
||||
^+Down::Return ; cancel swap_line_down
|
||||
#!Down::send ^+{Down} ; swap_line_down
|
||||
^Pause::Return ; cancel cancel_build
|
||||
; #c::send ^{Pause} ; cancel_build
|
||||
F9::Return ; cancel sort_lines case_s false
|
||||
F5::send {F9} ; sort_lines case_s false
|
||||
#F9::Return ; cancel sort_lines case_s true
|
||||
#F5::send #{F9} ; sort_lines case_s true
|
||||
!+1::Return ; cancel set_layout
|
||||
^!1::send !+1 ; set_layout
|
||||
!+2::Return ; cancel set_layout
|
||||
^!2::send !+2 ; set_layout
|
||||
!+3::Return ; cancel set_layout
|
||||
^!3::send !+3 ; set_layout
|
||||
!+4::Return ; cancel set_layout
|
||||
^!4::send !+4 ; set_layout
|
||||
!+5::Return ; cancel set_layout
|
||||
^!5::send !+5 ; set_layout
|
||||
!+8::Return ; cancel set_layout
|
||||
^!8::send !+8 ; set_layout
|
||||
!+9::Return ; cancel set_layout
|
||||
^!9::send !+9 ; set_layout
|
||||
#If
|
||||
|
||||
#IfWinActive ahk_group terminals
|
||||
|
||||
; End of Line
|
||||
; #e:: ; Default
|
||||
; !e:: ; CB/IBM
|
||||
Send {End}
|
||||
return
|
||||
|
||||
; Beginning of Line
|
||||
; #a:: ; Default
|
||||
; !a:: ; CB/IBM
|
||||
Send {Home}
|
||||
return
|
||||
|
||||
; Copy
|
||||
^c::
|
||||
If WinActive("ahk_exe cmd.exe") OR WinActive("ahk_exe box.exe"){
|
||||
Send {Enter}
|
||||
}
|
||||
else if WinActive("ahk_exe mintty.exe"){
|
||||
SetKeyDelay -1
|
||||
Send {Blind}{Insert}
|
||||
}
|
||||
; else if WinActive("ahk_exe WindowsTerminal.exe"){ ; WinTerm
|
||||
; SetKeyDelay -1 ; WinTerm
|
||||
; Send {Blind}{F13} ; WinTerm
|
||||
; } ; WinTerm
|
||||
else{
|
||||
SetKeyDelay -1
|
||||
Send {Blind}{LShift down}{c DownTemp}
|
||||
}
|
||||
return
|
||||
|
||||
^c up::
|
||||
If not WinActive("ahk_group cmd.exe") OR WinActive("ahk_exe box.exe"){
|
||||
SetKeyDelay -1
|
||||
Send {Blind}{c Up}{LShift Up}
|
||||
}
|
||||
return
|
||||
|
||||
; Sigints - interrupt
|
||||
; $#c::Send {Ctrl down}c{Ctrl up} ; Default
|
||||
; $!c::Send {Ctrl down}c{Ctrl up} ; CB/IBM
|
||||
$^.::Send {Ctrl down}c{Ctrl up}
|
||||
|
||||
; Windows Terminal
|
||||
; Ctrl+Shift+C should do nothing
|
||||
If WinActive("ahk_exe WindowsTerminal.exe"){
|
||||
$#+c::return
|
||||
}
|
||||
|
||||
; Paste
|
||||
$^v::
|
||||
If WinActive("ahk_exe mintty.exe"){
|
||||
Send {Shift down}{Insert}{Shift up}
|
||||
}
|
||||
else if WinActive("ahk_group posix"){
|
||||
Send {Blind}{Shift down}v{Shift up}
|
||||
}
|
||||
else if WinActive("ahk_exe box.exe"){
|
||||
SendEvent {RButton}
|
||||
}
|
||||
else{
|
||||
Send {Blind}v
|
||||
}
|
||||
return
|
||||
#If
|
||||
|
||||
#IfWinActive ahk_group posix
|
||||
; Open/Close Tab for those that support it
|
||||
$^t::
|
||||
If not WinActive("ahk_group ConEmu") AND not WinActive("ahk_class Console_2_Main"){
|
||||
Send {Blind}{LShift down}t{LShift Up}
|
||||
}
|
||||
else if WinActive("ahk_class Console_2_Main"){
|
||||
Send {Blind}{F1}{LShift Up}
|
||||
}
|
||||
else{
|
||||
Send {Blind}t
|
||||
}
|
||||
return
|
||||
|
||||
|
||||
$^w::
|
||||
If not WinActive("ahk_group ConEmu"){
|
||||
Send {Blind}{LShift down}w{LShift Up}
|
||||
}
|
||||
else{
|
||||
Send ^w
|
||||
}
|
||||
return
|
||||
|
||||
^l::Send clear{Enter}
|
||||
; #l::return
|
||||
; Clear Terminal and Scroll Buffer
|
||||
^k::Send clear && printf '\e[3J'{Enter}
|
||||
; Remap Physical Ctrl back to Ctrl
|
||||
#0::Send {LCtrl down}0{Ctrl up} ; Default
|
||||
#1::Send {LCtrl down}1{Ctrl up} ; Default
|
||||
#2::Send {LCtrl down}2{Ctrl up} ; Default
|
||||
#3::Send {LCtrl down}3{Ctrl up} ; Default
|
||||
#4::Send {LCtrl down}4{Ctrl up} ; Default
|
||||
#5::Send {LCtrl down}5{Ctrl up} ; Default
|
||||
#6::Send {LCtrl down}6{Ctrl up} ; Default
|
||||
#7::Send {LCtrl down}7{Ctrl up} ; Default
|
||||
#8::Send {LCtrl down}8{Ctrl up} ; Default
|
||||
#9::Send {LCtrl down}9{Ctrl up} ; Default
|
||||
#-::Send {LCtrl down}-{Ctrl up} ; Default
|
||||
#=::Send {LCtrl down}={Ctrl up} ; Default
|
||||
#`::Send {LCtrl down}`{Ctrl up} ; Default
|
||||
#a::Send {LCtrl down}a{Ctrl up} ; Default
|
||||
#b::Send {LCtrl down}b{Ctrl up} ; Default
|
||||
#c::Send {LCtrl down}c{Ctrl up} ; Default
|
||||
#d::Send {LCtrl down}d{Ctrl up} ; Default
|
||||
#e::Send {LCtrl down}e{Ctrl up} ; Default
|
||||
#f::Send {LCtrl down}f{Ctrl up} ; Default
|
||||
#g::Send {LCtrl down}g{Ctrl up} ; Default
|
||||
#h::Send {LCtrl down}h{Ctrl up} ; Default
|
||||
#i::Send {LCtrl down}i{Ctrl up} ; Default
|
||||
#j::Send {LCtrl down}j{Ctrl up} ; Default
|
||||
#k::Send {LCtrl down}k{Ctrl up} ; Default
|
||||
#l::Send {LCtrl down}l{Ctrl up} ; Default
|
||||
#m::Send {LCtrl down}m{Ctrl up} ; Default
|
||||
#n::Send {LCtrl down}n{Ctrl up} ; Default
|
||||
#o::Send {LCtrl down}o{Ctrl up} ; Default
|
||||
#p::Send {LCtrl down}p{Ctrl up} ; Default
|
||||
#q::Send {LCtrl down}q{Ctrl up} ; Default
|
||||
#r::Send {LCtrl down}r{Ctrl up} ; Default
|
||||
#s::Send {LCtrl down}s{Ctrl up} ; Default
|
||||
#t::Send {LCtrl down}t{Ctrl up} ; Default
|
||||
#u::Send {LCtrl down}u{Ctrl up} ; Default
|
||||
#v::Send {LCtrl down}v{Ctrl up} ; Default
|
||||
#w::Send {LCtrl down}w{Ctrl up} ; Default
|
||||
#x::Send {LCtrl down}x{Ctrl up} ; Default
|
||||
#y::Send {LCtrl down}y{Ctrl up} ; Default
|
||||
#z::Send {LCtrl down}z{Ctrl up} ; Default
|
||||
; !0::Send {LCtrl down}0{Ctrl up} ; CB/IBM
|
||||
; !1::Send {LCtrl down}1{Ctrl up} ; CB/IBM
|
||||
; !2::Send {LCtrl down}2{Ctrl up} ; CB/IBM
|
||||
; !3::Send {LCtrl down}3{Ctrl up} ; CB/IBM
|
||||
; !4::Send {LCtrl down}4{Ctrl up} ; CB/IBM
|
||||
; !5::Send {LCtrl down}5{Ctrl up} ; CB/IBM
|
||||
; !6::Send {LCtrl down}6{Ctrl up} ; CB/IBM
|
||||
; !7::Send {LCtrl down}7{Ctrl up} ; CB/IBM
|
||||
; !8::Send {LCtrl down}8{Ctrl up} ; CB/IBM
|
||||
; !9::Send {LCtrl down}9{Ctrl up} ; CB/IBM
|
||||
; !-::Send {LCtrl down}-{Ctrl up} ; CB/IBM
|
||||
; !=::Send {LCtrl down}={Ctrl up} ; CB/IBM
|
||||
; !`::Send {LCtrl down}`{Ctrl up} ; CB/IBM
|
||||
; !a::Send {LCtrl down}a{Ctrl up} ; CB/IBM
|
||||
; !b::Send {LCtrl down}b{Ctrl up} ; CB/IBM
|
||||
; !c::Send {LCtrl down}c{Ctrl up} ; CB/IBM
|
||||
; !d::Send {LCtrl down}d{Ctrl up} ; CB/IBM
|
||||
; !e::Send {LCtrl down}e{Ctrl up} ; CB/IBM
|
||||
; !f::Send {LCtrl down}f{Ctrl up} ; CB/IBM
|
||||
; !g::Send {LCtrl down}g{Ctrl up} ; CB/IBM
|
||||
; !h::Send {LCtrl down}h{Ctrl up} ; CB/IBM
|
||||
; !i::Send {LCtrl down}i{Ctrl up} ; CB/IBM
|
||||
; !j::Send {LCtrl down}j{Ctrl up} ; CB/IBM
|
||||
; !k::Send {LCtrl down}k{Ctrl up} ; CB/IBM
|
||||
; !l::Send {LCtrl down}l{Ctrl up} ; CB/IBM
|
||||
; !m::Send {LCtrl down}m{Ctrl up} ; CB/IBM
|
||||
; !n::Send {LCtrl down}n{Ctrl up} ; CB/IBM
|
||||
; !o::Send {LCtrl down}o{Ctrl up} ; CB/IBM
|
||||
; !p::Send {LCtrl down}p{Ctrl up} ; CB/IBM
|
||||
; !q::Send {LCtrl down}q{Ctrl up} ; CB/IBM
|
||||
; !r::Send {LCtrl down}r{Ctrl up} ; CB/IBM
|
||||
; !s::Send {LCtrl down}s{Ctrl up} ; CB/IBM
|
||||
; !t::Send {LCtrl down}t{Ctrl up} ; CB/IBM
|
||||
; !u::Send {LCtrl down}u{Ctrl up} ; CB/IBM
|
||||
; !v::Send {LCtrl down}v{Ctrl up} ; CB/IBM
|
||||
; !w::Send {LCtrl down}w{Ctrl up} ; CB/IBM
|
||||
; !x::Send {LCtrl down}x{Ctrl up} ; CB/IBM
|
||||
; !y::Send {LCtrl down}y{Ctrl up} ; CB/IBM
|
||||
; !z::Send {LCtrl down}z{Ctrl up} ; CB/IBM
|
||||
#If
|
||||
#If
|
||||
|
||||
ReleaseModifiers:
|
||||
Send {RCtrl up}
|
||||
Send {LCtrl up}
|
||||
Send {RAlt up}
|
||||
Send {LAlt up}
|
||||
Send {RWin up}
|
||||
Send {LWin up}
|
||||
Send {RShift up}
|
||||
Send {LShift up}
|
||||
return
|
BIN
windows/standard_ctrlalt_swap.skl
Executable file
BIN
windows/theme_ubuntu.reg
Normal file
65
windows/toggle_kb.bat
Normal file
@@ -0,0 +1,65 @@
|
||||
@echo off
|
||||
|
||||
IF "%1"=="mac" goto mac
|
||||
IF "%1"=="win" goto win
|
||||
IF "%1"=="chrome" goto chrome
|
||||
IF "%1"=="ibm" goto ibm
|
||||
IF "%1"=="auto" goto auto
|
||||
|
||||
echo Not found.
|
||||
goto commonexit
|
||||
|
||||
:auto
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(;)( )(.*)(; Autodetect)|^(?!; )(.*)(; )(Autodetect)/$6$5$6$7$3$4/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
"%userprofile%\.kinto\kinto-start.vbs"
|
||||
goto commonexit
|
||||
|
||||
:win
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; Default)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; CB\/IBM)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; Chromebook)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; IBM)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(ahk\"\" )(\w*)/$1win/gm" "%userprofile%\.kinto\kinto-start.vbs"
|
||||
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk" win
|
||||
goto commonexit
|
||||
|
||||
:mac
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; Default)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; CB\/IBM)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; Chromebook)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; IBM)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(ahk\"\" )(\w*)/$1mac/gm" "%userprofile%\.kinto\kinto-start.vbs"
|
||||
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk" mac
|
||||
goto commonexit
|
||||
|
||||
:chrome
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!; )(.*)(; Autodetect)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; Default)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; Chromebook)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; CB\/IBM)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(ahk\"\" )(\w*)/$1chrome/gm" "%userprofile%\.kinto\kinto-start.vbs"
|
||||
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk" chrome
|
||||
goto commonexit
|
||||
|
||||
:ibm
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!; )(.*)(; Autodetect)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; WinModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; Chromebook)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; MacModifiers)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/^(?!;)(.*)(; Default)/; $1$2/gm" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; IBM)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB\/IBM)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(; )(.*)(; CB\/IBM)/$2$3/g" "%userprofile%\.kinto\kinto.ahk"
|
||||
C:\Strawberry\perl\bin\perl.exe -pi -e "s/(ahk\"\" )(\w*)/$1ibm/gm" "%userprofile%\.kinto\kinto-start.vbs"
|
||||
"C:\Program Files\AutoHotkey\AutoHotkey.exe" "%userprofile%\.kinto\kinto.ahk" ibm
|
||||
goto commonexit
|
||||
|
||||
:commonexit
|
||||
exit
|
BIN
windows/unused/macbook_winctrl_capsesc_swap.reg
Normal file
BIN
windows/unused/macbook_winctrl_swap.reg
Normal file
BIN
windows/unused/macbook_winctrl_swap.skl
Normal file
4
windows/unused/remove_keyswap.reg
Normal file
@@ -0,0 +1,4 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
|
||||
"Scancode Map"=-
|