132 Commits

Author SHA1 Message Date
pagedown
59afdfc4e9
macOS: Allow the New kitty Here services to open multiple folders 2022-03-20 14:51:47 +08:00
pagedown
7007f2e7fc
macOS: Allow to customize global menu full screen shortcut 2022-02-17 16:31:46 +08:00
Kovid Goyal
bdb98cf210
Count chars not bytes when truncating menubar title 2022-02-07 22:37:58 +05:30
Kovid Goyal
e9ea7b13b6
macOS: Add an option to control the max length of the window title displayed in the global menubar
Fixes #2132
2022-02-07 21:57:36 +05:30
Kovid Goyal
1358f00969
Raise an exception for empty url schemes 2022-02-06 21:10:41 +05:30
Kovid Goyal
eedc849c45
Cleanup previous PR 2022-02-06 20:49:40 +05:30
Kovid Goyal
89679d07ae
Merge branch 'feat-macos-handle-url' of https://github.com/page-down/kitty 2022-02-06 20:29:16 +05:30
pagedown
e31ca68875
macOS: Add a way to set kitty as the default handler for the URL schemes 2022-02-06 19:51:39 +08:00
pagedown
f5337096d5
Rename LAUNCH_URL to LAUNCH_URLS 2022-02-06 18:57:40 +08:00
pagedown
007e9697c4
macOS: Add Open with kitty Service
There are still some file types that cannot be matched.
Add a standalone Open With service.
Users can configure shortcut for this service in System Preferences.
2022-02-05 23:20:19 +08:00
Kovid Goyal
97a6a11066
Capitalization of menu action 2022-02-04 16:12:46 +05:30
Kovid Goyal
50bc5b0302
macOS: Add the default shortcut cmd+k to clear the terminal screen and scrollback up to the cursor
Fixes #4625
2022-02-04 11:58:52 +05:30
Luflosi
347c0d4de4
Fix compilation on macOS 10.12
Without this commit, kitty would fail to compile on macOS 10.12 with the error "use of undeclared identifier".
This problem was introduced in f7be4fab48d2e7cc7bbf9942d8a9fdbfba85b274, where some code was moved to a different file, without moving the corresponding `#define` statements.
2022-01-27 12:21:17 +01:00
Kovid Goyal
ce63ddfe54
macOS: Print out unhandled exceptions 2022-01-13 16:54:36 +05:30
Kovid Goyal
62953c2057
Mark parameters as unused 2022-01-11 11:26:08 +05:30
Kovid Goyal
24c44861ef
Cleanup previous PR
Simplify wrapping of toggle_secure_input
Dont duplicate debug_keyboard flag in two places
2022-01-09 22:11:22 +05:30
pagedown
f7be4fab48
macOS: Allow mapping secure keyboard entry shortcut 2022-01-09 22:54:03 +08:00
pagedown
278477b387
Add light and dark to the macOS title bar option 2021-12-21 15:14:08 +08:00
Kovid Goyal
889f2fce6d
Avoid deprecation warning from Apple
Apparently Apple invent half-assed language extensions like @available
and then dont implement them properly
2021-11-20 06:08:30 +05:30
Kovid Goyal
ae6318cb5a
Forgot to add definitions of the notification constants for old SDKs 2021-11-20 04:58:53 +05:30
Kovid Goyal
19e653ef1b
Fix building on older macOS SDKs 2021-11-20 04:42:01 +05:30
pagedown
fccba24f0b
Allow macOS notification to play sound 2021-11-19 14:41:18 +08:00
pagedown
9be7345ba6
Capitalize menu item and adjust the order of menu items following the convention 2021-11-05 18:15:29 +08:00
Kovid Goyal
c2641458e7
A new option to specify the path to a sound file to use as the bell sound 2021-09-24 08:28:37 +05:30
Kovid Goyal
30cb7286db
Fix building on macOS
macOS defines newlocale() in xlocale.h
2021-08-05 06:47:45 +05:30
Kovid Goyal
9e7253c179
macOS: Set LANG to en_US if cocoa reports language as en_* that is not a valid locale
Fixes #3899
2021-08-05 06:29:21 +05:30
Kovid Goyal
ebff343a55
macOS: Add reload config to kitty global menu 2021-06-13 20:34:27 +05:30
Kovid Goyal
4cff3e51cb
macOS: Add a global menu entry to reset the terminal 2021-06-05 10:12:44 +05:30
Kovid Goyal
e2197c586b
Forgot a brace 2021-06-03 12:11:31 +05:30
Kovid Goyal
93e9d3cb5f
Fix a crash on exit on macOS
Calling Python API functions is not allowed in atexit handlers.

