Kovid Goyal
ff96036f62
Better window title when choosing tabs/OS windows
2020-11-21 14:58:08 +05:30
Kovid Goyal
d8790a4628
Make the help text for --linenum-action less confusing
2020-11-13 23:53:26 +05:30
Kovid Goyal
75a94bcd96
Improving MIME type detection for some common file types when they are missing from the system MIME database
...
Also allow the user to specify their own database via mime.types in the
kitty config directory. See #3056
2020-10-25 13:42:11 +05:30
Kovid Goyal
e160cbf32b
ssh kitten: Fix parsing of combined single letter options to more closely match ssh. Fixes #3053
2020-10-23 16:55:53 +05:30
Kovid Goyal
efca2658ea
Fix typing issues pointed out by updated mypy
2020-10-12 23:03:07 +05:30
Kovid Goyal
6a755bda45
A new kitten to easily query kitty for config values
2020-10-07 13:35:16 +05:30
Kovid Goyal
dab555ea3b
kittens: Dont discard pending input on startup
...
Fixes #3012
2020-10-06 16:39:00 +05:30
Kovid Goyal
b04b0c670d
Fix #3010
...
Probably ancient version of Python
2020-10-06 12:09:47 +05:30
Kovid Goyal
12c9d8d8f8
Delay load the ipaddress module
2020-10-06 06:50:17 +05:30
Sighery
10533c3eba
Hints kitten: validate IPs with ipaddress
...
On the initial commit of this feature, IPs were just matched with a
very simple regex that prioritised simplicity/readability over
accuracy.
This commit adds a postprocessor for ip matches that makes use of
Python's `ipaddress` in the standard library to validate all the IP
matches.
This way we don't need huge and complex regex patterns to match _and_
validate the IPs, and we can just use `ipaddress` to abstract us from
implementing all the validation logic into the regex pattern.
2020-10-05 20:11:25 +02:00
Sighery
b4415c90f9
Hints kitten: add support for IPs (v4 and v6)
...
It selects v4 and v6 IPs with a simple regex that doesn't actually
check for the validity of the IPs.
2020-10-05 20:11:22 +02:00
Kovid Goyal
7fe6c7e78b
Also handle EOFError
2020-09-25 18:58:03 +05:30
Kovid Goyal
6c8a4f8d9f
Handle SIGINT more gracefully
2020-09-25 18:55:43 +05:30
Kovid Goyal
12bbe5459d
Allow selecting hyperlinks via the hints kitten
2020-09-24 13:21:15 +05:30
Kovid Goyal
e0d9e05fd4
Preserve rg exit code
2020-09-23 20:33:03 +05:30
Kovid Goyal
8bea61cb99
hyperlinked_grep: Ensure filename is always printed
...
Fixes hyperlinks not working when a single file is searched
2020-09-23 19:11:09 +05:30
Kovid Goyal
d09666aba9
Unicode input kitten: Add symbols from NERD font
...
These are mostly Private Use symbols not in any standard,
however they are common enough to be useful.
Fixes #2972
2020-09-22 19:47:39 +05:30
Kovid Goyal
083c47b0f0
A new kitten to easily search files and open the results at the matched line by clicking on them.
2020-09-18 19:33:51 +05:30
Kovid Goyal
e36d41b46f
Add a --hold option to icat
...
Keeps it alive after display images
2020-09-18 11:48:31 +05:30
Kovid Goyal
7695e3a9c8
Cleanup exit flow control for remote hostname not matching
2020-09-17 16:45:02 +05:30
Kovid Goyal
6d9d048287
Verify hostname before acting on remote file URL
...
Fixes #2971
2020-09-17 16:45:02 +05:30
Kovid Goyal
09e4d101c5
DRYer
2020-09-17 16:45:02 +05:30
Kovid Goyal
d60020f5ac
Allow copying hyperlink URL to clipboard
2020-09-15 13:23:31 +05:30
Kovid Goyal
437efe5473
Allow using the ask kitten to pick a choice
2020-09-15 12:39:07 +05:30
Kovid Goyal
be29c4a243
Move class definition to utils so can be used from multiple kittens easily
2020-09-15 10:34:37 +05:30
Kovid Goyal
e21a8e3cc2
Implement save as action for remote file kitten
2020-09-15 09:28:59 +05:30
Kovid Goyal
4279d6514d
Fix path completion for ~ paths
2020-09-15 09:22:24 +05:30
Kovid Goyal
457db5994b
Fix coloring of links using target
2020-09-15 09:14:44 +05:30
Kovid Goyal
71c942d290
Add colors to the path completer
2020-09-14 22:19:56 +05:30
Kovid Goyal
ee5bc8523b
Fix input redisplay when cursor not at end
2020-09-14 20:15:36 +05:30
Kovid Goyal
174f6b7ea8
Start work on a path completion implementation
2020-09-14 19:58:36 +05:30
Kovid Goyal
b14fb6f3c4
Implement editing of remote files
2020-09-12 18:43:04 +05:30
Kovid Goyal
d6e27e776b
Start work on the remote_file kitten
...
Easy access to files over SSH
2020-09-12 06:36:41 +05:30
Kovid Goyal
e6839b45e3
typo
2020-09-10 11:57:41 +05:30
Kovid Goyal
229134cf31
Misc. fixes for issues reported by clang's static analyzer
...
Most of them are false positives. A couple of mem leaks after unlikely
failure conditions.
2020-09-10 10:47:28 +05:30
Kovid Goyal
55e15dc79e
Properly type check os window initial size function
...
Also use the sizes specified int he session file in preference to those
specified on the command line. Fixes #2909
2020-08-11 09:28:53 +05:30
Kovid Goyal
a835b56a51
Speed up is_combining_char() in the common case
2020-08-06 17:45:40 +05:30
Kovid Goyal
8c7886d429
Add a changelog entry for the last PR
2020-08-03 09:00:19 +05:30
Jay Han
ee0b70f51b
allow users to choose hint colors
2020-08-02 15:33:17 -07:00
Trygve Aaberge
d509a4fa8c
Expand ~ in the path argument for linenum in hints
...
Fixes #2822
2020-07-02 01:01:14 +02:00
Kovid Goyal
57e6e7b2c5
Use ctrl+[] for changing tabs in unicode input as ctrl+tab is taken on macOS
...
ctrl+tab remains in addition for backwards compat
2020-06-26 12:29:42 +05:30
Luflosi
2b884377d4
Fix typos
2020-06-23 16:35:13 +02:00
Kovid Goyal
2c6e5a6e73
Get multiprocessing working in kitty
...
Monkeypatch the stdlib multiprocessing module to
use kitty as its python interpreter for spawning worker
processes.
2020-06-21 14:47:24 +05:30
Kovid Goyal
e07916425e
macOS: Fix for diff kitten not working with python 3.8
...
Fixes #2780
2020-06-20 19:03:45 +05:30
Kovid Goyal
19df7b94ea
Clarify documentation a bit
2020-06-16 09:53:08 +05:30
Kovid Goyal
a3ecc79f0d
Dont actually need -- since kitty's option processing code is smart enough to stop looking for options after the first non-optional argument
2020-06-16 09:31:42 +05:30
Kovid Goyal
b140b15119
Add a -- to linenum hints examples
2020-06-16 08:30:34 +05:30
Kovid Goyal
0e2ff077af
Fix #2682
2020-05-23 09:03:44 +05:30
Kovid Goyal
5768cc98b6
...
2020-05-15 13:31:35 +05:30
Kovid Goyal
da1cc6c1c5
Add a yes/no mode to the ask kitten
2020-05-15 13:16:14 +05:30
Kovid Goyal
e39da2b2bb
Merge branch 'icat-http-timeout' of https://github.com/lamby/kitty
2020-05-11 16:58:21 +05:30
Chris Lamb
f08ec1522a
Set a default socket timeout when retrieving remote items in icat.
...
Otherwise we can easily hang when "icat"-ing resources from unreliable
websites/webcams, etc.
2020-05-11 12:24:57 +01:00
Trygve Aaberge
681fe7f2f2
Don't set word_characters to select_by_word_characters when empty string
...
This allows you to pass in --word-characters "" which will make hints
only match \w.
2020-04-13 23:02:44 +02:00
Kovid Goyal
0196920533
icat kitten: Fix display of 16-bit depth images
...
Fixes #2542
2020-04-13 23:05:10 +05:30
Kovid Goyal
4e7bf80447
diff kitten: New option to control the background color for filler lines in the margin
...
Fixes #2518
2020-04-08 20:42:49 +05:30
Kovid Goyal
bf4e8c490c
Update to Unicode 13.0
...
Fixes #2513
2020-04-06 18:59:35 +05:30
Kovid Goyal
8c23f9e526
DRYer
2020-03-28 09:20:28 +05:30
Kovid Goyal
90985cc846
Merge branch 'hints-copy-to-primary-selection' of https://github.com/trygveaa/kitty
2020-03-28 08:21:08 +05:30
Trygve Aaberge
63917944f2
Add an option to hints for copying to the primary selection
2020-03-27 20:23:02 +01:00
Kovid Goyal
8f1c6c4d74
Fix #2482
2020-03-26 00:53:19 +05:30
Kovid Goyal
0da566b49f
Hints kitten: Adjust the default regex used to detect line numbers to handle line+column numbers
...
See #2268
2020-03-25 10:03:25 +05:30
Kovid Goyal
eddd45bbc3
diff kitten: Fix images losing position when scrolling using mouse wheel/touchpad
2020-03-19 18:46:10 +05:30
Kovid Goyal
382c31ddf2
Use a stub rather than TYPE_CHECKING
2020-03-15 13:27:40 +05:30
Kovid Goyal
7c4a2ba329
Fix #2434
2020-03-14 20:19:26 +05:30
Kovid Goyal
c912eef040
Minor strictness increases
2020-03-14 14:59:31 +05:30
Kovid Goyal
8a3e71d3d0
oops
2020-03-12 11:28:58 +05:30
Kovid Goyal
149ae2866a
more typing work
2020-03-12 08:10:51 +05:30
Kovid Goyal
2ebdf738ca
more typing work
2020-03-11 20:08:16 +05:30
Kovid Goyal
2d4f194f0d
more typing work
2020-03-11 09:43:28 +05:30
Kovid Goyal
ce94a9b2df
More typing work
2020-03-11 09:35:59 +05:30
Kovid Goyal
bb8cab3a02
Add type information for tui operations cmds
2020-03-10 22:25:57 +05:30
Kovid Goyal
10435c23c2
more typing work
2020-03-10 20:25:09 +05:30
Kovid Goyal
01142cdc8c
Add type information to the Graphics Command infrastructure
2020-03-10 20:14:04 +05:30
Kovid Goyal
8ae110691e
More typing work
2020-03-09 21:06:13 +05:30
Kovid Goyal
3c2f3ecd8e
Fix #2420
2020-03-09 17:24:51 +05:30
Kovid Goyal
ac2c21e046
more typing work
2020-03-09 16:13:00 +05:30
Kovid Goyal
c817ba9eae
more typing work
2020-03-09 13:32:45 +05:30
Kovid Goyal
5bdb405635
More typing work
2020-03-09 08:56:02 +05:30
Kovid Goyal
9beae321d7
More typing work
2020-03-08 22:08:18 +05:30
Kovid Goyal
7057bc663e
Implement proper editor integration for mypy
2020-03-08 14:39:46 +05:30
Kovid Goyal
d84cff0baf
The hints kitten should by default use the URL prefixes from kitty.conf
2020-03-08 13:26:55 +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
0a6e264d09
Fix #2414
2020-03-07 15:15:27 +05:30
Kovid Goyal
afec07b124
More typing work
2020-03-06 14:19:46 +05:30
Kovid Goyal
1e998b6a3f
Use mypy in daemon mode
2020-03-05 20:38:51 +05:30
Kovid Goyal
77e9460eea
Make mypy a bit stricter
2020-03-05 19:57:28 +05:30
Kovid Goyal
f05890719d
Add type checking for the various CLI options objects
2020-03-05 15:47:12 +05:30
Kovid Goyal
ec8c96b8e6
diff kitten: Highlight pyi files as python
2020-03-04 11:52:58 +05:30
Kovid Goyal
f0b29e15c3
The utils and constants modules are now fully typechecked
2020-03-04 10:26:41 +05:30
Kovid Goyal
36eb52424f
No top level typing issues for kittens
2020-03-04 07:49:28 +05:30
Kovid Goyal
c9ce2f47dc
No top level typing issues found in kitty package
2020-03-04 07:31:22 +05:30
Kovid Goyal
a4cc10c41b
More typing work
2020-03-04 06:10:57 +05:30
Kovid Goyal
5730ce5f53
More typing work
2020-03-03 20:18:24 +05:30
Kovid Goyal
27524bfc3d
Restore global key definitions so as not to break third party kittens that might use them
2020-03-03 15:06:10 +05:30
Kovid Goyal
8843ded1c9
Refactor key encoding
...
Cannot have key names in global namespace as not all key names are valid
python identifiers. So move them into a dict.
2020-03-03 14:54:30 +05:30
Kovid Goyal
64b497589f
Start adding typing info
2020-03-03 14:31:25 +05:30
Kovid Goyal
507fbc7abf
Fix #2399
2020-02-27 07:14:44 +05:30
Trygve Aaberge
6a3eb3f3d7
tui line_edit: Set correct cursor position on end
...
Previously, the cursor would end up one character after the last typed
character when pressing end in the unicode input kitten.
2020-02-23 11:58:44 +01:00
Kovid Goyal
d6d01102fe
diff kitten: Fix directory diffing with removed binary files failing
...
Fixes #2378
2020-02-19 19:53:19 +05:30
Kovid Goyal
62e273c5bb
unicode input kitten: Allow pressing :kbd:ctrl+tab to change the input mode
...
Fixes #2343
2020-02-08 13:29:50 +05:30
Kovid Goyal
1eee6deb22
Fix #2339
2020-02-06 16:21:40 +05:30
Kovid Goyal
91673642b3
icat: Allow easily specifying z-index values below background threshold
2020-01-12 09:36:11 +05:30
Kovid Goyal
9bc1b5a2d9
hints kitten: Allow pressing :sc:goto_file_line to quickly open the selected file at the selected line in vim
...
Fixes #2268
2020-01-10 10:01:03 +05:30
Kovid Goyal
fdb915d0c8
Merge branch 'zindex' of https://github.com/ctrlcctrlv/kitty
2020-01-08 18:20:34 +05:30
Fredrick Brennan
c2769c9aed
Add --z-index to icat kitten
...
Meow.
2020-01-08 20:08:01 +08:00
Nathan DECHER
6742fabfba
fix kitty +kitten panel -c <config> resulting in no config at all
2019-12-18 00:33:40 +01:00
Kovid Goyal
90bcbbf426
No need to add index to titles when using hits kitten to choose tab/os_window
2019-11-28 10:11:14 +05:30
Kovid Goyal
5f7bcae072
hints kitten: Add an option --ascending to control if the hints numbers increase or decrease from top to bottom
2019-11-28 09:20:02 +05:30
Kovid Goyal
738878c2ff
unicode input kitten: Add an option :option:kitty +kitten unicode_input --emoji-variation to control the presentation variant of selected emojis
...
Fixes #2139
2019-11-17 13:13:37 +05:30
Kovid Goyal
d5682fe49a
Fix #2137
2019-11-17 08:35:23 +05:30
Kovid Goyal
c8627c9713
Expand user/env vars in csutomize processing path and note that absolute paths can be used in the docs for it.
2019-11-16 10:05:25 +05:30
Kovid Goyal
432d0f3318
hints kitten: Allow passing extra CLI args when using --customize-procesing
2019-11-13 17:27:55 +05:30
Kovid Goyal
400ab584ac
hints kitten: Allow completely customizing the matching and actions performed by the kitten using your own script
...
Fixes #2124
2019-11-11 21:26:42 +05:30
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
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 10e5fcc375 .
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
Kovid Goyal
60b64dadfe
Add tests for the subseq matcher
2019-01-24 20:52:18 +05:30
Kovid Goyal
edb25314c5
Add skeleton for choose kitten
2019-01-23 20:04:46 +05:30
Kovid Goyal
19bce0c23c
Start work on a choose kitten for fuzzy selection
2019-01-23 19:38:08 +05:30
Kovid Goyal
a8ad4461a1
Create a kitten to demonstrate the kitty extended keyboard protocol
2019-01-20 14:38:19 +05:30
Kovid Goyal
9fdd8e4ae4
macOS: Fix some kittens causing 100% CPU usage
2019-01-19 14:01:36 +05:30
Kovid Goyal
6b6dea5190
...
2019-01-19 13:51:18 +05:30
Kovid Goyal
5af551c96d
macOS: Fix detection of differ
...
There can be a wrapper git on macOS that complains about command line
tools installation, so check that passing --help to it actually works.
2019-01-19 12:36:34 +05:30
Kovid Goyal
3bddb9d95b
Fix an exception when chaging diff context on very small diffs
2019-01-16 21:24:34 +05:30
Kovid Goyal
fa01e0b76f
icat kitten: Add a --stdin option to control if image data is read from stdin
...
See #1308
2019-01-16 16:35:53 +05:30
Kovid Goyal
c94e06ccd2
hints kitten: Start hints numbering at one instead of zero by default. Added an option `--hints-offset` to control it.
...
Fixes #1289
Fixes #1290
2019-01-08 07:31:54 +05:30
Kovid Goyal
3e26f96744
Add some common synonyms for unicode word searching
...
Fixes #1133
2018-11-13 15:46:33 +05:30
Kovid Goyal
34aea3bca1
Merge branch 'hints-add-trailing-space' of https://github.com/maximbaz/kitty
2018-11-11 11:03:11 +05:30
Maxim Baz
f26519863f
Don't include --progam in the condition
2018-11-10 13:24:39 +01:00
Maxim Baz
a57e96500a
hints: optionally add trailing space
2018-11-10 13:19:40 +01:00
Kovid Goyal
4601cd13dc
icat kitten: Implement reading image data from STDIN, if STDIN is not connected to a terminal
...
Fixes #1130
2018-11-10 12:31:09 +05:30
Kovid Goyal
787100a4dc
Modify the kittens sub-system to allow creating custom kittens without any user interface.
...
See #870
2018-10-12 18:09:37 +05:30
Kovid Goyal
4a8c4c4601
Unicode input: Fix an error when searching for the string 'fir'
...
Fixes #1035
2018-09-28 19:01:20 +05:30
Kovid Goyal
e498cedf56
remove unused import
2018-09-27 08:52:40 +05:30
Daniel Hahler
3323ddcdef
unicode_input: use reverse mode for menu selection
2018-09-26 22:50:22 +02:00
Kovid Goyal
3bd45966c6
diff kitten: Fix spurious traceback on exit when pygments is missing
...
Fixes #863
2018-09-06 06:05:08 +05:30
Kovid Goyal
bbe8bcb28d
Fix a regression that broke layout resizing
...
Fixes #860
2018-09-05 10:51:08 +05:30
Kovid Goyal
e05aaf77ce
spelling typo
2018-09-01 10:41:35 +05:30
Kovid Goyal
59f39ae3ab
Fix detection of xprop on systems with older xprop
...
Fixes #798
2018-08-08 15:31:15 +05:30
Kovid Goyal
d964146f8c
Use ctermid() instead of hardcoding /dev/tty
2018-08-04 20:58:01 +05:30
Kovid Goyal
e05d48a574
Also prevent long running diff workers from causing a hang on exit
2018-08-04 17:51:33 +05:30
Kovid Goyal
927bfcd37a
Use only a single diff executor
2018-08-04 17:46:05 +05:30
Kovid Goyal
42cabace47
Better fix for long running highlight workers
2018-08-04 17:41:37 +05:30
Kovid Goyal
9a1f14d05c
diff kitten: Do not highlight extremely large files
...
python's asyncio module has no way to tell a process executor object to
kill its worker processes, so highlighting very large files cause the
kitten to hang around o exit till the highlighting is done
2018-08-04 17:30:45 +05:30
Kovid Goyal
000c1cf306
Implement support for emoji skin tone modifiers
...
Fixes #787
2018-08-04 10:06:25 +05:30
Kovid Goyal
e5a720c6fa
Fix detection of URLs in HTML source code (URLs inside quotes)
...
Fixes #785
2018-08-03 12:28:23 +05:30
Kovid Goyal
8d20dbe81d
Use the ! modifier when resizing images via ImageMagick
...
Should hopefully make ImageMagick respect the specified width and height
exactly.
2018-08-01 12:03:36 +05:30
Kovid Goyal
f018e1a075
Nicer check for is_binary
2018-07-28 14:02:01 +05:30
Kovid Goyal
8a812c9d02
diff kitten: Fix error when only RHS file is a binary file
...
Fixes #752
2018-07-28 13:59:32 +05:30
Kovid Goyal
341a34ea9e
Assume file extensions are up to 7 chars long
...
See .desktop files
2018-07-26 18:37:13 +05:30
Kovid Goyal
57871e1983
Restore sys.path after importing custom kitten
2018-07-25 09:51:04 +05:30
Kovid Goyal
5485436ea1
...
2018-07-24 10:18:37 +05:30
Kovid Goyal
05d51d8693
Fix #730
2018-07-20 15:55:39 +05:30
Kovid Goyal
2c3235d452
Remove need to call super-class on_resize method
2018-07-15 16:19:54 +05:30
Kovid Goyal
d2ea71a403
Remove unused code
2018-07-15 16:14:40 +05:30
Kovid Goyal
feb97b2313
Use asyncio for jobs in the diff kitten
2018-07-15 16:09:52 +05:30
Kovid Goyal
0b662ecb9a
Refactor the kittens tui loop to use asyncio
...
Gets us timers and various jobs for free, and makes it easier to
integrate with libraries that use asyncio from the larger python
ecosystem.
2018-07-15 15:27:35 +05:30
Kovid Goyal
65fef81f29
hints kitten: Add an option to select multiple items
...
Fixes #687
2018-06-29 06:49:16 +05:30
Kovid Goyal
0c88e11cd7
More useful exception when unexpected output encountered from a kitten
2018-06-27 14:13:40 +05:30
Kovid Goyal
66a52ac588
Also ignore failure to read readline history in the ask kitten
2018-06-22 17:23:55 +05:30
Kovid Goyal
491f233d33
diff kitten: When triggering a search scroll to the first match automatically
2018-06-19 10:30:52 +05:30
Kovid Goyal
fedde51c12
...
2018-06-16 10:16:06 +05:30
Kovid Goyal
ad97315925
diff kitten: Misc fixes to msg display in the status line
2018-06-16 08:57:02 +05:30
Kovid Goyal
e8f7a2b345
Dont send on_text events with empty text
2018-06-16 08:55:10 +05:30
Kovid Goyal
3669d4135c
diff kitten: Add keybindings to search without regex
2018-06-16 08:45:42 +05:30
Kovid Goyal
8b4fe494cf
Format matches count the same as scroll percent
2018-06-16 08:24:32 +05:30
Kovid Goyal
6f7ea49008
Switch to high number OSC codes instead of DCS string codes for dynamic color push/pop
2018-06-15 15:21:46 +05:30
Kovid Goyal
84b99b1b3d
diff kitten: Clear the search when pressing Esc
2018-06-15 15:00:09 +05:30
Kovid Goyal
1022d8a0ee
diff kitten: Show the number of matches in the status bar when doing a search
2018-06-15 14:57:03 +05:30
Kovid Goyal
cd6a46730a
...
2018-06-15 14:48:59 +05:30
Kovid Goyal
59743fd7a1
diff kitten: Allow theming the selection background/foreground as well
2018-06-15 14:43:39 +05:30
Kovid Goyal
fe3b10a8fb
diff kitten: Implement searching for text in the diff
...
Fixes #574
2018-06-15 14:28:42 +05:30
Kovid Goyal
22cffef7c8
diff kitten: Use a single-width replacement for control chars
...
Preserves text width better, and conveys the essential message, namely
non-printable characters. Most people wont know what <hex code> is in
any case.
2018-06-15 08:08:21 +05:30
Kovid Goyal
5dfb8b1d80
diff kitten: Display CRLF line endings using the unicode return symbol instead of <d> as it is less intrusive.
...
Fixes #638
2018-06-15 07:08:57 +05:30
Kovid Goyal
82f9f002bd
diff kitten: Fix default foreground/background colors not being restored when kitten quits. Fixes #637
2018-06-14 23:25:13 +05:30
Kovid Goyal
2a8295d71c
diff kitten: Better error message when one of the arguments does not exist
2018-06-14 21:53:13 +05:30
Kovid Goyal
7214b66aa5
A new tui API for simple line editing
...
Handles basic line-editing with the extended keyboard protocol and
support for wide chars.
Currently used by the unicode input kitten.
2018-06-14 13:11:48 +05:30
Kovid Goyal
61dd52b50f
Ignore the non-characters from the unicode standard in addition to ignoring the control characters
2018-06-14 10:20:13 +05:30
Kovid Goyal
fc74d22724
Nicer error message when specifying a non-existent kitten
2018-06-09 13:49:33 +05:30
Kovid Goyal
ca41e642fb
Nicer error message when no kitten name is specified
2018-06-09 13:47:49 +05:30
Kovid Goyal
83849ab07a
Document the clipboard kitten
2018-06-09 13:32:32 +05:30
Kovid Goyal
02ac2336bd
DRYer
2018-06-09 12:47:52 +05:30
Kovid Goyal
c094ebce07
Set VMIN to 1 as without it poll() returns immediately even when no data is available to read on macOS
2018-06-09 11:17:12 +05:30
Kovid Goyal
65ed9c759c
...
2018-06-09 11:10:58 +05:30
Kovid Goyal
83fe2438f9
Forgot to port the exception handler loop
2018-06-09 11:08:25 +05:30
Kovid Goyal
caa20aa081
Use the new tty code in tui as well
2018-06-09 09:06:48 +05:30
Kovid Goyal
0cc008e737
Use TTYIO for the icat kitten as well
2018-06-08 20:21:05 +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
c76a8242e2
Make the icat kitten work even if stdout/stdin are redirected
2018-06-06 12:04:10 +05:30
Kovid Goyal
8a1a45b067
Allow the diff kitten to work even if stdout/stdin are redirected
...
Now directly opens /dev/tty
2018-06-06 12:01:47 +05:30
Kovid Goyal
8f433f5ff6
...
2018-06-06 11:27:03 +05:30
Kovid Goyal
97c317b735
Make screen_size handling in tui cleaner
...
Now screen size is fetched only for output_fd rather than sys.stdout
2018-06-06 11:20:55 +05:30
Kovid Goyal
d39cf5d702
Get rid of the default diff.conf
2018-06-05 10:44:18 +05:30
Robert Ricci
da6ad5df45
Switch to generic hash instead of sha1 specifically
...
Suggested by @maximbaz
2018-06-04 15:43:03 -06:00
Robert Ricci
a9f394ce18
Fix stray text
2018-06-04 14:28:35 -06:00
Robert Ricci
093921cb9a
Add support for sha1 hashes to the hint kitten
...
This is specifically intended for git commit hashes, so it allows for
hashes as short as 7 characters (git's default length for abbreviated
hashes) up to the full 40 characters
2018-06-04 14:25:38 -06:00
Kovid Goyal
7cf6b8b594
Move the config utils into its own package
2018-06-03 11:54:26 +05:30
Kovid Goyal
620782aa80
Document the icat kitten
2018-06-02 14:45:46 +05:30
Kovid Goyal
bd9a4e9cd8
Dont hardcode the ssh options
2018-06-02 14:30:05 +05:30
Kovid Goyal
bb8e0e7789
Add CLI docs for the diff kitten
2018-06-02 13:09:18 +05:30
Kovid Goyal
7236e0ff21
Add CLI docs for the hints kitten
2018-06-02 13:04:25 +05:30
Kovid Goyal
9a615efa83
Document CLI of panel kitten
2018-06-02 12:24:21 +05:30
Kovid Goyal
ec0edd6f45
A new kitten to draw dock panels on X11 desktops showing the output from running arbitrary terminal programs
2018-06-02 11:27:01 +05:30
Kovid Goyal
06237b85f5
Only add to server_args unconditionally if two non-option args have been seen
2018-06-01 22:55:13 +05:30
Kovid Goyal
d319180e88
...
2018-06-01 22:48:19 +05:30
Kovid Goyal
d8f5dc958d
ssh kitten: Handle combined single character options
2018-06-01 22:47:07 +05:30
Kovid Goyal
cd80a85d2d
ssh kitten: Dont transfer terminfo if any of the -Nnf arguments are passed to ssh
2018-06-01 20:33:57 +05:30
Kovid Goyal
0d7feb0404
ssh kitten: Allow specifying args to pass to ssh
...
Uses the same syntax as the ssh command. Note that currently specifying
-N -f or similar will not work (it does not make sense anyway as you
only use this kitten if you plan on an interactive ssh session).
Fixes #591
2018-06-01 07:42:25 +05:30
Kovid Goyal
28803d9a5a
Use rst roles to format cli help text
2018-05-30 19:07:12 +05:30
Kovid Goyal
f6d0cadcc5
Redirect old asciidoc pages to new website
2018-05-30 12:52:59 +05:30
Kovid Goyal
dab57f3819
When receiving contiguous non-empty OSC 52 clipboard writes, combine them.
...
Max combined text is set at 1MB. Allows sending texts larger than the
escape code size limit.
2018-05-28 21:50:42 +05:30
Kovid Goyal
daafea7f7e
Don't add a newline at the end of the size output
2018-05-28 14:19:12 +05:30
Kovid Goyal
5f7bc8bff2
Opening for reading is sufficient
2018-05-28 14:11:10 +05:30
Kovid Goyal
8809b8db56
Make --print-screen-size work when stdout is redirected
2018-05-28 14:09:52 +05:30
Kovid Goyal
6570565e2d
Rename --print-screen-size to --print-window-size
...
We are reporting the size (inner area) of the terminal window, not the
full screen.
2018-05-28 13:14:42 +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
20611c7c15
Add a convenience option to kitty icat to print the screen size
2018-05-28 10:11:19 +05:30
Kovid Goyal
f36e6f0461
Nicer handling of empty lines
2018-05-26 13:40:43 +05:30
Kovid Goyal
978dc008e2
hints kitten: Fix a regression that caused some blank lines to be not displayed
2018-05-26 13:35:44 +05:30
Kovid Goyal
94f1759b14
Update README
2018-05-24 19:31:08 +05:30
Kovid Goyal
a33ebce3c9
diff kitten: Add keybindings to scroll by a page
2018-05-24 15:17:03 +05:30
Kovid Goyal
219d3161d9
diff kitten: Fix incorrect syntax highlighting with a few file formats such as yaml
2018-05-24 15:00:26 +05:30
Kovid Goyal
2a5ef628fa
DRYer
2018-05-23 13:25:46 +05:30
Kovid Goyal
4b259dd719
diff kitten: Make the keyboard shortcuts configurable
...
Fixes #563
2018-05-23 13:10:32 +05:30
Kovid Goyal
beded75547
Make ssh kitten work with the execrable dash shell
2018-05-23 09:54:33 +05:30
Kovid Goyal
46b4f33850
A nice error message when using shortcuts to change background_opacity without setting dynamic_background_opacity
...
Also change the default shortcuts
2018-05-23 09:14:10 +05:30
Kovid Goyal
6fbb953aa4
Add a note about needing a temp file for tic
2018-05-22 23:18:11 +05:30
Kovid Goyal
30b38e9fa0
Drop the requirement for having python on the server when using the ssh kitten
2018-05-22 23:15:24 +05:30
Kovid Goyal
d20e801793
Add a kitten to easily ssh into servers that automatically copies the terminfo files over
2018-05-22 22:32:51 +05:30
Kovid Goyal
3fd2f03f11
Print failure message to standard error
2018-05-21 23:26:57 +05:30
Kovid Goyal
4ad4e28a9c
...
2018-05-21 23:25:59 +05:30
Kovid Goyal
d3edd2e73f
Add a kitten to get/set the clipboard via OSC 52
2018-05-21 23:24:27 +05:30
Kovid Goyal
3d37348c2b
...
2018-05-21 23:17:44 +05:30
Kovid Goyal
48847cdaf8
hints kitten: Fix detection of URLs in ReStructuredText
2018-05-21 16:14:49 +05:30
Kovid Goyal
e70b5114fb
diff kitten: resolve symlinks before passing paths to the diff tool
2018-05-21 15:50:28 +05:30
Kovid Goyal
70352ca722
kittens: Don't fail on systems that return invalid values for SC_IOV_MAX. Fixes #558
2018-05-21 12:22:46 +05:30
Kovid Goyal
be28e7bf46
Update README
2018-05-21 11:30:19 +05:30
Kovid Goyal
6b2b8e0208
...
2018-05-21 11:00:24 +05:30
Kovid Goyal
c997dc8ea7
Add a link to the default diff.conf
2018-05-21 10:59:10 +05:30
Kovid Goyal
a20e7e2a6b
Add a note about why kitty-diff is kitty only
2018-05-21 10:51:50 +05:30
Kovid Goyal
624dfdf913
Update README
2018-05-20 17:33:09 +05:30
Kovid Goyal
b6baa99fce
diff kitten: Make the representation of tabs configurable
2018-05-20 15:37:52 +05:30
Kovid Goyal
912b395316
diff kitten: Render tabs as four spaces instead of <9>
2018-05-20 15:29:12 +05:30
Kovid Goyal
b1b90d2bf7
Replace tabs in README
2018-05-20 15:17:19 +05:30
Kovid Goyal
37bd964fee
Add some notes about integrating with git
2018-05-20 15:12:21 +05:30
Kovid Goyal
fa3e173c18
diff kitten: Report errors converting images
2018-05-20 15:01:25 +05:30
Kovid Goyal
2a9dc23c61
...
2018-05-20 12:44:16 +05:30
Kovid Goyal
2885f54360
Add README for diff kitten
2018-05-20 12:41:40 +05:30
Kovid Goyal
ac2f4c8ab6
Nicer window title for the diff kitten
2018-05-20 12:26:14 +05:30
Kovid Goyal
9cab8a2de5
diff kitten: Do not specify the default foreground color in formatting codes.
...
Fixes an issue with foreground color being incorrect after a highlighted
segment if the syntax highlight does not specify a foreground color at
the boundary.
2018-05-20 08:51:41 +05:30
Kovid Goyal
029b82807c
Ignore \ prefixed lines when parsing patches
2018-05-19 23:02:49 +05:30
Kovid Goyal
67c0942e01
Fix error reporting in the diff kitten
2018-05-19 22:51:02 +05:30
Kovid Goyal
fb57653665
Make debugging kittens a little nicer
...
Now debug() writes to the stderr of the parent kitty process instead of
a temp file.
2018-05-19 16:32:08 +05:30
Kovid Goyal
646a349d82
...
2018-05-19 15:11:08 +05:30
Kovid Goyal
ad1109b6fe
Hints kitten: Overhaul making it more intelligent
...
It now uses information about the geometry of the screen.
So URLs that stretch over multiple lines are detected even if there is a
hard line break in between (some programs like mutt generate these).
2018-05-19 14:31:00 +05:30
Kovid Goyal
2a713cab60
kittens should specify their own required input type
...
It is DRYer. Also replace the run_kitten function with just kitten that
takes no type of input argument. Backward compat for run_kitten is
maintained.
2018-05-18 22:55:42 +05:30
Kovid Goyal
26df57a1c7
More elegant handling for pressing enter with no valid current input in the hints kitten
2018-05-18 21:28:43 +05:30
Kovid Goyal
6020aadbf2
diff kitten: Show overall diff stats
2018-05-18 14:19:25 +05:30
Kovid Goyal
f8b6b532e0
diff kitten: Show scroll %
2018-05-18 13:36:12 +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
91a1d61cc6
diff: Fix margins not being reset on exit
2018-05-10 16:21:26 +05:30
Kovid Goyal
b8e9921f3d
Forgot this file in previous commit
2018-05-10 16:20:58 +05:30
Kovid Goyal
e0ce5d5629
tui: Cleanup unhandled exception processing
...
Also handler finalization should happen before term manager
finalization.
2018-05-10 16:20:33 +05:30
Kovid Goyal
ed511c296c
Avoid needing to resend images on every draw_screen()
2018-05-10 15:58:52 +05:30
Kovid Goyal
eab1fbbbb0
diff: Mark displayed images as change starts
2018-05-10 15:29:53 +05:30
Kovid Goyal
ee3b052a50
tui: Preserve cursor position when placing images
2018-05-10 15:27:35 +05:30
Kovid Goyal
51d76e5a2b
...
2018-05-10 14:37:43 +05:30
Kovid Goyal
a6bce0b221
diff: More work on showing images
2018-05-10 14:33:09 +05:30
Kovid Goyal
fb5dc8a2ba
A spot of refactoring
2018-05-10 11:52:51 +05:30
Kovid Goyal
d571ee0d01
diff: More work on displaying images
2018-05-10 11:50:46 +05:30
Kovid Goyal
5d7ed67316
diff: More work on displaying images
2018-05-10 10:36:50 +05:30
Kovid Goyal
2e313fbdd2
Better exception for image conversion failure
2018-05-09 20:50:56 +05:30
Kovid Goyal
5c3e4db05f
DRYer
2018-05-09 20:36:53 +05:30
Kovid Goyal
2be2f6aa0c
Make icat a kitten
...
The kittens framework did not exist when icat was first written.
2018-05-09 20:26:30 +05:30
Kovid Goyal
6d038f5cdf
Pass the image manager to the render code
2018-05-09 20:12:39 +05:30
Kovid Goyal
27feccba39
diff: More work on image support
2018-05-09 19:41:37 +05:30
Kovid Goyal
2e69b904da
diff: More work on images
2018-05-09 14:06:15 +05:30
Kovid Goyal
683e5a4754
DRYer
2018-05-09 11:32:09 +05:30
Kovid Goyal
d51a424b98
diff: Start work on image display
2018-05-09 10:25:53 +05:30
Kovid Goyal
b9fa8dbe42
DRYer
2018-05-09 09:28:38 +05:30
Kovid Goyal
3820c46801
Ensure there is a blank line before each new item
2018-05-09 08:33:24 +05:30
Kovid Goyal
b663160bc2
Fix rendering of binary files
2018-05-09 08:17:52 +05:30
Kovid Goyal
a65c807a4a
diff: Add keyboard shortcuts to got to next/previous change
2018-05-09 08:12:40 +05:30
Kovid Goyal
3a1f85cb69
diff: Make the diff implementation configurable
2018-05-08 23:32:21 +05:30
Kovid Goyal
196bd9c22b
Allow setting the number of context lines in diff.conf
2018-05-08 23:17:40 +05:30
Kovid Goyal
9bf2087b55
Better error message when pygments style is not found
2018-05-08 23:13:50 +05:30
Kovid Goyal
51e589c7e6
diff: Add a option for pygments style
2018-05-08 23:08:20 +05:30
Kovid Goyal
7365ed9b05
diff: Better title rendering
2018-05-08 23:02:00 +05:30
Kovid Goyal
9cb7a6b2c7
...
2018-05-08 22:50:00 +05:30
Kovid Goyal
9ff7eae1af
diff: Add an option to control syntax aliases
2018-05-08 22:46:25 +05:30
Kovid Goyal
61e1b74434
Highlight .pyj files as python
2018-05-08 22:32:34 +05:30
Kovid Goyal
324c223d54
diff kitten: keyboard shortcuts to change the number of lines of context
2018-05-08 22:19:50 +05:30
Kovid Goyal
96793a296c
diff kitten has working syntax highlighting
2018-05-08 14:48:01 +05:30
Kovid Goyal
7b1626a38f
Ensure highlighting is run only once
2018-05-08 09:20:36 +05:30
Kovid Goyal
09a3a3dafb
More work on the diff kitten
2018-05-08 08:43:41 +05:30
Kovid Goyal
03256d8ac9
Code to integrate with pygments
2018-05-07 13:30:59 +05:30
Kovid Goyal
23ee6b3109
More work on the diff kitten
2018-05-06 16:25:04 +05:30
Kovid Goyal
d133ffac25
Make using tui.operations more convenient
2018-05-06 15:34:11 +05:30
Kovid Goyal
ffc6e65392
Implement scrolling for the diff kitten
2018-05-06 14:41:10 +05:30
Kovid Goyal
d61086907d
Add a global debug function to the kittens
2018-05-06 13:48:40 +05:30
Kovid Goyal
5b58c2892d
Rename module
2018-05-06 10:35:01 +05:30
Kovid Goyal
67379c67cc
More work on the diff kitten
2018-05-05 13:38:28 +05:30
Kovid Goyal
f5c713b118
More work on the diff kitten
2018-05-05 09:45:35 +05:30
Kovid Goyal
5efa26a98d
Micro-optimization
2018-05-04 15:48:58 +05:30
Kovid Goyal
51d2c01bc1
Highlight changed in individual lines in chunks that have the same number of adds/removes
2018-05-04 15:35:11 +05:30
Kovid Goyal
be9d876997
find common prefix and suffix of two strings
2018-05-03 20:15:28 +05:30
Kovid Goyal
866b53f384
More work on the diff kitten
2018-05-03 18:05:55 +05:30
Kovid Goyal
93ff651d9e
...
2018-05-02 15:52:10 +05:30
Kovid Goyal
bec0f02b11
More work on the diff kitten
2018-05-02 15:26:47 +05:30
Kovid Goyal
0721951c79
Add hunk title lines
2018-05-02 09:47:24 +05:30
Kovid Goyal
0b93b85cf2
Dont use case range in names.h as it prevents compilation with Visual Studio
2018-05-01 11:27:10 +05:30
Kovid Goyal
f7001ea068
Fix character names for control characters not being read from unicode database
...
Also allow unicode_names.c to be compiled with python 2 so I can re-use
it in calibre.
2018-05-01 10:13:58 +05:30
Kovid Goyal
4760580d1c
More work on the diff kitten
2018-04-29 08:07:03 +05:30
Kovid Goyal
8fa492e0ee
More work on the diff kitten
2018-04-28 14:07:24 +05:30
Kovid Goyal
f68f8bf9c9
macOS: Fix changing tab title and kitty shell not working
...
I forgot that Apple has its own special snowflake readline variant.
Fixes #494
2018-04-27 15:16:26 +05:30
Kovid Goyal
84ab0f5062
More work on the diff kitten
2018-04-26 08:01:12 +05:30
Kovid Goyal
d54b58d2f3
...
2018-04-25 19:50:40 +05:30
Kovid Goyal
0be0963dc7
Utility method to truncate formatted lines to specified width
2018-04-25 19:34:04 +05:30
Kovid Goyal
61a2360df5
hints kitten: Detect bracketed URLs and dont include the closing bracket in the URL.
2018-04-25 14:33:37 +05:30
Kovid Goyal
316e7cb9f5
Also use cwd of child when opening programs via the hints kitten
2018-04-25 09:07:35 +05:30
Kovid Goyal
7a543fac86
Wire up color handling in the diff kitten
2018-04-24 10:58:15 +05:30
Kovid Goyal
5c4b14468c
Apply default colors in diff kitten
2018-04-24 10:33:18 +05:30
Kovid Goyal
0b99bb534f
Unicode input: When searching by name search for prefix matches as well as whole word matches
...
So now hori matches both "hori" and "horizontal". Switched to a
prefix-trie internally.
2018-04-24 07:45:20 +05:30
Kovid Goyal
92ca8ab9cc
Fix #482
2018-04-23 07:19:40 +05:30
Kovid Goyal
b5da109e7f
Wire up config infrastructure for diff kitten
2018-04-22 21:44:47 +05:30
Kovid Goyal
20c42ab519
tui: Allow handlers to finalize() as well as initialize()
2018-04-22 13:14:25 +05:30
Kovid Goyal
8bbc2b82d4
More work on the diff kitten
2018-04-22 13:05:58 +05:30
Kovid Goyal
6929358976
More work on the diff kitten
2018-04-21 15:45:16 +05:30
Kovid Goyal
cd25abc49f
...
2018-04-20 22:06:42 +05:30
Kovid Goyal
92bb6e293a
Add threaded job infrastructure to tui
2018-04-20 21:12:10 +05:30
Kovid Goyal
d5907a1bf9
More work on the diff kitten
2018-04-19 10:26:14 +05:30
Kovid Goyal
0a8dc4be0a
Start work on the diff kitten
2018-04-17 17:43:56 +05:30
Kovid Goyal
ba177c61bc
...
2018-04-16 16:46:42 +05:30
Kovid Goyal
52f4e81d59
hints kitten: Reverse order of hints
...
Gives hints at the bottom of the screen smaller numbers. In
non-fullscreen usage matches closer to the bottom are more likely to be
the ones the user is looking for. Fixes #460
2018-04-14 23:07:53 +05:30
Kovid Goyal
1056ab1b81
Store marks in the index map
2018-04-14 23:01:49 +05:30
Kovid Goyal
339a2e0800
Add a word select type to the hints kitten
2018-04-12 13:49:12 +05:30
Kovid Goyal
c95d1393cc
Add some more default keybindings for the hints kitten
2018-04-12 13:01:16 +05:30
Kovid Goyal
6a090ac740
Add a --type argument to hints kitten
...
Allows addition of more sophisticated types of matches later.
2018-04-12 10:30:32 +05:30
Kovid Goyal
3c7236557c
hints: Use --program=@ to copy to clipboard
2018-04-12 10:16:48 +05:30
Kovid Goyal
83a3d99824
Make --help work for all kittens
2018-04-12 09:33:50 +05:30
Kovid Goyal
808750a76a
Rename url_hints to just hints
2018-04-12 09:23:48 +05:30
Kovid Goyal
038248f55d
Remove unnecessary handling of passed in files to url_hints
2018-04-12 09:04:54 +05:30
Kovid Goyal
21b7bf6009
url_hints: Allow using a group to ignore prefix/suffix when matching via regex
2018-04-12 08:54:36 +05:30
Kovid Goyal
805baad9cd
More appropriate message when URLs not found
2018-04-12 07:27:40 +05:30
Kovid Goyal
56dd442e2c
Flush output streams on kitten end
2018-04-11 20:24:39 +05:30
Kovid Goyal
cb7fff6986
Refactor the ask kitten to use the new API
2018-04-11 14:40:58 +05:30
Kovid Goyal
75b5130d96
Allow the URL hints kitten to insert the selected URL into the terminal
2018-04-11 13:22:07 +05:30
Kovid Goyal
2cf8c6aea7
Refactor the kittens framework
...
Make it possible to perform arbitrary actions with the kittens output
and also allow running kittens from standalone python files.
2018-04-11 13:09:31 +05:30
alexander white
f99e368831
Fixed crash on tab-completing without any search results.
2018-04-07 14:10:16 -04:00
Kovid Goyal
58e33e2512
URL hints: Exclude trailing punctuation from URLs
2018-04-04 08:53:12 +05:30
Kovid Goyal
90a4b4f859
URL hints kitten: Open the URL from within the kitty process. This ensures that the behavior of the program used to open the URL is the same as when ctrl+shift clicking URLs. Fixes #424
2018-04-01 16:48:07 +05:30
Kovid Goyal
be8f2b8106
Create a shortcut to set the tab title
...
No longer need to use remote control just to change tab titles.
2018-03-25 09:55:02 +05:30
Kovid Goyal
71db024a3b
Add history based completion to the ask kitten
2018-03-24 11:49:34 +05:30
Kovid Goyal
3790af6897
Basic ask kitten
2018-03-23 18:03:43 +05:30
Kovid Goyal
527255e3a1
Fix compilation with gcc 8
...
Apparently some nitwit Linux distros have made an unreleased compiler
their default compiler. Fixes #376
Fixes various new warnings that GCC 8 issues
2018-03-12 10:38:12 +05:30
Kovid Goyal
51b6b325b9
Add a keyboard shortcut to edit the kitty config file easily
...
Fixes #366
2018-03-09 17:57:09 +05:30
Kovid Goyal
3b34821c86
Report unhandled exceptions during loop initialization in the unicode input kitten as well
2018-03-08 13:57:13 +05:30
Kovid Goyal
eaea0b16b5
Fix URL hints not working on macOS
...
Fixes #363
2018-03-08 13:38:16 +05:30
Kovid Goyal
1b84064e5f
...
2018-03-08 13:01:35 +05:30
Kovid Goyal
dd128a99ac
Report unahndled exceptions when starting loop in URL hints kitten
2018-03-08 12:58:54 +05:30
Kovid Goyal
e8f3f00792
Handle cols being zero
2018-02-27 18:48:48 +05:30
Kovid Goyal
11e85ac703
Swapped unicode input name and hex mode prompt strings
2018-02-24 14:51:49 +05:30
Kovid Goyal
97b4256ba4
Remove unused code
2018-02-14 18:50:52 +05:30
Kovid Goyal
e4b643fdaf
Show a nice message when no URLs are found
2018-02-14 18:36:57 +05:30
Kovid Goyal
51e3e9997c
Allow clicking URLs via keybaord hints by pressing ctrl+shift+e
2018-02-14 17:18:57 +05:30
Kovid Goyal
ad706f9924
Make the list of URL prefixes configurable
2018-02-14 12:48:44 +05:30
Kovid Goyal
57cf789c75
Finish up the URL hints kitten
2018-02-14 12:34:01 +05:30
Kovid Goyal
62174fdbcc
DRYer
2018-02-14 11:19:58 +05:30
Kovid Goyal
0c3257b6b9
Start work on url hints kitten
2018-02-14 11:01:17 +05:30
Kovid Goyal
4bbf5c0bc9
Allow choosing a match by index in the search by name panel as well
2018-02-13 11:25:45 +05:30
Kovid Goyal
b0820f6e13
Use . instead of r for the index char
2018-02-13 11:10:35 +05:30
Kovid Goyal
b0f5d8dfdc
Fix table row generation for non-name unicode input panels
2018-02-13 10:50:06 +05:30
Kovid Goyal
67e0d3723a
Implement favorites for unicode input
2018-02-13 10:33:55 +05:30
Kovid Goyal
a36f4a4670
Add a Emoji panel to the unicode input kitten
2018-02-13 09:06:39 +05:30
Kovid Goyal
dab852c412
Implement searching for unicode characters by name
2018-02-12 14:08:54 +05:30
Kovid Goyal
193ac6cd81
Forgot to remove from recent when adding to top of list
2018-02-12 12:39:02 +05:30
Kovid Goyal
34ca8419bb
Finish chose unicode symbol by recently used
2018-02-12 10:19:29 +05:30
Kovid Goyal
6094aabe26
...
2018-02-12 10:19:29 +05:30
Kovid Goyal
3363a9459b
Implement drawing of titlebar, remembering of mode and fix various bugs in tui
2018-02-12 10:19:29 +05:30
Kovid Goyal
f0d4ad16d2
Work on search by name in unicode input
2018-02-12 10:19:29 +05:30
Kovid Goyal
e119ed0daa
Ignore harmless KeyError while modifying selectors
2018-02-09 20:20:18 +05:30
Kovid Goyal
8c18486836
Module with all the data for unicode entry by character name
2018-02-09 19:56:25 +05:30
Kovid Goyal
3068846d8f
Implement using Ctrl+Shift+u to input unicode
...
Fixes #302
2018-02-08 22:47:17 +05:30
Kovid Goyal
194454715f
Basic unicode input works
2018-02-08 22:16:39 +05:30
Kovid Goyal
d19f9e5b96
Fix error handling in tui.loop
2018-02-08 12:33:27 +05:30
Kovid Goyal
213a223861
Typo in incremental decoder init
2018-02-08 11:56:34 +05:30
Kovid Goyal
ef9a24932f
Start work on unicode input kitten
2018-02-08 11:00:57 +05:30
Kovid Goyal
0f63d1bfa7
...
2018-02-07 22:41:03 +05:30
Kovid Goyal
66a897cc80
Add interrupt and eot callbacks
2018-02-07 19:46:53 +05:30
Kovid Goyal
e3b4919c17
Finish up tui.Loop
2018-02-07 13:30:34 +05:30
Kovid Goyal
168bc58635
The kittens learn about mice
2018-02-07 12:40:04 +05:30
Kovid Goyal
f4f0b8fd5f
Kittens learn about bracketed paste
2018-02-07 10:39:05 +05:30
Kovid Goyal
35f1658f4a
Key and text handler for the kittens
2018-02-06 20:58:46 +05:30
Kovid Goyal
22cf67b407
More work on tui.loop
2018-02-06 20:08:28 +05:30
Kovid Goyal
452ff02b15
Oops added extra file in previous commit
2018-02-04 20:34:02 +05:30
Kovid Goyal
c2cb43cc07
Framework for kittens
2018-02-04 20:23:52 +05:30