Commit Graph
105 Commits
Author SHA1 Message Date
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
Chet Gurevitch 1117bb5fda Update deps 2017-12-23 21:39:09 -08:00
Joe Wilm 3472921c7d Update dependencies
Also fixes warning from gl generator
2017-12-23 12:33:35 -08:00
Joe Wilm 672ea9b050 Remove built crate
This became a support burden for me due to various compile and run time
issues.
2017-12-22 14:25:14 -08:00
Theodore Dubois 94caa7667d Remove the launcher and set the locale/current directory in alacritty (#879) 2017-12-13 09:52:36 -08:00
Matthias Krüger b2c7fa7ee9 Cargo.lock: bump clippy from 0.0.164 to 0.0.174. 2017-12-03 12:50:40 -08:00
Matthias Krüger 2c443425b0 commit some Cargo.lock changes that "cargo build" would do automatically 2017-12-03 12:50:40 -08:00
hcpl 8a09917dd1 Output more info for --version (#888)
Useful when requesting more info to help investigating issues.
2017-11-11 17:17:47 -08:00
Joe Wilm 6916537858 Update servo-fontconfig-sys fork
Fixes naming collision issue on Fedora 26.
2017-10-08 22:33:01 -07:00
Joe Wilm 619e877819 Add support for env_logger
When RUST_LOG environment variable is set, uses env_logger instead of
our custom logger. This is desirable for debugging purposes.
2017-10-08 22:20:58 -07:00
Joe Wilm 88c1dabefc Revert "Update glutin & fix a few wayland issues (#815)"
This reverts commit e17d38167e.

Was breaking builds for mac users.
2017-10-06 11:32:53 -07:00
Victor Berger e17d38167e Update glutin & fix a few wayland issues (#815)
This PR fixes a few wayland issues of alacritty (and updates glutin on
the process because it is needed).

Mainly two changes are done:

1. Add a drawing_ready() method on Window: see
https://docs.rs/winit/0.8.2/winit/os/unix/trait.WindowExt.html#tymethod.is_ready
for explanations. Hopefully glutin will be able to handle it itself in
the future, but it currently does not.

2. resize window and OpenGL contextes.

The way wayland forces winit to draw its own decorations and how surface
size is defined by its content means that in practice:

- winit's window.set_inner_size() defines the dimensions of the
  borders
- glutins gl_window.resize() defines the dimensions of the content
  (and is a noop in other platforms)

It is for now glutin's user responsibility to keep them in sync
otherwise borders are drawn stupidly. This PR changes the resize methods
of alacritty::Window to always update both.

This fixed the borders issues for me, tested on weston.
2017-10-06 08:47:51 -07:00
Aaron Hill 5f7885749c Use clippy = "*", update, and fix some warnings (#796)
Because there are so many clippy warnings in the current codebase,
this commit removes '#![cfg_attr(feature = "clippy", deny(clippy))]',
to make it easier to fix warnings incrementally.
2017-09-27 17:29:44 -07:00
Jonathan Schleußer a7b50e0eb8 Update notify 2017-09-05 09:07:00 -07:00
Jonathan Schleußer a3d35ec185 Update most remaining deps 2017-09-05 09:07:00 -07:00
Jonathan Schleußer 967393a31c Update servo 2017-09-05 09:07:00 -07:00
Tiziano Santoro 00c9a9faaa Restore winit deps (#763)
Accidentally removed in
https://github.com/jwilm/alacritty/commit/c4ece6dde3c9dcf825a44aa775535a65c0c376a6
when winit version was bumped.
2017-08-29 07:52:20 -07:00
Tim Steinbach c4ece6dde3 winit: 0.7.5 -> 0.7.6, glutin: 0.9.1 -> 0.9.2 (#761) 2017-08-28 10:01:19 -07:00
Martin Lindhe f3e0c8609f font: update macOS core-text dependency to 6.1.0, fixes #685 (#692) 2017-07-28 09:00:55 -07:00
Joe Wilm 49c73f6d55 Use latest winit
Resolves #679
2017-07-21 13:34:52 -07:00
Joe Wilm 8e7dd009a4 Update to latest Glutin/winit (#671)
* Update to latest Glutin/winit

This *finally* gets us off the fork of Glutin we've been on for so long
and will unblock a number of other items. Functionality should be the
same as before.

The update forced our hand on a compiler update. It's no longer
feasible to pin on an old version. From now on, we require latest
stable.
2017-07-20 10:50:50 -07:00
Joe Wilm 08b5ae52c1 Revert "Reduce InstanceData footprint"
This reverts commit 3cdba29124.

On some systems, the target commit actually caused a massive performance
issue rather than fixing one.
2017-07-03 19:45:21 -07:00
Joe Wilm 3cdba29124 Reduce InstanceData footprint
The InstanceData type in the rendering subsystem was previously 16
floats which occupied a total of 64 bytes per instance. This meant that
for every character or background cell drawn, 64 bytes were sent to the
GPU. In the case of a 400x100 cell grid, a total of 2.5MB would be sent.

This patch reduces InstanceData's size to 26 bytes, a 60% improvement!
Using the above example for comparison, a worst case of 1MB would be
transferred.

The motivation for this patch comes from macOS. Once the terminal grid
would reach a certain size, performance experienced a sharp and dramatic
drop (render times would go from ~3ms to ~16ms). I don't want to
speculate too much on the underlying issue, but suffice it to say that
this patch alleviates the problem in my testing.
2017-07-01 10:24:50 -07:00
Joe Wilm 63787d0bf0 Use foreign-types from crates.io
We had previously vendored a very early version of this package before
it was ever published.
2017-06-27 09:29:09 -07:00
Joe Wilm 0091d3cb99 Update vte dependency
cc #68
2017-06-20 08:01:17 -07:00
Joe Wilm 529ac47fc8 Add support for Beam, Underline cursors
Notable about this implementation is it takes a different approach for
managing cursor cells that previously. The terminal Grid is now
borrowed *immutably*. Instead of mutating Cells in the Grid, a list is
managed within the RenderableCellsIter. The cell at the cursor location
is skipped over, and instead cells are popped off a list of cursor
cells.

It would be good in the future to share some more code between the
different cursor style implementations for populating the cursor cells
list.

Supercedes #349.
2017-06-11 13:21:13 -07:00
Martin Algesten 1fb2c843be final core-graphics extensions moved upstream 2017-06-01 09:47:58 -07:00
Martin Algesten dafa4ccde9 updated some font deps 2017-05-31 09:30:54 -07:00
Joe Wilm f051e686da Update dependencies 2017-05-25 10:57:42 -07:00