mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
version 0.48.1
This commit is contained in:
@@ -179,7 +179,7 @@ consumption to do the same tasks.
|
|||||||
Detailed list of changes
|
Detailed list of changes
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
0.48.1 [future]
|
0.48.1 [2026-07-24]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
- Wayland: fix a regression in the previous release that broke window sizing for on Hyprland/Sway with fractional scales and an initial specified size (:iss:`10268`)
|
- Wayland: fix a regression in the previous release that broke window sizing for on Hyprland/Sway with fractional scales and an initial specified size (:iss:`10268`)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class Version(NamedTuple):
|
|||||||
|
|
||||||
appname: str = 'kitty'
|
appname: str = 'kitty'
|
||||||
kitty_face = '🐱'
|
kitty_face = '🐱'
|
||||||
version: Version = Version(0, 48, 0)
|
version: Version = Version(0, 48, 1)
|
||||||
str_version: str = '.'.join(map(str, version))
|
str_version: str = '.'.join(map(str, version))
|
||||||
_plat = sys.platform.lower()
|
_plat = sys.platform.lower()
|
||||||
is_macos: bool = 'darwin' in _plat
|
is_macos: bool = 'darwin' in _plat
|
||||||
@@ -60,6 +60,7 @@ if getattr(sys, 'frozen', False):
|
|||||||
ans = os.path.dirname(os.path.dirname(ans))
|
ans = os.path.dirname(os.path.dirname(ans))
|
||||||
ans = os.path.join(ans, 'kitty')
|
ans = os.path.join(ans, 'kitty')
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
kitty_base_dir = get_frozen_base()
|
kitty_base_dir = get_frozen_base()
|
||||||
del get_frozen_base
|
del get_frozen_base
|
||||||
else:
|
else:
|
||||||
@@ -95,11 +96,15 @@ def _get_config_dir() -> str:
|
|||||||
return str(cdir)
|
return str(cdir)
|
||||||
import atexit
|
import atexit
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
ans = tempfile.mkdtemp(prefix='kitty-conf-')
|
ans = tempfile.mkdtemp(prefix='kitty-conf-')
|
||||||
|
|
||||||
def cleanup() -> None:
|
def cleanup() -> None:
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
with suppress(Exception):
|
with suppress(Exception):
|
||||||
shutil.rmtree(ans)
|
shutil.rmtree(ans)
|
||||||
|
|
||||||
atexit.register(cleanup)
|
atexit.register(cleanup)
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
@@ -128,6 +133,7 @@ def runtime_dir() -> str:
|
|||||||
candidate = os.path.abspath(os.environ['KITTY_RUNTIME_DIRECTORY'])
|
candidate = os.path.abspath(os.environ['KITTY_RUNTIME_DIRECTORY'])
|
||||||
elif is_macos:
|
elif is_macos:
|
||||||
from .fast_data_types import user_cache_dir
|
from .fast_data_types import user_cache_dir
|
||||||
|
|
||||||
candidate = user_cache_dir()
|
candidate = user_cache_dir()
|
||||||
elif 'XDG_RUNTIME_DIR' in os.environ:
|
elif 'XDG_RUNTIME_DIR' in os.environ:
|
||||||
candidate = os.path.abspath(os.environ['XDG_RUNTIME_DIR'])
|
candidate = os.path.abspath(os.environ['XDG_RUNTIME_DIR'])
|
||||||
@@ -137,6 +143,7 @@ def runtime_dir() -> str:
|
|||||||
candidate = os.path.join(cache_dir(), 'run')
|
candidate = os.path.join(cache_dir(), 'run')
|
||||||
os.makedirs(candidate, exist_ok=True)
|
os.makedirs(candidate, exist_ok=True)
|
||||||
import stat
|
import stat
|
||||||
|
|
||||||
if stat.S_IMODE(os.stat(candidate).st_mode) != 0o700:
|
if stat.S_IMODE(os.stat(candidate).st_mode) != 0o700:
|
||||||
os.chmod(candidate, 0o700)
|
os.chmod(candidate, 0o700)
|
||||||
return candidate
|
return candidate
|
||||||
@@ -144,6 +151,7 @@ def runtime_dir() -> str:
|
|||||||
|
|
||||||
def wakeup_io_loop() -> None:
|
def wakeup_io_loop() -> None:
|
||||||
from .fast_data_types import get_boss
|
from .fast_data_types import get_boss
|
||||||
|
|
||||||
b = get_boss()
|
b = get_boss()
|
||||||
if b is not None:
|
if b is not None:
|
||||||
b.child_monitor.wakeup()
|
b.child_monitor.wakeup()
|
||||||
@@ -168,11 +176,10 @@ ssh_control_master_template = 'kssh-{kitty_pid}-{ssh_placeholder}'
|
|||||||
# Update the spec in docs/desktop-notifications.rst if you change this.
|
# Update the spec in docs/desktop-notifications.rst if you change this.
|
||||||
standard_icon_names = {
|
standard_icon_names = {
|
||||||
'error': ('dialog-error', '☠'),
|
'error': ('dialog-error', '☠'),
|
||||||
'warning': ('dialog-warning','⚠'),
|
'warning': ('dialog-warning', '⚠'),
|
||||||
'warn': ('dialog-warning', '⚠'),
|
'warn': ('dialog-warning', '⚠'),
|
||||||
'info': ('dialog-information', 'ℹ'),
|
'info': ('dialog-information', 'ℹ'),
|
||||||
'question': ('dialog-question', '❔'),
|
'question': ('dialog-question', '❔'),
|
||||||
|
|
||||||
'help': ('system-help', '📖'),
|
'help': ('system-help', '📖'),
|
||||||
'file-manager': ('system-file-manager', '🗄'),
|
'file-manager': ('system-file-manager', '🗄'),
|
||||||
'system-monitor': ('utilities-system-monitor', '🎛'),
|
'system-monitor': ('utilities-system-monitor', '🎛'),
|
||||||
@@ -204,6 +211,7 @@ def detect_if_wayland_ok() -> bool:
|
|||||||
if not os.path.exists(wayland):
|
if not os.path.exists(wayland):
|
||||||
return False
|
return False
|
||||||
import ctypes
|
import ctypes
|
||||||
|
|
||||||
with suppress(Exception):
|
with suppress(Exception):
|
||||||
setattr(detect_if_wayland_ok, 'keep_module_loaded', ctypes.CDLL(wayland))
|
setattr(detect_if_wayland_ok, 'keep_module_loaded', ctypes.CDLL(wayland))
|
||||||
return True
|
return True
|
||||||
@@ -234,11 +242,13 @@ def running_in_kitty(set_val: bool | None = None) -> bool:
|
|||||||
|
|
||||||
def list_kitty_resources(package: str = 'kitty') -> Iterator[str]:
|
def list_kitty_resources(package: str = 'kitty') -> Iterator[str]:
|
||||||
from importlib.resources import files
|
from importlib.resources import files
|
||||||
|
|
||||||
return (path.name for path in files(package).iterdir())
|
return (path.name for path in files(package).iterdir())
|
||||||
|
|
||||||
|
|
||||||
def read_kitty_resource(name: str, package_name: str = 'kitty') -> bytes:
|
def read_kitty_resource(name: str, package_name: str = 'kitty') -> bytes:
|
||||||
from importlib.resources import files
|
from importlib.resources import files
|
||||||
|
|
||||||
return (files(package_name) / name).read_bytes()
|
return (files(package_name) / name).read_bytes()
|
||||||
|
|
||||||
|
|
||||||
@@ -259,6 +269,7 @@ def clear_handled_signals(*a: Any) -> None:
|
|||||||
if not handled_signals:
|
if not handled_signals:
|
||||||
return
|
return
|
||||||
import signal
|
import signal
|
||||||
|
|
||||||
if hasattr(signal, 'pthread_sigmask'):
|
if hasattr(signal, 'pthread_sigmask'):
|
||||||
signal.pthread_sigmask(signal.SIG_UNBLOCK, handled_signals)
|
signal.pthread_sigmask(signal.SIG_UNBLOCK, handled_signals)
|
||||||
for s in handled_signals:
|
for s in handled_signals:
|
||||||
@@ -294,6 +305,7 @@ def local_docs() -> str:
|
|||||||
@run_once
|
@run_once
|
||||||
def wrapped_kitten_names() -> frozenset[str]:
|
def wrapped_kitten_names() -> frozenset[str]:
|
||||||
import kitty.fast_data_types as f
|
import kitty.fast_data_types as f
|
||||||
|
|
||||||
return frozenset(f.wrapped_kitten_names())
|
return frozenset(f.wrapped_kitten_names())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user