Fixes #3686
2021-06-03 11:54:55 +05:30
Luflosi
4a67af9b90
macOS: add menu items for new_window and close_window 2021-05-25 13:54:02 +02:00
Luflosi
082ad61d14
macOS: move menu bar items for opening and closing OS windows and tabs to new menu
Most apps on macOS have the menu items for opening and closing tabs and windows in the "File" menu. Since this doesn't really apply to Terminal emulators, both Terminal.app and iTerm2 have them in the "Shell" menu instead.
This change makes the menu bar of kitty more consistent with these applications.
2021-05-21 18:21:31 +02:00
Kovid Goyal
0ca4faa25b
New OS window -> New OS Window 2021-05-21 17:57:53 +05:30
Luflosi
0788032003
macOS: fix spotlight search in help menu not working on some machines
The spotlight search in the "Help" menu of the menu bar did not appear when the system language is set to a language other than English. macOS magically adds the search box when the text in that menu matches the translation of "Help" in the system language. On my German system for example replacing "Help" with "Hilfe" will make the search box appear again. This is however not a good solution for kitty as it would require implementing localization support for all languages. Removing `CFBundleAllowMixedLocalizations=True` from `setup.py` also brings back the search box but that may break the locale again. The line was added in  8818b5d8df686c0e340ef3d15a069bf54082d112 to fix an issue related to https://github.com/kovidgoyal/kitty/issues/1233.
Luckily I found a seemingly undocumented function that helps us out here, which does not rely the text comparison magic.
2021-05-02 22:21:09 +02:00
Georgi Yonchev
98519bf326 [macos] - Add "Secure Keyboard Entry" menu item 2021-04-09 16:39:51 +03:00
Kovid Goyal
55dc354e68
Improve at exit cleanup functions
Now they are run in a defined order not based on
the order of initialization
2021-04-01 11:48:36 +05:30
Kovid Goyal
ce3cd691cc
macOS: Add global menu action to detach current tab 2021-02-25 12:27:10 +05:30
Kovid Goyal
81f144df15
macOS: Add entries to global menu bar for creating and changing tabs 2021-02-25 11:54:53 +05:30
Kovid Goyal
ed1188dc61
Forgot modifier mask 2021-02-25 07:12:00 +05:30
Kovid Goyal
52347ced85
macOS: Make the global keybinding used for preferences also configurable 2021-02-25 06:58:20 +05:30
Kovid Goyal
aa63bf71cf
macOS: Add menu items to close the OS window and the current tab
Fixes #3246
2021-01-17 06:49:25 +05:30
Kovid Goyal
86ce72e725
Port the Cocoa backend to use unicode key numbers 2021-01-16 20:52:16 +05:30
Quentin Fox
292c4ce450 add menu item to close window 2021-01-12 19:55:51 -05:00
Kovid Goyal
9193a20b44
macOS: Fix minimize not working for chromeless windows
Fixes #3112
2020-11-20 07:30:46 +05:30
Luflosi
7ad360d872
Fix incorrect decrement of the reference counts of objects
Found with the Clang Static Analyzer.
The function `schedule_notification()` for the new notification API also does not `release` similar objects.
2020-11-03 18:17:58 +01:00
Luflosi
d2ac51aa4a
Fix Clang Static Analyzer complaining about Apple coding conventions
The error message was: "Method accepting NSError** should have a non-void return value to indicate whether or not an error occurred".
2020-10-25 15:47:43 +01:00
Kovid Goyal
225e52b8b9
Merge branch 're-add-deprecated-macos-notifications' of https://github.com/Luflosi/kitty into master 2020-10-04 18:16:09 +05:30
Luflosi
0ae1f9906f
macOS: re-add deprecated notification API
The new User Notifications Framework is only available on macOS 10.14 and above, while the old NSUserNotification API is deprecated in macOS 11 (Big Sur) and will probably be removed in the future.
This commit compiles a simple test program to see if the Framework is available and then uses either the new or the old API.
2020-10-04 13:32:28 +02:00
Luflosi
7c4ad278d5
macOS: add ability to show subtitles in notifications
This used to be implemented before 4e3c6e52aad41b9deb98d052c806f4a84846b782, when the now deprecated notifications framework was still being used.
Implement it again for feature parity.
2020-10-03 16:04:32 +02:00
Luflosi
8ef53aa363
Remove unnecessary condition
According to the python documentation, `Py_CLEAR()` has no effect when the argument is `NULL`, see https://docs.python.org/3/c-api/refcounting.html#c.Py_CLEAR.
2020-09-28 12:21:23 +02:00