Commit Graph
240 Commits
Author SHA1 Message Date
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
Benoit de Chezelles 53275c9137 Extract key event data to struct 2019-09-24 19:15:35 +02:00
Kovid Goyal c905978874 Merge branch 'fix_issue_1924' of https://github.com/s1341/kitty
Fixes #1924
2019-08-26 10:19:50 +05:30
Kovid Goyal 472c6f6b8d When running kittens, use the colorscheme of the current window rather than the configured colorscheme
Fixes #1906
2019-08-18 18:27:44 +05:30
Luflosi b5c2163238 Add option to hide the window title on macOS
Deprecate `macos_show_window_title_in_menubar` and create a new option `macos_show_window_title_in`.
2019-08-02 00:20:43 -05:00
Kovid Goyal 49429b5f49 When zeroing memory, use type independent code
Reduces the potential for bugs
2019-07-23 10:54:10 +05:30
Kovid Goyal 003cd0a203 Add a little more event loop debug output 2019-07-07 06:10:59 +05:30
Kovid Goyal c848c3ee0d Use an interrupt-safe close() 2019-07-05 14:39:07 +05:30
Kovid Goyal 5dc4e79c8d Move code to handle loop wakeup and signals into its own module 2019-07-05 12:19:37 +05:30
Kovid Goyal 2cfd55f3ce Linux: Use the system "bell" for the terminal bell
Adds libcanberra as a new dependency to play the system sound.
2019-07-03 22:06:47 +05:30
Kovid Goyal 6a31909557 Make the MIN and MAX macros typesafe 2019-07-01 17:03:47 +05:30
Luflosi 893f406a99 Remove empty lines 2019-06-26 17:50:14 +02:00
Kovid Goyal 656916e0fa Use remove_i_from_array in a few more places
Also simplify the REMOVER macro
2019-06-07 14:25:33 +05:30
Kovid Goyal 4a55eb9e7f typo 2019-06-07 13:53:35 +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
Kovid Goyal 6037167336 Allow controlling the ligature strategy dynamically, per window
Fixes #1574
2019-04-27 22:05:33 +05:30
Kovid Goyal 3aaa69b36c ... 2019-01-31 20:57:21 +05:30
Kovid Goyal 41906cf7db Infrastructure to monitor child processes for death 2019-01-31 20:43:50 +05:30
Kovid Goyal de130787f6 Make the charsets code useable in kittens 2019-01-23 11:33:45 +05:30
Kovid Goyal f8ebba3954 Fix changing cursor_text_color via remote control not working
Fixes #1229
2018-12-16 17:12:49 +05:30
Kovid Goyal ee3ce3c7d8 Move cell_as_sgr to line.c 2018-09-30 08:58:33 +05:30
Dominique Martinet 2fe17aa889 cursor_as_sgr now works on GPUCells becomes cell_as_sgr 2018-09-22 19:10:09 +09:00
Dominique Martinet f76c8ad30b pager history buffer: alloc buffer progressively
Realloc buffer 1MB at a time until the configured size is reached
2018-09-22 19:10:09 +09:00
Dominique Martinet 3d862da2be pager history buffer: implement rewrap
rewarp the buffer the first time it is displayed after the window
changed
2018-09-22 19:10:09 +09:00
Dominique Martinet e08238d5a0 pager history buffer: add config option, keep buffer on resize 2018-09-22 18:02:11 +09:00
Dominique Martinet d0104660c8 Implement pager scrollback history buffer
For now, use big fixed-size buffer that is lost on resize
2018-09-22 18:02:11 +09:00
Kovid Goyal 2ec84969dd Fix drag-scrolling not working when the mouse leaves the window confines
Fixes #917
2018-09-09 14:30:32 +05:30
Kovid Goyal 0e248b3faa Write escape codes to children atomically
Ensure a partial escape code is never written
2018-08-29 09:01:52 +05:30
Kovid Goyal 009ef54de7 Implement high precision scrolling with the trackpad on platforms such as macOS and Wayland that implement it.
Fixes #819. Note that I have no idea whether the code works well on
retina screens, might have to multiple the pixel count by the scale
factor on those screens?
2018-08-24 11:00:58 +05:30
Kovid Goyal 9af3081f45 The focus_follows_mouse option now also works across top-level kitty OS windows
Fixes #772
2018-07-30 21:26:20 +05:30
Kovid Goyal 2c27316c4a Get rid of the cursor program
Cursors will now be drawn in the cell program using a sprite
2018-07-19 12:46:25 +05:30
Kovid Goyal 5a85c890ba Add a printf annotation of the log_error function 2018-07-13 16:39:47 +05:30
Kovid Goyal c8fc21d336 Linux: Allow using XKB key names to bind shortcuts to keys not supported by GLFW
Useful to bind keys such as the play/pause or volume buttons. Also can
be used to bind non-ascii keys on international keyboards. Fixes #665
2018-06-22 12:41:50 +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
Robert Ricci 8e84b21452 Re-order includes for "_POSIX_C_SOURCE"
One FreeBSD, the build was getting errors about _POSIX_C_SOURCE
being redefined. The fix for this is to make sure that Python.h
gets included before any system libraries.
2018-06-02 11:26:02 -06:00
Kovid Goyal 8dea5b3e3e Reduce data sent to GPU per draw by 30%
Split up the Cell structure into a CPUCell and a GPUCell. Only the
GPUCell part needs to be sent to the GPU. Should make kitty use even
less system resources and make a performance difference on systems where
the GPU bandwidth is constrained.

