mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-16 13:37:52 +02:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07bcc5ba61 | ||
|
|
6e90bc1996 | ||
|
|
6269f78ed2 | ||
|
|
dd0e1cce9e | ||
|
|
92e68a6e0c | ||
|
|
e4baca6d97 | ||
|
|
a09464dee9 | ||
|
|
b966013a2b | ||
|
|
046fbb860b | ||
|
|
91700b3e42 | ||
|
|
b314303787 | ||
|
|
176cfe771c | ||
|
|
3b57acf03c | ||
|
|
77e2572c5a | ||
|
|
39eff0fe8c | ||
|
|
12efff6d08 |
@@ -35,6 +35,15 @@ mouse anywhere in the current command to move the cursor there. See
|
||||
Detailed list of changes
|
||||
-------------------------------------
|
||||
|
||||
0.28.1 [2023-04-21]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Fix a regression in the previous release that broke the remote file kitten (:iss:`6186`)
|
||||
|
||||
- Fix a regression in the previous release that broke handling of some keyboard shortcuts in some kittens on some keyboard layouts (:iss:`6189`)
|
||||
|
||||
- Fix a regression in the previous release that broke usage of custom themes (:iss:`6191`)
|
||||
|
||||
0.28.0 [2023-04-15]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@ You can also create your own themes as :file:`.conf` files. Put them in the
|
||||
usually, :file:`~/.config/kitty/themes`. The kitten will automatically add them
|
||||
to the list of themes. You can use this to modify the builtin themes, by giving
|
||||
the conf file the name :file:`Some theme name.conf` to override the builtin
|
||||
theme of that name. Note that after doing so you have to run the kitten and
|
||||
theme of that name. Here, ``Some theme name`` is the actual builtin theme name, not
|
||||
its file name. Note that after doing so you have to run the kitten and
|
||||
choose that theme once for your changes to be applied.
|
||||
|
||||
|
||||
|
||||
@@ -1014,7 +1014,7 @@ static pthread_t main_thread;
|
||||
static NSLock *tick_lock = NULL;
|
||||
|
||||
|
||||
void _glfwDispatchTickCallback() {
|
||||
void _glfwDispatchTickCallback(void) {
|
||||
if (tick_lock && tick_callback) {
|
||||
[tick_lock lock];
|
||||
while(tick_callback_requested) {
|
||||
@@ -1026,7 +1026,7 @@ void _glfwDispatchTickCallback() {
|
||||
}
|
||||
|
||||
static void
|
||||
request_tick_callback() {
|
||||
request_tick_callback(void) {
|
||||
if (!tick_callback_requested) {
|
||||
tick_callback_requested = true;
|
||||
[NSApp performSelectorOnMainThread:@selector(tick_callback) withObject:nil waitUntilDone:NO];
|
||||
|
||||
@@ -323,7 +323,7 @@ static double getFallbackRefreshRate(CGDirectDisplayID displayID)
|
||||
////// GLFW internal API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void _glfwClearDisplayLinks() {
|
||||
void _glfwClearDisplayLinks(void) {
|
||||
for (size_t i = 0; i < _glfw.ns.displayLinks.count; i++) {
|
||||
if (_glfw.ns.displayLinks.entries[i].displayLink) {
|
||||
CVDisplayLinkStop(_glfw.ns.displayLinks.entries[i].displayLink);
|
||||
|
||||
19
go.mod
19
go.mod
@@ -5,24 +5,25 @@ go 1.20
|
||||
require (
|
||||
github.com/ALTree/bigfloat v0.0.0-20220102081255-38c8b72a9924
|
||||
github.com/alecthomas/chroma/v2 v2.7.0
|
||||
github.com/bmatcuk/doublestar v1.3.4
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.0
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/google/go-cmp v0.5.9
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/jamesruan/go-rfc1924 v0.0.0-20170108144916-2767ca7c638f
|
||||
github.com/seancfoley/ipaddress-go v1.5.3
|
||||
github.com/shirou/gopsutil/v3 v3.23.1
|
||||
golang.org/x/exp v0.0.0-20230202163644-54bba9f4231b
|
||||
golang.org/x/image v0.5.0
|
||||
golang.org/x/sys v0.4.0
|
||||
github.com/seancfoley/ipaddress-go v1.5.4
|
||||
github.com/shirou/gopsutil/v3 v3.23.3
|
||||
golang.org/x/exp v0.0.0-20230321023759-10a507213a29
|
||||
golang.org/x/image v0.7.0
|
||||
golang.org/x/sys v0.7.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
github.com/dlclark/regexp2 v1.9.0 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a // indirect
|
||||
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
|
||||
github.com/seancfoley/bintree v1.2.1 // indirect
|
||||
github.com/shoenig/go-m1cpu v0.1.5 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.11 // indirect
|
||||
github.com/tklauser/numcpus v0.6.0 // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.2 // indirect
|
||||
|
||||
51
go.sum
51
go.sum
@@ -4,15 +4,15 @@ github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2
|
||||
github.com/alecthomas/chroma/v2 v2.7.0 h1:hm1rY6c/Ob4eGclpQ7X/A3yhqBOZNUTk9q+yhyLIViI=
|
||||
github.com/alecthomas/chroma/v2 v2.7.0/go.mod h1:yrkMI9807G1ROx13fhe1v6PN2DDeaR73L3d+1nmYQtw=
|
||||
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
|
||||
github.com/bmatcuk/doublestar v1.3.4 h1:gPypJ5xD31uhX6Tf54sDPUOBXTqKH4c9aPY66CyQrS0=
|
||||
github.com/bmatcuk/doublestar v1.3.4/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.0 h1:HTuxyug8GyFbRkrffIpzNCSK4luc0TY3wzXvzIZhEXc=
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
|
||||
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
|
||||
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
|
||||
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
github.com/dlclark/regexp2 v1.9.0 h1:pTK/l/3qYIKaRXuHnEnIf7Y5NxfRPfpb7dis6/gdlVI=
|
||||
github.com/dlclark/regexp2 v1.9.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
@@ -23,25 +23,32 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
|
||||
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
|
||||
github.com/jamesruan/go-rfc1924 v0.0.0-20170108144916-2767ca7c638f h1:Ko4+g6K16vSyUrtd/pPXuQnWsiHe5BYptEtTxfwYwCc=
|
||||
github.com/jamesruan/go-rfc1924 v0.0.0-20170108144916-2767ca7c638f/go.mod h1:eHzfhOKbTGJEGPSdMHzU6jft192tHHt2Bu2vIZArvC0=
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
||||
github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a h1:N9zuLhTvBSRt0gWSiJswwQ2HqDmtX/ZCDJURnKUt1Ik=
|
||||
github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig=
|
||||
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||
github.com/seancfoley/bintree v1.2.1 h1:Z/iNjRKkXnn0CTW7jDQYtjW5fz2GH1yWvOTJ4MrMvdo=
|
||||
github.com/seancfoley/bintree v1.2.1/go.mod h1:hIUabL8OFYyFVTQ6azeajbopogQc2l5C/hiXMcemWNU=
|
||||
github.com/seancfoley/ipaddress-go v1.5.3 h1:fLnn4nsatd2rp3IJsVWriXv5gXn2Qiy8uxjxe4iZtTg=
|
||||
github.com/seancfoley/ipaddress-go v1.5.3/go.mod h1:fpvVPC+Jso+YEhNcNiww8HQmBgKP8T4T6BTp1SLxxIo=
|
||||
github.com/shirou/gopsutil/v3 v3.23.1 h1:a9KKO+kGLKEvcPIs4W62v0nu3sciVDOOOPUD0Hz7z/4=
|
||||
github.com/shirou/gopsutil/v3 v3.23.1/go.mod h1:NN6mnm5/0k8jw4cBfCnJtr5L7ErOTg18tMNpgFkn0hA=
|
||||
github.com/seancfoley/ipaddress-go v1.5.4 h1:ZdjewWC1J2y5ruQjWHwK6rA1tInWB6mz1ftz6uTm+Uw=
|
||||
github.com/seancfoley/ipaddress-go v1.5.4/go.mod h1:fpvVPC+Jso+YEhNcNiww8HQmBgKP8T4T6BTp1SLxxIo=
|
||||
github.com/shirou/gopsutil/v3 v3.23.3 h1:Syt5vVZXUDXPEXpIBt5ziWsJ4LdSAAxF4l/xZeQgSEE=
|
||||
github.com/shirou/gopsutil/v3 v3.23.3/go.mod h1:lSBNN6t3+D6W5e5nXTxc8KIMMVxAcS+6IJlffjRRlMU=
|
||||
github.com/shoenig/go-m1cpu v0.1.4/go.mod h1:Wwvst4LR89UxjeFtLRMrpgRiyY4xPsejnVZym39dbAQ=
|
||||
github.com/shoenig/go-m1cpu v0.1.5 h1:LF57Z/Fpb/WdGLjt2HZilNnmZOxg/q2bSKTQhgbrLrQ=
|
||||
github.com/shoenig/go-m1cpu v0.1.5/go.mod h1:Wwvst4LR89UxjeFtLRMrpgRiyY4xPsejnVZym39dbAQ=
|
||||
github.com/shoenig/test v0.6.3 h1:GVXWJFk9PiOjN0KoJ7VrJGH6uLPnqxR7/fe3HUPfE0c=
|
||||
github.com/shoenig/test v0.6.3/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
|
||||
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
|
||||
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
|
||||
@@ -51,17 +58,20 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR
|
||||
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/exp v0.0.0-20230202163644-54bba9f4231b h1:EqBVA+nNsObCwQoBEHy4wLU0pi7i8a4AL3pbItPdPkE=
|
||||
golang.org/x/exp v0.0.0-20230202163644-54bba9f4231b/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
||||
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug=
|
||||
golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.5.0 h1:5JMiNunQeQw++mMOz48/ISeNu3Iweh/JaZU8ZLqHRrI=
|
||||
golang.org/x/image v0.5.0/go.mod h1:FVC7BI/5Ym8R25iw5OLsgshdUBbT1h5jZTpA+mvAdZ4=
|
||||
golang.org/x/image v0.7.0 h1:gzS29xtG1J5ybQlv0PuyfE3nmc6R4qB73m6LUUmvFuw=
|
||||
golang.org/x/image v0.7.0/go.mod h1:nd/q4ef1AKKYl/4kft7g+6UyGbdiqWqTP1ZAbRoV7Rg=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -70,17 +80,22 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
|
||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
"kitty/tools/utils/paths"
|
||||
"kitty/tools/utils/shlex"
|
||||
|
||||
"github.com/bmatcuk/doublestar"
|
||||
"github.com/bmatcuk/doublestar/v4"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
@@ -145,7 +145,7 @@ func resolve_file_spec(spec string, is_glob bool) ([]string, error) {
|
||||
ans = paths_ctx.AbspathFromHome(ans)
|
||||
}
|
||||
if is_glob {
|
||||
files, err := doublestar.Glob(ans)
|
||||
files, err := doublestar.FilepathGlob(ans)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%s is not a valid glob pattern with error: %w", spec, err)
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ def option_text() -> str:
|
||||
--glob
|
||||
type=bool-set
|
||||
Interpret file arguments as glob patterns. Globbing is based on
|
||||
Based on standard wildcards with the addition that ``/**/`` matches any number of directories.
|
||||
standard wildcards with the addition that ``/**/`` matches any number of directories.
|
||||
See the :link:`detailed syntax <https://github.com/bmatcuk/doublestar#patterns>`.
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ variables and ~ are not expanded.
|
||||
--exclude
|
||||
type=list
|
||||
A glob pattern. Files with names matching this pattern are excluded from being
|
||||
transferred. Useful when adding directories. Can
|
||||
transferred. Only used when copying directories. Can
|
||||
be specified multiple times, if any of the patterns match the file will be
|
||||
excluded. If the pattern includes a :code:`/` then it will match against the full
|
||||
path, not just the filename. In such patterns you can use :code:`/**/` to match zero
|
||||
|
||||
@@ -960,7 +960,7 @@ cocoa_set_dock_icon(PyObject UNUSED *self, PyObject *args) {
|
||||
static NSSound *beep_sound = nil;
|
||||
|
||||
static void
|
||||
cleanup() {
|
||||
cleanup(void) {
|
||||
@autoreleasepool {
|
||||
|
||||
if (dockMenu) [dockMenu release];
|
||||
|
||||
@@ -22,7 +22,7 @@ class Version(NamedTuple):
|
||||
|
||||
appname: str = 'kitty'
|
||||
kitty_face = '🐱'
|
||||
version: Version = Version(0, 28, 0)
|
||||
version: Version = Version(0, 28, 1)
|
||||
str_version: str = '.'.join(map(str, version))
|
||||
_plat = sys.platform.lower()
|
||||
is_macos: bool = 'darwin' in _plat
|
||||
|
||||
@@ -155,7 +155,7 @@ font_descriptor_from_python(PyObject *src) {
|
||||
static CTFontCollectionRef all_fonts_collection_data = NULL;
|
||||
|
||||
static CTFontCollectionRef
|
||||
all_fonts_collection() {
|
||||
all_fonts_collection(void) {
|
||||
if (all_fonts_collection_data == NULL) all_fonts_collection_data = CTFontCollectionCreateFromAvailableFonts(NULL);
|
||||
return all_fonts_collection_data;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ user_cache_dir(void) {
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
process_group_map() {
|
||||
process_group_map(void) {
|
||||
int num_of_processes = proc_listallpids(NULL, 0);
|
||||
size_t bufsize = sizeof(pid_t) * (num_of_processes + 1024);
|
||||
FREE_AFTER_FUNCTION pid_t *buf = malloc(bufsize);
|
||||
|
||||
@@ -332,7 +332,7 @@ exec_kitten(int argc, char *argv[], char *exe_dir) {
|
||||
newargv[argc] = 0;
|
||||
newargv[0] = "kitten";
|
||||
errno = 0;
|
||||
execv(exe, argv);
|
||||
execv(exe, newargv);
|
||||
fprintf(stderr, "Failed to execute kitten (%s) with error: %s\n", exe, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ cwd_of_process(PyObject *self UNUSED, PyObject *pid_) {
|
||||
|
||||
// Read the maximum argument size for processes
|
||||
static int
|
||||
get_argmax() {
|
||||
get_argmax(void) {
|
||||
int argmax;
|
||||
int mib[] = { CTL_KERN, KERN_ARGMAX };
|
||||
size_t size = sizeof(argmax);
|
||||
|
||||
@@ -154,6 +154,7 @@ def run_website(args: Any) -> None:
|
||||
f.write(version)
|
||||
shutil.copy2(os.path.join(docs_dir, 'installer.sh'), publish_dir)
|
||||
os.chdir(os.path.dirname(publish_dir))
|
||||
subprocess.check_call(['optipng', '-o7', 'kitty/_images/social_previews/*.png'])
|
||||
subprocess.check_call(['git', 'add', 'kitty'])
|
||||
subprocess.check_call(['git', 'commit', '-m', 'kitty website updates'])
|
||||
subprocess.check_call(['git', 'push'])
|
||||
|
||||
2
setup.py
2
setup.py
@@ -816,8 +816,6 @@ def compile_kittens(compilation_database: CompilationDatabase) -> None:
|
||||
return kitten, sources, headers, f'kittens/{kitten}/{output}', includes, libraries
|
||||
|
||||
for kitten, sources, all_headers, dest, includes, libraries in (
|
||||
files('unicode_input', 'unicode_names'),
|
||||
files('diff', 'diff_speedup'),
|
||||
files('transfer', 'rsync', libraries=('rsync',)),
|
||||
):
|
||||
final_env = kenv.copy()
|
||||
|
||||
@@ -532,10 +532,11 @@ func parse_theme_metadata(path string) (*ThemeMetadata, map[string]string, error
|
||||
type Theme struct {
|
||||
metadata *ThemeMetadata
|
||||
|
||||
code string
|
||||
settings map[string]string
|
||||
zip_reader *zip.File
|
||||
is_user_defined bool
|
||||
code string
|
||||
settings map[string]string
|
||||
zip_reader *zip.File
|
||||
is_user_defined bool
|
||||
path_for_user_defined_theme string
|
||||
}
|
||||
|
||||
func (self *Theme) Name() string { return self.metadata.Name }
|
||||
@@ -558,6 +559,13 @@ func (self *Theme) load_code() (string, error) {
|
||||
}
|
||||
self.code = utils.UnsafeBytesToString(data)
|
||||
}
|
||||
if self.is_user_defined && self.path_for_user_defined_theme != "" && self.code == "" {
|
||||
raw, err := os.ReadFile(self.path_for_user_defined_theme)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
self.code = utils.UnsafeBytesToString(raw)
|
||||
}
|
||||
return self.code, nil
|
||||
}
|
||||
|
||||
@@ -813,7 +821,7 @@ func (self *Themes) AddFromFile(path string) (*Theme, error) {
|
||||
if m.Name == "" {
|
||||
m.Name = theme_name_from_file_name(filepath.Base(path))
|
||||
}
|
||||
t := Theme{metadata: m, is_user_defined: true, settings: conf}
|
||||
t := Theme{metadata: m, is_user_defined: true, settings: conf, path_for_user_defined_theme: path}
|
||||
self.name_map[m.Name] = &t
|
||||
return &t, nil
|
||||
|
||||
@@ -829,7 +837,13 @@ func (self *Themes) add_from_dir(dirpath string) error {
|
||||
}
|
||||
for _, e := range entries {
|
||||
if !e.IsDir() && strings.HasSuffix(e.Name(), ".conf") {
|
||||
if _, err = self.AddFromFile(filepath.Join(dirpath, e.Name())); err != nil {
|
||||
path := filepath.Join(dirpath, e.Name())
|
||||
// ignore files if they are the STDOUT of the current processes
|
||||
// allows using kitten theme --dump-theme name > ~/.config/kitty/themes/name.conf
|
||||
if utils.Samefile(path, os.Stdout) {
|
||||
continue
|
||||
}
|
||||
if _, err = self.AddFromFile(path); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,26 +140,30 @@ func KeyEventFromCSI(csi string) *KeyEvent {
|
||||
csi = csi[:len(csi)-1]
|
||||
sections := strings.Split(csi, ";")
|
||||
|
||||
get_sub_sections := func(section string) []int {
|
||||
get_sub_sections := func(section string, missing int) []int {
|
||||
p := strings.Split(section, ":")
|
||||
ans := make([]int, len(p))
|
||||
for i, x := range p {
|
||||
q, err := strconv.Atoi(x)
|
||||
if err != nil {
|
||||
return nil
|
||||
if x == "" {
|
||||
ans[i] = missing
|
||||
} else {
|
||||
q, err := strconv.Atoi(x)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
ans[i] = q
|
||||
}
|
||||
ans[i] = q
|
||||
}
|
||||
return ans
|
||||
}
|
||||
first_section := get_sub_sections(sections[0])
|
||||
second_section := make([]int, 0)
|
||||
third_section := make([]int, 0)
|
||||
first_section := get_sub_sections(sections[0], 0)
|
||||
second_section := []int{}
|
||||
third_section := []int{}
|
||||
if len(sections) > 1 {
|
||||
second_section = get_sub_sections(sections[1])
|
||||
second_section = get_sub_sections(sections[1], 1)
|
||||
}
|
||||
if len(sections) > 2 {
|
||||
third_section = get_sub_sections(sections[2])
|
||||
third_section = get_sub_sections(sections[2], 0)
|
||||
}
|
||||
var ans = KeyEvent{Type: PRESS}
|
||||
var keynum int
|
||||
|
||||
30
tools/tui/loop/key-encoding_test.go
Normal file
30
tools/tui/loop/key-encoding_test.go
Normal file
@@ -0,0 +1,30 @@
|
||||
// License: GPLv3 Copyright: 2023, Kovid Goyal, <kovid at kovidgoyal.net>
|
||||
|
||||
package loop
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
|
||||
func TestKeyEventFromCSI(t *testing.T) {
|
||||
|
||||
test_text := func(csi string, expected, alternate string) {
|
||||
ev := KeyEventFromCSI(csi)
|
||||
if ev == nil {
|
||||
t.Fatalf("Failed to get parse %#v", csi)
|
||||
}
|
||||
if diff := cmp.Diff(expected, ev.Text); diff != "" {
|
||||
t.Fatalf("Failed to get text from %#v:\n%s", csi, diff)
|
||||
}
|
||||
if diff := cmp.Diff(alternate, ev.AlternateKey); diff != "" {
|
||||
t.Fatalf("Failed to get alternate from %#v:\n%s", csi, diff)
|
||||
}
|
||||
}
|
||||
test_text("121;;121u", "y", "")
|
||||
test_text("121::122;;121u", "y", "z")
|
||||
}
|
||||
@@ -4,6 +4,7 @@ package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"golang.org/x/exp/constraints"
|
||||
"golang.org/x/exp/slices"
|
||||
@@ -153,3 +154,50 @@ func Memset[T any](dest []T, pattern ...T) []T {
|
||||
}
|
||||
return dest
|
||||
}
|
||||
|
||||
type statable interface {
|
||||
Stat() (os.FileInfo, error)
|
||||
}
|
||||
|
||||
func Samefile(a, b any) bool {
|
||||
var sta, stb os.FileInfo
|
||||
var err error
|
||||
switch v := a.(type) {
|
||||
case string:
|
||||
sta, err = os.Stat(v)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
case statable:
|
||||
sta, err = v.Stat()
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
case *os.FileInfo:
|
||||
sta = *v
|
||||
case os.FileInfo:
|
||||
sta = v
|
||||
default:
|
||||
panic(fmt.Sprintf("a must be a string, os.FileInfo or a stat-able object not %T", v))
|
||||
}
|
||||
switch v := b.(type) {
|
||||
case string:
|
||||
stb, err = os.Stat(v)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
case statable:
|
||||
stb, err = v.Stat()
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
case *os.FileInfo:
|
||||
stb = *v
|
||||
case os.FileInfo:
|
||||
stb = v
|
||||
default:
|
||||
panic(fmt.Sprintf("b must be a string, os.FileInfo or a stat-able object not %T", v))
|
||||
}
|
||||
|
||||
return os.SameFile(sta, stb)
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# vim:fileencoding=utf-8
|
||||
# License: GPL v3 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
import atexit
|
||||
import glob
|
||||
import os
|
||||
import shlex
|
||||
@@ -9,8 +10,6 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import atexit
|
||||
|
||||
|
||||
if False:
|
||||
dmg = sys.argv[-1]
|
||||
|
||||
Reference in New Issue
Block a user