Commit Graph

1027 Commits

Author SHA1 Message Date
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
Christian Duerr 1cebcd660b
Fix rendering of zero-width characters
Instead of rendering zero-width characters as full characters, they are
now properly rendered without advancing the cursor.

Because of performance limitations, this implementation only supports up
to 5 zero-width characters per cell. However, as a result of this
limitation there should not be any performance impact.

This fixes #1317, fixes #696 and closes #1318.
2018-12-09 15:28:22 +00:00
Vineeth Sagar 47f8f1bac6 Add a contributing.md file 2018-12-09 01:46:09 +00:00
Tezkerek aef38d6c2f Change missing config log level to info 2018-12-08 20:51:36 +00:00
Nathan Lilienthal f32facfbfd Refactor Alacritty scripts
This includes some changes to the scripts `README.md` to provide
some more information on the different Alacritty scripts.

A new script for testing the 24 bit support of Alacritty has been
added with the `24-bit-color.sh` name. This should help with
troubleshooting truecolor support issues.

Since `perf` is a standard tool which is available in the official
repositories for most distributions, it doesn't make much sense to
provide an installation script specifically for Ubuntu. As a result of
this, the script has been removed.
2018-12-08 20:28:57 +00:00
Christian Duerr 6b61e96739
Fix recording of ref tests
Due to the lazy initialization of lines in the Alacritty history, the
recording of ref tests was broken. Because a WM would often resize the
ref test window after it was spawned, some additional lines were
initialized in the stored ref test.

To make sure lazy initialization does not play any role in the recording
and replaying of reftests, before recording and replaying the tests, the
complete grid is initialized and then truncated. This should make sure
that only the relevant lines are kept.
2018-12-08 01:50:01 +00:00
Matthias Krüger a6764ba05f Use tool lints for clippy allow/deny lint attributes 2018-12-07 13:58:11 +00:00
Muhammad Talal Anwar cdc22ce76a Add docs for enabling system font smoothing on macOS 2018-12-06 21:55:02 +00:00
Vineeth Sagar cadbb86eb7 Detach Child process to avoid zombie processes
This makes use of the common double-fork behavior to prevent
spawning zombie processes every time a URL is clicked.
2018-12-06 21:38:34 +00:00
Muhammad Talal Anwar f57bd6e12f Remove sudo keyword from travis
The `sudo` keyword has been deprecated.

