Kovid Goyal
35d4e2d4e0
Clean up previous PR
2021-10-05 11:36:29 +05:30
Matt Fellenz
072e583835
Properly evaluate /etc/issue placeholders
2021-10-04 20:49:48 -07:00
Kovid Goyal
8aacf30f19
Centralize definition of file transfer OSC code
2021-09-08 13:43:59 +05:30
Kovid Goyal
ef76c075e0
Get rid of bits from CellAttrs
2021-08-18 10:06:08 +05:30
Kovid Goyal
780e526143
Use a union for cell attributes
...
Cleaner code, no performance impact
2021-08-18 10:06:08 +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
be34af4555
Remove inline from .c files
...
It is ignored by compilers and hides unused static functions
2021-08-03 09:11:17 +05:30
Kovid Goyal
fcd206891f
kitty @ get-text add an option to also get the current cursor position and state as ANSI escape codes
...
Fixes #3625
2021-05-15 09:27:28 +05:30
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
0ec7e6c36f
Make the freetype text rendering code re-useable in multiple contexts
2021-04-01 11:28:23 +05:30
Kovid Goyal
cdbc096990
Start work on rendering text for CSDs
2021-03-29 12:15:47 +05:30
Kovid Goyal
2a96d2621c
Use cleanup in a few more places to simplify the code
2021-02-19 18:53:30 +05:30
Kovid Goyal
d55fde9eea
Use EINTR safe wrappers for open() and shm_open()
2021-01-31 07:02:11 +05:30
Kovid Goyal
3162d391cc
Start work on disk cache
2020-12-29 19:16:21 +05:30
Kovid Goyal
dab555ea3b
kittens: Dont discard pending input on startup
...
Fixes #3012
2020-10-06 16:39:00 +05:30
Kovid Goyal
a3bbad0060
Allow specifying the optional actions for tcsetattr
2020-10-06 16:30:23 +05:30
Kovid Goyal
444080f320
Make wcswidth useable in a streaming fashion
2020-09-21 15:55:22 +05:30
Kovid Goyal
f8a80ccf5f
Move the wcswidth functions out of screen.c
...
They have nothing to do with screens
2020-09-17 21:24:52 +05:30
Kovid Goyal
392f576d07
Instrument safe_close() to make it easy to see where an fd is closed from
2020-07-14 20:18:04 +05:30
Luflosi
9cb2c4b1ff
Simplify code
...
There is already a check if `m` is `NULL`, so there is no need for a second `NULL` check after that.
2020-05-22 16:04:28 +02:00
Kovid Goyal
624dd78460
Actually apply mark colors when rendering
2020-01-13 09:51:03 +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
7bf0afa621
Fix #2187
2019-12-08 22:37:47 +05:30
Kovid Goyal
f9e4e71285
Slightly better error message when opening controlling terminal fails
2019-10-07 20:48:31 +05:30
Kovid Goyal
97fe38fbbc
monotonic_start_time needs to be a global symbol, not local to each translation unit
2019-09-28 08:18:21 +05:30
Kovid Goyal
2e71dde780
Merge branch 'monotonic_t' of https://github.com/Luflosi/kitty
2019-09-27 19:23:27 +05:30
Luflosi
f3b9ff5f9f
Use datatype monotonic_t instead of double to keep track of time
...
The time is stored in a signed 64 bit integer with nanosecond accuracy. This eliminates the possibility of floating-point inaccuracies.
`monotonic_t` can currently hold values large enough to work correctly for more than 200 years into the future.
Using a typedef instead of directly using `int64_t` everywhere will also allow easily changing the datatype in the future should the need arise for more precise or bigger time values.
2019-09-25 17:43:11 +02:00
Kovid Goyal
38f73b9f5e
Fix #1832
2019-07-23 13:31:09 +05:30
Kovid Goyal
8f8138d9bd
Have monotic() return numbers offset from init time
2019-07-08 10:30:06 +05:30
Kovid Goyal
c848c3ee0d
Use an interrupt-safe close()
2019-07-05 14:39:07 +05:30
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
Luflosi
0e2a5c63c6
Convert some tabs to spaces
2019-02-02 22:08:32 +01:00
Kovid Goyal
c4aeb1adba
Report the current foreground processes as well as the original child process, when using kitty @ ls
2019-01-03 13:14:39 +05:30
Kovid Goyal
ac686a47c1
Fail early when opening tty fails
2018-09-02 14:29:10 +05:30
Kovid Goyal
d964146f8c
Use ctermid() instead of hardcoding /dev/tty
2018-08-04 20:58:01 +05:30
Kovid Goyal
b4269199b4
Fix #771
2018-07-30 07:58:34 +05:30
Kovid Goyal
0dd3334811
Implement getting cmdline of process on macOS as well
2018-07-24 11:07:53 +05:30
Kovid Goyal
2b035739f8
Make the PNG reader code re-useable
2018-07-07 07:46:15 +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
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
caa20aa081
Use the new tty code in tui as well
2018-06-09 09:06:48 +05:30
Kovid Goyal
5701ec4082
Remove duplicate import
2018-06-08 15:42:42 +05:30
Kovid Goyal
04afe969a0
Fix building on macOS with termios.h
2018-06-08 15:41:40 +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
6f2d63eb87
Implement SGR dim
...
kitty now supports the SGR DIM escape code, which makes text fade into
the background. It works by alpha blending the text color into the
background color. Fixes #446
2018-05-20 10:43:26 +05:30
Kovid Goyal
bb939ed4f8
Remove unused code
2018-04-20 22:19:31 +05:30
James McCoy
215a7689d9
Correct types for various PyArg_ParseTuple/Py_BuildValue calls
...
Debian's [mips] build failed one of the font tests:
FAIL: test_sprite_map (kitty_tests.fonts.Rendering)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/kitty_tests/fonts.py", line 48, in test_sprite_map
self.ae(test_sprite_position_for(0, 1), (0, 1, 1))
self = <kitty_tests.fonts.Rendering testMethod=test_sprite_map>
AssertionError: Tuples differ: (0, 0, 0) != (0, 1, 1)
First differing element 1:
0
1
- (0, 0, 0)
? ^ ^
+ (0, 1, 1)
? ^ ^
This was due to test_sprite_position_for() using the "I" code to parse
into an unsigned short. Since mips is big endian, the "wrong" byte was
stored into extra_glyphs.data.
This commit changes all similar data type mismatches that were found
from auditing calls to PyArg_ParseTuple/Py_BuildValue.
[mips]: https://buildd.debian.org/status/fetch.php?pkg=kitty&arch=mips&ver=0.9.0-1&stamp=1524126606&raw=0
2018-04-20 08:28:26 -04:00
Kovid Goyal
fa064bf9cf
When kitty is built from a git checkout show the current revision in --debug-config
2018-04-01 20:27:31 +05:30
Kovid Goyal
f7f9ceec34
Consolidate signal handling
...
Move the signal handler for SIGCHLD into child-monitor.c
Makes for cleaner code.
2018-03-12 21:53:02 +05:30