Jackie Li 0d3c5497ff for #7009
Oops, the num is already negative index, no need to reverse here.

Alternatively this is shorter:

```
    def nth_os_window(self, num: int = 1) -> None:
        if not self.os_window_map:
            return

        if num == 0:
            os_window_id = current_focused_os_window_id() or last_focused_os_window_id()
        elif num > 0:
            ids = tuple(self.os_window_map.keys())
            os_window_id = ids[min(num, len(ids)) - 1]
        else:
            fc_map = os_window_focus_counters()
            ids = sorted(fc_map.keys(), key=fc_map.__getitem__, reverse=True)
            os_window_id = ids[min(-num, len(ids)-1)]
        focus_os_window(os_window_id, True)
```
2024-01-18 09:53:47 +00:00
...
2023-08-27 19:26:13 +05:30
2023-11-05 17:59:19 +05:30
2023-11-11 08:32:05 +05:30
2024-01-16 13:38:12 +05:30
2024-01-18 09:53:47 +00:00
2023-11-11 08:32:05 +05:30
2023-12-04 14:14:11 +05:30
2023-11-11 08:32:05 +05:30
2023-07-30 19:49:42 +05:30
2023-11-11 08:32:05 +05:30
2023-06-14 03:39:53 +06:00
2023-07-29 14:16:25 +05:30
2023-07-29 14:16:25 +05:30
2023-11-11 08:32:05 +05:30
2023-01-26 08:44:16 +05:30
2022-11-14 15:42:01 +05:30
2022-11-14 15:41:53 +05:30
2023-11-11 08:32:05 +05:30

= kitty - the fast, feature-rich, cross-platform, GPU based terminal

See https://sw.kovidgoyal.net/kitty/[the kitty website].

image:https://github.com/kovidgoyal/kitty/workflows/CI/badge.svg["Build status", link="https://github.com/kovidgoyal/kitty/actions?query=workflow%3ACI"]

https://sw.kovidgoyal.net/kitty/faq/[Frequently Asked Questions]

To ask other questions about kitty usage, use either the https://github.com/kovidgoyal/kitty/discussions/[discussions on GitHub] or the
https://www.reddit.com/r/KittyTerminal[Reddit community]

Packaging status in various repositories:

image:https://repology.org/badge/vertical-allrepos/kitty.svg?columns=3&header=kitty["Packaging status", link="https://repology.org/project/kitty/versions"]
Description
No description provided
Readme GPL-3.0 155 MiB
Languages
Python 38.5%
C 28%
Go 26.4%
Objective-C 5.5%
Shell 1%
Other 0.5%