Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kitty for openSUSE:Factory checked in at 2021-05-06 22:52:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kitty (Old) and /work/SRC/openSUSE:Factory/.kitty.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kitty" Thu May 6 22:52:45 2021 rev:4 rq:890909 version:0.20.3 Changes: -------- --- /work/SRC/openSUSE:Factory/kitty/kitty.changes 2021-04-29 01:39:37.070681934 +0200 +++ /work/SRC/openSUSE:Factory/.kitty.new.2988/kitty.changes 2021-05-06 22:53:20.406573112 +0200 @@ -1,0 +2,14 @@ +Thu May 6 07:44:39 UTC 2021 - Michael Vetter <mvet...@suse.com> + +- Update to 0.20.3: + * A new show_key kitten to easily see the bytes generated by the + terminal for key presses in the various keyboard modes (#3556) + * Linux: Fix keyboard layout change keys defined via compose + rules not being ignored + * Fix tab activity symbol not appearing if no other changes happen + in tab bar even when there is activity in a tab (#3571) + * Fix focus changes not being sent to windows when focused window + changes because of the previously focused window being + closed (#3571) + +------------------------------------------------------------------- Old: ---- kitty-0.20.2.tar.gz New: ---- kitty-0.20.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kitty.spec ++++++ --- /var/tmp/diff_new_pack.s7Nj7w/_old 2021-05-06 22:53:20.946570885 +0200 +++ /var/tmp/diff_new_pack.s7Nj7w/_new 2021-05-06 22:53:20.946570885 +0200 @@ -17,7 +17,7 @@ Name: kitty -Version: 0.20.2 +Version: 0.20.3 Release: 0 Summary: A GPU-based terminal emulator License: GPL-3.0-only @@ -90,7 +90,7 @@ %if 0%{?sle_version} > 150100 || 0%{?suse_version} >= 1550 %{_mandir}/man1/%{name}.1%{?ext_man} %{_datadir}/doc/%{name} -%{_mandir}/man1/kitty.conf.5%{?ext_man} +%{_mandir}/man5/kitty.conf.5%{?ext_man} %endif %changelog ++++++ kitty-0.20.2.tar.gz -> kitty-0.20.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/bypy/init_env.py new/kitty-0.20.3/bypy/init_env.py --- old/kitty-0.20.2/bypy/init_env.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/bypy/init_env.py 2021-05-06 04:41:41.000000000 +0200 @@ -46,9 +46,12 @@ return subprocess.call(list(args), env=env, cwd=cwd) +SETUP_CMD = [PYTHON, 'setup.py', '--build-universal-binary'] + + def build_frozen_launcher(extra_include_dirs): inc_dirs = [f'--extra-include-dirs={x}' for x in extra_include_dirs] - cmd = [PYTHON, 'setup.py', '--prefix', build_frozen_launcher.prefix] + inc_dirs + ['build-frozen-launcher'] + cmd = SETUP_CMD + ['--prefix', build_frozen_launcher.prefix] + inc_dirs + ['build-frozen-launcher'] if run(*cmd, cwd=build_frozen_launcher.writeable_src_dir) != 0: print('Building of frozen kitty launcher failed', file=sys.stderr) os.chdir(KITTY_DIR) @@ -89,7 +92,7 @@ with suppress(FileNotFoundError): os.unlink(os.path.join(writeable_src_dir, 'kitty', 'launcher', 'kitty')) - cmd = [PYTHON, 'setup.py', 'macos-freeze' if ismacos else 'linux-freeze'] + cmd = SETUP_CMD + ['macos-freeze' if ismacos else 'linux-freeze'] if args.dont_strip: cmd.append('--debug') dest = kitty_constants['appname'] + ('.app' if ismacos else '') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/bypy/macos/__main__.py new/kitty-0.20.3/bypy/macos/__main__.py --- old/kitty-0.20.2/bypy/macos/__main__.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/bypy/macos/__main__.py 2021-05-06 04:41:41.000000000 +0200 @@ -278,7 +278,6 @@ 'lcms2.2', 'crypto.1.1', 'ssl.1.1', - 'ffi.7', ): print('\nAdding', x) x = 'lib%s.dylib' % x @@ -420,7 +419,7 @@ py_compile(join(self.resources_dir, 'Python')) @flush - def makedmg(self, d, volname, internet_enable=True, format='ULFO'): + def makedmg(self, d, volname, format='ULFO'): ''' Copy a directory d into a dmg named volname ''' print('\nMaking dmg...') sys.stdout.flush() @@ -456,9 +455,6 @@ print('\nCreating dmg...') with timeit() as times: subprocess.check_call(cmd + [dmg]) - if internet_enable: - subprocess.check_call( - ['/usr/bin/hdiutil', 'internet-enable', '-yes', dmg]) print('dmg created in %d minutes and %d seconds' % tuple(times)) shutil.rmtree(tdir) size = os.stat(dmg).st_size / (1024 * 1024.) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/bypy/macos.conf new/kitty-0.20.3/bypy/macos.conf --- old/kitty-0.20.2/bypy/macos.conf 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/bypy/macos.conf 2021-05-06 04:41:41.000000000 +0200 @@ -1,6 +1,8 @@ # Requires installation of XCode 10.3 and Python 3 and # python3 -m pip install certifi -vm_name 'macos-kitty-build' +vm_name 'macos-kitty' root '/Users/Shared/kitty-build' python '/usr/local/bin/python3' +universal 'true' +deploy_target '10.14' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/bypy/sources.json new/kitty-0.20.3/bypy/sources.json --- old/kitty-0.20.2/bypy/sources.json 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/bypy/sources.json 2021-05-06 04:41:41.000000000 +0200 @@ -28,6 +28,16 @@ } }, + { + "name": "cmake", + "os": "macos", + "unix": { + "filename": "cmake-3.19.4.tar.gz", + "hash": "sha256:7d0232b9f1c57e8de81f38071ef8203e6820fe7eec8ae46a1df125d88dbcc2e1", + "urls": ["https://cmake.org/files/v3.19/{filename}"] + } + }, + { "name": "expat", @@ -72,6 +82,7 @@ { "name": "libffi", + "os": "linux", "unix": { "filename": "libffi-3.3.0.tar.gz", "hash": "sha256:72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056", @@ -130,9 +141,9 @@ { "name": "python", "unix": { - "filename": "Python-3.9.1.tar.xz", - "hash": "sha256:991c3f8ac97992f3d308fefeb03a64db462574eadbff34ce8bc5bb583d9903ff", - "urls": ["https://www.python.org/ftp/python/3.9.1/{filename}"] + "filename": "Python-3.9.4.tar.xz", + "hash": "sha256:4b0e6644a76f8df864ae24ac500a51bbf68bd098f6a173e27d3b61cdca9aa134", + "urls": ["https://www.python.org/ftp/python/3.9.4/{filename}"] } }, @@ -154,16 +165,6 @@ } }, - { - "name": "cmake", - "os": "macos", - "unix": { - "filename": "cmake-3.19.4.tar.gz", - "hash": "sha256:7d0232b9f1c57e8de81f38071ef8203e6820fe7eec8ae46a1df125d88dbcc2e1", - "urls": ["https://cmake.org/files/v3.19/{filename}"] - } - }, - { "name": "libpng", "unix": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/docs/changelog.rst new/kitty-0.20.3/docs/changelog.rst --- old/kitty-0.20.2/docs/changelog.rst 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/docs/changelog.rst 2021-05-06 04:41:41.000000000 +0200 @@ -4,6 +4,27 @@ |kitty| is a feature-rich, cross-platform, *fast*, GPU based terminal. To update |kitty|, :doc:`follow the instructions <binary>`. +0.20.3 [2021-05-06] +---------------------- + +- macOS: Distribute universal binaries with both ARM and Intel architectures + +- A new ``show_key`` kitten to easily see the bytes generated by the terminal + for key presses in the various keyboard modes (:pull:`3556`) + +- Linux: Fix keyboard layout change keys defined via compose rules not being + ignored + +- macOS: Fix Spotlight search of global menu not working in non-English locales + (:pull:`3567`) + +- Fix tab activity symbol not appearing if no other changes happen in tab bar even when + there is activity in a tab (:iss:`3571`) + +- Fix focus changes not being sent to windows when focused window changes + because of the previously focused window being closed (:iss:`3571`) + + 0.20.2 [2021-04-28] ---------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/docs/faq.rst new/kitty-0.20.3/docs/faq.rst --- old/kitty-0.20.2/docs/faq.rst 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/docs/faq.rst 2021-05-06 04:41:41.000000000 +0200 @@ -4,6 +4,7 @@ .. highlight:: sh .. contents:: + :local: Some special symbols are rendered small/truncated in kitty? ----------------------------------------------------------- @@ -229,23 +230,11 @@ map alt+s send_text all \x13 This maps :kbd:`alt+s` to :kbd:`ctrl+s`. To figure out what bytes to use for -the :sc:`send_text <send_text>` you can use the ``showkey`` utility. Run:: +the :sc:`send_text <send_text>` you can use the ``show_key`` kitten. Run:: - showkey -a + kitty +kitten show_key -Then press the key you want to emulate. On macOS, this utility is currently not -available. The manual way to figure it out is: - - 1. Look up your key's decimal value in the table at the bottom of `this - page <http://ascii-table.com/ansi-escape-sequences.php>`_ or any - ANSI escape sequence table. There are different modifiers for :kbd:`ctrl`, - :kbd:`alt`, etc. For e.g., for :kbd:`ctrl+s`, find the ``S`` row and look at - the third column value, ``19``. - - 2. Convert the decimal value to hex with ``kitty +runpy "print(hex(19))"``. - This shows the hex value, ``13`` in this case. - - 3. Use ``\x(hexval)`` in your ``send_text`` command in kitty. So in this example, ``\x13`` +Then press the key you want to emulate. How do I open a new window or tab with the same working directory as the current window? -------------------------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/docs/graphics-protocol.rst new/kitty-0.20.3/docs/graphics-protocol.rst --- old/kitty-0.20.2/docs/graphics-protocol.rst 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/docs/graphics-protocol.rst 2021-05-06 04:41:41.000000000 +0200 @@ -46,6 +46,7 @@ .. contents:: + :local: Getting the window size diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/docs/index.rst new/kitty-0.20.3/docs/index.rst --- old/kitty-0.20.2/docs/index.rst 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/docs/index.rst 2021-05-06 04:41:41.000000000 +0200 @@ -49,6 +49,12 @@ Screenshot, showing vim, tig and git running in |kitty| with the 'Tall' layout + +.. contents:: + :local: + :depth: 1 + + .. _quickstart: Quickstart @@ -75,9 +81,6 @@ :doc:`Invocation <invocation>` for the command line arguments |kitty| supports. -.. contents:: - - Design philosophy ------------------- @@ -109,7 +112,7 @@ A layout is an arrangement of multiple kitty *windows* inside a top-level OS window. You can create a new window using the :sc:`new_window` key combination. -Currently, there are six layouts available: +Currently, there are seven layouts available: * **Fat** -- One (or optionally more) windows are shown full width on the top, the rest of the windows are shown side-by-side on the bottom * **Grid** -- All windows are shown in a grid diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/docs/keyboard-protocol.rst new/kitty-0.20.3/docs/keyboard-protocol.rst --- old/kitty-0.20.2/docs/keyboard-protocol.rst 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/docs/keyboard-protocol.rst 2021-05-06 04:41:41.000000000 +0200 @@ -28,7 +28,7 @@ You can see this protocol with all enhancements in action by running:: - kitty +kitten key_demo + kitty +kitten show_key -m kitty inside the kitty terminal to report key events. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/docs/kittens/diff.rst new/kitty-0.20.3/docs/kittens/diff.rst --- old/kitty-0.20.2/docs/kittens/diff.rst 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/docs/kittens/diff.rst 2021-05-06 04:41:41.000000000 +0200 @@ -26,6 +26,7 @@ Screenshot, showing a sample diff .. contents:: + :local: Installation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/docs/layouts.rst new/kitty-0.20.3/docs/layouts.rst --- old/kitty-0.20.2/docs/layouts.rst 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/docs/layouts.rst 2021-05-06 04:41:41.000000000 +0200 @@ -28,6 +28,7 @@ the default. Individual layouts and how to use them are described below. .. contents:: + :local: The Stack Layout diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/docs/open_actions.rst new/kitty-0.20.3/docs/open_actions.rst --- old/kitty-0.20.2/docs/open_actions.rst 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/docs/open_actions.rst 2021-05-06 04:41:41.000000000 +0200 @@ -63,7 +63,7 @@ ------------------ An entry in :file:`open-actions.conf` must have one or more matching criteria. -URLs that match all criteria for an entry will trigger that entries' actions. +URLs that match all criteria for an entry will trigger that entry's actions. Processing stops at the first matching entry, so put more specific matching criteria at the start of the list. Entries in the file are separated by blank lines. The various available criteria are: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/docs/protocol-extensions.rst new/kitty-0.20.3/docs/protocol-extensions.rst --- old/kitty-0.20.2/docs/protocol-extensions.rst 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/docs/protocol-extensions.rst 2021-05-06 04:41:41.000000000 +0200 @@ -16,9 +16,11 @@ thereby hopefully encouraging their widespread adoption. If you wish to discuss these extensions, propose additions/changes to them -please do so by opening issues in the github bug tracker. +please do so by opening issues in the `GitHub +<https://github.com/kovidgoyal/kitty/issues>`_ bug tracker. .. contents:: + :local: Colored and styled underlines ------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/glfw/xkb_glfw.c new/kitty-0.20.3/glfw/xkb_glfw.c --- old/kitty-0.20.2/glfw/xkb_glfw.c 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/glfw/xkb_glfw.c 2021-05-06 04:41:41.000000000 +0200 @@ -702,6 +702,11 @@ last_handled_press_keycode = ev->glfw_ev.native_key; } +static bool +is_switch_layout_key(xkb_keysym_t xkb_sym) { + return xkb_sym == XKB_KEY_ISO_First_Group || xkb_sym == XKB_KEY_ISO_Last_Group || xkb_sym == XKB_KEY_ISO_Next_Group || xkb_sym == XKB_KEY_ISO_Prev_Group || xkb_sym == XKB_KEY_Mode_switch; +} + void glfw_xkb_handle_key_event(_GLFWwindow *window, _GLFWXKBData *xkb, xkb_keycode_t xkb_keycode, int action) { static char key_text[64] = {0}; @@ -745,7 +750,7 @@ xkb_mod_mask_t consumed_unknown_mods = xkb_state_key_get_consumed_mods(sg->state, code_for_sym) & sg->activeUnknownModifiers; if (sg->activeUnknownModifiers) debug("%s", format_xkb_mods(xkb, "active_unknown_mods", sg->activeUnknownModifiers)); if (consumed_unknown_mods) { debug("%s", format_xkb_mods(xkb, "consumed_unknown_mods", consumed_unknown_mods)); } - else xkb_sym = clean_syms[0]; + else if (!is_switch_layout_key(xkb_sym)) xkb_sym = clean_syms[0]; // xkb returns text even if alt and/or super are pressed if ( ((GLFW_MOD_CONTROL | GLFW_MOD_ALT | GLFW_MOD_SUPER | GLFW_MOD_HYPER | GLFW_MOD_META) & sg->modifiers) == 0) { xkb_state_key_get_utf8(sg->state, code_for_sym, key_text, sizeof(key_text)); @@ -757,9 +762,7 @@ } if (key_text[0]) { debug("%s: %s ", text_type, key_text); } } - if (xkb_sym == XKB_KEY_ISO_First_Group || xkb_sym == XKB_KEY_ISO_Last_Group || xkb_sym == XKB_KEY_ISO_Next_Group || xkb_sym == XKB_KEY_ISO_Prev_Group || xkb_sym == XKB_KEY_Mode_switch) { - return; - } + if (is_switch_layout_key(xkb_sym)) { debug(" is a keyboard layout shift key, ignoring.\n"); return; } if (sg->modifiers & GLFW_MOD_NUM_LOCK && XKB_KEY_KP_Space <= xkb_sym && xkb_sym <= XKB_KEY_KP_9) { xkb_sym = xkb_state_key_get_one_sym(sg->state, code_for_sym); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kittens/key_demo/main.py new/kitty-0.20.3/kittens/key_demo/main.py --- old/kitty-0.20.2/kittens/key_demo/main.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kittens/key_demo/main.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,80 +0,0 @@ -#!/usr/bin/env python3 -# vim:fileencoding=utf-8 -# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net> - -import sys -from typing import List - -from kitty.key_encoding import ( - ALT, CAPS_LOCK, CTRL, HYPER, META, NUM_LOCK, PRESS, RELEASE, REPEAT, SHIFT, - SUPER, KeyEvent, encode_key_event -) - -from ..tui.handler import Handler -from ..tui.loop import Loop - - -class KeysHandler(Handler): - - def initialize(self) -> None: - self.cmd.set_window_title('Kitty extended keyboard protocol demo') - self.cmd.set_cursor_visible(False) - self.print('Press any keys - Ctrl+C or Ctrl+D will terminate') - - def on_key_event(self, key_event: KeyEvent, in_bracketed_paste: bool = False) -> None: - etype = { - PRESS: 'PRESS', - REPEAT: 'REPEAT', - RELEASE: 'RELEASE' - }[key_event.type] - lmods = [] - for m, name in { - SHIFT: 'Shift', - ALT: 'Alt', - CTRL: 'Ctrl', - SUPER: 'Super', - HYPER: 'Hyper', - META: 'Meta', - NUM_LOCK: 'NumLock', - CAPS_LOCK: 'CapsLock', - }.items(): - if key_event.mods & m: - lmods.append(name) - mods = '+'.join(lmods) - if mods: - mods += '+' - key = f'{mods}{key_event.key} ' - self.cmd.colored(key, 'green') - self.cmd.colored(etype + ' ', 'yellow') - self.cmd.styled(key_event.text, italic=True) - self.print() - rep = 'CSI ' + encode_key_event(key_event)[2:] - rep = rep.replace(';', ' ; ').replace(':', ' : ')[:-1] + ' ' + rep[-1] - self.cmd.styled(rep, fg='magenta') - if (key_event.shifted_key or key_event.alternate_key): - self.print() - if key_event.shifted_key: - self.cmd.colored('Shifted key: ', 'gray') - self.print(key_event.shifted_key + ' ', end='') - if key_event.alternate_key: - self.cmd.colored('Alternate key: ', 'gray') - self.print(key_event.alternate_key + ' ', end='') - self.print() - self.print() - - def on_interrupt(self) -> None: - self.quit_loop(0) - - def on_eot(self) -> None: - self.quit_loop(0) - - -def main(args: List[str]) -> None: - loop = Loop() - handler = KeysHandler() - loop.loop(handler) - raise SystemExit(loop.return_code) - - -if __name__ == '__main__': - main(sys.argv) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kittens/show_key/kitty_mode.py new/kitty-0.20.3/kittens/show_key/kitty_mode.py --- old/kitty-0.20.2/kittens/show_key/kitty_mode.py 1970-01-01 01:00:00.000000000 +0100 +++ new/kitty-0.20.3/kittens/show_key/kitty_mode.py 2021-05-06 04:41:41.000000000 +0200 @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +# vim:fileencoding=utf-8 +# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net> + +from kitty.key_encoding import ( + ALT, CAPS_LOCK, CTRL, HYPER, META, NUM_LOCK, PRESS, RELEASE, REPEAT, SHIFT, + SUPER, KeyEvent, encode_key_event +) + +from kittens.tui.handler import Handler +from kittens.tui.loop import Loop + + +class KeysHandler(Handler): + + def initialize(self) -> None: + self.cmd.set_window_title('Kitty extended keyboard protocol demo') + self.cmd.set_cursor_visible(False) + self.print('Press any keys - Ctrl+C or Ctrl+D will terminate') + + def on_key_event(self, key_event: KeyEvent, in_bracketed_paste: bool = False) -> None: + etype = { + PRESS: 'PRESS', + REPEAT: 'REPEAT', + RELEASE: 'RELEASE' + }[key_event.type] + lmods = [] + for m, name in { + SHIFT: 'Shift', + ALT: 'Alt', + CTRL: 'Ctrl', + SUPER: 'Super', + HYPER: 'Hyper', + META: 'Meta', + NUM_LOCK: 'NumLock', + CAPS_LOCK: 'CapsLock', + }.items(): + if key_event.mods & m: + lmods.append(name) + mods = '+'.join(lmods) + if mods: + mods += '+' + key = f'{mods}{key_event.key} ' + self.cmd.colored(key, 'green') + self.cmd.colored(etype + ' ', 'yellow') + self.cmd.styled(key_event.text, italic=True) + self.print() + rep = 'CSI ' + encode_key_event(key_event)[2:] + rep = rep.replace(';', ' ; ').replace(':', ' : ')[:-1] + ' ' + rep[-1] + self.cmd.styled(rep, fg='magenta') + if (key_event.shifted_key or key_event.alternate_key): + self.print() + if key_event.shifted_key: + self.cmd.colored('Shifted key: ', 'gray') + self.print(key_event.shifted_key + ' ', end='') + if key_event.alternate_key: + self.cmd.colored('Alternate key: ', 'gray') + self.print(key_event.alternate_key + ' ', end='') + self.print() + self.print() + + def on_interrupt(self) -> None: + self.quit_loop(0) + + def on_eot(self) -> None: + self.quit_loop(0) + + +def main() -> None: + loop = Loop() + handler = KeysHandler() + loop.loop(handler) + raise SystemExit(loop.return_code) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kittens/show_key/main.py new/kitty-0.20.3/kittens/show_key/main.py --- old/kitty-0.20.2/kittens/show_key/main.py 1970-01-01 01:00:00.000000000 +0100 +++ new/kitty-0.20.3/kittens/show_key/main.py 2021-05-06 04:41:41.000000000 +0200 @@ -0,0 +1,81 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 +# License: GPLv3 Copyright: 2021, Kovid Goyal <kovid at kovidgoyal.net> + + +import os +import sys +from typing import List + +from kitty.cli import parse_args +from kitty.cli_stub import ShowKeyCLIOptions +from kittens.tui.operations import raw_mode, styled + +ctrl_keys = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_' + + +def print_key(raw: bytearray) -> None: + unix = '' + for ch in raw: + if ch < len(ctrl_keys): + unix += '^' + ctrl_keys[ch] + elif ch == 127: + unix += '^?' + else: + unix += chr(ch) + print(unix + '\t\t', end='') + for ch in raw: + x = chr(ch).encode('ascii') + print(styled(repr(x)[2:-1], fg='yellow'), end='') + print(end='\r\n', flush=True) + + +def read_keys() -> None: + fd = sys.stdin.fileno() + while True: + try: + raw = bytearray(os.read(fd, 64)) + except OSError as err: + print(err, file=sys.stderr, flush=True) + break + if not raw: + break + print_key(raw) + if len(raw) == 1 and raw[0] == 4: + break + + +def legacy_main() -> None: + print('Press any keys - Ctrl-D will terminate this program', end='\r\n', flush=True) + print(styled('UNIX', italic=True, fg='green'), styled('send_text', italic=True, fg='green'), sep='\t\t', end='\r\n') + + with raw_mode(): + read_keys() + + +OPTIONS = r''' +--key-mode -m +default=normal +type=choices +choices=normal,application,kitty,unchanged +The keyboard mode to use when showing keys. "normal" mode is with DECCKM reset and "application" mode is with +DECCKM set. "kitty" is the full kitty extended keyboard protocol. +'''.format + + +def main(args: List[str]) -> None: + cli_opts, items = parse_args(args[1:], OPTIONS, '', '', 'kitty +kitten clipboard', result_class=ShowKeyCLIOptions) + if cli_opts.key_mode == 'kitty': + from .kitty_mode import main as kitty_main + return kitty_main() + if cli_opts.key_mode != 'unchanged': + print(end='\x1b[?1' + ('l' if cli_opts.key_mode == 'normal' else 'h'), flush=True) + try: + return legacy_main() + finally: + if cli_opts.key_mode != 'unchanged': + print(end='\x1b[?1l', flush=True) + + +if __name__ == '__main__': + main(sys.argv) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kitty/boss.py new/kitty-0.20.3/kitty/boss.py --- old/kitty-0.20.2/kitty/boss.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kitty/boss.py 2021-05-06 04:41:41.000000000 +0200 @@ -436,6 +436,7 @@ mark_os_window_for_close(src_tab.os_window_id) def on_child_death(self, window_id: int) -> None: + prev_active_window = self.active_window window = self.window_id_map.pop(window_id, None) if window is None: return @@ -464,6 +465,12 @@ import traceback traceback.print_exc() window.action_on_close = window.action_on_removal = None + window = self.active_window + if window is not prev_active_window: + if prev_active_window is not None: + prev_active_window.focus_changed(False) + if window is not None: + window.focus_changed(True) def close_window(self, window: Optional[Window] = None) -> None: window = window or self.active_window @@ -768,6 +775,12 @@ cocoa_set_menubar_title(w.title or '') tm.mark_tab_bar_dirty() + def on_activity_since_last_focus(self, window: Window) -> None: + os_window_id = window.os_window_id + tm = self.os_window_map.get(os_window_id) + if tm is not None: + tm.mark_tab_bar_dirty() + def update_tab_bar_data(self, os_window_id: int) -> None: tm = self.os_window_map.get(os_window_id) if tm is not None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kitty/cli_stub.py new/kitty-0.20.3/kitty/cli_stub.py --- old/kitty-0.20.2/kitty/cli_stub.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kitty/cli_stub.py 2021-05-06 04:41:41.000000000 +0200 @@ -13,7 +13,7 @@ LaunchCLIOptions = AskCLIOptions = ClipboardCLIOptions = DiffCLIOptions = CLIOptions HintsCLIOptions = IcatCLIOptions = PanelCLIOptions = ResizeCLIOptions = CLIOptions ErrorCLIOptions = UnicodeCLIOptions = RCOptions = RemoteFileCLIOptions = CLIOptions -QueryTerminalCLIOptions = BroadcastCLIOptions = CLIOptions +QueryTerminalCLIOptions = BroadcastCLIOptions = ShowKeyCLIOptions = CLIOptions def generate_stub() -> None: @@ -42,6 +42,9 @@ from kittens.clipboard.main import OPTIONS do(OPTIONS(), 'ClipboardCLIOptions') + from kittens.show_key.main import OPTIONS + do(OPTIONS(), 'ShowKeyCLIOptions') + from kittens.diff.main import OPTIONS do(OPTIONS(), 'DiffCLIOptions') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kitty/cocoa_window.m new/kitty-0.20.3/kitty/cocoa_window.m --- old/kitty-0.20.2/kitty/cocoa_window.m 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kitty/cocoa_window.m 2021-05-06 04:41:41.000000000 +0200 @@ -454,6 +454,7 @@ action:@selector(open_kitty_website_url:) keyEquivalent:@"?"] setTarget:global_menu_target]; + [NSApp setHelpMenu:helpMenu]; [helpMenu release]; [bar release]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kitty/config_data.py new/kitty-0.20.3/kitty/config_data.py --- old/kitty-0.20.2/kitty/config_data.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kitty/config_data.py 2021-05-06 04:41:41.000000000 +0200 @@ -1303,7 +1303,7 @@ ''')) o('macos_hide_from_tasks', False, long_text=_(''' -Hide the kitty window from running tasks (:kbd:`Option+Tab`) on macOS. +Hide the kitty window from running tasks (:kbd:`???+Tab`) on macOS. ''')) o('macos_quit_when_last_window_closed', False, long_text=_(''' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kitty/constants.py new/kitty-0.20.3/kitty/constants.py --- old/kitty-0.20.2/kitty/constants.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kitty/constants.py 2021-05-06 04:41:41.000000000 +0200 @@ -21,7 +21,7 @@ appname: str = 'kitty' kitty_face = '????' -version: Version = Version(0, 20, 2) +version: Version = Version(0, 20, 3) str_version: str = '.'.join(map(str, version)) _plat = sys.platform.lower() is_macos: bool = 'darwin' in _plat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kitty/fonts.c new/kitty-0.20.3/kitty/fonts.c --- old/kitty-0.20.2/kitty/fonts.c 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kitty/fonts.c 2021-05-06 04:41:41.000000000 +0200 @@ -325,33 +325,6 @@ *x = fg->sprite_tracker.xnum; *y = fg->sprite_tracker.ynum; *z = fg->sprite_tracker.z; } -void -clear_sprite_map(Font *font) { -#define CLEAR(s) s->filled = false; s->rendered = false; s->colored = false; s->glyph = 0; zero_at_ptr(&s->extra_glyphs); s->x = 0; s->y = 0; s->z = 0; s->ligature_index = 0; - SpritePosition *s; - for (size_t i = 0; i < arraysz(font->sprite_map); i++) { - s = font->sprite_map + i; - CLEAR(s); - while ((s = s->next)) { - CLEAR(s); - } - } -#undef CLEAR -} - -void -clear_special_glyph_cache(Font *font) { -#define CLEAR(s) s->data = 0; s->glyph = 0; - SpecialGlyphCache *s; - for (size_t i = 0; i < arraysz(font->special_glyph_cache); i++) { - s = font->special_glyph_cache + i; - CLEAR(s); - while ((s = s->next)) { - CLEAR(s); - } - } -#undef CLEAR -} static void sprite_tracker_set_layout(GPUSpriteTracker *sprite_tracker, unsigned int cell_width, unsigned int cell_height) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kitty/screen.c new/kitty-0.20.3/kitty/screen.c --- old/kitty-0.20.2/kitty/screen.c 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kitty/screen.c 2021-05-06 04:41:41.000000000 +0200 @@ -571,6 +571,7 @@ if (is_ignored_char(och)) return; if (!self->has_activity_since_last_focus && !self->has_focus) { self->has_activity_since_last_focus = true; + CALLBACK("on_activity_since_last_focus", NULL); } uint32_t ch = och < 256 ? self->g_charset[och] : och; bool is_cc = is_combining_char(ch); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kitty/tabs.py new/kitty-0.20.3/kitty/tabs.py --- old/kitty-0.20.2/kitty/tabs.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kitty/tabs.py 2021-05-06 04:41:41.000000000 +0200 @@ -755,10 +755,8 @@ def remove(self, tab: Tab) -> None: active_tab_before_removal = self.active_tab self._remove_tab(tab) - try: - active_tab_needs_to_change = self.active_tab is None or self.active_tab is tab - except IndexError: - active_tab_needs_to_change = True + active_tab = self.active_tab + active_tab_needs_to_change = (active_tab is None and (active_tab_before_removal is None or active_tab_before_removal is tab)) or active_tab is tab while True: try: self.active_tab_history.remove(tab.id) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kitty/window.py new/kitty-0.20.3/kitty/window.py --- old/kitty-0.20.2/kitty/window.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kitty/window.py 2021-05-06 04:41:41.000000000 +0200 @@ -612,6 +612,10 @@ def has_activity_since_last_focus(self) -> bool: return self.screen.has_activity_since_last_focus() + def on_activity_since_last_focus(self) -> None: + if self.opts.tab_activity_symbol: + get_boss().on_activity_since_last_focus(self) + def on_bell(self) -> None: if self.opts.command_on_bell and self.opts.command_on_bell != ['none']: import shlex diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/kitty_tests/__init__.py new/kitty-0.20.3/kitty_tests/__init__.py --- old/kitty-0.20.2/kitty_tests/__init__.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/kitty_tests/__init__.py 2021-05-06 04:41:41.000000000 +0200 @@ -51,6 +51,9 @@ self.notifications = [] self.open_urls = [] + def on_activity_since_last_focus(self) -> None: + pass + def filled_line_buf(ynum=5, xnum=5, cursor=Cursor()): ans = LineBuf(ynum, xnum) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/logo/attribution.txt new/kitty-0.20.3/logo/attribution.txt --- old/kitty-0.20.2/logo/attribution.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/kitty-0.20.3/logo/attribution.txt 2021-05-06 04:41:41.000000000 +0200 @@ -0,0 +1,8 @@ +Attribution +########### + +- Name: macOS Big Sur Icon Template +- Author: V??clav Van??ura +- Source: https://www.figma.com/community/file/857303226040719059 +- License: https://creativecommons.org/licenses/by/4.0/ +- Modification: Replaced the template logo with kitty's diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/logo/kitty-framed.svg new/kitty-0.20.3/logo/kitty-framed.svg --- old/kitty-0.20.2/logo/kitty-framed.svg 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/logo/kitty-framed.svg 2021-05-06 04:41:41.000000000 +0200 @@ -1,171 +1,33 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="256" - height="256" - viewBox="0 0 239.99999 239.99999" - id="svg2" - version="1.1" - inkscape:version="1.0.2 (e86c870879, 2021-01-15, custom)" - sodipodi:docname="kitty-framed.svg"> - <defs - id="defs4" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="2.8" - inkscape:cx="-88.462374" - inkscape:cy="123.36947" - inkscape:document-units="px" - inkscape:current-layer="layer1" - showgrid="false" - units="px" - inkscape:window-width="2560" - inkscape:window-height="1400" - inkscape:window-x="0" - inkscape:window-y="40" - inkscape:window-maximized="0" - inkscape:document-rotation="0" /> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - <dc:creator> - <cc:Agent> - <dc:title>Kovid Goyal</dc:title> - </cc:Agent> - </dc:creator> - <dc:rights> - <cc:Agent> - <dc:title /> - </cc:Agent> - </dc:rights> - <dc:publisher> - <cc:Agent> - <dc:title /> - </cc:Agent> - </dc:publisher> - <cc:license - rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" /> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/by-sa/4.0/"> - <cc:permits - rdf:resource="http://creativecommons.org/ns#Reproduction" /> - <cc:permits - rdf:resource="http://creativecommons.org/ns#Distribution" /> - <cc:requires - rdf:resource="http://creativecommons.org/ns#Notice" /> - <cc:requires - rdf:resource="http://creativecommons.org/ns#Attribution" /> - <cc:permits - rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> - <cc:requires - rdf:resource="http://creativecommons.org/ns#ShareAlike" /> - </cc:License> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1" - transform="translate(0,-812.36217)"> - <path - fill="none" - stroke="#000000" - stroke-width="1.68332" - d="m 120.00001,1052.3622 c 52.58333,0 81.8151,0 100.90756,-19.0924 19.09242,-19.0924 19.09242,-48.32422 19.09242,-100.9076 0,-52.58334 0,-81.81515 -19.09242,-100.90762 -19.09246,-19.09241 -48.32423,-19.09241 -100.90756,-19.09241 -52.583346,0 -81.815144,0 -100.907602,19.09241 C 0,850.54705 0,879.77886 0,932.3622 c 0,52.58338 0,81.8152 19.092408,100.9076 19.092458,19.0924 48.324256,19.0924 100.907602,19.0924 z" - id="path4-36" - style="fill:#dddddd;fill-opacity:1;stroke:none" /> - <g - id="g867" - transform="translate(0.16463248,0.18492414)"> - <rect - style="fill:#dddddd;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.86877;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4496" - width="100.44641" - height="161.55127" - x="72.823654" - y="850.13007" - ry="0" /> - <path - inkscape:connector-curvature="0" - d="M 67.895761,1029.7093 H 172.10422 a 7.0649814,7.0649814 0 0 0 7.06499,-7.065 V 918.43587 a 7.0649814,7.0649814 0 0 0 -7.06499,-7.06499 H 67.895761 a 7.0649814,7.0649814 0 0 0 -7.064982,7.06499 v 104.20843 a 7.0649814,7.0649814 0 0 0 7.064982,7.065 z m 55.813329,-38.3487 h 37.4444 a 4.23899,4.23899 0 0 1 0,8.47798 h -37.4444 a 4.23899,4.23899 0 0 1 0,-8.47798 z M 78.676916,945.65018 a 4.2389889,4.2389889 0 0 1 5.991104,-5.99111 l 26.47954,26.46541 a 4.2389889,4.2389889 0 0 1 0,5.99111 l -26.47954,26.47955 a 4.2389889,4.2389889 0 0 1 -5.991104,-5.9911 l 23.483984,-23.484 z" - id="path4" - style="stroke-width:1.413" /> - <path - d="m 96.085398,898.14342 c 1.881045,0 3.385879,-3.57421 3.385879,-8.16963 0,-4.59543 -1.504834,-8.16964 -3.385879,-8.16964 -1.881044,0 -3.385879,3.57421 -3.385879,8.16964 0,4.59542 1.504835,8.16963 3.385879,8.16963 z" - id="path4-3" - inkscape:connector-curvature="0" - style="clip-rule:evenodd;fill:#c0c81f;fill-opacity:1;fill-rule:evenodd;stroke-width:3.09914" /> - <path - d="m 193.12782,836.88644 c -4.59543,-4.85071 -25.53011,1.0212 -38.29517,8.93554 -9.95674,-5.10602 -21.95589,-8.16962 -34.72093,-8.16962 -13.02037,0 -25.01952,3.0636 -34.976266,8.16962 -12.765052,-7.91434 -33.95504,-14.04156 -38.295158,-8.93554 -4.595418,5.10602 3.318914,26.29601 12.765053,38.03987 0,0 0,0 0,0 -0.765903,3.0636 -1.276505,6.12722 -1.276505,9.44614 0,10.21204 4.340118,19.65818 11.743848,27.31721 h 42.124678 c -1.27651,-2.55301 0.51061,-4.08482 8.16963,-4.08482 7.65905,0.2553 9.19084,1.53181 8.16964,4.08482 h 42.12467 c 7.40374,-7.65903 11.74386,-17.36048 11.74386,-27.31721 0,-3.31892 -0.51061,-6.38254 -1.2765,-9.44614 8.93553,-11.74386 16.59456,-33.18914 11.99915,-38.03987 z m -97.014419,67.39949 c -8.935538,0 -16.339269,-7.40374 -16.339269,-16.33927 0,-8.93553 7.403731,-16.33927 16.339269,-16.33927 8.935529,0 16.339269,7.40374 16.339269,16.33927 0,8.93553 -7.40374,16.33927 -16.339269,16.33927 z m 47.996599,0 c -8.93553,0 -16.33926,-7.40374 -16.33926,-16.33927 0,-8.93553 7.40373,-16.33927 16.33926,-16.33927 8.93555,0 16.33927,7.40374 16.33927,16.33927 0,8.93553 -7.14842,16.33927 -16.33927,16.33927 z" - id="path6" - inkscape:connector-curvature="0" - style="clip-rule:evenodd;fill:#784421;fill-opacity:1;fill-rule:evenodd;stroke-width:2.55301" /> - <g - id="g4541" - style="fill:#2b1100;fill-opacity:1"> - <path - style="clip-rule:evenodd;fill:#2b1100;fill-opacity:1;fill-rule:evenodd;stroke-width:2.55301" - inkscape:connector-curvature="0" - id="path10" - d="m 168.5072,903.26472 c 15.31805,-19.14757 46.72009,-28.33841 67.65477,-15.06276 -24.50889,-3.82951 -46.72009,2.55301 -67.65477,15.06276 z" /> - <path - style="clip-rule:evenodd;fill:#2b1100;fill-opacity:1;fill-rule:evenodd;stroke-width:2.55301" - inkscape:connector-curvature="0" - id="path12" - d="m 167.486,898.66931 c 8.68022,-20.42409 34.46564,-33.69975 55.14502,-26.55131 -21.70058,2.80831 -39.31636,11.23323 -55.14502,26.55131 z" /> - <path - style="clip-rule:evenodd;fill:#2b1100;fill-opacity:1;fill-rule:evenodd;stroke-width:2.55301" - inkscape:connector-curvature="0" - id="path14" - d="m 167.23069,908.62604 c 15.82867,-15.06275 50.80491,-20.16879 61.52756,-4.34011 -21.70059,-6.89313 -40.59288,-3.82953 -61.52756,4.34011 z" /> - </g> - <g - id="g4536" - style="fill:#2b1100;fill-opacity:1"> - <path - style="clip-rule:evenodd;fill:#2b1100;fill-opacity:1;fill-rule:evenodd;stroke-width:2.55301" - inkscape:connector-curvature="0" - id="path16" - d="M 71.492797,903.26472 C 56.174733,884.11715 24.772703,874.92631 3.8380177,888.20196 28.346918,884.37245 50.55811,890.75497 71.492797,903.26472 Z" /> - <path - style="clip-rule:evenodd;fill:#2b1100;fill-opacity:1;fill-rule:evenodd;stroke-width:2.55301" - inkscape:connector-curvature="0" - id="path18" - d="M 72.514,898.66931 C 63.833764,878.24522 38.048358,864.96956 17.368973,872.118 c 21.70059,2.80831 39.316362,11.23323 55.145027,26.55131 z" /> - <path - style="clip-rule:evenodd;fill:#2b1100;fill-opacity:1;fill-rule:evenodd;stroke-width:2.55301" - inkscape:connector-curvature="0" - id="path20" - d="m 72.769301,908.62604 c -15.828665,-15.06275 -50.80491,-20.16879 -61.527553,-4.34011 21.70059,-6.89313 40.592868,-3.82953 61.527553,4.34011 z" /> - </g> - <path - d="m 52.600515,893.56329 c -6.382526,0 -11.743849,3.3189 -14.29686,8.42492 -0.255301,0 -0.510602,0 -0.765903,0 -6.893128,0 -12.765052,5.10602 -12.765052,11.48856 0,8.93553 9.190838,13.78625 17.615773,10.72264 5.10602,7.40373 16.083966,7.91434 20.168783,0 6.127225,-0.2553 16.083966,-1.2765 17.615773,-10.72264 1.021204,-6.38254 -5.616623,-11.48856 -12.765052,-11.48856 -0.255303,0 -0.510604,0 -0.765905,0 -2.042407,-5.10602 -7.659031,-8.42492 -14.041557,-8.42492 z m 134.798965,0 c 6.38252,0 11.74384,3.3189 14.29685,8.42492 0.2553,0 -2.80831,0 0.7659,0 3.57422,0 12.76506,5.10602 12.76506,11.48856 0,8.93553 -9.19084,13.78625 -17.61578,10.72264 -5.10602,7.40373 -16.08397,7.91434 -20.16878,0 -6.12722,-0.2553 -16.08397,-1.2765 -17.61576,-10.72264 -1.02122,-6.38254 9.19083,-11.48856 12.76504,-11.48856 3.57421,0 0.51061,0 0.7659,0 2.04242,-5.10602 7.65904,-8.42492 14.04157,-8.42492 z" - id="path8" - inkscape:connector-curvature="0" - style="clip-rule:evenodd;fill:#483737;fill-opacity:1;fill-rule:evenodd;stroke-width:2.55301" /> - <path - d="m 143.54212,898.14341 c 1.88105,0 3.38588,-3.57421 3.38588,-8.16963 0,-4.59543 -1.50483,-8.16964 -3.38588,-8.16964 -1.88104,0 -3.38588,3.57421 -3.38588,8.16964 0,4.59542 1.50484,8.16963 3.38588,8.16963 z" - id="path4-3-3" - inkscape:connector-curvature="0" - style="clip-rule:evenodd;fill:#c0c81f;fill-opacity:1;fill-rule:evenodd;stroke-width:3.09914" /> - </g> - </g> +<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g filter="url(#filter0_d)"> +<rect x="100" y="100" width="824" height="824" rx="184" fill="white"/> +<rect x="100" y="100" width="824" height="824" rx="184" fill="url(#paint0_linear)"/> +</g> +<path d="M681.218 251.015H362.14V764.198H681.218V251.015Z" fill="#DDDDDD"/> +<path d="M346.486 821.466H677.514C680.462 821.466 683.38 820.885 686.103 819.757C688.826 818.63 691.3 816.977 693.384 814.893C695.468 812.809 697.121 810.334 698.249 807.611C699.377 804.889 699.957 801.97 699.957 799.023V467.995C699.957 465.047 699.377 462.129 698.249 459.406C697.121 456.683 695.468 454.209 693.384 452.125C691.3 450.041 688.826 448.388 686.103 447.26C683.38 446.133 680.462 445.552 677.514 445.552H346.486C343.539 445.552 340.62 446.133 337.897 447.26C335.175 448.388 332.7 450.041 330.616 452.125C328.533 454.209 326.879 456.683 325.752 459.406C324.624 462.129 324.043 465.047 324.043 467.995V799.023C324.043 801.97 324.624 804.889 325.752 807.611C326.879 810.334 328.532 812.809 330.616 814.893C332.7 816.977 335.175 818.63 337.897 819.757C340.62 820.885 343.539 821.466 346.486 821.466V821.466ZM523.782 699.647H642.728C646.3 699.647 649.725 701.066 652.25 703.591C654.775 706.117 656.194 709.542 656.194 713.113C656.194 716.684 654.775 720.109 652.25 722.634C649.725 725.16 6 46.3 726.578 642.728 726.578H523.782C520.211 726.578 516.786 725.16 514.261 722.634C511.736 720.109 510.317 716.684 510.317 713.113C510.317 709.542 511.736 706.117 514.261 703.591C516.786 701.066 520.211 699.647 523.782 699.647V699.647ZM380.733 554.444C378.355 551.891 377.06 548.515 377.121 545.026C377.183 541.538 378.596 538.209 381.063 535.742C383.53 533.275 386.859 531.862 390.347 531.8C393.836 531.739 397.212 533.034 399.765 535.412L483.879 619.482C486.401 622.007 487.818 625.43 487.818 628.998C487.818 632.566 486.401 635.989 483.879 638.514L399.765 722.629C397.212 725.007 393.836 726.302 390.347 726.24C386.859 726.179 383.53 724.766 381.063 722.298C378.596 719.831 377.183 716.503 377.121 713.015C377.06 709.526 378.355 706.15 380.733 703.597L455.332 628.998L380.733 554.444Z" fill="black"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M436.033 403.534C442.009 403.534 446.789 392.18 446.789 377.582C446.789 362.984 442.009 351.63 436.033 351.63C430.058 351.63 425.278 362.984 425.278 377.582C425.278 392.18 430.058 403.534 436.033 403.534Z" fill="#C0C81F"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M744.298 208.945C729.7 193.536 663.199 212.189 622.65 237.329C591.021 221.11 552.905 211.378 512.355 211.378C470.995 211.378 432.878 221.11 401.249 237.329C360.7 212.189 293.388 192.725 279.601 208.945C265.003 225.165 290.144 292.477 320.151 329.782C317.718 339.514 316.096 349.246 316.096 359.789C316.096 392.228 329.882 422.235 353.401 446.565H487.214C483.159 438.455 488.836 433.589 513.166 433.589C537.496 434.4 542.362 438.455 539.118 446.565H672.931C696.45 422.235 710.236 391.417 710.236 359.789C710.236 349.246 708.615 339.514 706.182 329.782C734.566 292.477 758.896 224.354 744.298 208.945V208.945ZM436.122 423.046C407.737 423.046 384.219 399.527 384.219 371.143C384.219 342.758 407.737 319.239 436.122 319.239C464.507 319.239 488.025 342.758 488.025 371.143C488.025 399.527 464.507 423.046 436.122 423.046ZM588.588 423.046C560.203 423.046 536.685 399.527 536.685 371.143C536.685 342.758 560.203 319.239 588.588 319.239C616.973 319.239 640 .491 342.758 640.491 371.143C640.491 399.527 617.784 423.046 588.588 423.046Z" fill="#784421"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M666.088 419.802C714.747 358.978 814.499 329.782 881 371.954C803.145 359.789 732.589 380.063 666.088 419.802Z" fill="#2B1100"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M662.844 405.204C690.418 340.325 772.328 298.153 838.018 320.861C769.084 329.782 713.125 356.545 662.844 405.204Z" fill="#2B1100"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M662.033 436.833C712.314 388.984 823.42 372.765 857.482 423.046C788.547 401.149 728.534 410.881 662.033 436.833Z" fill="#2B1100"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M357.912 419.802C309.253 358.978 209.501 329.782 143 371.954C220.855 359.789 291.411 380.063 357.912 419.802Z" fill="#2B1100"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M361.156 405.204C333.583 340.325 251.673 298.153 185.982 320.861C254.917 329.782 310.875 356.545 361.156 405.204Z" fill="#2B1100"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M361.967 436.833C311.686 388.984 200.58 372.765 166.519 423.046C235.453 401.149 295.466 410.881 361.967 436.833Z" fill="#2B1100"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M297.899 388.984C277.624 388.984 260.593 399.527 252.484 415.747C251.673 415.747 250.862 415.747 250.051 415.747C228.154 415.747 209.501 431.967 209.501 452.241C209.501 480.626 238.697 496.035 265.459 486.303C281.679 509.822 316.552 511.444 329.528 486.303C348.991 485.492 380.62 482.248 385.486 452.241C388.73 431.967 367.644 415.747 344.936 415.747C344.125 415.747 343.314 415.747 342.503 415.747C336.015 399.527 318.174 388.984 297.899 388.984ZM726.101 388.984C746.376 388.984 763.407 399.527 771.517 415.747C772.328 415.747 762.596 415.747 773.95 415.747C785.303 415.747 814.499 431.967 814.499 452.241C814.499 480.626 785.303 496.035 758.541 486.303C742.321 509.822 707.448 511.444 694.473 486.303C675.009 485.492 643.38 482.248 638.514 452.241C635.27 431.967 667.71 415.747 679.064 415.747C690.418 415.747 680.686 415.747 681.497 415.747C687.985 399.527 705.827 388.984 726.101 388.984Z" fill="#483737"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M586.784 403.534C592.759 403.534 597.54 392.18 597.54 377.582C597.54 362.984 592.759 351.63 586.784 351.63C580.809 351.63 576.029 362.984 576.029 377.582C576.029 392.18 580.809 403.534 586.784 403.534Z" fill="#C0C81F"/> +<defs> +<filter id="filter0_d" x="78" y="89" width="868" height="868" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> +<feFlood flood-opacity="0" result="BackgroundImageFix"/> +<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/> +<feOffset dy="11"/> +<feGaussianBlur stdDeviation="11"/> +<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.28 0"/> +<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/> +<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/> +</filter> +<linearGradient id="paint0_linear" x1="512" y1="100" x2="512" y2="924" gradientUnits="userSpaceOnUse"> +<stop stop-opacity="0"/> +<stop offset="1" stop-opacity="0.2"/> +</linearGradient> +</defs> </svg> Binary files old/kitty-0.20.2/logo/kitty.iconset/icon_128x128.png and new/kitty-0.20.3/logo/kitty.iconset/icon_128x128.png differ Binary files old/kitty-0.20.2/logo/kitty.iconset/icon_128x...@2x.png and new/kitty-0.20.3/logo/kitty.iconset/icon_128x...@2x.png differ Binary files old/kitty-0.20.2/logo/kitty.iconset/icon_16x16.png and new/kitty-0.20.3/logo/kitty.iconset/icon_16x16.png differ Binary files old/kitty-0.20.2/logo/kitty.iconset/icon_16...@2x.png and new/kitty-0.20.3/logo/kitty.iconset/icon_16...@2x.png differ Binary files old/kitty-0.20.2/logo/kitty.iconset/icon_256x256.png and new/kitty-0.20.3/logo/kitty.iconset/icon_256x256.png differ Binary files old/kitty-0.20.2/logo/kitty.iconset/icon_256x...@2x.png and new/kitty-0.20.3/logo/kitty.iconset/icon_256x...@2x.png differ Binary files old/kitty-0.20.2/logo/kitty.iconset/icon_32x32.png and new/kitty-0.20.3/logo/kitty.iconset/icon_32x32.png differ Binary files old/kitty-0.20.2/logo/kitty.iconset/icon_32...@2x.png and new/kitty-0.20.3/logo/kitty.iconset/icon_32...@2x.png differ Binary files old/kitty-0.20.2/logo/kitty.iconset/icon_512x512.png and new/kitty-0.20.3/logo/kitty.iconset/icon_512x512.png differ Binary files old/kitty-0.20.2/logo/kitty.iconset/icon_512x...@2x.png and new/kitty-0.20.3/logo/kitty.iconset/icon_512x...@2x.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/publish.py new/kitty-0.20.3/publish.py --- old/kitty-0.20.2/publish.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/publish.py 2021-05-06 04:41:41.000000000 +0200 @@ -110,6 +110,13 @@ subprocess.check_call(['git', 'push']) +def sign_file(path: str) -> None: + subprocess.check_call([ + os.environ['PENV'] + '/gpg-as-kovid', '--output', path + '.sig', + '--detach-sig', path + ]) + + def run_sdist(args: Any) -> None: with tempfile.TemporaryDirectory() as tdir: base = os.path.join(tdir, f'kitty-{version}') @@ -124,6 +131,7 @@ with suppress(FileNotFoundError): os.remove(dest + '.xz') subprocess.check_call(['xz', '-9', dest]) + sign_file(dest + '.xz') class ReadFileWithProgressReporting(io.FileIO): # {{{ @@ -313,7 +321,7 @@ 'tag_name': self.current_tag_name, 'target_commitish': 'master', 'name': 'version %s' % self.version, - 'body': 'Release version %s' % self.version, + 'body': 'Release version %s. GPG key used for signing tarballs is: https://calibre-ebook.com/signatures/kovid.gpg' % self.version, 'draft': False, 'prerelease': False })) @@ -331,18 +339,26 @@ def run_upload(args: Any) -> None: - files = { - os.path.join('bypy', 'b', f.format(version)): desc - for f, desc in { - 'macos/dist/kitty-{}.dmg': 'macOS dmg', - 'linux/64/sw/dist/kitty-{}-x86_64.txz': 'Linux amd64 binary bundle', - 'linux/32/sw/dist/kitty-{}-i686.txz': 'Linux x86 binary bundle', - }.items() - } + files = {} + signatures = {} + for f, desc in { + 'macos/dist/kitty-{}.dmg': 'macOS dmg', + 'linux/64/sw/dist/kitty-{}-x86_64.txz': 'Linux amd64 binary bundle', + 'linux/32/sw/dist/kitty-{}-i686.txz': 'Linux x86 binary bundle', + }.items(): + path = os.path.join('bypy', 'b', f.format(version)) + if not os.path.exists(path): + raise SystemExit(f'The installer {path} does not exist') + files[path] = desc + signatures[path] = desc + ' GPG signature' files[f'build/kitty-{version}.tar.xz'] = 'Source code' + files[f'build/kitty-{version}.tar.xz.sig'] = 'Source code GPG signature' + for path, desc in signatures.items(): + sign_file(path) + files[path + '.sig'] = desc + ' GPG signature' for f in files: if not os.path.exists(f): - raise SystemExit('The installer {} does not exist'.format(f)) + raise SystemExit(f'The release artifact {f} does not exist') gd = get_github_data() gh = GitHub(files, appname, version, gd['username'], gd['password']) gh() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitty-0.20.2/setup.py new/kitty-0.20.3/setup.py --- old/kitty-0.20.2/setup.py 2021-04-28 07:20:34.000000000 +0200 +++ new/kitty-0.20.3/setup.py 2021-05-06 04:41:41.000000000 +0200 @@ -250,6 +250,18 @@ return '' +def set_arches(flags: List[str], arches: Iterable[str] = ('x86_64', 'arm64')) -> None: + while True: + try: + idx = flags.index('-arch') + except ValueError: + break + del flags[idx] + del flags[idx] + for arch in arches: + flags.extend(('-arch', arch)) + + def init_env( debug: bool = False, sanitize: bool = False, @@ -261,7 +273,8 @@ canberra_library: Optional[str] = None, extra_logging: Iterable[str] = (), extra_include_dirs: Iterable[str] = (), - ignore_compiler_warnings: bool = False + ignore_compiler_warnings: bool = False, + build_universal_binary: bool = False ) -> Env: native_optimizations = native_optimizations and not sanitize and not debug if native_optimizations and is_macos and is_arm: @@ -345,6 +358,10 @@ for path in extra_include_dirs: cflags.append(f'-I{path}') + if build_universal_binary: + set_arches(cflags) + set_arches(ldflags) + return Env(cc, cppflags, cflags, ldflags, library_paths, ccver=ccver) @@ -751,7 +768,8 @@ env = init_env( args.debug, args.sanitize, native_optimizations, args.link_time_optimization, args.profile, args.egl_library, args.startup_notification_library, args.canberra_library, - args.extra_logging, args.extra_include_dirs, args.ignore_compiler_warnings + args.extra_logging, args.extra_include_dirs, args.ignore_compiler_warnings, + args.build_universal_binary ) @@ -772,6 +790,8 @@ def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 'source') -> None: cflags = '-Wall -Werror -fpie'.split() + if args.build_universal_binary: + cflags += '-arch x86_64 -arch arm64'.split() cppflags = [] libs: List[str] = [] if args.profile or args.sanitize: @@ -825,16 +845,21 @@ def copy_man_pages(ddir: str) -> None: mandir = os.path.join(ddir, 'share', 'man') safe_makedirs(mandir) + man_levels = '15' with suppress(FileNotFoundError): - shutil.rmtree(os.path.join(mandir, 'man1')) + for x in man_levels: + shutil.rmtree(os.path.join(mandir, f'man{x}')) src = 'docs/_build/man' if not os.path.exists(src): raise SystemExit('''\ -The kitty man page is missing. If you are building from git then run: +The kitty man pages are missing. If you are building from git then run: make && make docs (needs the sphinx documentation system to be installed) ''') - shutil.copytree(src, os.path.join(mandir, 'man1')) + for x in man_levels: + os.makedirs(os.path.join(mandir, f'man{x}')) + for y in glob.glob(os.path.join(src, f'*.{x}')): + shutil.copy2(y, os.path.join(mandir, f'man{x}')) def copy_html_docs(ddir: str) -> None: @@ -877,7 +902,8 @@ def create_linux_bundle_gunk(ddir: str, libdir_name: str) -> None: if not os.path.exists('docs/_build/html'): - run_tool(['make', 'docs']) + make = "gmake" if is_freebsd else "make" + run_tool([make, 'docs']) copy_man_pages(ddir) copy_html_docs(ddir) icdir = os.path.join(ddir, 'share', 'icons', 'hicolor', '256x256', 'apps') @@ -1236,6 +1262,11 @@ default=False, action='store_true', help='Ignore any warnings from the compiler while building' ) + p.add_argument( + '--build-universal-binary', + default=False, action='store_true', + help='Build a universal binary (ARM + Intel on macOS, ignored on other platforms)' + ) return p # }}} @@ -1243,6 +1274,8 @@ def main() -> None: global verbose args = option_parser().parse_args(namespace=Options()) + if not is_macos: + args.build_universal_binary = False verbose = args.verbose > 0 args.prefix = os.path.abspath(args.prefix) os.chdir(base)