Fix #2688
This commit is contained in:
parent
b9d74e2012
commit
d8896eb210
@ -12,6 +12,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
- Tall and Fat layouts: Add a ``mirrored`` option to put the full size window
|
- Tall and Fat layouts: Add a ``mirrored`` option to put the full size window
|
||||||
on the opposite edge of the screen (:iss:`2654`)
|
on the opposite edge of the screen (:iss:`2654`)
|
||||||
|
|
||||||
|
- Tall and Fat layouts: Add mappable actions to increase or decrease the number
|
||||||
|
of full size windows (:iss:`2688`)
|
||||||
|
|
||||||
- Add an option :opt:`confirm_os_window_close` to ask for confirmation
|
- Add an option :opt:`confirm_os_window_close` to ask for confirmation
|
||||||
when closing an OS window with multiple kitty windows.
|
when closing an OS window with multiple kitty windows.
|
||||||
|
|
||||||
|
|||||||
@ -67,6 +67,13 @@ for the options is shown below::
|
|||||||
│ │ │
|
│ │ │
|
||||||
└──────────────┴───────────────┘
|
└──────────────┴───────────────┘
|
||||||
|
|
||||||
|
In addition, you can map keys to increase or decrease the number of full size
|
||||||
|
windows, for example::
|
||||||
|
|
||||||
|
map ctrl+[ layout_action decrease_num_full_size_windows
|
||||||
|
map ctrl+] layout_action increase_num_full_size_windows
|
||||||
|
|
||||||
|
|
||||||
The Fat Layout
|
The Fat Layout
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# License: GPLv3 Copyright: 2020, Kovid Goyal <kovid at kovidgoyal.net>
|
# License: GPLv3 Copyright: 2020, Kovid Goyal <kovid at kovidgoyal.net>
|
||||||
|
|
||||||
from itertools import islice, repeat
|
from itertools import islice, repeat
|
||||||
from typing import Dict, Generator, List, Tuple
|
from typing import Dict, Generator, List, Optional, Sequence, Tuple
|
||||||
|
|
||||||
from kitty.conf.utils import to_bool
|
from kitty.conf.utils import to_bool
|
||||||
from kitty.typing import EdgeLiteral, WindowType
|
from kitty.typing import EdgeLiteral, WindowType
|
||||||
@ -209,6 +209,15 @@ class Tall(Layout):
|
|||||||
else:
|
else:
|
||||||
yield self.only_between_border
|
yield self.only_between_border
|
||||||
|
|
||||||
|
def layout_action(self, action_name: str, args: Sequence[str], all_windows: WindowList) -> Optional[bool]:
|
||||||
|
if action_name == 'increase_num_full_size_windows':
|
||||||
|
self.layout_opts.full_size += 1
|
||||||
|
return True
|
||||||
|
if action_name == 'decrease_num_full_size_windows':
|
||||||
|
if self.layout_opts.full_size > 1:
|
||||||
|
self.layout_opts.full_size -= 1
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
class Fat(Tall):
|
class Fat(Tall):
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user