Commit Graph

64 Commits

Author SHA1 Message Date
Kovid Goyal
850bc12929 DRYer 2020-11-30 22:16:21 +05:30
Kovid Goyal
382c31ddf2 Use a stub rather than TYPE_CHECKING 2020-03-15 13:27:40 +05:30
Kovid Goyal
a348f64833 more typing work 2020-03-13 21:41:07 +05:30
Kovid Goyal
b6692849d6 more typing work 2020-03-12 14:52:11 +05:30
Kovid Goyal
ac2c21e046 more typing work 2020-03-09 16:13:00 +05:30
Kovid Goyal
cc1336a616 More typing work
Also use a mypy based linter when editing
2020-03-08 11:02:14 +05:30
Kovid Goyal
9b32f18109 Refactor remote control commands into individual modules
Also add type information
2020-03-08 08:39:26 +05:30
Kovid Goyal
f05890719d Add type checking for the various CLI options objects 2020-03-05 15:47:12 +05:30
Kovid Goyal
cf1b7c0adb Allow set_background_image to work over SSH 2020-02-01 11:35:12 +05:30
Luflosi
527ff0238a Replace all instances of EnvironmentError with OSError
According to the text just above https://docs.python.org/3/library/exceptions.html#EnvironmentError, `EnvironmentError` has been an alias of `OSError` since Python 3.3. Replacing it makes the code more consistent since `OSError` is used in other places in the code too.
2020-01-11 16:47:36 +01:00
Kovid Goyal
658be9405f Document the kitty remote control protocol
Fixes #1646
2019-06-12 13:12:53 +05:30
Luflosi
2b095f720e Use "with suppress()" to suppress python exceptions
Using
```Python
with suppress(OSError):
    os.remove('somefile.tmp')
```
instead of
```Python
try:
    os.remove('somefile.tmp')
except OSError:
    pass
```
makes the code more compact and more readable IMO.

This pattern was recommended by Raymond Hettinger, a Python Core
Developer in his talk "Transforming Code into Beautiful, Idiomatic Python" at https://www.youtube.com/watch?v=OSGv2VnC0go. The transcript is available at https://github.com/JeffPaine/beautiful_idiomatic_python
2019-06-03 12:27:43 +02:00
Luflosi
a792c94ccf Use python3 shebang for all python scripts
Fixes #1624.
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
Luflosi
1d91edfb00 dont -> don't 2018-08-29 03:18:25 +02:00
Kovid Goyal
9235d2b8e4 ... 2018-08-06 18:38:23 +05:30
Kovid Goyal
605847fd75 Add --no-response to kitty @ focus-window 2018-08-06 18:17:45 +05:30
Kovid Goyal
634d262b64 When using the --listen-on option have kitty @ automatically connect to the socket even when --to is not specified
The listen on value is set in the env of the child processes, so kitty @
can read it when run from inside kitty.
2018-08-04 22:06:47 +05:30
Kovid Goyal
4189aa8f14 Add a --no-response argument to kitty @ new-window
See #786
2018-08-04 15:57:43 +05:30
Kovid Goyal
8bfdc47998 macOS: Fix an error in remote control when using --listen-on. Fixes #679 2018-06-25 12:33:54 +05:30
Kovid Goyal
c09542ea6a Speed up reading of command responses 2018-06-18 11:42:32 +05:30
Kovid Goyal
ddfe7797e5 Fix #620 2018-06-09 23:21:00 +05:30
Kovid Goyal
5dbaf9aab0 Clean up usage of TTYIO for remote cmds and the shell 2018-06-08 20:17:27 +05:30
Kovid Goyal
19721014d0 Remote control: Fix kitty @ sometimes failing to read the response from kitty.
Fixes #614
2018-06-08 15:35:01 +05:30
Kovid Goyal
ea4a7136f0 Get rid of the |kitty.conf| substitution 2018-06-05 08:44:51 +05:30
Kovid Goyal
fb0db2b7df Document kitty @ 2018-05-30 19:35:54 +05:30
Kovid Goyal
28803d9a5a Use rst roles to format cli help text 2018-05-30 19:07:12 +05:30
Kovid Goyal
05ec174868 @resize-window now has a useful return code 2018-05-18 00:01:31 +05:30
Kovid Goyal
8ea84c97d5 Use an overlay window for window resizing
Also implement a remote command to resize windows
2018-05-17 23:26:41 +05:30
Kovid Goyal
de1a2f7682 Delay load some particularly heavy stdlib modules that are not often needed 2018-05-03 17:53:22 +05:30
Kovid Goyal
6141c9fdda Implement a command shell for kitty
Run it with:

kitty @
2018-04-06 12:11:37 +05:30
Kovid Goyal
a32e010f89 Move the remote commands into their own module
Separates the commands from the UI for running them.
2018-04-06 10:38:26 +05:30
Kovid Goyal
83e225a50f ... 2018-04-02 15:30:14 +05:30
Kovid Goyal
6256b9027a Add a --reset option to @ set-colors 2018-04-02 11:14:54 +05:30
Kovid Goyal
1fd84612a8 Add a remote control command to change colors
Also add a FAQ entry about changing colors in a running kitty instance.
I'm tired of all the bug reports asking for this feature. Apparently,
people find it hard to google for the existing escape codes based
solution.
2018-04-02 10:45:52 +05:30
Kovid Goyal
64b48945d4 Add a focus-tab remote command
Fixes #394
2018-03-15 17:41:49 +05:30
Kovid Goyal
bbfd463357 Dont show a useless traceback when failing to match in a remote command
Fixes #393
2018-03-15 15:45:12 +05:30
Kovid Goyal
b252504306 ... 2018-03-15 11:31:37 +05:30
Kovid Goyal
44f654ff86 Cleanup remote_control.py 2018-03-15 11:26:22 +05:30
Kovid Goyal
84cfa9382f Add argspecs for the remote control command help text 2018-03-15 11:21:13 +05:30
Kovid Goyal
c6da374aa9 Add a configurable keyboard shortcut and remote command to set the font size to a specific value
Fixes #388
2018-03-15 11:15:35 +05:30
Kovid Goyal
15f07f57bf Finish remote control via socket implementation 2018-03-03 10:32:49 +05:30
Kovid Goyal
bc21ec7551 Have kitty @ use /dev/tty instead of stdout/stdin
Allows redirecting those streams, while still being able to send
messages. Downside is that if user runs it outside kitty there wont
be any useful error message.
2018-03-02 09:08:58 +05:30
Kovid Goyal
9c21610215 Use a single generic function to get text and ANSI representations of all buffers 2018-02-14 20:38:53 +05:30
Kovid Goyal
80ca25e879 ... 2018-01-11 16:03:23 +05:30
Kovid Goyal
3cd744b247 Implement @focus-window 2018-01-10 13:23:04 +05:30
Kovid Goyal
23f2b29069 Add --keep-focus for @new-window 2018-01-10 12:36:15 +05:30
Kovid Goyal
7b33a87725 @send-text allow sending from files and stdin 2018-01-10 10:37:43 +05:30
Kovid Goyal
c11a20f1ec Add --new-tab to @new-window 2018-01-09 23:09:57 +05:30
Kovid Goyal
e5b9bd2e5a Implement @get-text 2018-01-09 22:48:24 +05:30
Kovid Goyal
5d082d8d5a Implement @new-window 2018-01-09 16:13:28 +05:30