mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 09:48: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
|
||||
-------------------------------------
|
||||
|
||||
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`)
|
||||
|
||||
@@ -22,7 +22,7 @@ class Version(NamedTuple):
|
||||
|
||||
appname: str = 'kitty'
|
||||
kitty_face = '🐱'
|
||||
version: Version = Version(0, 48, 0)
|
||||
version: Version = Version(0, 48, 1)
|
||||
str_version: str = '.'.join(map(str, version))
|
||||
_plat = sys.platform.lower()
|
||||
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.join(ans, 'kitty')
|
||||
return ans
|
||||
|
||||
kitty_base_dir = get_frozen_base()
|
||||
del get_frozen_base
|
||||
else:
|
||||
@@ -95,11 +96,15 @@ def _get_config_dir() -> str:
|
||||
return str(cdir)
|
||||
import atexit
|
||||
import tempfile
|
||||
|
||||
ans = tempfile.mkdtemp(prefix='kitty-conf-')
|
||||
|
||||
def cleanup() -> None:
|
||||
import shutil
|
||||
|
||||
with suppress(Exception):
|
||||
shutil.rmtree(ans)
|
||||
|
||||
atexit.register(cleanup)
|
||||
return ans
|
||||
|
||||
@@ -128,6 +133,7 @@ def runtime_dir() -> str:
|
||||
candidate = os.path.abspath(os.environ['KITTY_RUNTIME_DIRECTORY'])
|
||||
elif is_macos:
|
||||
from .fast_data_types import user_cache_dir
|
||||
|
||||
candidate = user_cache_dir()
|
||||
elif 'XDG_RUNTIME_DIR' in os.environ:
|
||||
candidate = os.path.abspath(os.environ['XDG_RUNTIME_DIR'])
|
||||
@@ -137,6 +143,7 @@ def runtime_dir() -> str:
|
||||
candidate = os.path.join(cache_dir(), 'run')
|
||||
os.makedirs(candidate, exist_ok=True)
|
||||
import stat
|
||||
|
||||
if stat.S_IMODE(os.stat(candidate).st_mode) != 0o700:
|
||||
os.chmod(candidate, 0o700)
|
||||
return candidate
|
||||
@@ -144,6 +151,7 @@ def runtime_dir() -> str:
|
||||
|
||||
def wakeup_io_loop() -> None:
|
||||
from .fast_data_types import get_boss
|
||||
|
||||
b = get_boss()
|
||||
if b is not None:
|
||||
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.
|
||||
standard_icon_names = {
|
||||
'error': ('dialog-error', '☠'),
|
||||
'warning': ('dialog-warning','⚠'),
|
||||
'warning': ('dialog-warning', '⚠'),
|
||||
'warn': ('dialog-warning', '⚠'),
|
||||
'info': ('dialog-information', 'ℹ'),
|
||||
'question': ('dialog-question', '❔'),
|
||||
|
||||
'help': ('system-help', '📖'),
|
||||
'file-manager': ('system-file-manager', '🗄'),
|
||||
'system-monitor': ('utilities-system-monitor', '🎛'),
|
||||
@@ -204,6 +211,7 @@ def detect_if_wayland_ok() -> bool:
|
||||
if not os.path.exists(wayland):
|
||||
return False
|
||||
import ctypes
|
||||
|
||||
with suppress(Exception):
|
||||
setattr(detect_if_wayland_ok, 'keep_module_loaded', ctypes.CDLL(wayland))
|
||||
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]:
|
||||
from importlib.resources import files
|
||||
|
||||
return (path.name for path in files(package).iterdir())
|
||||
|
||||
|
||||
def read_kitty_resource(name: str, package_name: str = 'kitty') -> bytes:
|
||||
from importlib.resources import files
|
||||
|
||||
return (files(package_name) / name).read_bytes()
|
||||
|
||||
|
||||
@@ -259,6 +269,7 @@ def clear_handled_signals(*a: Any) -> None:
|
||||
if not handled_signals:
|
||||
return
|
||||
import signal
|
||||
|
||||
if hasattr(signal, 'pthread_sigmask'):
|
||||
signal.pthread_sigmask(signal.SIG_UNBLOCK, handled_signals)
|
||||
for s in handled_signals:
|
||||
@@ -294,6 +305,7 @@ def local_docs() -> str:
|
||||
@run_once
|
||||
def wrapped_kitten_names() -> frozenset[str]:
|
||||
import kitty.fast_data_types as f
|
||||
|
||||
return frozenset(f.wrapped_kitten_names())
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user