Kovid Goyal
382c31ddf2
Use a stub rather than TYPE_CHECKING
2020-03-15 13:27:40 +05:30
Kovid Goyal
d3f37eeba4
more typing work
2020-03-14 11:42:05 +05:30
Kovid Goyal
b6692849d6
more typing work
2020-03-12 14:52:11 +05:30
Kovid Goyal
ce94a9b2df
More typing work
2020-03-11 09:35:59 +05:30
Kovid Goyal
c817ba9eae
more typing work
2020-03-09 13:32:45 +05:30
Kovid Goyal
afec07b124
More typing work
2020-03-06 14:19:46 +05:30
Kovid Goyal
77e9460eea
Make mypy a bit stricter
2020-03-05 19:57:28 +05:30
Kovid Goyal
0f4e7921ee
Create an auto-generated stub file for the kitty Options object
2020-03-04 19:14:50 +05:30
Kovid Goyal
f0b29e15c3
The utils and constants modules are now fully typechecked
2020-03-04 10:26:41 +05:30
Kovid Goyal
3b36470e84
When resolving scrollback pager if it is not present in system PATH try using shell PATH
2020-02-03 08:03:35 +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
9edad62144
hints kitten: Allow using named groups in the regular expression. The named groups are passed to the invoked program for further processing.
2019-11-11 17:34:19 +05:30
toonn
a64a0d64cb
Prefer VISUAL to EDITOR
...
Fix #2096
2019-10-25 18:52:17 +02:00
Luflosi
5f855ce547
Use context managers to open files
...
Inspired by d50a6ddc1b .
2019-08-01 13:21:26 -05:00
Luflosi
5143b62a07
Add kakoune to the list of editors
2019-07-20 01:07:10 +02:00
Kovid Goyal
277f43aed6
Linux: Disable the Wayland backend on GNOME
...
GNOME has no support for server side decorations.
Can be controlled by new option linux_display_server.
2019-06-04 19:10:13 +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
Kovid Goyal
e44b331cc3
Fix exception when getting function name for debug_keyboard action dispatch
...
Fixes #1401
2019-02-23 08:00:21 +05:30
Kovid Goyal
d20c65ef80
Graphics protocol: Only delete temporary image-data files if they are in a known temporary file location
2018-12-11 10:00:43 +05:30
Kovid Goyal
df11da74e9
Fix #1156
2018-11-20 08:49:07 +05:30
Kovid Goyal
718111582a
Fix #1136
2018-11-12 09:15:41 +05:30
Luflosi
1d91edfb00
dont -> don't
2018-08-29 03:18:25 +02:00
Kovid Goyal
cf7ecd5e66
Do not import fast_data_types at the top level of utility modules
2018-08-28 10:27:06 +05:30
Kovid Goyal
da15477aaf
Make the choice of default editor a bit more robust
2018-07-25 08:57:44 +05:30
Kovid Goyal
0398dbdcbe
Fix extra blank lines when using log_error()
2018-06-19 12:51:54 +05:30
Kovid Goyal
c5583d380d
No need to use select() for TTYIO
...
Instead make read() block with timeout via termios
2018-06-18 11:10:16 +05:30
Kovid Goyal
f820f72768
Add a kitty @ get-colors command
2018-06-18 10:02:05 +05:30
Kovid Goyal
6db1f8e3e3
Dont read more data than needed in TTYIO
2018-06-18 08:36:47 +05:30
Kovid Goyal
ba7f0132f2
Add a command line option to make --single-instance wait for the closing of the newly opened window before quitting. Fixes #630
2018-06-12 20:53:25 +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
7cf6b8b594
Move the config utils into its own package
2018-06-03 11:54:26 +05:30
Kovid Goyal
345b3437f4
Add a config option to set the EDITOR kitty uses
...
Useful on systems that make it hard to set system-wide environment
variables. See #580
2018-05-28 12:24:09 +05:30
Kovid Goyal
3b04776956
Show the window much sooner after creating it
...
Do not make any OpenGL calls between creation and showing of the window.
Hopefully, that will make the fussy wlroots happy.
2018-05-27 12:37:50 +05:30
Kovid Goyal
a29c317217
Add code to disable terminal echo to non_blocking_read
2018-05-21 22:09:34 +05:30
Kovid Goyal
029500f3ed
Store fd for screen_size at creation time
2018-05-10 18:27:18 +05:30
Kovid Goyal
2819a4ebf3
...
2018-05-10 09:53:17 +05:30
Kovid Goyal
043530409c
DRYer
2018-05-10 07:47:29 +05:30
Kovid Goyal
27feccba39
diff: More work on image support
2018-05-09 19:41:37 +05:30
Kovid Goyal
7d39d5c088
Ensure only a single screen size function is used
2018-05-09 14:14:09 +05:30
Kovid Goyal
683e5a4754
DRYer
2018-05-09 11:32:09 +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
23851e31bf
When calling pass_selection_to_program use the current directory of the child process as the cwd of the program. Fixes #491
2018-04-25 08:30:22 +05:30
Kovid Goyal
9962ac2703
...
2018-04-23 10:54:04 +05:30
Kovid Goyal
edc4b91d15
Expand ~ and env vars in program names. Fixes #483
2018-04-23 10:53:20 +05:30
Kovid Goyal
964ffadc8e
DRYer
2018-03-08 13:37:56 +05:30
Kovid Goyal
c7506496da
Unify error logging between python and C
2018-03-04 11:55:47 +05:30
Kovid Goyal
1e3d3df9b8
Remove unused code
2018-03-04 10:59:12 +05:30
Kovid Goyal
ed75ad0d41
Log a timestamp as well when printing error messages from python
2018-03-04 10:44:28 +05:30