Include all in page headings in the sidebar ToC

The furo theme tries to make this impossible, fortunately,
this being python, we dont care what it wants
This commit is contained in:
Kovid Goyal 2021-07-21 10:35:58 +05:30
parent 8dfef58f29
commit 329d95fd3a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
11 changed files with 33 additions and 21 deletions

View File

@ -1,5 +1,5 @@
Mappable actions
==================
-----------------------
.. highlight:: conf

View File

@ -482,8 +482,16 @@ def write_conf_docs(app: Any, all_kitten_names: Iterable[str]) -> None:
# }}}
def add_html_context(app: Any, pagename: str, templatename: str, context: Any, *args: Any) -> None:
def add_html_context(app: Any, pagename: str, templatename: str, context: Any, doctree: Any, *args: Any) -> None:
context['analytics_id'] = app.config.analytics_id
if 'toctree' in context:
original_toctee_function = context['toctree']
def include_sub_headings(**kwargs: Any) -> Any:
kwargs['titles_only'] = False
return original_toctee_function(**kwargs)
context['toctree'] = include_sub_headings
def setup(app: Any) -> None:

View File

@ -1,5 +1,5 @@
Configure kitty
===============================
kitty.conf
-----------------------
.. highlight:: conf

View File

@ -34,6 +34,11 @@ Glossary
to display :doc:`hints </kittens/hints>`, for :doc:`unicode input
</kittens/unicode-input>` etc.
hyperlinks
Terminals can have hyperlinks, just like the internet. In kitty you can
:doc:`control exactly what happens <open_actions>` when clicking on a
hyperlink, based on the type of link and its URL.
.. _env_vars:
Environment variables

View File

@ -26,7 +26,7 @@ kitty
* Graphics, with :doc:`images and animations <graphics-protocol>`
* Ligatures and emoji, with :opt:`per glyph font substitution <symbol_map>`
* Hyperlinks, with :doc:`configurable actions <open_actions>`
* :term:`Hyperlinks<hyperlinks>`, with :doc:`configurable actions <open_actions>`
.. tab:: Scriptable

View File

@ -1,7 +1,7 @@
.. _kittens:
Extend kitty
================
Extend with kittens
-----------------------
.. toctree::
:hidden:

View File

@ -1,5 +1,5 @@
Launching new tabs/windows
========================================
The :command:`launch` command
--------------------------------
.. program:: launch

View File

@ -1,5 +1,5 @@
Arrange windows
===================
-------------------
kitty has the ability to define its own windows that can be tiled next to each
other in arbitrary arrangements, based on *Layouts*, see below for examples:

View File

@ -1,11 +1,14 @@
Mark text on screen
========================
---------------------
kitty has the ability to mark text on the screen based on regular expressions.
This can be useful to highlight words or phrases when browsing output from long
running programs or similar. Lets start with a few examples:
Examples
----------
Suppose we want to be able to highlight the word ERROR in the current window.
Add the following to :file:`kitty.conf`::

View File

@ -163,7 +163,7 @@ For example:
cannot create new OS windows, or tabs.
Launching new tabs/windows
Creating tabs/windows
-------------------------------
kitty can be told to run arbitrary programs in new :term:`tabs <tab>`,
@ -197,11 +197,7 @@ Mouse features
All these actions can be customized in :file:`kitty.conf` as described
:ref:`here <conf-kitty-mouse.mousemap>`.
Scripting the mouse click
---------------------------
You can customize what happens when clicking on hyperlinks in kitty,
You can also customize what happens when clicking on :term:`hyperlinks` in kitty,
having it open files in your editor, download remote files, open things
in your browser, etc.

View File

@ -1,15 +1,15 @@
Control kitty from scripts
==============================================
----------------------------
.. highlight:: sh
Tutorial
----------
|kitty| can be controlled from scripts or the shell prompt. You can open new
windows, send arbitrary text input to any window, name windows and tabs, etc.
Let's walk through a few examples of controlling |kitty|.
Tutorial
------------
Start by running |kitty| as::
kitty -o allow_remote_control=yes -o enabled_layouts=tall