Commit Graph

137 Commits

Author SHA1 Message Date
Christian Duerr bc2c34eb7f
Add wayland primary selection clipboard support 2019-06-09 11:46:31 +00: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
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 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
Kirill Chibisov dbce674d70 Add icon to Linux .desktop file 2019-04-04 18:41:57 +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
Christian Duerr 6f4d1afcf8
Add official logo 2019-04-01 22:41:20 +00:00
Alex Touchet d29c309007 Update extended-description for deb file 2019-03-21 22:45:03 +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 7eb0ea82ef
Disable incremental for release builds
This fixes #1115.
2019-02-05 23:00:14 +00:00
M. Stoeckl 40237b213a Simplify text shader 2019-02-04 19:03:25 +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
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
Zac Pullar-Strecker 6d7647c890 Make windows config location more sensible 2018-12-27 14:16:31 +00:00
Joe Wilm 217ad9ec28 Upgrade to Rust 2018
This resolves a lot of NLL issues, however full NLL will be necessary to
handle a couple of remaining issues.
2018-12-10 17:53:56 +00:00
Christian Duerr 7ab0b44847
Bump version to 0.2.4 2018-12-09 23:28:29 +00:00
Ilya Epifanov fc04bc1e6d Changed path to standard /usr/bin/..., registered as an x-terminal-emulator alternative 2018-11-19 09:24:22 +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 521d2f6a2c
Bump version to 0.2.3
Since the version 0.2.2 had some significant breakage which affects a
large number of users, this 0.2.3 release aims at providing a stable
release which works for everyone without any major regressions.
2018-11-13 16:06:33 +00:00
Christian Duerr f182afafe5
Bump version number to v0.2.2 2018-11-11 22:16:53 +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
Micha Gorelick 77816797e8 Publish Github releases from Travis
This release introduces some config to automatically build deploy a
binaries on the github release page using travis. The build only happens
when a commit is tagged and it uses the stable version of rust.

The main travis sections (install/script/before_deploy) have been
moved out of the .travis.yml to make it easier to read, maintain and
extend the different steps of the CI process.

Since checking for the Rust version in CI is enough to know if clippy
should be used or not, the environment variable `CLIPPY` has also been
removed, which further allowed simplifying the CI process.

Besides the executables, some auxillary files are now also published as
part of a release when they have changed since the last tagged Alacritty
release. This should make it clear for returning users when a new
version of a specific auxillary file is required.

Instead of using the 14.04 image which travis provides by default, an
18.04 docker image is used to build the output binaries for Linux.
This affects both the .deb and the .tar.gz binary.

The advantage of this is that while binaries compiled on 14.04, do not
work on 18.04, it does work the other way around. The generated .tar.gz
binary has been tested on 18.04, Debian, Fedora and Archlinux and all
systems were able to run it without any warnings or errors.
2018-11-03 15:08:30 +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
Nathan West a10403b7c7 Fix fish completion name in deb installer 2018-09-17 21:44:29 +00:00
Alexander Schlarb e2c1e56b25 Give zsh completion file the correct name when installing with `cargo deb --install`
The zsh completion name for the deb installer has been corrected.

The installation instructions for the zsh completions have also been
updated to make it possible to install them without root permissios.
2018-09-17 21:37:00 +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
Christian Duerr 5d2faf4365
Enable LTO
This has been disabled temporarily to improve compile times, however
there were some performance regressions caused by this change.

Since this only affects release compiles and performance is a high
priority for Alacritty, LTO has been enabled again.
2018-07-29 11:31:25 +00:00