Move options code into its own directory
This commit is contained in:
parent
ddd178fa82
commit
5470dd74bd
@ -38,7 +38,7 @@ from .keys import get_shortcut, shortcut_matches
|
||||
from .layout.base import set_layout_options
|
||||
from .notify import notification_activated
|
||||
from .options_stub import Options
|
||||
from .options_types import MINIMUM_FONT_SIZE, KeyAction, SubSequenceMap
|
||||
from .options.utils import MINIMUM_FONT_SIZE, KeyAction, SubSequenceMap
|
||||
from .os_window_size import initial_window_size_func
|
||||
from .rgb import Color, color_from_int
|
||||
from .session import Session, create_sessions, get_os_window_sizing_data
|
||||
|
||||
@ -13,7 +13,7 @@ from typing import (
|
||||
|
||||
from .cli_stub import CLIOptions
|
||||
from .conf.utils import resolve_config
|
||||
from .options_types import KeyAction, MouseMap
|
||||
from .options.utils import KeyAction, MouseMap
|
||||
from .constants import appname, defconf, is_macos, is_wayland, str_version
|
||||
from .options_stub import Options as OptionsStub
|
||||
from .types import MouseEvent, SingleKey
|
||||
|
||||
@ -19,7 +19,7 @@ from .conf.utils import (
|
||||
from .config_data import all_options
|
||||
from .constants import cache_dir, defconf, is_macos
|
||||
from .options_stub import Options as OptionsStub
|
||||
from .options_types import (
|
||||
from .options.utils import (
|
||||
KeyDefinition, KeyMap, MouseMap, MouseMapping, SequenceMap, env,
|
||||
font_features, kitten_alias, parse_map, parse_mouse_map, symbol_map
|
||||
)
|
||||
|
||||
@ -13,7 +13,7 @@ from .conf.utils import (
|
||||
to_color_or_none, unit_float
|
||||
)
|
||||
from .constants import is_macos
|
||||
from .options_types import (
|
||||
from .options.utils import (
|
||||
active_tab_title_template, adjust_line_height, allow_hyperlinks,
|
||||
allow_remote_control, box_drawing_scale, clear_all_shortcuts,
|
||||
clipboard_control, config_or_absolute_path, copy_on_select,
|
||||
|
||||
@ -8,7 +8,7 @@ from .fast_data_types import (
|
||||
GLFW_MOD_ALT, GLFW_MOD_CAPS_LOCK, GLFW_MOD_CONTROL, GLFW_MOD_HYPER,
|
||||
GLFW_MOD_META, GLFW_MOD_NUM_LOCK, GLFW_MOD_SHIFT, GLFW_MOD_SUPER, KeyEvent
|
||||
)
|
||||
from .options_types import KeyAction, KeyMap, SequenceMap, SubSequenceMap
|
||||
from .options.utils import KeyAction, KeyMap, SequenceMap, SubSequenceMap
|
||||
from .types import SingleKey
|
||||
from .typing import ScreenType
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ from urllib.parse import ParseResult, unquote, urlparse
|
||||
from .conf.utils import to_cmdline_implementation
|
||||
from .constants import config_dir
|
||||
from .guess_mime_type import guess_type
|
||||
from .options_types import KeyAction, parse_key_action
|
||||
from .options.utils import KeyAction, parse_key_action
|
||||
from .types import run_once
|
||||
from .typing import MatchType
|
||||
from .utils import expandvars, log_error
|
||||
|
||||
0
kitty/options/__init__.py
Normal file
0
kitty/options/__init__.py
Normal file
@ -14,20 +14,20 @@ from typing import (
|
||||
import kitty.fast_data_types as defines
|
||||
from kitty.fast_data_types import CURSOR_BEAM, CURSOR_BLOCK, CURSOR_UNDERLINE
|
||||
|
||||
from .conf.utils import (
|
||||
from kitty.conf.utils import (
|
||||
key_func, positive_float, positive_int, python_string, to_bool, to_cmdline,
|
||||
to_color, uniq, unit_float
|
||||
)
|
||||
from .constants import config_dir
|
||||
from .fonts import FontFeature
|
||||
from .key_names import (
|
||||
from kitty.constants import config_dir
|
||||
from kitty.fonts import FontFeature
|
||||
from kitty.key_names import (
|
||||
character_key_name_aliases, functional_key_name_aliases,
|
||||
get_key_name_lookup
|
||||
)
|
||||
from .layout.interface import all_layouts
|
||||
from .rgb import Color, color_as_int
|
||||
from .types import FloatEdges, MouseEvent, SingleKey
|
||||
from .utils import expandvars, log_error
|
||||
from kitty.layout.interface import all_layouts
|
||||
from kitty.rgb import Color, color_as_int
|
||||
from kitty.types import FloatEdges, MouseEvent, SingleKey
|
||||
from kitty.utils import expandvars, log_error
|
||||
|
||||
KeyMap = Dict[SingleKey, 'KeyAction']
|
||||
MouseMap = Dict[MouseEvent, 'KeyAction']
|
||||
@ -17,7 +17,7 @@ def generate_stub():
|
||||
all_options,
|
||||
preamble_lines=(
|
||||
'from kitty.types import SingleKey',
|
||||
'from kitty.options_types import KeyAction, KeyMap, SequenceMap, MouseMap',
|
||||
'from kitty.options.utils import KeyAction, KeyMap, SequenceMap, MouseMap',
|
||||
'from kitty.fonts import FontFeature',
|
||||
),
|
||||
extra_fields=(
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from kitty.config import parse_marker_spec
|
||||
from kitty.options.utils import parse_marker_spec
|
||||
|
||||
from .base import (
|
||||
MATCH_WINDOW_OPTION, ArgsType, Boss, PayloadGetType,
|
||||
|
||||
@ -7,7 +7,7 @@ import os
|
||||
import sys
|
||||
from typing import TYPE_CHECKING, Dict, Generator, List, Optional
|
||||
|
||||
from kitty.config import parse_send_text_bytes
|
||||
from kitty.options.utils import parse_send_text_bytes
|
||||
from kitty.key_encoding import decode_key_event_as_window_system_key
|
||||
from kitty.fast_data_types import KeyEvent as WindowSystemKeyEvent
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import sys
|
||||
from typing import Generator, List, Optional, Sequence, Union
|
||||
|
||||
from .cli_stub import CLIOptions
|
||||
from .options_types import to_layout_names, window_size
|
||||
from .options.utils import to_layout_names, window_size
|
||||
from .constants import kitty_exe
|
||||
from .layout.interface import all_layouts
|
||||
from .options_stub import Options
|
||||
|
||||
@ -24,7 +24,7 @@ from .fast_data_types import (
|
||||
)
|
||||
from .key_encoding import KeyEvent as KeyEventType
|
||||
from .layout.base import Layout as LayoutType
|
||||
from .options_types import (
|
||||
from .options.utils import (
|
||||
KeyAction as KeyActionType, KeyMap as KeyMap, SequenceMap as SequenceMap
|
||||
)
|
||||
from .rc.base import RemoteCommand as RemoteCommandType
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user