Luflosi
5e7fd21c8d
Use "with suppress()" to suppress a python exception
2019-10-28 18:35:21 +01:00
Luflosi
b710ffc403
Fix icat kitten
...
Fixes https://github.com/kovidgoyal/kitty/issues/2081 .
This bug was introduced in 10e5fcc37535fdf6eed7f03f1c5380a2b4f0db9c.
One place in the code requires the actual `screen_size_function`, not just the result of it.
2019-10-20 21:37:14 +02:00
Benoit de Chezelles
10e5fcc375
Fix usage of icat function show
...
The `screen_size` function was not initialized yet
2019-10-18 04:54:14 +02:00
Kovid Goyal
802da7087c
diff kitten: Allow diffing remote files easily via ssh
...
See #727
2019-10-04 09:08:22 +05:30
Kovid Goyal
b709ee6842
Add a function to check if a codepoint is a symbol
2019-10-01 18:57:06 +05:30
Luflosi
6cc720a350
Fix typos
...
Inspired by 4d3ee554b3 .
Found using `codespell`.
2019-08-26 12:31:15 +02:00
Kovid Goyal
a5d6cd169e
Fix piping PNG images into the icat kitten not working
...
Fixes #1920
2019-08-24 08:04:04 +05:30
Kovid Goyal
afcaca85da
Merge branch 'hints_regex_doc' of https://github.com/toonn/kitty
2019-08-18 07:41:14 +05:30
Toon Nolten
2575349ec2
Add expected regex syntax to hints kitten docs
...
The hints kitten's help documentation did not mention what syntax to use
for the regular expressions. I knew much of kitty was implemented in
python so I guessed correctly but not everyone might know this.
I also fixed some double-spaced sentences because most of them are
single-spaced.
2019-08-17 21:27:53 +02:00
Kovid Goyal
8e1ed2f8c3
Update unicode data to 12.1
2019-08-02 14:48:18 +05:30
Kovid Goyal
bdf7d98a36
hints kitten: Allow specifying :option:kitty +kitten hints --program multiple times to run multiple programs
...
See #1879
2019-08-02 10:03:04 +05:30
Luflosi
5f855ce547
Use context managers to open files
...
Inspired by d50a6ddc1b .
2019-08-01 13:21:26 -05:00
Kovid Goyal
68f3b6fbeb
Fix the decode_hint function to work with an arbitrary alphabet
2019-08-01 19:31:21 +05:30
Kovid Goyal
dc6d14943e
Dont use a global variable for the hints alphabet
2019-08-01 19:24:09 +05:30
Kovid Goyal
05f7334db9
hints kitten: Add a :option:kitty +kitten hints --alphabet option to control what alphabets are used for hints
...
Fixes #1879
2019-08-01 16:25:54 +05:30
Kovid Goyal
7ab5244bf5
ssh kitten: Make argument parsing more like ssh
...
Fixes #1787
2019-07-09 17:48:43 +05:30
Kovid Goyal
2719926870
Add some documentation on how to get regexes in the hints kitten to match over multiple lines.
2019-07-03 10:45:37 +05:30
Kovid Goyal
6a31909557
Make the MIN and MAX macros typesafe
2019-07-01 17:03:47 +05:30
Kovid Goyal
af3504e05c
Ensure that ensure_space() does not leave a NULL pointer
2019-06-24 16:00:45 +05:30
Kovid Goyal
38bc90f724
unicode_input kitten: Fix a regression that broke using indices to select recently used symbols.
2019-06-17 07:11:07 +05:30
Kovid Goyal
2e99259589
Make it possible to run custom kittens via kitty +kitten
...
Should help reduce confusion about how kittens work. Fixes #1712
2019-06-14 09:05:03 +05:30
Kovid Goyal
83e6b75872
More helpful error message if user tries to run a custom kitten via kitty +kitten
2019-06-14 08:23:25 +05:30
Kovid Goyal
8ebad06e7e
clipboard kitten: Add a --wait-for-completion option to have the kitten wait till copying to clipboard is complete
...
Fixes #1693
2019-06-07 07:13:15 +05:30
Luflosi
4eed8463b3
Simplify chained comparisions
2019-06-05 15:24:36 +02:00
Kovid Goyal
c0a96f2087
icat kitten: Fix a regression that broke passing directories to icat
...
Fixes #1683
2019-06-05 07:36:47 +05:30
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
Kovid Goyal
4f163338dd
Allow controlling how multiple selections are handled in the hints kitten
...
Fixes #1665
2019-06-02 09:23:20 +05:30
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
4fff84b4b9
Add void to all function declarations for functions that take no arguments
...
Micro-optimization for some architectures. Enforced via
-Wstrict-prototypes
2019-05-13 11:04:21 +05:30
Kovid Goyal
c6d3ede57e
Fix show_error kitten --title not working
2019-04-28 20:48:57 +05:30
Kovid Goyal
1c4f5b471d
Fix #1575
2019-04-27 07:58:07 +05:30
Kovid Goyal
6f5ff05c56
Merge branch 'master' of https://github.com/fdev31/kitty
2019-04-19 14:09:48 +05:30
fdev31
2376b7c255
implement fast browsing of the unicode input
...
useful for zones with icons
2019-04-18 22:52:06 +02:00
Kovid Goyal
6c8ccbd73a
...
2019-03-07 06:40:33 +05:30
Kovid Goyal
2550bc910d
Fix specifying initial window size in cells not working correctly on HiDPI screens
...
Fixes #1444
2019-03-06 21:23:54 +05:30
Kovid Goyal
facd353228
Update to using the Unicode 12 standard
2019-03-06 13:58:16 +05:30
Kovid Goyal
5adf7c2a3a
icat kitten: Add a --silent flag to avoid printing anything to stdout
...
Useful for integration with other tools. See #1308
2019-02-27 09:02:15 +05:30
Luflosi
3b34cec64c
Consistent case for color codes
2019-02-25 14:47:14 +01:00
Luflosi
37afd7aaa7
Fix memory leak
2019-02-23 15:46:16 +01:00
Luflosi
862075bd65
Fix memory leak
2019-02-23 12:32:40 +01:00
Luflosi
174a45b4bd
Add check for NULL after malloc()
2019-02-23 09:13:12 +01:00
Kovid Goyal
aed504efdc
Remove unnecessary NULL check
2019-02-23 07:42:08 +05:30
Kovid Goyal
502c31b408
icat: Ensure temp files are cleaned up
2019-02-15 10:08:25 +05:30
Kovid Goyal
062563a562
icat: Add support for file:// URLs as well
2019-02-15 09:59:54 +05:30
Kovid Goyal
8952afd6cc
Fix compilation of new choose kitten under FreeBSD
...
I hope. Fixes #1347
2019-01-30 09:11:25 +05:30
Kovid Goyal
c8dfe955d7
...
2019-01-29 11:08:34 +05:30
Kovid Goyal
5ff4a6f4d8
Add a note to the icat help about viewing URLs
2019-01-27 21:33:03 +05:30
Kovid Goyal
5172597d96
Also process ftp URLs in icat
2019-01-27 21:30:53 +05:30
Kovid Goyal
a09fb7b20d
icat kitten: Add support for displaying images at http(s) URLs
...
Fixes #1340
2019-01-27 21:28:46 +05:30