Commit graph

233 commits

Author SHA1 Message Date
Kirill Chibisov 7b814c3be7 Bump winit version
Fixes cursor icon managing with `hide_when_typing: true` on Wayland.
2019-10-16 21:20:38 +02:00
Christian Duerr 729eef0c93
Update to winit/glutin EventLoop 2.0
This takes the latest glutin master to port Alacritty to the EventLoop
2.0 rework.

This changes a big part of the event loop handling by pushing the event
loop in a separate thread from the renderer and running both in
parallel.

Fixes #2796.
Fixes #2694.
Fixes #2643.
Fixes #2625.
Fixes #2618.
Fixes #2601.
Fixes #2564.
Fixes #2456.
Fixes #2438.
Fixes #2334.
Fixes #2254.
Fixes #2217.
Fixes #1789.
Fixes #1750.
Fixes #1125.
2019-10-05 02:29:26 +02:00
Christian Duerr 8aa406b98b
Bump minimum Rust version to 1.36.0 2019-09-09 21:40:48 +00:00
Bastien Orivel 20846ef925 Update and dedupe parking_lot to 0.9 2019-09-06 19:35:28 +00:00
Kirill Chibisov db63c31554 Fix Wayland selection clipboard not storing text when stopping outside of window 2019-09-03 15:42:24 +00:00
Bastien Orivel a8692983f5 Update depedencies 2019-08-18 02:46:29 +00:00
Kirill Chibisov 1da986ae2b
Fix smithay-clipboard integration
Fixes: #2574
2019-08-16 01:33:37 +02:00
Christian Duerr 14fa02648e
Remove errno depedency 2019-08-04 20:17:22 +00:00
Christian Duerr 9dddf649a1
Switch to rfind_url for URL detection
This switches to rfind_url for detecting URLs inside the grid. Instead
of expanding at the cursor position, the complete terminal is searched
from the bottom until the visible region is left with no active URL.

Instead of having the field `cur` publicly accessibly on the
`DisplayIterator`, there are the two methods `DisplayIterator::point`
and `DisplayIterator::cell` for accessing the current element of the
iterator now. This allows accessing the current element right after
creating the iterator.

Fixes #2629.
Fixes #2627.
2019-08-01 15:37:01 +00:00
Christian Duerr 86b9cdbabe
Bump minimum supported Rust version to 1.34.0 2019-07-30 22:13:51 +00:00
Wild Kat 14a48a2533 Update gl_generator to 0.13 2019-07-28 17:03:52 +00:00
Christian Duerr a23b372f34
Fix NetBSD build failure
Fixes #2631.
2019-07-22 18:56:08 +00:00
Christian Duerr c4d2725e14
Fix row occ not set during new and reset
Since ref tests were only stored whenever winit requested the window
close, they would not get stored properly when the terminal was closed
through Alacritty using `exit`, Ctrl+D or similar.

This moves the ref test code to the and of the main entry point, which
will always be executed regardless of how the terminal was shutdown.

Fixes #2613.
2019-07-10 21:17:20 +00:00
Christian Duerr 165246f50a
Fix saving of ref tests
Since ref tests were only stored whenever winit requested the window
close, they would not get stored properly when the terminal was closed
through Alacritty using `exit`, Ctrl+D or similar.

This moves the ref test code to the and of the main entry point, which
will always be executed regardless of how the terminal was shutdown.
2019-07-07 14:51:11 +00:00
Christian Duerr a3f56a5f09
Fix X11 clipboard hanging with mime set 2019-06-29 14:35:53 +00:00
Christian Duerr f002171c84
Fix performance issues with text reflow
Fixes #2567.
Fixes #2414.
2019-06-23 23:29:01 +00:00
Christian Duerr cc3e4d3d5c
Bump version to 0.3.3 2019-06-16 14:10:15 +00:00
Christian Duerr 8ea28eb1b0
Bump version to 0.3.3-rc2 2019-06-15 21:34:13 +02:00
Christian Duerr 1b26059a06
Bump smithay-clipboard dependency version 2019-06-15 19:08:51 +00:00
Bastien Orivel 6cd0f12efb Remove reqwest dependency on Windows 2019-06-13 21:18:01 +00:00
Christian Duerr 0b88b9fee4
Bump version to 0.3.3-rc1 2019-06-09 22:10:42 +02:00
Christian Duerr bc2c34eb7f
Add wayland primary selection clipboard support 2019-06-09 11:46:31 +00:00
Christian Duerr 4cd55acd78
Bump minimum supported Rust version to 1.32.0 2019-06-08 16:01:14 +00:00
Bernardo Meurer 679b15e274 Update Cargo.lock 2019-05-17 19:08:42 +00:00
Christian Duerr 5d173f6df3
Refactor config parsing files
This is a large refactor of the config parsing structure, attempting to
reduce the size of the file a bit by splitting it up into different
modules with more specific purposes.