Also allows adding more CPU only data in the future without affecting
GPU bandwidth. For example, hyperlinks or more combining characters.
2018-05-27 21:25:09 +05:30
Kovid Goyal 523aadaa3b Refactor font group handling
Allow kitty to manage multiple groups of fonts with different cell
sizes. Will eventually allow kitty to have different font sizes/dpi per
OSWindow
2018-05-27 12:37:05 +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 3f316c39d1 Dynamically allocate the scrollback history buffer
Reduces startup memory consumption when using very large scrollback
buffer sizes.
2018-05-03 15:17:02 +05:30
Kovid Goyal bd0382830a Add a setting (kitty_mod) to change the modifier used by all the default kitty shortcuts, globally
See #487
2018-04-24 08:53:07 +05:30
Kovid Goyal da8e2d3d4a Adjust keys callback for new glfw keyboard API 2018-03-31 12:21:36 +05:30
Kovid Goyal 582500d3e9 Basic changes for new glfw keyboard API 2018-03-31 12:21:36 +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 c7506496da Unify error logging between python and C 2018-03-04 11:55:47 +05:30
Kovid Goyal ebe97bf492 Get rid of safe_wcwidth
Since wcwidth is now in our control, we dont need to wrap it.
2018-02-05 10:11:30 +05:30
Kovid Goyal fc7ec1d3f7 Get rid of the option to use the system wcwidth
The system wcwidth() is often wrong. Not to mention that if you SSH into
a different machine, then you have a potentially different wcwidth. The
only sane way to deal with this is to use the unicode standard.
2018-02-04 21:02:30 +05:30
Kovid Goyal 855b3de473 Implement support for save/restore of DEC private modes (CSI ? s/r) 2018-02-01 09:19:43 +05:30
Kovid Goyal 80301d465b Handle non-BMP combining characters
Use a level of indirection to store combining characters. This allows
combining characters to be stored using only two bytes, even if they are
after USHORT_MAX
2018-01-18 16:25:42 +05:30
Kovid Goyal 409bd37db5 Store combining chars as an array in the Cell
Makes it easier to increase the number of combining chars if needed,
rather than storing them as a mask.
2018-01-18 14:10:58 +05:30
Kovid Goyal 5fd4bc965f Annotate Cell structure
Make it clear what parts are needed only on the CPU
2018-01-18 12:47:49 +05:30