Add shell integration scripts to kitty package
This commit is contained in:
parent
b581408137
commit
bffe7aba8f
@ -127,6 +127,7 @@ def wakeup() -> None:
|
|||||||
terminfo_dir = os.path.join(kitty_base_dir, 'terminfo')
|
terminfo_dir = os.path.join(kitty_base_dir, 'terminfo')
|
||||||
logo_png_file = os.path.join(kitty_base_dir, 'logo', 'kitty.png')
|
logo_png_file = os.path.join(kitty_base_dir, 'logo', 'kitty.png')
|
||||||
beam_cursor_data_file = os.path.join(kitty_base_dir, 'logo', 'beam-cursor.png')
|
beam_cursor_data_file = os.path.join(kitty_base_dir, 'logo', 'beam-cursor.png')
|
||||||
|
shell_integration_dir = os.path.join(kitty_base_dir, 'shell-integration')
|
||||||
try:
|
try:
|
||||||
shell_path = pwd.getpwuid(os.geteuid()).pw_shell or '/bin/sh'
|
shell_path = pwd.getpwuid(os.geteuid()).pw_shell or '/bin/sh'
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|||||||
@ -49,9 +49,11 @@ class TestBuild(BaseTest):
|
|||||||
self.assertGreater(len(names), 8)
|
self.assertGreater(len(names), 8)
|
||||||
|
|
||||||
def test_filesystem_locations(self) -> None:
|
def test_filesystem_locations(self) -> None:
|
||||||
from kitty.constants import logo_png_file, terminfo_dir
|
from kitty.constants import terminfo_dir, logo_png_file, shell_integration_dir
|
||||||
|
zsh = os.path.join(shell_integration_dir, 'kitty.zsh')
|
||||||
self.assertTrue(os.path.isdir(terminfo_dir), f'Terminfo dir: {terminfo_dir}')
|
self.assertTrue(os.path.isdir(terminfo_dir), f'Terminfo dir: {terminfo_dir}')
|
||||||
self.assertTrue(os.path.exists(logo_png_file), f'Logo file: {logo_png_file}')
|
self.assertTrue(os.path.exists(logo_png_file), f'Logo file: {logo_png_file}')
|
||||||
|
self.assertTrue(os.path.exists(zsh), f'Shell integration: {zsh}')
|
||||||
|
|
||||||
def test_ca_certificates(self):
|
def test_ca_certificates(self):
|
||||||
import ssl
|
import ssl
|
||||||
|
|||||||
1
setup.py
1
setup.py
@ -1099,6 +1099,7 @@ def package(args: Options, bundle_type: str) -> None:
|
|||||||
shutil.copy2('logo/kitty.png', os.path.join(libdir, 'logo'))
|
shutil.copy2('logo/kitty.png', os.path.join(libdir, 'logo'))
|
||||||
shutil.copy2('logo/beam-cursor.png', os.path.join(libdir, 'logo'))
|
shutil.copy2('logo/beam-cursor.png', os.path.join(libdir, 'logo'))
|
||||||
shutil.copy2('logo/beam-cursor@2x.png', os.path.join(libdir, 'logo'))
|
shutil.copy2('logo/beam-cursor@2x.png', os.path.join(libdir, 'logo'))
|
||||||
|
shutil.copytree('shell-integration', os.path.join(libdir, 'shell-integration'), dirs_exist_ok=True)
|
||||||
allowed_extensions = frozenset('py glsl so'.split())
|
allowed_extensions = frozenset('py glsl so'.split())
|
||||||
|
|
||||||
def src_ignore(parent: str, entries: Iterable[str]) -> List[str]:
|
def src_ignore(parent: str, entries: Iterable[str]) -> List[str]:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user