346 Commits

Author SHA1 Message Date
Kovid Goyal
f20ad2fcb1 ... 2025-03-19 23:17:33 +05:30
Kovid Goyal
3b8e0e209b Wayland: Allow overriding the kitty OS Window icon on compositors that implement the xdg-toplevel-icon protocol 2025-03-10 12:32:03 +05:30
George Joseph
d2288ee787 Add support for os_window_name in startup sessions.
You can now specify `os_window_name` in addition to `os_window_class` in
startup sessions.  It works for the initial session as well as new sessions
started with `new_os_window`.

Updated documentation in overview.rst to add `os_window_name` in the
Startup Session examples.

Although not related to this feature. The documentation in launch.py
was updated to note that the `launch --type` `tab` and `os-window` options
aren't supported when launch is invoked from a startup script.  There's
already a note to that effect in the "Startup Sessions" section in
overview.rst but if you're looking at the launch syntax page like I was,
you wouldn't realize the limitation. This was throwing me for a loop while
wotking on this PR.

Resolves: #8387
2025-03-02 14:10:17 -07:00
Kovid Goyal
50f64d5981 Only use window occlusion on platforms where it is supported 2025-02-12 12:02:46 +05:30
Kovid Goyal
82d4234d9a Run at exit cleanup functions explicitly instead of relying on the ever unreliable python interpreter to do it 2025-02-10 15:06:18 +05:30
Kovid Goyal
da1626090a Update codebase to Python 3.10 using pyupgrade 2025-02-03 10:56:50 +05:30
Kovid Goyal
c67475271f Remove box drawing python code 2025-02-03 10:56:48 +05:30
Kovid Goyal
cbefc72a7e macOS: Add menu items to the Edit menu to clear the screen and scrollback 2025-01-05 14:03:08 +05:30
Kovid Goyal
96c1a5c4d1 Get automatic theme switching working 2024-11-07 17:31:44 +05:30
Kovid Goyal
e485b3b4a3 Code to allow users to create dark and light themes that are automatically applied when the OS color scheme changes 2024-11-07 13:52:49 +05:30
Kovid Goyal
f3112d61ef DRYer 2024-09-15 12:39:29 +05:30
Kovid Goyal
e3124812e5 log a warning that double --single-instance will ignore the one from macos-launch-services-cmdline 2024-09-15 10:38:32 +05:30
Kovid Goyal
d1bdbddbfc macOS: Fix a regression in the previous release that caused kitty to fail to run after an unclean shutdown/crash
When porting the single instance code to C I forgot to port the lock
file usage.

Fixes #7846
2024-09-15 10:05:18 +05:30
Kovid Goyal
036241fc6c macOS: Fix a regression in the previous release that caused --single-instance to not work when using macos-launch-services-cmdline 2024-08-23 15:27:26 +05:30
Kovid Goyal
f1d0d0949b Run pyupgrade to update the codebase to python 3.9
Gets rid of a lot of typing ugliness by using type annotations on
builtin types
2024-07-31 07:55:27 +05:30
Kovid Goyal
fd5b96b43b Use builtin NERD font for symbol_map if no system NERD font is available 2024-07-02 15:33:07 +05:30
Kovid Goyal
98c85d2923 Use builtin NERD fonts
Prevents users from having to install their own NERD font. System fonts
are still used preferentially on Linux but on macOS the builtin one is
used preferentially. Cant find any CoreText API to change this.

Still has to be implemented on macOS. And need to add code to the build
system to bundle the font when building.
2024-07-02 10:28:07 +05:30
Kovid Goyal
56f8fb9f75 Implement basic support for selecting font variations in fontconfig 2024-06-24 07:54:09 +05:30
Kovid Goyal
b5cf999da9 Make kitty --single-instance fast
No longer pay the overhead of starting the Python interpreter
just to write a message to the single instance socket. This reduces
the time for kitty --single-instance (for second and later instances)
from 70ms to 3ms an almost 25x improvement.

Needs testing on macOS and also porting of the +open handling.
2024-06-23 15:45:41 +05:30
Kovid Goyal
2c4ffba0f3 Wayland: A new option to turn off IME 2024-04-05 14:56:11 +05:30
Kovid Goyal
333ea519ed Infrastructure to go from panel CLI opts all the way to wayland layer shell implementation 2024-03-24 20:48:20 +05:30
Kovid Goyal
56978189e0 Infrastructure for passing layer shell config from python to glfw 2024-03-24 20:48:20 +05:30
Kovid Goyal
be92cc87a4 macOS: The command line args from macos-launch-services-cmdline are now prefixed to any args from open --args rather than overwriting them
The purpose of the file is to provide default command line args when
launching from GUI. Since macOS nowadays also allows command line args
when launch via open, also respect them.

