From d0a5d1b3a485081d412ed13e94dd397d496c7ec8 Mon Sep 17 00:00:00 2001 From: olzhasar Date: Wed, 14 Jun 2023 03:39:53 +0600 Subject: [PATCH] Fix misspellings --- CONTRIBUTING.md | 2 +- docs/build.rst | 2 +- docs/changelog.rst | 8 ++++---- docs/clipboard.rst | 2 +- docs/glossary.rst | 6 +++--- docs/graphics-protocol.rst | 2 +- docs/keyboard-protocol.rst | 2 +- docs/kittens/hyperlinked_grep.rst | 2 +- docs/layouts.rst | 2 +- docs/remote-control.rst | 2 +- docs/shell-integration.rst | 2 +- glfw/cocoa_init.m | 8 ++++---- glfw/cocoa_window.m | 6 +++--- glfw/xkb-compat-shim.h | 4 ++-- kittens/icat/main.go | 2 +- kittens/icat/transmit.go | 2 +- kittens/ssh/main.go | 2 +- kitty/child-monitor.c | 2 +- kitty/child.c | 2 +- kitty/clipboard.py | 6 +++--- kitty/constants.py | 4 ++-- kitty/entry_points.py | 2 +- kitty/fonts/box_drawing.py | 2 +- kitty/glfw.c | 2 +- kitty/graphics.h | 2 +- kitty/iqsort.h | 4 ++-- kitty/main.py | 4 ++-- kitty/mouse.c | 2 +- kitty/options/definition.py | 4 ++-- kitty/remote_control.py | 2 +- kitty/shaders.c | 2 +- kitty_tests/main.py | 2 +- kitty_tests/ssh.py | 2 +- shell-integration/ssh/bootstrap.sh | 2 +- tools/tty/tty.go | 4 ++-- 35 files changed, 53 insertions(+), 53 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b416b315..e00ccbd34 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ a minimum, kitty version, OS and OS version, kitty config (ideally a minimal config to reproduce the issue with). Note that bugs and feature requests are often closed quickly as they are either -fixed or deemed wontfix/invalid. In my experience, this is the only scaleable way to +fixed or deemed wontfix/invalid. In my experience, this is the only scalable way to manage a bug tracker. Feel free to continue to post to a closed bug report if you would like to discuss the issue further. Being closed does not mean you will not get any more responses. diff --git a/docs/build.rst b/docs/build.rst index fbbedb809..965a8f2cb 100644 --- a/docs/build.rst +++ b/docs/build.rst @@ -18,7 +18,7 @@ following dependencies are installed first. If you are making small changes only to the Python parts of kitty, there is no need to build kitty at all, instead, assuming you have installed the official kitty binaries, you can simply set the :envvar:`KITTY_DEVELOP_FROM` - enviroment variable to point to the directory into which you have checked out + environment variable to point to the directory into which you have checked out the kitty source code. kitty will then load its Python code from there. You should use a version of the source that matches the binary version as closely as possible, since the two are tightly coupled. diff --git a/docs/changelog.rst b/docs/changelog.rst index 0be6b6f6e..94ffabd65 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -508,7 +508,7 @@ Detailed list of changes - A new value :code:`last_reported` for :option:`launch --cwd` to use the current working directory last reported by the program running in the terminal -- macOS: When using Apple's less as the pager for viewing scrollback strip out OSC codes as it cant parse them (:iss:`4788`) +- macOS: When using Apple's less as the pager for viewing scrollback strip out OSC codes as it can't parse them (:iss:`4788`) - diff kitten: Fix incorrect rendering in rare circumstances when scrolling after changing the context size (:iss:`4831`) @@ -769,7 +769,7 @@ Detailed list of changes - A new remote control command to :program:`visually select a window ` (:iss:`4165`) -- Add support for reporting mouse events with pixel co-ordinates using the +- Add support for reporting mouse events with pixel coordinates using the ``SGR_PIXEL_PROTOCOL`` introduced in xterm 359 - When programs ask to read from the clipboard prompt, ask the user to allow @@ -933,7 +933,7 @@ Detailed list of changes sizes (:iss:`3896`) - Fix shift+middle click to paste sending a mouse press event but no release - event which breaks some applications that grab the mouse but cant handle + event which breaks some applications that grab the mouse but can't handle mouse events (:iss:`3902`) - macOS: When the language is set to English and the country to one for which @@ -1610,7 +1610,7 @@ Detailed list of changes - Fix image leaving behind a black rectangle when switch away and back to alternate screen (:iss:`2901`) -- Fix one pixel mis-alignment of rounded corners when either the cell +- Fix one pixel misalignment of rounded corners when either the cell dimensions or the thickness of the line is an odd number of pixels (:iss:`2907`) diff --git a/docs/clipboard.rst b/docs/clipboard.rst index f3c755a86..88b6d7632 100644 --- a/docs/clipboard.rst +++ b/docs/clipboard.rst @@ -150,7 +150,7 @@ other characters must be stripped out from the id by the terminal emulator before retransmitting it. Note that when using a terminal multiplexer it is possible for two different -programs to tread on each others clipboard requests. This is fundamentally +programs to treat on each others clipboard requests. This is fundamentally unavoidable since the system clipboard is a single global shared resource. However, there is an additional complication where responses form this protocol could get lost if, for instance, multiple write requests are received diff --git a/docs/glossary.rst b/docs/glossary.rst index 422bd6d5b..64797ddc2 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -6,7 +6,7 @@ Glossary .. glossary:: os_window - kitty has two kinds of windows. Operating System windows, refered to as :term:`OS + kitty has two kinds of windows. Operating System windows, referred to as :term:`OS Window `, and *kitty windows*. An OS Window consists of one or more kitty :term:`tabs `. Each tab in turn consists of one or more *kitty windows* organized in a :term:`layout`. @@ -22,7 +22,7 @@ Glossary the terminal. See :doc:`layouts` for details. window - kitty has two kinds of windows. Operating System windows, refered to as :term:`OS + kitty has two kinds of windows. Operating System windows, referred to as :term:`OS Window `, and *kitty windows*. An OS Window consists of one or more kitty :term:`tabs `. Each tab in turn consists of one or more *kitty windows* organized in a :term:`layout`. @@ -93,7 +93,7 @@ Variables that influence kitty behavior .. envvar:: KITTY_WAYLAND_DETECT_MODIFIERS When set to a non-empty value, kitty attempts to autodiscover XKB modifiers - under Wayland. This is useful if using non-standard modifers like hyper. It + under Wayland. This is useful if using non-standard modifiers like hyper. It is possible for the autodiscovery to fail; the default Wayland XKB mappings are used in this case. See :pull:`3943` for details. diff --git a/docs/graphics-protocol.rst b/docs/graphics-protocol.rst index 05ea619ac..930bb9dce 100644 --- a/docs/graphics-protocol.rst +++ b/docs/graphics-protocol.rst @@ -108,7 +108,7 @@ code to demonstrate its use #!/bin/bash # This uses the kitten standalone binary from kitty to get the pixel sizes - # since we cant do IOCTLs directly. Fortunately, kitten is a static exe + # since we can't do IOCTLs directly. Fortunately, kitten is a static exe # pre-built for every Unix like OS under the sun. builtin read -r rows cols < <(command stty size) diff --git a/docs/keyboard-protocol.rst b/docs/keyboard-protocol.rst index ae906c3c1..7fab24381 100644 --- a/docs/keyboard-protocol.rst +++ b/docs/keyboard-protocol.rst @@ -279,7 +279,7 @@ The terminal will reply with:: The program can also push/pop the current flags onto a stack in the terminal with:: - CSI > flags u # for push, if flags ommitted default to zero + CSI > flags u # for push, if flags omitted default to zero CSI < number u # to pop number entries, defaulting to 1 if unspecified Terminals should limit the size of the stack as appropriate, to prevent diff --git a/docs/kittens/hyperlinked_grep.rst b/docs/kittens/hyperlinked_grep.rst index ed305e30e..685debdd7 100644 --- a/docs/kittens/hyperlinked_grep.rst +++ b/docs/kittens/hyperlinked_grep.rst @@ -62,7 +62,7 @@ the need for this kitten. .. note:: - While you can pass any of ripgrep's comand line options to the kitten and + While you can pass any of ripgrep's command line options to the kitten and they will be forwarded to :program:`rg`, do not use options that change the output formatting as the kitten works by parsing the output from ripgrep. The unsupported options are: :code:`--context-separator`, diff --git a/docs/layouts.rst b/docs/layouts.rst index 185e87f01..f113cdebd 100644 --- a/docs/layouts.rst +++ b/docs/layouts.rst @@ -157,7 +157,7 @@ define a few extra key bindings in :file:`kitty.conf`:: # one above the other if the existing window is tall. map f4 launch --location=split - # Rotate the current split, chaging its split axis from vertical to + # Rotate the current split, changing its split axis from vertical to # horizontal or vice versa map f7 layout_action rotate diff --git a/docs/remote-control.rst b/docs/remote-control.rst index 944049ae5..c2f2b70d7 100644 --- a/docs/remote-control.rst +++ b/docs/remote-control.rst @@ -283,7 +283,7 @@ are matched:: map f1 remote_control !focus-window --match XXXXXX .. note:: You do not need :opt:`allow_remote_control` to use these mappings, - as they are not actual remote programs, but are simply a way to resuse the + as they are not actual remote programs, but are simply a way to reuse the remote control infrastructure via keybings. diff --git a/docs/shell-integration.rst b/docs/shell-integration.rst index 69bbca15c..475e826e9 100644 --- a/docs/shell-integration.rst +++ b/docs/shell-integration.rst @@ -298,7 +298,7 @@ Manual shell integration ---------------------------- The automatic shell integration is designed to be minimally intrusive, as such -it wont work for sub-shells, terminal multiplexers, containers, etc. +it won't work for sub-shells, terminal multiplexers, containers, etc. For such systems, you should setup manual shell integration by adding some code to your shells startup files to load the shell integration script. diff --git a/glfw/cocoa_init.m b/glfw/cocoa_init.m index d9999581b..2b662cec3 100644 --- a/glfw/cocoa_init.m +++ b/glfw/cocoa_init.m @@ -826,7 +826,7 @@ int _glfwPlatformInit(void) if (!_glfw.ignoreOSKeyboardProcessing) { // first check if there is a global menu bar shortcut if ([[NSApp mainMenu] performKeyEquivalent:event]) { - debug_key("keyDown triggerred global menu bar action ignoring\n"); + debug_key("keyDown triggered global menu bar action ignoring\n"); last_keydown_shortcut_event.virtual_key_code = [event keyCode]; last_keydown_shortcut_event.input_source_switch_modifiers = 0; last_keydown_shortcut_event.timestamp = [event timestamp]; @@ -835,7 +835,7 @@ int _glfwPlatformInit(void) // now check if there is a useful apple shortcut int global_shortcut = is_active_apple_global_shortcut(event); if (is_useful_apple_global_shortcut(global_shortcut)) { - debug_key("keyDown triggerred global macOS shortcut ignoring\n"); + debug_key("keyDown triggered global macOS shortcut ignoring\n"); last_keydown_shortcut_event.virtual_key_code = [event keyCode]; // record the modifier keys if switching to the next input source last_keydown_shortcut_event.input_source_switch_modifiers = (global_shortcut == kSHKSelectNextSourceInInputMenu) ? USEFUL_MODS([event modifierFlags]) : 0; @@ -844,7 +844,7 @@ int _glfwPlatformInit(void) } // check for JIS keyboard layout function keys if (is_apple_jis_layout_function_key(event)) { - debug_key("keyDown triggerred JIS layout function key ignoring\n"); + debug_key("keyDown triggered JIS layout function key ignoring\n"); last_keydown_shortcut_event.virtual_key_code = [event keyCode]; last_keydown_shortcut_event.input_source_switch_modifiers = 0; last_keydown_shortcut_event.timestamp = [event timestamp]; @@ -865,7 +865,7 @@ int _glfwPlatformInit(void) if (last_keydown_shortcut_event.virtual_key_code != 0xffff && last_keydown_shortcut_event.virtual_key_code == [event keyCode]) { // ignore as the corresponding key down event triggered a menu bar or macOS shortcut last_keydown_shortcut_event.virtual_key_code = 0xffff; - debug_key("keyUp ignored as corresponds to previous keyDown that trigerred a shortcut\n"); + debug_key("keyUp ignored as corresponds to previous keyDown that triggered a shortcut\n"); return nil; } NSWindow *kw = [NSApp keyWindow]; diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 22a42cec7..3e8c4b39d 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -355,7 +355,7 @@ CGDirectDisplayID displayIDForWindow(_GLFWwindow *w) { if (!dl->first_unserviced_render_frame_request_at) dl->first_unserviced_render_frame_request_at = now; if (!CVDisplayLinkIsRunning(dl->displayLink)) CVDisplayLinkStart(dl->displayLink); else if (now - dl->first_unserviced_render_frame_request_at > s_to_monotonic_t(1ll)) { - // display link is stuck need to recreate it because Apple cant even + // display link is stuck need to recreate it because Apple can't even // get a simple timer right CVDisplayLinkRelease(dl->displayLink); dl->displayLink = nil; dl->first_unserviced_render_frame_request_at = now; @@ -2561,7 +2561,7 @@ bool _glfwPlatformToggleFullscreen(_GLFWwindow* w, unsigned int flags) { NSWindowStyleMask sm = [window styleMask]; if (traditional) { if (@available(macOS 10.15.7, *)) { - // As of Big Turd NSWindowStyleMaskFullScreen is no longer useable + // As of Big Turd NSWindowStyleMaskFullScreen is no longer usable // Also no longer compatible after a minor release of macOS 10.15.7 if (!w->ns.in_traditional_fullscreen) { w->ns.pre_full_screen_style_mask = sm; @@ -2589,7 +2589,7 @@ bool _glfwPlatformToggleFullscreen(_GLFWwindow* w, unsigned int flags) { } // Changing the style mask causes the first responder to be cleared [window makeFirstResponder:w->ns.view]; - // If the dock and menubar are hidden going from maximized to fullscreen doesnt change the window size + // If the dock and menubar are hidden going from maximized to fullscreen doesn't change the window size // and macOS forgets to trigger windowDidResize, so call it ourselves NSNotification *notification = [NSNotification notificationWithName:NSWindowDidResizeNotification object:window]; [w->ns.delegate performSelector:@selector(windowDidResize:) withObject:notification afterDelay:0]; diff --git a/glfw/xkb-compat-shim.h b/glfw/xkb-compat-shim.h index 31d820fc2..750b40978 100644 --- a/glfw/xkb-compat-shim.h +++ b/glfw/xkb-compat-shim.h @@ -371,7 +371,7 @@ static const struct codepair keysymtab[] = { { 0x07c8, 0x0398 }, /* Greek_THETA Θ GREEK CAPITAL LETTER THETA */ { 0x07c9, 0x0399 }, /* Greek_IOTA Ι GREEK CAPITAL LETTER IOTA */ { 0x07ca, 0x039a }, /* Greek_KAPPA Κ GREEK CAPITAL LETTER KAPPA */ - { 0x07cb, 0x039b }, /* Greek_LAMBDA Λ GREEK CAPITAL LETTER LAMDA */ + { 0x07cb, 0x039b }, /* Greek_LAMBDA Λ GREEK CAPITAL LETTER LAMBDA */ { 0x07cc, 0x039c }, /* Greek_MU Μ GREEK CAPITAL LETTER MU */ { 0x07cd, 0x039d }, /* Greek_NU Ν GREEK CAPITAL LETTER NU */ { 0x07ce, 0x039e }, /* Greek_XI Ξ GREEK CAPITAL LETTER XI */ @@ -395,7 +395,7 @@ static const struct codepair keysymtab[] = { { 0x07e8, 0x03b8 }, /* Greek_theta θ GREEK SMALL LETTER THETA */ { 0x07e9, 0x03b9 }, /* Greek_iota ι GREEK SMALL LETTER IOTA */ { 0x07ea, 0x03ba }, /* Greek_kappa κ GREEK SMALL LETTER KAPPA */ - { 0x07eb, 0x03bb }, /* Greek_lambda λ GREEK SMALL LETTER LAMDA */ + { 0x07eb, 0x03bb }, /* Greek_lambda λ GREEK SMALL LETTER LAMBDA */ { 0x07ec, 0x03bc }, /* Greek_mu μ GREEK SMALL LETTER MU */ { 0x07ed, 0x03bd }, /* Greek_nu ν GREEK SMALL LETTER NU */ { 0x07ee, 0x03be }, /* Greek_xi ξ GREEK SMALL LETTER XI */ diff --git a/kittens/icat/main.go b/kittens/icat/main.go index 06d320bae..6138257bd 100644 --- a/kittens/icat/main.go +++ b/kittens/icat/main.go @@ -221,7 +221,7 @@ func main(cmd *cli.Command, o *Options, args []string) (rc int, err error) { } } if passthrough_mode != no_passthrough { - // tmux doesnt allow responses from the terminal so we cant detect if memory or file based transferring is supported + // tmux doesn't allow responses from the terminal so we can't detect if memory or file based transferring is supported transfer_by_memory = unsupported transfer_by_file = unsupported transfer_by_stream = supported diff --git a/kittens/icat/transmit.go b/kittens/icat/transmit.go index 0decaaf43..c66e8f92b 100644 --- a/kittens/icat/transmit.go +++ b/kittens/icat/transmit.go @@ -144,7 +144,7 @@ func transmit_file(imgd *image_data, frame_num int, frame *image_frame) (err err if err != nil { return fmt.Errorf("Failed to convert image data output file: %s to absolute path with error: %w", frame.filename, err) } - frame.filename = "" // so it isnt deleted in cleanup + frame.filename = "" // so it isn't deleted in cleanup } else { is_temp = true if frame.shm != nil && frame.shm.FileSystemName() != "" { diff --git a/kittens/ssh/main.go b/kittens/ssh/main.go index ddcdb689f..8aa21c56b 100644 --- a/kittens/ssh/main.go +++ b/kittens/ssh/main.go @@ -489,7 +489,7 @@ func wrap_bootstrap_script(cd *connection_data) { encoded_script = base64.StdEncoding.EncodeToString(utils.UnsafeStringToBytes(cd.bootstrap_script)) unwrap_script = `"import base64, sys; eval(compile(base64.standard_b64decode(sys.argv[-1]), 'bootstrap.py', 'exec'))"` } else { - // We cant rely on base64 being available on the remote system, so instead + // We can't rely on base64 being available on the remote system, so instead // we quote the bootstrap script by replacing ' and \ with \v and \f // also replacing \n and ! with \r and \b for tcsh // finally surrounding with ' diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index c3de6a721..e540f87bd 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -816,7 +816,7 @@ render(monotonic_t now, bool input_read) { // dont respect render frames soon after a resize on Wayland as they cause flicker because // we want to fill the newly resized buffer ASAP, not at compositors convenience if (!global_state.is_wayland || (monotonic() - w->viewport_resized_at) > s_double_to_monotonic_t(1)) { - // since we didnt scan the window for animations, force a rescan on next wakeup/render frame + // since we didn't scan the window for animations, force a rescan on next wakeup/render frame if (scan_for_animated_images) global_state.check_for_active_animated_images = true; continue; } diff --git a/kitty/child.c b/kitty/child.c index 7d9038c39..f3b6ee339 100644 --- a/kitty/child.c +++ b/kitty/child.c @@ -27,7 +27,7 @@ serialize_string_tuple(PyObject *src) { if (!pysrc) { PyErr_Clear(); DECREF_AFTER_FUNCTION PyObject *u8 = PyUnicode_AsEncodedString(PyTuple_GET_ITEM(src, i), "UTF-8", "ignore"); - if (!u8) { PyErr_Print(); fatal("couldnt parse command line"); } + if (!u8) { PyErr_Print(); fatal("couldn't parse command line"); } ans[i] = calloc(PyBytes_GET_SIZE(u8) + 1, sizeof(char)); if (ans[i] == NULL) fatal("Out of memory"); memcpy(ans[i], PyBytes_AS_STRING(u8), PyBytes_GET_SIZE(u8)); diff --git a/kitty/clipboard.py b/kitty/clipboard.py index a3038fa7a..0f178d26e 100644 --- a/kitty/clipboard.py +++ b/kitty/clipboard.py @@ -245,7 +245,7 @@ def __init__( self.current_leftover_bytes = memoryview(b'') self.max_size = (get_options().clipboard_max_size * 1024 * 1024) if max_size < 0 else max_size self.aliases: Dict[str, str] = {} - self.commited = False + self.committed = False def encode_response(self, status: str = 'OK') -> bytes: ans = f'{self.protocol_type.value};type=write:status={status}' @@ -255,9 +255,9 @@ def encode_response(self, status: str = 'OK') -> bytes: return a def commit(self) -> None: - if self.commited: + if self.committed: return - self.commited = True + self.committed = True cp = get_boss().primary_selection if self.is_primary_selection else get_boss().clipboard if cp.enabled: for alias, src in self.aliases.items(): diff --git a/kitty/constants.py b/kitty/constants.py index def981eab..7ca5370b8 100644 --- a/kitty/constants.py +++ b/kitty/constants.py @@ -229,7 +229,7 @@ def running_in_kitty(set_val: Optional[bool] = None) -> bool: def list_kitty_resources(package: str = 'kitty') -> Iterator[str]: try: if sys.version_info[:2] < (3, 10): - raise ImportError('importlib.resources.files() doesnt work with frozen builds on python 3.9') + raise ImportError("importlib.resources.files() doesn't work with frozen builds on python 3.9") from importlib.resources import files except ImportError: from importlib.resources import contents @@ -241,7 +241,7 @@ def list_kitty_resources(package: str = 'kitty') -> Iterator[str]: def read_kitty_resource(name: str, package_name: str = 'kitty') -> bytes: try: if sys.version_info[:2] < (3, 10): - raise ImportError('importlib.resources.files() doesnt work with frozen builds on python 3.9') + raise ImportError("importlib.resources.files() doesn't work with frozen builds on python 3.9") from importlib.resources import files except ImportError: from importlib.resources import read_binary diff --git a/kitty/entry_points.py b/kitty/entry_points.py index b712ce959..048960cec 100644 --- a/kitty/entry_points.py +++ b/kitty/entry_points.py @@ -169,7 +169,7 @@ def namespaced(args: List[str]) -> None: def setup_openssl_environment(ext_dir: str) -> None: # Use our bundled CA certificates instead of the system ones, since - # many systems come with no certificates in a useable form or have various + # many systems come with no certificates in a usable form or have various # locations for the certificates. d = os.path.dirname if 'darwin' in sys.platform.lower(): diff --git a/kitty/fonts/box_drawing.py b/kitty/fonts/box_drawing.py index d3e51a24f..4c5ae2363 100644 --- a/kitty/fonts/box_drawing.py +++ b/kitty/fonts/box_drawing.py @@ -439,7 +439,7 @@ def rectircle_equations( ) -> Tuple[ParameterizedFunc, ParameterizedFunc]: ''' Return two functions, x(t) and y(t) that map the parameter t which must be - in the range [0, 1] to x and y co-ordinates in the cell. The rectircle equation + in the range [0, 1] to x and y coordinates in the cell. The rectircle equation we use is: (|x| / a) ^ (2a / r) + (|y| / a) ^ (2b / r) = 1 diff --git a/kitty/glfw.c b/kitty/glfw.c index 1229ca085..58a0b8db4 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -1808,7 +1808,7 @@ make_x11_window_a_dock_window(PyObject *self UNUSED, PyObject *args UNUSED) { int x11_window_id; PyObject *dims; if (!PyArg_ParseTuple(args, "iO!", &x11_window_id, &PyTuple_Type, &dims)) return NULL; - if (PyTuple_GET_SIZE(dims) != 12 ) { PyErr_SetString(PyExc_TypeError, "dimesions must be a tuple of length 12"); return NULL; } + if (PyTuple_GET_SIZE(dims) != 12 ) { PyErr_SetString(PyExc_TypeError, "dimensions must be a tuple of length 12"); return NULL; } if (!glfwSetX11WindowAsDock) { PyErr_SetString(PyExc_RuntimeError, "Failed to load glfwGetX11Window"); return NULL; } uint32_t dimensions[12]; for (Py_ssize_t i = 0; i < 12; i++) dimensions[i] = PyLong_AsUnsignedLong(PyTuple_GET_ITEM(dims, i)); diff --git a/kitty/graphics.h b/kitty/graphics.h index 448dfe923..fc210638a 100644 --- a/kitty/graphics.h +++ b/kitty/graphics.h @@ -131,7 +131,7 @@ typedef struct { static inline float gl_size(const unsigned int sz, const unsigned int viewport_size) { - // convert pixel sz to OpenGL co-ordinate system. + // convert pixel sz to OpenGL coordinate system. const float px = 2.f / viewport_size; return px * sz; } diff --git a/kitty/iqsort.h b/kitty/iqsort.h index e4ee16755..9853f2c4c 100644 --- a/kitty/iqsort.h +++ b/kitty/iqsort.h @@ -45,7 +45,7 @@ * with the difference in last parameter. * Note the islt macro/routine (it receives pointers to two elements): * the only condition of interest is whenever one element is less than - * another, no other conditions (greather than, equal to etc) are tested. + * another, no other conditions (greater than, equal to etc) are tested. * So, for example, to define integer sort, use: * #define islt(a,b) ((*a)<(*b)) * QSORT(int, arr, n, islt) @@ -149,7 +149,7 @@ typedef struct { \ /* Don't declare two variables of type QSORT_TYPE in a single \ * statement: eg `TYPE a, b;', in case if TYPE is a pointer, \ - * expands to `type* a, b;' wich isn't what we want. \ + * expands to `type* a, b;' which isn't what we want. \ */ \ \ if (_elems > _QSORT_MAX_THRESH) { \ diff --git a/kitty/main.py b/kitty/main.py index 711721458..661cdf396 100644 --- a/kitty/main.py +++ b/kitty/main.py @@ -148,7 +148,7 @@ def get_macos_shortcut_for( ) -> Optional[SingleKey]: # for maximum robustness we should use opts.alias_map to resolve # aliases however this requires parsing everything on startup which could - # be potentially slow. Lets just hope the user doesnt alias these + # be potentially slow. Lets just hope the user doesn't alias these # functions. ans = None candidates = [] @@ -194,7 +194,7 @@ def set_macos_app_custom_icon() -> None: log_error('Failed to set custom app icon, ignoring') # macOS Dock does not reload icons until it is restarted, so we set # the application icon here. This will revert when kitty quits, but - # cant be helped since there appears to be no way to get the dock + # can't be helped since there appears to be no way to get the dock # to reload short of killing it. cocoa_set_dock_icon(icon_path) break diff --git a/kitty/mouse.c b/kitty/mouse.c index 59298b669..87db54f72 100644 --- a/kitty/mouse.c +++ b/kitty/mouse.c @@ -885,7 +885,7 @@ scroll_event(double xoffset, double yoffset, int flags, int modifiers) { } if (!w) return; // Also update mouse cursor position while kitty OS window is not focused. - // Allows scroll events to be delivered to the child with correct pointer co-ordinates even when + // Allows scroll events to be delivered to the child with correct pointer coordinates even when // the window is not focused on macOS if (!osw->is_focused) { unsigned int x = 0, y = 0; diff --git a/kitty/options/definition.py b/kitty/options/definition.py index 6af35c98d..b04096bca 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -387,7 +387,7 @@ buffer with pager. This separate buffer is not available for interactive scrolling but will be piped to the pager program when viewing scrollback buffer in a separate window. The current implementation stores the data in UTF-8, so -approximatively 10000 lines per megabyte at 100 chars per line, for pure ASCII, +approximately 10000 lines per megabyte at 100 chars per line, for pure ASCII, unformatted text. A value of zero or less disables this feature. The maximum allowed size is 4GB. Note that on config reload if this is changed it will only affect newly created windows, not existing ones. @@ -1253,7 +1253,7 @@ :code:`title` The current tab title. :code:`index` - The tab index useable with :ac:`goto_tab N ` shortcuts. + The tab index usable with :ac:`goto_tab N ` shortcuts. :code:`layout_name` The current layout name. :code:`num_windows` diff --git a/kitty/remote_control.py b/kitty/remote_control.py index 3768ec711..624093410 100644 --- a/kitty/remote_control.py +++ b/kitty/remote_control.py @@ -153,7 +153,7 @@ def is_cmd_allowed(pcmd: Dict[str, Any], window: Optional['Window'], from_socket return True if 'cancel_async' in pcmd and pcmd.get('async_id'): # we allow these without authentication as they are sent on error - # conditions and we cant have users prompted for these. The worst side + # conditions and we can't have users prompted for these. The worst side # effect of a malicious cancel_async request is that it can prevent # another async request from getting a result, if it knows the async_id # of that request. diff --git a/kitty/shaders.c b/kitty/shaders.c index e541bf5be..dee72e38e 100644 --- a/kitty/shaders.c +++ b/kitty/shaders.c @@ -937,7 +937,7 @@ draw_cells(ssize_t vao_idx, ssize_t gvao_idx, const ScreenRenderData *srd, float CellRenderData crd = {.gl={.xstart = srd->xstart, .ystart = srd->ystart, .dx = srd->dx * x_ratio, .dy = srd->dy * y_ratio} }; crd.gl.width = crd.gl.dx * screen->columns; crd.gl.height = crd.gl.dy * screen->lines; // The scissor limits below are calculated to ensure that they do not - // overlap with the pixels outside the draw area. We cant use the actual pixel window dimensions + // overlap with the pixels outside the draw area. We can't use the actual pixel window dimensions // because of the mapping of opengl's float based co-ord system to pixels. // for a test case (scissor is also used to blit framebuffer in draw_cells_interleaved_premult) run: // kitty -o background=cyan -o background_opacity=0.7 -o cursor_blink_interval=0 -o window_margin_width=40 -o remember_initial_window_size=n -o initial_window_width=401 kitty +kitten icat --hold logo/kitty.png diff --git a/kitty_tests/main.py b/kitty_tests/main.py index e671f1f36..ef308a173 100644 --- a/kitty_tests/main.py +++ b/kitty_tests/main.py @@ -30,7 +30,7 @@ def contents(package: str) -> Iterator[str]: try: if sys.version_info[:2] < (3, 10): - raise ImportError('importlib.resources.files() doesnt work with frozen builds on python 3.9') + raise ImportError("importlib.resources.files() doesn't work with frozen builds on python 3.9") from importlib.resources import files except ImportError: from importlib.resources import contents diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py index 3834b7a9d..345f5aced 100644 --- a/kitty_tests/ssh.py +++ b/kitty_tests/ssh.py @@ -109,7 +109,7 @@ def touch(p): contents = set(files_in(remote_home)) contents.discard('.zshrc') # added by check_bootstrap() # depending on platform one of these is a symlink and hence - # isnt in contents + # isn't in contents contents.discard(f'{tname}/x/xterm-kitty') contents.discard(f'{tname}/78/xterm-kitty') self.ae(contents, { diff --git a/shell-integration/ssh/bootstrap.sh b/shell-integration/ssh/bootstrap.sh index a71d0b122..2b7bfb014 100644 --- a/shell-integration/ssh/bootstrap.sh +++ b/shell-integration/ssh/bootstrap.sh @@ -95,7 +95,7 @@ read_base64_from_tty() { untar_and_read_env() { # extract the tar file atomically, in the sense that any file from the # tarfile is only put into place after it has been fully written to disk - command -v tar > /dev/null 2> /dev/null || die "tar is not availiable on this server. The ssh kitten requires tar." + command -v tar > /dev/null 2> /dev/null || die "tar is not available on this server. The ssh kitten requires tar." tdir=$(command mktemp -d "$HOME/.kitty-ssh-kitten-untar-XXXXXXXXXXXX") [ $? = 0 ] || die "Creating temp directory failed" # suppress STDERR for tar as tar prints various warnings if for instance, timestamps are in the future diff --git a/tools/tty/tty.go b/tools/tty/tty.go index 7904a3b7a..55b2afe80 100644 --- a/tools/tty/tty.go +++ b/tools/tty/tty.go @@ -78,7 +78,7 @@ var SetBlockingRead TermiosOperation = SetReadTimeout(0) var SetRaw TermiosOperation = func(t *unix.Termios) { // This attempts to replicate the behaviour documented for cfmakeraw in - // the termios(3) manpage, as Go doesnt wrap cfmakeraw probably because its not in POSIX + // the termios(3) manpage, as Go doesn't wrap cfmakeraw probably because its not in POSIX t.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON t.Oflag &^= unix.OPOST t.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN @@ -336,7 +336,7 @@ func (self *Term) GetSize() (*unix.Winsize, error) { } } -// go doesnt have a wrapper for ctermid() +// go doesn't have a wrapper for ctermid() func Ctermid() string { return "/dev/tty" } func DebugPrintln(a ...any) {