74 Commits

Author SHA1 Message Date
Kovid Goyal
d548a6fcf4 rename typing module to avoid conflicts with stdlib typing 2025-04-28 09:20:10 +05:30
Kovid Goyal
167e6e73f7 Fix #8529 2025-04-11 09:33:52 +05:30
Kovid Goyal
07a7b23223 Fix #8302 2025-02-08 08:21:22 +05:30
Kovid Goyal
244f4597dc launch: Decouple source and dest windows from active window
Fixes #8295
2025-02-07 13:40:44 +05:30
Kovid Goyal
da1626090a Update codebase to Python 3.10 using pyupgrade 2025-02-03 10:56:50 +05:30
Kovid Goyal
9bf44f0b85 oops 2025-01-17 20:28:59 +05:30
Kovid Goyal
069868f89d Splits layout: Special case move_to_edge when there is a single split to preserve bias 2025-01-17 08:41:54 +05:30
Kovid Goyal
c600451bb8 Splits layout: Allow setting the bias of the current split using layout_action bias
Fixes #8222
2025-01-17 08:37:07 +05:30
Kovid Goyal
9d48fa9126 hints/unicode_input kittens: Do not lose keypresses that are sent very rapidly via an automation tool immediately after the kitten is launched
We now buffer the key events until the kitten tells us it is ready.
Without this the key presses are delivered to the underlying window
as the kitten's overlay window was not being focused until the kitten
set the ready message.

Fixes #7089
2024-12-12 13:11:12 +05:30
Kovid Goyal
62fbda8c9b When re-attaching a detached tab preserve internal layout state such as biases and orientations
Fixes #8106
2024-12-06 19:54:10 +05:30
Kovid Goyal
d02b1c0b31 ... 2024-09-24 14:38:11 +05:30
Kovid Goyal
83c989d4e9 Splits layout: Allow setting the split_axis option to auto so that all new windows have their split axis chosen automatically unless explicitly specified in the launch command
Fixes #7887
2024-09-24 14:21:23 +05:30
Kovid Goyal
5ab484cac2 Implement --bias for the grid layout 2024-07-20 13:11:06 +05:30
Kovid Goyal
92385f6db7 Make function re-useable and simplify bias docs a bit 2024-07-20 12:44:46 +05:30
Kovid Goyal
681048f1ca launch command: A new --bias option to adjust the size of newly created windows declaratively
Still need to implement it for the Grid layout.
Fixes #7634
2024-07-20 12:37:18 +05:30
Kovid Goyal
04735eb072 ... 2024-07-15 22:21:21 +05:30
Kovid Goyal
e0a7d25dda Splits layout: Fix the move_to_screen_edge action breaking when only a single window is present
Fixes #7621
2024-07-12 12:13:31 +05:30
Johannes Wüller
7c8660a694 Extend placement_stragegy options
placement_strategy previously only accepted 'center' and 'top-left', but
others are potentially useful too. I personally like 'bottom-left'. The
new set of accepted values mirrors the window_logo_position option.
2024-05-08 16:33:04 +02:00
Kovid Goyal
cd5099d6f7 Splits layout: Fix move_window_forward not working
Fixes #7264
2024-03-26 08:21:03 +05:30
Kovid Goyal
039d144c84 Splits layout: Allow resizing until one of the halves in a split is minimally sized
Fixes #7220
2024-03-14 15:59:23 +05:30
Kovid Goyal
2a5ba519f5 Fix #6923 2023-12-17 10:50:18 +05:30
Kovid Goyal
856fddec3c Tall/fat layout: When changing the number of full size windows, reset the main axis biases. Fixes #6123 2023-03-20 22:36:18 +05:30
Kovid Goyal
fccd776732 Fix overlay windows not inheriting the per-window padding and margin settings of their parents
Fixes #6063
2023-03-01 21:45:17 +05:30
Kovid Goyal
7fe5d7b58f Replace isort with ruff 2023-01-09 16:47:42 +05:30
Kovid Goyal
2e8ef66496 Another mypy update another round of spurious errors 2022-11-08 17:17:40 +05:30
Kovid Goyal
f5de08d5fa Splits layout: Add a new mappable action to move the active window to the screen edge
Fixes #5643
2022-11-03 17:40:04 +05:30
ms-test
aab149366d Check correct pair member
I haven't looked deeply, but this looked to be a simple typo unless it's checking one both times because of a type invariant. If that is the case, and the check is correct, then a comment and/or code refactoring to call attention to this would likely be a good idea.
2022-10-16 03:53:16 -04:00
Kovid Goyal
2a5922ce92 Cleanup previous PR
The reason maxsplit is 1 is because some layout action in the future may need more
sophisticated args processing, for example, shlex.split() instead of
plain split(), or even a full command line parser.
2022-08-05 08:12:05 +05:30
Steven Moazami
adfcbb004f Add layout_action to change bias on tall layout
Can specify 1 bias to toggle between that and 50%.