Fixes #7135
2024-02-18 11:22:15 +05:30
Kovid Goyal
89c3b4f9e2 macOS: Fix a regression in the previous release that broke overriding keyboard shortcuts for actions present in the global menu bar
Fixes #7016
2024-01-19 19:44:04 +05:30
Kovid Goyal
3c4f2aa1b8 shlex.split -> shlex_split 2023-12-02 15:17:08 +05:30
Kovid Goyal
0d10ee1a8c DRYer 2023-12-02 08:07:25 +05:30
Kovid Goyal
9560968a7d Sequences should not participate in global shortcuts 2023-12-01 19:31:14 +05:30
Kovid Goyal
f46425c2f9 Fix #6876 2023-12-01 16:28:48 +05:30
Kovid Goyal
9e815212dc Implement modal keyboard handling 2023-11-30 19:44:41 +05:30
Kovid Goyal
cb418a0040 Infrastructure for more map options 2023-11-30 13:36:29 +05:30
Kovid Goyal
f11f770011 Allow creating key mappings that depend on the state of the focused window, such as what program is running inside it 2023-11-30 11:35:30 +05:30
Kovid Goyal
77292a16d6 Make shebangs consistent
Follow PEP 0394 and use /usr/bin/env python so that the python in the
users venv is respected. Not that the kitty python files are meant to be
executed standalone anyway, but, whatever.

Fixes #6810
2023-11-11 08:32:05 +05:30
Kovid Goyal
778adfcd3d Report invalid effective listen_on as a bad config error 2023-10-29 08:44:41 +05:30
Kovid Goyal
4f1971c480 Rationalize mouse cursor shape handling
Now can use the full range of standard mouse cursor shapes similar to
those supported by browsers via the CSS cursor property.

Still needs to be fully implemented for cocoa backend.
2023-10-15 09:17:31 +05:30
Kovid Goyal
be03da0c54 macOS: Fix keyboard shortcuts in the Apple global menubar not being changed when reloading the config 2023-08-25 16:08:34 +05:30
Kovid Goyal
b348195d22 Ignore listen_on=none in kitty.conf 2023-08-08 20:58:34 +05:30
Kovid Goyal
bde4a41ed4 Remote control: Allow using a random TCP socket as the remote control socket and also allow using TCP sockets in kitty.conf 2023-08-04 11:12:31 +05:30
Kovid Goyal
02c9205061 X11: Print an error to STDERR instead of refusing to start when the user sets a custom window icon larger than 128128
Fixes #6507
2023-07-30 19:40:55 +05:30
Ben Blank
b1f557d98b X11: Add support for custom window icon 2023-07-16 09:35:40 -07:00
Kovid Goyal
22c2687432 Nicer fallback logic when deriving LANG from NSLocale 2023-07-01 11:53:09 +05:30
Percy Ma
7102e0c0bb fix: fallback to en_US when locale code is invalid 2023-07-01 02:46:12 +08:00
olzhasar
d0a5d1b3a4 Fix misspellings 2023-06-14 03:39:53 +06:00
Kovid Goyal
aa0642d3e3 Show shader filename in compilation error messages 2023-06-13 22:06:22 +05:30
Kovid Goyal
97746a26f5 Move loading of shader programs into shaders module 2023-06-13 18:08:39 +05:30
Kovid Goyal
5ff1dadf0d Allow using --session=none to override startup_session
Fixes #6131
2023-03-25 10:44:34 +05:30
Kovid Goyal
34cbf5ceac Get rid of prewarming
Don't need it anymore since all major UI kittens are ported to Go
and so don't have startup latency.
2023-03-10 13:22:10 +05:30
pagedown
ba83ce7b10 macOS: Display the newly created OS window in specified state
Fix the maximized window can't occupy full screen space when window
decoration or title bar is hidden.
Fix resize_in_steps being applied even when window is maximized.
Allows to specify `os_window_state` in startup session file.
2023-02-18 14:02:19 +08:00
Kovid Goyal
fbbfb25702 Better fix for kitten not being in PATH
Add it to PATH just as we add the kitty dir to PATH. Ensures the correct
kitten is in PATH, corresponding to the correct kitty.
2023-02-01 10:16:50 +05:30
Kovid Goyal
d8bbb16d5e Make the single instance data type checked 2023-01-23 17:45:11 +05:30
Kovid Goyal
60791bb57b Session files: Expand environment variables 2023-01-23 17:34:53 +05:30