aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-07-25Ignore errors when logger can't write to outputChristian Duerr
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-25Fix clippy lints and run font tests on travisMatthias Krüger
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).
2018-07-23Add optional dim foreground colorRémi Garde
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.
2018-07-22Add binding action for hiding the windowJosh Leeb-du Toit
2018-07-21Allow specifying modifiers for mouse bindingsChristian Duerr
2018-07-20Switch from deprecated `std::env::home_dir` to `dirs::home_dir`Christian Duerr
2018-07-15Add bright foreground color optionChristian Duerr
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.
2018-07-15Add support for cursor shape escape sequenceAnthony Clays
2018-07-15Add config for unfocused window cursor changePatrycja Balik
2018-07-05Replace debug asserts with static_assertionsChristian Duerr
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.
2018-07-01Remove unnecessary clippy lint annotationsMatthias Krüger
We moved to "cargo clippy" in 5ba34d4f9766a55a06ed5e3e44cc384af1b09f65 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.
2018-07-01Update manpage to document all CLI optionsChristian Duerr
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.
2018-07-01Fix clippy issuesChristian Duerr
2018-06-23Ignore mouse input if window is unfocusedFelippe da Motta Raposo
2018-06-19Change green implementation to use the macroasoderman
2018-06-18Override dynamic_title when --title is specifiedNathan Lilienthal
2018-06-17Move to cargo clippyChristian Duerr
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.
2018-06-16Add Copy/Cut/Paste keysChristian Duerr
This just adds support for the Copy/Cut/Paste keys and sets up Copy/Paste as alternative defaults for Ctrl+Shift+C/V.
2018-06-08Reduce Increase-/DecreaseFontSize step to 0.5Felippe da Motta Raposo
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.
2018-06-07Add working --class and --title CLI parametersTezkerek
2018-06-07Allow disabling DPI scalingChristian Duerr
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.
2018-05-29Update to glutin 0.16.0Francesca Frangipane
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-25Fix typo in error messageRandy Ramos
2018-05-25Fix locale_id for older versions of OS X (<= 10.11)Bradford Boyle
This fixes a regression introduced in https://github.com/jwilm/alacritty/pull/1087/files#diff-5ffadea12561d6964b05ac2a0b8e388fL33.
2018-05-14handle older macOS versionsJoe Moon
add logic to fallback to `localeIdentifier` if `currentLocale.languageCode` and `currentLocale.countryCode` are not available.
2018-05-14macos: add check for valid localeJoe Moon
2018-05-14remove commented out lineJoe Moon
2018-05-14Set $LANG env var using languageCode, countryCodeJoe Moon
fixes #933 Using logic from https://github.com/gnachman/iTerm2/blob/79aff4d59fd591e7628649bcabe5f27541740bf6/sources/PTYSession.m#L1703
2018-05-11Fix clippy lintsChristian Duerr
2018-05-11Paste path into terminal when drag & dropping fileChristian Duerr
It's now possible to insert the path of a file or directory by dropping it from the file manager into alacritty. This fixes #1301.
2018-05-05Don't paste selection when in mouse modeChristian Duerr
When the mouse mode is set using either 1000h, 1002h or 1003h, the selection should not be pasted when hitting the middle mouse button, because it is job of the application to handle this when mouse mode is enabled. This has been solved by checking for the current mouse modes whenever the `PasteSelection` binding is invoked. This fixes #1215.
2018-04-27macOS: fixes segfault on nightlyJoe Moon
fixes #1264
2018-04-14alacritty: add support for OpenBSD.Matt T. Proud
This commit expands the conditional compilation directives to support building Alacritty for OpenBSD. The build succeeds, and Alacritty runs without issue once https://github.com/rust-lang/libc/pull/957 has been merged and added to a versioned libc release. This has been tested on the recently-released OpenBSD 6.3 on amd64 with rustc 1.24.0 from its standard ports tree.
2018-03-22Explicitly call log::set_max_level (Closes: #1201)Harlan Lieberman-Berg
For some reason, log 0.4 requires that we explicitly set the log level with log::set_max_level or it defaults to Off. The documentation isn't clear but suggests we must do this in addition to doing the filtration ourselves in the Log impl.
2018-03-13Try to create window with different SRGB config when failedYOSHIOKA Takuma
This may truly solve #921 (and issue caused by #1178) <https://github.com/jwilm/alacritty/issues/921#issuecomment-372619121>.
2018-03-12Switch meta key to alt instead of superChristian Duerr
2018-03-12Add modifiers to mouse eventsChristian Duerr
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-12Fix clippy lintsCelti Burroughs
2018-03-12Rename button_state to prev_state for clarityCelti Burroughs
2018-03-12Extend SGR and VT200 (normal) mouse supportCelti Burroughs
With this commit, Alacritty now reports presses and releases of all three mouse buttons properly, dragging events with all three buttons, and mouse movement events where no button is pressed. It does not report more than three buttons due to inherent limitations of the VT200 and SGR protocol modes. It does not report modifier keys on mouse buttons due to practical considerations. Fixes #714, #506.
2018-03-12Enable SRGB (#1178)らりお (YOSHIOKA Takuma)
This will solve the error "Error creating GL context; Couldn't find any pixel format that matches the criterias." (I think this maybe a problem of mesa (18.0.0_rc4), but I'm not sure. See the thread <https://mastodon.cardina1.red/@lo48576/99670278063669603> for my debug log.
2018-03-12Prevent negative cell dimensions (#1181)Christian Duerr
Prevent the cell dimensions from going below 1, this bug resulted in allocation of large amounts of memory in the scrollback PR but is also present on master. Currently the approach is to just `panic!`, however an `eprintln!` and `exit` could be an alternative too. I don't think it's realistic to check this at startup and it should have no performance impact since the failing method is only called once at startup. To make it a bit more clear what kind of values are accepted, the datatypes of offsets and paddings have also been changed so that these don't accept floats anymore and padding can never be negative. This should allow us to be a bit more strict with the config to make sure that errors are printed when invalid values are specified (like negative padding). This fixes #1167.
2018-03-09Add caret keyMichael Schumacher
2018-03-09Fix benchmarksChristian Duerr
2018-03-04Remove all instances of unwrap() from configChristian Duerr
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-02-28Update arraydeque dependencyAndy Lok
2018-01-26Update dependenciesgolem131
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-18Implement `reset_state` of Term struct (#1035)Christian Duerr
Up to this point the `reset_state` method of the `Term` struct has been just a placeholder. This has been changed and all important state has been reset. The only state that has not been reset is stuff which is retrieved from the config and isn't stored as default on the `Term` struct either. From what I can tell these are all never changed though. This fixes jwilm/alacritty#1033. After doing some more testing trying to figure out how to fix that all glyphs are messed up after doing `cat /dev/urandom`, I was able to confirm that resetting `Term::cursor` fixes the glyphs and restores everything to normal. So this also fixes jwilm/alacritty#804.
2018-01-15Spawn alacritty window as invisibleChristian Duerr
This change initially spawns alacritty as in invisible window, this makes it possible for the pty to already access data like `window_id` without having to wait for the window manager to actually open the window. Even though `GlWindow::new` is blocking when `with_visibility(true)` is used, the `window.show` call is not blocking. So calling `GlWindow::new` and `with_visibility(false)`, then immediately calling `window.show` will create a window and make it visible instantly.
2018-01-08Fix `ioctl` call failing on 32 bit architecture (#1011)Christian Duerr