This also fixes #2279.
2019-05-10 11:36:16 +00:00
Bastien Orivel 81cd108395 Update dependencies 2019-05-08 08:38:52 +00:00
Christian Duerr f3cc7c4c4e
Fix empty clipboard freezing Alacritty on X11
This fixes #2392.
2019-05-04 18:05:45 +00:00
Nathan Lilienthal 34c54e7e0e
Add git hash to version string, and fix crate name (#2397)
This moves `cli` out of `alacritty_terminal` and into `alacritty` where
it belongs, along with the `clap` dependency.
2019-05-03 19:48:25 -04:00
Christian Duerr 9e89aaa477
Switch from copypasta to rust-clipboard
This switches our own `copypasta` crate with the more standardized
`clipboard` library, which allows us to get rid of the `xclip`
dependency on X11.

Additionally, this lays the foundation for native Wayland clipboard
support once the clipboard crate is updated (or a fork is created).

Fixes #5.
2019-04-28 20:21:39 +00:00
Theodore Dubois dbd8538762 Split alacritty into a separate crates
The crate containing the entry point is called alacritty, and the crate
containing everything else is called alacritty_terminal.
2019-04-28 13:24:58 +00:00
Ben Pye b0efa9d105 Add DirectWrite font rasterizer
This adds a DirectWrite font rasterizer for Windows and enables
subpixel rendering and hinting.

It also completely replaces rusttype for font rendering on Windows,
allowing Alacritty to use the native font stacks on all operating systems.

Fixes #1673.
Fixes #2316.
2019-04-23 17:41:21 +00:00
Christian Duerr 4fbae5e397
Bump version to 0.3.2 2019-04-22 22:19:55 +00:00
Christian Duerr 2b39e6bf99
Bump version to 0.3.1 2019-04-22 16:04:58 +00:00
Christian Duerr cfc20d4f34
Fix cursor dimensions with font offset
Previously cursor dimensions were not calculated correctly when a font
offset was specified, since the font offset was completely ignored.

This has been fixed by moving all the cursor logic from the font into
the Alacritty crate, applying the config's offsets before rasterizing
the cursors.

This has also fixed an issue with some cursors not being rendered as
double-width correctly when over double-width glyphs.

This fixes #2209.
2019-04-19 18:00:24 +00:00
Christian Duerr 6716c81c08
Fix update_lines performance issues
This resolves performance issues with the `update_lines` method that
were caused by excessive updates without underlines or strikeout
present.

This also resolves a bug that was causing the underline and strikeout to
extend beyond the end of line in some rare cases.

This fixes #114.
2019-04-19 12:07:56 +00:00
Christian Duerr 56fea343ff
Set maximum Rust version to 1.31.0
By setting the minimum Rust version and enforcing it with CI, Alacritty
should hopefully make it possible for maintainers to package the
application even on distributions which are not rolling release.

The 1.31.0 target has been chosen here because it's the first version of
the Rust 2018 release. Bumping this version in the future should be
considered to be a breaking change and should only be done with caution
and in consideration of the supported Rust versions of the major
distributions available.

This fixes #2277.
2019-04-09 19:29:46 +00:00
Christian Duerr 6757acbb82
Bump version to 0.3.0 2019-04-08 19:14:51 +00:00
Christian Duerr f0dbfc9b9c
Fix build errors on BSD
This updates winit and glutin to the latest git versions instead of
relying on releases to fix a build failure on BSD.

Unfortunately the upstream version bumps might still take a bit and
there hasn't been any feedback with regards to a planned release date.

This also fixes a slight issue on Windows where selections would start
when focusing a window and a build failure with some Linux systems

Fixes #2243.
Fixes #2170.
Fixes #2244.
2019-04-04 23:11:29 +00:00
David Hewitt 83b5474c4f Upgrade to winapi 0.3.7 2019-04-04 17:04:06 +00:00
Christian Duerr e98ea64c74
Bump dependencies 2019-04-03 22:57:54 +00:00
Christian Duerr 86ccd0566e
Fix BSD build failure
This updates all dependencies removing any reference to nix 0.12 which
prevents successful builds on OpenBSD.

Fixes #2244.
2019-04-02 23:29:36 +00:00
Hirokazu Hata 94cf97b42d Update Cargo.lock 2019-03-15 00:11:44 +00:00
Christian Duerr 0f96a62218
Update glutin to version 0.20
Fixes #458.
Fixes #1681.
2019-03-14 20:06:38 +00:00
Rachel K 62c1d999e1 Fix signal handling on Unix systems
This removes the the signal handling machinery in tty::unix, and
replaces it with functionality from signal-hook, which should be more
robust. Signals caught by signal-hook wake up the existing I/O event
loop, which then delegates back to the PTY to handle them.

In particular, this allows `SIGCHLD` (i.e. child process exits) to shut
down the terminal promptly, instead of sometimes leaving the window
lingering.

Fixes #915.
Fixes #1276.
Fixes #1313.

As a side effect, this fixes a very rare bug on Linux, where a `read`
from the PTY on the master side would sometimes "fail" with `EIO` if the
child closed the client side at a particular moment. This was subject to
a race condition, and was very difficult to trigger in practice.
2019-03-12 19:44:47 +00:00
Christian Duerr 3ec53b4f0b
Bump version to 0.2.9 2019-02-11 23:59:21 +00:00
Christian Duerr 85df82a6fd
Bump version to 0.2.8 2019-02-10 20:14:52 +00:00
Christian Duerr 35efb4619c
Dynamically resize terminal for errors/warnings
The warning and error messages now don't overwrite other terminal
content anymore but instead resize the terminal to make sure that text
can always be read.

Instead of just showing that there is a new error and pointing to the log,
errors will now be displayed fully in multiple lines of text, assuming that
there is enough space left in the terminal.

Explicit mouse click handling has also been added to the message bar,
which made it possible to add a simple `close` button in the form of
`[X]`.

Alacritty's log file location is now stored in the `$ALACRITTY_LOG`
environment variable which the shell inherits automatically.

Previously there were some issues with the log file only being deleted
when certain methods for closing Alacritty were used (like typing
`exit`). This has been reworked and now Ctrl+D, exit and signals should
all work properly.

Before the config is reloaded, all current messages are now dropped.
This should help with multiple terminals all getting clogged up at the
same time when the config is broken.

When one message is removed, all other duplicate messages are
automatically removed too.
2019-02-07 22:36:45 +00:00
Christian Duerr 851e77383e
Remove library lockfiles from git
Following Rust's standard, the lockfiles for Alacritty's
sub-libraries have been removed.

One instance of the deprecated `ATOMIC_USIZE_INIT` has
also been removed.

This fixes #2040.
2019-02-04 23:12:56 +00:00
M. Stoeckl 40237b213a Simplify text shader 2019-02-04 19:03:25 +00:00
Christian Duerr 5e0d740943
Update dependencies
This resolves an issue with notify that caused excessive wake-ups when
waiting for config updates.

Fixes #2029.
2019-01-23 22:05:47 +00:00
Christian Duerr d62fe71b60
Bump version to 0.2.7 2019-01-21 16:39:24 +00:00
Christian Duerr 693edaab3f
Bump version to 0.2.6 2019-01-19 16:00:09 +00:00
Carlos Tuñón 09003f6c30 Fix crash on macOS and BSD with SpawnNewInstance action 2019-01-19 13:45:45 +00:00
Christian Duerr 5d3cbe51bc
Fix CPU load when moving windows between monitors 2019-01-09 22:51:04 +00:00
Christian Duerr 55c894b30b
Bump version to 0.2.5
This bumps the version number to 0.2.5 and prepares everything for the
next versioned release.
2019-01-07 17:36:16 +00:00
David Hewitt f1bc6802e1 Add support for Windows ConPTY API 2018-12-28 16:01:58 +00:00
Bastien Orivel 562d96341c Update reqwest to 0.9 2018-12-27 20:43:55 +00:00
Bastien Orivel e6c4d08192 Use mio-extras instead of mio-more
The latter isn't maintained anymore and this removes a bunch of outdated
dependencies.
2018-12-27 19:49:29 +00:00
Christian Duerr cf9d94eb12
Add color option to visual bell
This adds the option to specify the color of the visual bell using the
`visual_bell.color` configuration setting.

This is done by rendering a big quad over the entire screen, which also
opens up options to draw other arbitrary rectangles on the screen in the
future.
2018-12-17 19:06:07 +00:00
Steve Blundy 0c3e28617a Fixing tabs in copy-paste
This resolves issues with copy-pasting tabs by including them in the
pasted string.

Selection of tabs is still inconsistent with what might be expected
based on other terminal emulators, however the behavior hasn't
regressed.

This fixes https://github.com/jwilm/alacritty/issues/219.
2018-12-15 21:33:33 +00:00
Christian Duerr 21f888ec41
Update dependencies
This fixes #1674.
2018-12-15 12:10:26 +00:00
Christian Duerr 7ab0b44847
Bump version to 0.2.4 2018-12-09 23:28:29 +00:00
Zac Pullar-Strecker 6f4ad9bb4f Move winpty-sys dep to crates.io 2018-11-24 12:02:10 +13:00
Andrei-Marius Radu e72a649794 Update filetime to v0.2.4
filetime v0.2.3 fails to build on OpenBSD.

This fixes #1784 .
2018-11-18 15:49:16 +00:00
Christian Duerr 6265ef91d5
Display errors and warnings
To make sure that all error and information reporting to the user is
unified, all instances of `print!`, `eprint!`, `println!` and
`eprintln!` have been removed and replaced by logging.

When `RUST_LOG` is not specified, the default Alacritty logger now also
prints to both the stderr and a log file. The log file is only created
when a message is written to it and its name is printed to stdout the
first time it is used.

Whenever a warning or an error has been written to the log file/stderr,
a message is now displayed in Alacritty which points to the log file
where the full error is documented.

The message is cleared whenever the screen is cleared using either the
`clear` command or the `Ctrl+L` key binding.

To make sure that log files created by root don't prevent normal users
from interacting with them, the Alacritty log file is `/tmp/Alacritty-$PID.log`.

Since it's still possible that the log file can't be created, the UI
error/warning message now informs the user if the message was only
written to stderr. The reason why it couldn't be created is then printed
to stderr.

To make sure the deletion of the log file at runtime doesn't create any
issues, the file is re-created if a write is attempted without the file
being present.

To help with debugging Alacritty issues, a timestamp and the error
level are printed in all log messages.

All log messages now follow this format:
    [YYYY-MM-DD HH:MM] [LEVEL] Message

Since it's not unusual to spawn a lot of different terminal emulators
without restarting, Alacritty can create a ton of different log files.

To combat this problem, logfiles are removed by default after
Alacritty has been closed. If the user wants to persist the log of a
single session, the `--persistent_logging` option can be used. For
persisting all log files, the `persistent_logging` option can be set in
the configuration file
2018-11-17 14:39:13 +00:00
Christian Duerr 00830b3da8
Update all dependencies
This applies all breaking and non-breaking dependency updates.
2018-11-14 23:44:53 +00:00
Christian Duerr f5e2f39979
Bump lockfile 2018-11-13 17:58:10 +01:00
Christian Duerr d05d16f023
Fix incorrect padding calculations
The extra window padding was calculated in the renderer which lead to
problems with the paddings calculated in the `src/display.rs` and
`src/term/mod.rs`.

As a solution, every instance of `config.padding().x/y` has been removed
from the renderer (`src/renderer/mod.rs`), instead the padding is always
passed through from the `src/display.rs`.

The initial calculations during display creation and after resize then
are scaled appropriately and then the extra padding is calculated. As a
result every other location can just make use of the correctly
calculated `size_info.padding_x` and `size_info.padding_y`.

The documentation has been changed to clearly state that the padding is
scaled by DPI now.

This fixes #1773.
2018-11-12 18:23:23 +00:00
Christian Duerr 6a0bd7409d
Center the grid inside the window
Currently alacritty always puts the grid at the top-left position of the
window. The only distance to the top-left window border is set by the
padding in the config.

However the grid always has a fixed size, and if a cell doesn't
completely fit the screen anymore, the padding at the bottom right
window corner can be significantly bigger than the padding at the top
left.

To fix this whenever there is more space left and there would usually be
a bigger padding at the bottom right, the space is now split up and
added to the padding.

This should always center the grid inside the window and make sure all
borders have the same padding from the text area.

This screenshot shows how it has been until now:
![Before](https://u.teknik.io/kRJwg.png)

Here is how it looks now:
![After](https://u.teknik.io/m4puV.png)

This fixes #1065.
2018-11-11 20:24:41 +00:00
Matt Keeler 2434547fce Upgrade Glutin to v0.19.0
Some changes include:

• Use the with_hardware_acceleration function on the ContextBuilder to not require the discrete GPU
• Remove the LMenu and RMenu virtual key codes (winit 0.16.0 removed these because Windows now generates LAlt and RAlt instead
• Replace set_cursor_state with hide_cursor (winit 0.16.0 removed the set_cursor_state function)
• Replace GlWindow::hidpi_factor with GlWindow::get_hidpi_factor and change to expecting an f64
• Use the glutin/winit dpi size and position types where possible

Glutin's dpi change event has been implemented. All size events now
return logical sizes. As a result of that, the logical sizes are translated
in the `display::handle_rezize` method so DPI scaling works correctly.

When the DPI is changed, the glyph cache is updated to make use of the
correct font size again.

Moving a window to a different screen which is a different DPI caused a
racing condition where the logical size of the event was sent to the
`handle_resize` method in `src/display.rs`, however if there was a DPI
change event before `handle_resize` is able to process this message, it
would incorrectly use the new DPI to scale the resize event.

To solve this issue instead of sending the logical size to the
`handle_resize` method and then converting it to a physical size in
there, the `LogicalSize` of the resize event is transformed into a
`PhysicalSize` as soon as it's received. This fixes potential racing
conditions since all events are processed in order.

The padding has been changed so it's also scaled by DPR.

The `scale_with_dpi` config option has been removed. If it's not present
a warning will be emitted.

The `winit` dependency on Windows has been removed. All interactions
with winit in Alacritty are handled through glutin.
2018-11-10 16:08:48 +00:00
Do Duy f0579345ea Update serde_yaml to 0.8
This fixes jwilm/alacritty#1730.
2018-11-01 11:45:20 +00:00
Zac Pullar-Strecker 58127f4687 Add cargo workspace, add winpty tests to CI 2018-10-29 20:52:14 +13:00
Christian Duerr 8ee0d2b5b2
Add option to open URLs on click
This adds the option to automatically launch URLs with a specified
program when clicking on them.

The config option `mouse.url_launcher` has been added to specify which
program should be used to open the URL. The URL is always passed as the
last parameter to the specified command.

It is not always desired for URLs to open automatically when clicking on
them. To resolve this a new `modifiers` field has been introduced to the
config, which allows specifying which keyboard modifiers need to be held
down to launch URLs in the specified launcher.

Some tests have been added to make sure that the edge-cases of the URL
parsing are protected against future regressions. To make testing easier
the parsing method has been moved into the `SemanticSearch` trait. The
name of the trait has also been changed to just `Search` and it has been
moved to `src/term/mod.rs` to fit the additional functionality.

This fixes #113.
2018-10-22 19:39:26 +00:00
Zac Pullar-Strecker 15e0deae2b Add support for Windows (#1374)
Initial support for Windows is implemented using the winpty translation
layer. Clipboard support for Windows is provided through the `clipboard`
crate, and font rasterization is provided by RustType.

The tty.rs file has been split into OS-specific files to separate
standard pty handling from the winpty implementation.

Several binary components are fetched via build script on windows
including libclang and winpty. These could be integrated more directly
in the future either by building those dependencies as part of the
Alacritty build process or by leveraging git lfs to store the artifacts.

Fixes #28.
2018-10-16 10:02:52 -07:00
Joe Wilm 44909bae69 Version 0.2.1 2018-10-03 08:13:14 -07:00
Jon Gjengset f785f88a58 Bump fontconfig dependencies
The patch uses the Cargo.toml patch section to force a single downstream
choice of freetype-sys instead of relying on forks of other crates. It
also bumps the fontconfig/freetype dependencies in the process.
2018-09-30 20:44:14 +00:00
Daniel Eklöf ec3a80427b Add standalone terminfo definition
This replaces the current definitions, which depend on the system's
'xterm-256color' terminfo definition with the `alacritty` and
`alacritty-direct` definitions.

The new definitions are completely standalone.

The default `TERM` value has been changed to be dynamically
set based on the definitions installed on the system. Alacritty will
try to use the `alacritty` definition first and fall back to
`xterm-256color` if the `alacritty` definition is not present.
2018-09-24 19:06:12 +00:00
Jeff Muizelaar 26c4043aaf Update core-* dependencies
The core-* dependencies have been updated and every breaking
change has been resolved.

These are the main changes which required adaption:
- font_path() returns a PathBuf now
- get_descriptors() returns an Option<CFArray>
- get_advances_for_glyphs and get_glyphs_for_characters are now unsafe.

All packages which did not have breaking updates have also been updated.
2018-09-19 21:55:35 +00:00
Christian Duerr ca1b75b4c0 Bump version number to 0.2.0 (#1492)
* Change deb installation from crates.io to git

There have been a number of issues an PRs opened since
the cargo-deb installation does not work with the latest
version from crates.io.

To help out users until the crates.io version is updated,
the installation instructions have been temporarily
changed to install `cargo-deb` through github.

* Revert cargo-deb install back to use crates.io

Since `cargo-deb` has been updated on crates.io it is now
possible to just install it from crates.io and build Alacritty's
deb without having to rely on github.

* Update dependencies

This fixes an `illegal hardware instruction (core dumped)`
error when building in release mode.

* Remove redundant copy when selecting font_key

* Bump version number to 0.2.0

Since the Scrollback branch introduces some major changes, this bumps
the version number from 0.1.0 to 0.2.0.

The versions of Alacritty have not been updated regularly to this point,
so the scrollback branch is a good point in time to start updating
Alacritty's version on a regular basis.

Further changes to the readme, like dropping the 'alpha' status and
updating it to 'beta' could also be introduced with this branch. This
way there will be a clean cut which updates everything as soon as
scrollback is merged.

Building versions is another thing which would be a good thing to start
reasonably quickly. However starting this on the main branch after
scrollback has been merged seems like a more reliable way to move
forward.

This fixes #1240.

* Add a CHANGELOG file

A CHANGELOG file has been added to offer a bit more transparency over
which features have been changed, added and potentially removed in
Alacritty.

There are various formats available for the CHANGELOG file but the most
common and sensible one seems to be the one defined by
https://keepachangelog.com/en/1.0.0. Following the template proposed by
this it should be possible to create a clear CHANGELOG which makes it
simple for new contributors to figure out exactly which formatting
should be used for it.

Since there have been quite a few changes to Alacritty already, not all
changes have been added to the changelog. However a few entries have
been ported just to give a bit of an example what the format should look
like. This also helps with the 0.2.0 version since it will not be
completely empty in the changelog.

This fixes #1534.

* Update CHANGELOG

This updates the CHANGELOG to include the changes introduced by
43882ade33.
2018-09-17 07:54:47 -07:00
Matthias Krüger 7717bd7c16 Update depend
This fixes an `illegal hardware instruction (core dumped)`
error when building in release mode.
2018-08-05 22:41:37 +00:00
Christian Duerr c4a0f9c4cb
Merge master into scrollback
* Allow disabling DPI scaling

This makes it possible to disable DPI scaling completely, instead the
the display pixel ration will always be fixed to 1.0.

By default nothing has changed and DPI is still enabled, this just seems
like a better way than running `WINIT_HIDPI_FACTOR=1.0 alacritty` every
time the user wants to start alacritty.

It would be possible to allow specifying any DPR, however I've decided
against this since I'd assume it's a very rare usecase. It's also still
possible to make use of `WINIT_HIDPI_FACTOR` to do this on X11.

Currently this is not updated at runtime using the live config update,
there is not really much of a technical limitation why this woudn't be
possible, however a solution for that issue should be first added in
jwilm/alacritty#1346, once a system is established for changing DPI at
runtime, porting that functionality to this PR should be simple.

* Add working --class and --title CLI parameters

* Reduce Increase-/DecreaseFontSize step to 0.5

Until now the Increase-/DecreaseFontSize keybinds hand a step size of 1.0. Since the font size however is multiplied by two to allow more granular font size control, this lead to the bindings skipping one font size (incrementing/decrementing by +-2).

To fix this the step size of the Increase-/DecreaseFontSize bindings has been reduced to the minimum step size that exists with the current font configuration (0.5). This should allow users to increment and decrement the font size by a single point instead of two.

This also adds a few tests to make sure the methods for increasing/decreasing/resetting font size work properly.

* Add Copy/Cut/Paste keys

This just adds support for the Copy/Cut/Paste keys and sets up
Copy/Paste as alternative defaults for Ctrl+Shift+C/V.

* Move to cargo clippy

Using clippy as a library has been deprecated, instead the `cargo
clippy` command should be used instead. To comply with this change
clippy has been removed from the `Cargo.toml` and is now installed with
cargo when building in CI.

This has also lead to a few new clippy issues to show up, this includes
everything in the `font` subdirectory. This has been fixed and `font`
should now be covered by clippy CI too.

This also upgrades all dependencies, as a result this fixes #1341 and
this fixes #1344.

* Override dynamic_title when --title is specified

* Change green implementation to use the macro

* Ignore mouse input if window is unfocused

* Make compilation of binary a phony target

* Add opensuse zypper install method to readme

* Fix clippy issues

* Update manpage to document all CLI options

The introduction of `--class` has added a flag to the CLI without adding
it to the manpage. This has been fixed by updating the manpage.

This also adds the default values of `--class` and `--title` to the CLI
options.

* Remove unnecessary clippy lint annotations

We moved to "cargo clippy" in 5ba34d4f97 and
removing the clippy lint annotations in `src/lib.rs` does not cause any additional warnings.

This also changes `cargo clippy` to use the flags required for checking integration tests.

* Enable clippy in font/copypasta crates

Enabled clippy in the sub-crates font and copypasta. All issues
that were discovered by this change have also been fixed.

* Remove outdated comment about NixOS

* Replace debug asserts with static_assertions

To check that transmutes will work correctly without having to rely on
error-prone runtime checking, the `static_assertions` crate has been
introduced. This allows comparing the size of types at compile time,
preventing potentially silent breakage.

This fixes #1417.

* Add `cargo deb` build instructions

Updated the `Cargo.toml` file and added a `package.metadata.deb`
subsection to define how to build a debian "deb" install file using
`cargo deb`. This will allow debian/ubuntu users to install `alacritty`
using their system's package manager. It also will make it easier to
provide pre-built binaries for those systems.

Also fixed a stray debug line in the bash autocomplete script that was
writting to a tempfile.

* Add config for unfocused window cursor change

* Add support for cursor shape escape sequence

* Add bright foreground color option

It was requested in jwilm/alacritty#825 that it should be possible to
add an optional bright foreground color.

This is now added to the primary colors structure and allows the user to
set a foreground color for bold normal text. This has no effect unless
the draw_bold_text_with_bright_colors option is also enabled.

If the color is not specified, the bright foreground color will fall
back to the normal foreground color.

This fixes #825.

* Fix clone URL in deb install instructions

* Fix 'cargo-deb' desktop file name

* Remove redundant dependency from deb build

* Switch from deprecated `std::env::home_dir` to `dirs::home_dir`

* Allow specifying modifiers for mouse bindings

* Send newline with NumpadEnter

* Add support for LCD-V pixel mode

* Add binding action for hiding the window

* Switch to rustup clippy component

* Add optional dim foreground color

Add optional color for the dim foreground (`\e[2m;`)
Defaults to 2/3 of the foreground color. (same as other colors).

If a bright color is dimmed, it's displayed as the normal color. The
exception for this is when the bright foreground is dimmed when no
bright foreground color is set. In that case it's treated as a normal
foreground color and dimmed to DimForeground.

To minimize the surprise for the user, the bright and dim colors have
been completely removed from the default configuration file.
Some documentation has also been added to make it clear to users what
these options can be used for.

This fixes #1448.

* Fix clippy lints and run font tests on travis

This fixes some existing clippy issues and runs the `font` tests through travis.

Testing of copypasta crate was omitted due to problens when running on headless travis-ci environment (x11 clipboard would fail).

* Ignore errors when logger can't write to output

The (e)print macro will panic when there is no output available to
write to, however in our scenario where we only log user errors to
stderr, the better choice would be to ignore when writing to stdout or
stderr is not possible.

This changes the (e)print macro to make use of `write` and ignore
any potential errors.

Since (e)println rely on (e)print, this also solves potential failuers
when calling (e)println.

With this change implemented, all of logging, (e)println and (e)print
should never fail even if the stdout/stderr is not available.
2018-07-28 23:10:13 +00:00
Christian Duerr f50ca1a54c
Scrollback cleanup
There were some unneeded codeblocks and TODO/XXX comments in the code
that have been removed. All issues marked with TODO/XXX have either been
already resolved or tracking issues exist.
2018-07-21 17:17:41 +00:00
Francesca Frangipane 765949f256 Update to glutin 0.16.0
Note that `WM_CLASS` is now set to `"alacritty", "Alacritty"`
instead of the previous value of `"Alacritty", "Alacritty"`. This
seems to be more standard.

This also contains some revised recommendations for installing the
`.desktop` file.
2018-05-29 09:50:49 -07:00
Christian Duerr e34dccdabf Fix clippy lints 2018-05-11 16:54:19 -07:00
Christian Duerr f936f40ad2 Add modifiers to mouse events
This commits adds modifiers to the mouse events.

It's an attempt at merging https://github.com/jwilm/alacritty/pull/1141
into this branch/PR.
2018-03-12 23:21:19 -07:00
Christian Duerr 7f2b398ad2
Remove all instances of unwrap() from config
Unwrapping inside the config file parsing can lead to some issues that
prevent us from falling back to a default configuration file.

One instance of that issue was mentioned in #1135.

Now all instances of `unwrap()` have been removed and replaced with
proper error handling. This will make the config more robust and
prevents live reload from silently breaking while alacritty is running.

This also fixes a few currently existing clippy issues.
Clippy added an additonal lint which complains about `MyStruct { field:
field }`.

These issues have been fixed, except for some false-positives and issues
in external macros which will probably be fixed with future updates (rust-lang-nursery/bitflags#149)
2018-03-04 22:40:15 +00:00
Andy Lok 475ebecfc4 Update arraydeque dependency 2018-02-28 20:33:29 +00:00
Sam Rijs 8045737d58 Upgrade dependencies
Upgrading glutin to the latest version allows building alacritty even
with old XRandr versions.

This is relevant for Debian machines (and other ancient systems).
2018-02-28 19:52:42 +00:00
Jeff Muizelaar 2466f81d5e Update core-text (#1061)
This cleans up a bunch of code.
2018-01-31 09:03:24 -08:00
Christian Duerr 53a5a96fdd
Update lockfile
Updated the lockfile to make sure clippy is building properly with the
latest nightly toolchain.
2018-01-30 18:59:17 +00:00
golem131 b82622e994 Update dependencies
Updated the version of some dependencies.

This also changes to a new clippy version so clippy can work with the latest nightly compiler again. Some issues created by new lints have been fixed.
2018-01-26 20:20:42 +00:00
Christian Duerr 692cdef9e3 Update lockfile (#1031)
The lockfile has been updated to make clippy work with nightly again.
2018-01-16 12:29:54 -08:00
Christian Duerr 8aa8422bcc
Update lockfile
Clippy failed to build with the latest nightly, so the lockfile has been
updated to allow the nightly builds to work again.
2018-01-11 16:30:52 +00:00
Christian Dürr b83a26ffe0 Enable shift+select in mouse mode
When an application takes control over the mouse, it usually disables
selection completely. However the common way to still make selection
possible is by allowing selection while the shift key is held down.

This feature is implemented here by making use of the new `modifiers`
field on mouse events with glutin/winit.

This fixes jwilm/alacritty#146.
2018-01-03 11:15:57 -08:00
Geert Jansen 20aa45c878 Add support for set-clipboard. (#970)
This allows e.g. tmux to set the clipboard via the OSC 52 escape code.
2018-01-02 08:32:50 -08:00
Theodore Dubois 7895e32083 Remove the launcher and set the locale/current directory in alacritty (#879) 2017-12-24 09:46:54 -08:00
chetgurevitch 958a32767f Update glutin to v0.11 2017-12-23 21:39:09 -08:00
Chet Gurevitch b10390ede8 Update euclid to v16 2017-12-23 21:39:09 -08:00
Chet Gurevitch 76ca679e89 Update bitflags to v1 2017-12-23 21:39:09 -08:00
Chet Gurevitch ae533e660f Update glutin to v0.10 2017-12-23 21:39:09 -08:00