See: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
2018-12-06 14:17:54 +00:00
Bjorn Neergaard 0d2f5b0f0f Launch a login shell by default on macOS 2018-12-03 22:26:59 +00:00
Barret Rennie ca9a259caa Request user attention when bell received in macOS
We now request the user's attention in macOS when a visual bell
character is received. This manifests as the window jumping up and down
in the dock.
2018-12-02 16:11:51 +00:00
Christian Duerr e690a1444e
Add change log entries for macOS privacy requests 2018-12-02 17:07:23 +01:00
John Naylor 973db4845c Request OSX privacy permissions 2018-12-02 16:06:24 +00:00
Zac Pullar-Strecker 742a6b48a1
Fix for an underflow on some type conversions (#1715) 2018-11-25 10:08:02 +13:00
dm1try 0d47cd25b9 Ignore initial size if the window is maximized on start 2018-11-23 23:41:06 +00:00
Zac Pullar-Strecker 6f4ad9bb4f Move winpty-sys dep to crates.io 2018-11-24 12:02:10 +13:00
Jonathan Dahan 2ede659134 Add option for launching Alacritty maximized 2018-11-19 21:23:47 +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 42d8989916
Add keybinding action for clearing warns/errors
Since running `clear` inside of tmux doesn't actually clear any part of
the screen, but just resets the scrolling region, the warning and error
notices can't be removed without quitting tmux or Alacritty.

As a solution, a new action `ClearLogNotice` has been added which has
been bound to Ctrl+L by default. As a result, Ctrl+L can be used inside
of tmux to remove the messages, even though tmux doesn't clear the
screen.

This fixes #1811.
2018-11-19 08:33:48 +00:00
Christian Duerr e429b8dfdd
Remove `scale_with_dpi` setting from config
Since the `scale_with_dpi` setting has been deprecated, but it hasn't
been removed from the config, Alacritty would print an error every time
it is started.

To resolve this problem, the option is removed from the default
configuration file.
2018-11-18 23:05:38 +00: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 75504ef05b
Lower log level of warnings in ansi.rs
Since ansi.rs is mostly about control sequences sent by applications,
displaying all issues during parsing to the user can be annoying since
Alacritty might not actually do anything wrong.

To resolve this problem, all `warn!` logs in `src/ansi.rs` have been
decreased to the `debug!` level.

This fixes #1809.
2018-11-18 13:48:10 +00:00
Ryan Morey 3593ec72dd Add NixOS install instructions to README.md 2018-11-17 18:29:08 +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 ea637cde1c
Fix blurry fonts without dynamic padding
There were some minor rounding issues in the padding codepath without
dynamic padding. These have been fixed, which should resolve issues with
blurry fonts on monitors with a fractional DPR.

This fixes https://github.com/jwilm/alacritty/issues/1806.
2018-11-16 21:28:49 +00:00
Christian Duerr d68ecb0def
Add option for dynamic padding (#1780)
This adds the `window.dynamic_padding` option which allows disabling the
dynamic spread of additional padding around the grid's content.

Based on the feedback I've gotten so far and the fact that most other
terminal emulators do not seem to center the content inside themselves,
I've changed the default configuration option to disable centering of the grid.

This fixes #1778.
2018-11-15 19:57:15 +00:00
Fintan ba76ac8661 Document homebrew cask option for macOS installation 2018-11-15 13:58:24 +00:00
Christian Duerr 82d0c5ea44
Fix i386 CI releases
The i386 CI releases were still using x86_64 platforms for building the
output binaries, as a result the produced binaries did not work properly
on i386 systems.

The maximum time of 50 minutes was exceeded when Alacritty tries to build
for all Linux platforms, this was because it was effectively compiling
Alacritty from scratch four times.

By making use of the previous build artifacts, it's possible to cut this
down to two compiles using the `--no-build` option of `cargo-deb`.
2018-11-14 23:47: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
Hellsenberg 5baf1fceab Move .deb building instructions to INSTALL.md
This fixes #1541.
2018-11-14 21:49:34 +00:00
Christian Duerr bf71d532b0
Add change log entry for `scale_with_dpi` setting 2018-11-14 20:37:54 +00:00
Christian Duerr f5e2f39979
Bump lockfile 2018-11-13 17:58:10 +01: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 a68ce7a0e4
Fix specifying 0 lines/columns in config file
The logic during the initial spawning of the window was a bit twisted
up. This has been resolved and it should all work properly now, even
without a resize event at startup.

This fixes #1781.
2018-11-13 06:32:40 +00: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
Mihyaeru 4a8d18cdee Fix macos config bold font documentation 2018-11-12 15:20:44 +00:00
Christian Duerr 6503316332
Fix failing github releases
The manpage was incorrectly zipped up with the `-z` option, which
doesn't exist and created a 0-size file. Since Github does not accept
0-size files, this lead to the complete release deployment failing.

Changing this to use the `-c` option should fix this problem by creating
a proper non-zero size gzip file.
2018-11-12 14:46:35 +00:00
Christian Duerr f182afafe5
Bump version number to v0.2.2 2018-11-11 22:16:53 +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
Christian Duerr dba3cccf69
Set env variables before window start
The environment variables specified in the configuration file are now
all set before the window is created. As a result, this makes it
possible to add the `WINIT_HIDPI_FACTOR` env variable directly to the
Alacritty configuration.

This fixes https://github.com/jwilm/alacritty/issues/1768.
2018-11-11 12:55:28 +00:00
Christian Duerr 021b424858
Remove re-export of glutin size types 2018-11-10 17:04:26 +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
Alex Touchet 81617983bb Fix grammatical errors in README 2018-11-07 20:04:41 +00:00
Alex Touchet 36f376fea8 Capitalization changes in README.md (#1757) 2018-11-07 09:49:13 -08:00
Christian Duerr 06fbb891cf
Add automated i386 docker builds to travis 2018-11-06 00:40:29 +00:00
Christian Duerr 0e49bfb02a
Update readme to link to the github releases 2018-11-04 00:13:18 +00:00
Christian Duerr 0b1754e73f
Fix clippy issues
This resolves all existing clippy issues and removes some old `allow`
annotations which aren't neccesary anymore.
2018-11-04 00:11:51 +00:00
Christian Duerr d2f4972703
Fix windows tagged builds
The windows tagged builds currently fail some tests since the
winpty-agent.exe is inside the release directory instead of the debug
directory with tagged builds.
2018-11-03 18:46:26 +00:00