Can specify multiple biases to rotate through them with each call to the
layout_action.

Left a comment regarding working around either a possible bug or a
design decision.
2022-08-04 19:29:17 -04:00
Kovid Goyal
a9a9f1ac00 Add a mappable action to toggle the mirrored setting for the tall and fat layouts
Fixes #5344
2022-08-03 22:45:38 +05:30
Kovid Goyal
c40ef01445 Fix resizing window that is extra tall/wide because of left-over cells not working reliably
Fixes #4913
2022-04-08 15:41:53 +05:30
Kovid Goyal
ab8a4c6b9f Make per cell bias calculation overridable more easily 2022-04-08 14:52:53 +05:30
Kovid Goyal
6dc1617429 Avoid flicker when starting kittens such as the hints kitten
Fixes #4674
2022-03-23 15:55:11 +05:30
Kovid Goyal
ba1b3c3c2d Fix mypy failures 2022-03-12 08:28:43 +05:30
Kovid Goyal
31a5965b01 Splits layout: A new value for :option:launch --location to auto-select the split axis when splitting existing windows. 2022-02-22 22:37:26 +05:30
pagedown
ba0f61d752 Refactor: More f-string for kitty 2022-01-29 20:17:46 +08:00
Kovid Goyal
4c8ef26141 For the vertical and horizontal layouts have the windows arranged on a ring rather than a plane. This means the first and last window are considered neighbors
Fixes #4494
2022-01-11 08:08:11 +05:30
pagedown
f1b6fb397b Remove redundant variable assignment 2022-01-01 21:28:55 +08:00
Kovid Goyal
d090db380f Add more type annotations 2021-10-27 13:26:18 +05:30
Kovid Goyal
4494ddd8ff mypy: Turn on return value checks
Its a shame GvR is married to "return None"
https://github.com/python/mypy/issues/7511
2021-10-26 22:39:14 +05:30
Kovid Goyal
0e08c6c660 Fix a one pixel line not being drawn at the bottom edge of the fat and tall layouts 2021-10-25 15:28:49 +05:30
Kovid Goyal
4fd76b09d9 kitty @ ls: Also report layout options 2021-10-21 13:44:06 +05:30
Kovid Goyal
6546c1da9b run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
Kovid Goyal
75b73f6821 Allow using neighboring window operations in the stack layout 2021-07-09 08:54:22 +05:30
Kovid Goyal
6d7df1c5e8 Refactor configuration file parsing
Now the time for importing the kitty.config module has been halved, from
16ms from 32ms on my machine. Also, the new architecture will eventually
allow for auto generating a bunch of python-to-C boilerplate code.
2021-05-31 17:40:49 +05:30
Kovid Goyal
02fb020dfd Better fix for minimal border layout issue
Keep _set_dimensions() private
2021-05-17 15:30:03 +05:30
Kovid Goyal
bac6ebdf95 Fix incorrect border drawing when multiple tabs and multiple OS Windows are present and some of the OS Windows have tab bars and some dont
Fixes #3634
2021-05-17 15:04:33 +05:30
Kovid Goyal
518057489c Also output layout state in kitty @ ls 2021-04-17 12:11:56 +05:30
Kovid Goyal
6e73d3fac8 Fix extra space at bottom of OS window when using the fat layout with the tab bar at the top
Fix #3258
2021-01-25 09:30:14 +05:30
Kovid Goyal
027c5a57f1 Work on porting kittens to use new key infrastructure
Also move type definitions into their own module
2021-01-16 20:52:14 +05:30