Commit Graph

785 Commits

Author SHA1 Message Date
Christian Duerr 12afbd007d
Fix clippy issues 2018-07-01 16:31:46 +00:00
Avindra Goolcharan d5690f6cc7 Add opensuse zypper install method to readme 2018-07-01 14:22:57 +00:00
Craig Furman 015a6d4c03 Make compilation of binary a phony target 2018-06-26 20:35:50 +00:00
Felippe da Motta Raposo caf4580daa Ignore mouse input if window is unfocused 2018-06-23 10:13:19 +00:00
asoderman 128c25ee8b Change green implementation to use the macro 2018-06-19 21:27:47 +00:00
Nathan Lilienthal f55252ec85 Override dynamic_title when --title is specified 2018-06-18 05:26:54 +00:00
Christian Duerr 5ba34d4f97
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.
2018-06-17 09:19:30 +00:00
Christian Duerr 0f700a01bd
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.
2018-06-16 10:11:47 +00:00
Felippe da Motta Raposo 6cbae83f17 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.
2018-06-08 23:32:21 +00:00
Tezkerek 66acf1e03d Add working --class and --title CLI parameters 2018-06-07 16:53:16 +00:00
Christian Duerr 93780ef092
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.
2018-06-07 15:52:06 +00:00
Tatsuyuki Ishi 2fcdd40a81 Reduce debug level for release
Backtraces are useful, but line-level debuginfo bloats the binary, and has impact on compile times notably. This reduces it to function-level debuginfo which is a good compromise point.
2018-05-30 10:23:03 -07: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
Randy Ramos f7172fd6e7 Fix typo in error message 2018-05-25 20:51:55 +00:00
Bradford Boyle 4d4e62db92 Fix locale_id for older versions of OS X (<= 10.11)
This fixes a regression introduced in https://github.com/jwilm/alacritty/pull/1087/files#diff-5ffadea12561d6964b05ac2a0b8e388fL33.
2018-05-25 13:57:47 +00:00
Joe Moon 24e8a19e7d handle older macOS versions
add logic to fallback to `localeIdentifier` if
`currentLocale.languageCode` and `currentLocale.countryCode` are not
available.
2018-05-14 12:37:13 -07:00
Joe Moon 75529be729 macos: add check for valid locale 2018-05-14 12:37:13 -07:00
Joe Moon f818109856 remove commented out line 2018-05-14 12:37:13 -07:00
Joe Moon 1c08fae156 Set $LANG env var using languageCode, countryCode
fixes #933

Using logic from 79aff4d59f/sources/PTYSession.m (L1703)
2018-05-14 12:37:13 -07:00
Christian Duerr e34dccdabf Fix clippy lints 2018-05-11 16:54:19 -07:00
Christian Duerr 5728136350 Paste path into terminal when drag & dropping file
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-11 16:54:19 -07:00
Christian Duerr 5be0e3ad8f Don't paste selection when in mouse mode
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-05-05 08:10:57 -07:00
zhouji e2abd8945a Fix completion install instructions for Fish on macOS (#1237) 2018-05-01 10:58:52 -07:00
Joe Moon abe678c686 macOS: fixes segfault on nightly
fixes #1264
2018-04-27 17:36:39 -07:00
Matt T. Proud 1b7ffea136 alacritty: add support for OpenBSD.
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-04-14 10:17:50 -07:00
Bernardo Meurer 3d75c49191 Oxford comma
Added an Oxford comma to the OS support list
2018-03-29 19:47:39 -07:00
Bernardo Meurer b0be5b6bc0 Fixed typos, alphabetical ordering
freeBSD->FreeBSD.
Ordered OS support alphabetically.
2018-03-29 19:47:39 -07:00
MatthiasSchuster fff0e11faa add freeBSD on the top 2018-03-27 09:58:18 -07:00
Saugat Acharya dcc4b75038 Fix typo 2018-03-23 10:20:35 -07:00
Harlan Lieberman-Berg 0edac74e61 Explicitly call log::set_max_level (Closes: #1201)
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-22 18:10:27 -07:00
YOSHIOKA Takuma 6debc4f335 Try to create window with different SRGB config when failed
This may truly solve #921 (and issue caused by #1178)
<https://github.com/jwilm/alacritty/issues/921#issuecomment-372619121>.
2018-03-13 16:43:15 -07:00
Christian Duerr 196e602387 Switch meta key to alt instead of super 2018-03-12 23:21: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
Celti Burroughs b7e0005334 Fix clippy lints 2018-03-12 23:21:19 -07:00
Celti Burroughs 72296b89d5 Rename button_state to prev_state for clarity 2018-03-12 23:21:19 -07:00
Celti Burroughs fb43c73a38 Extend SGR and VT200 (normal) mouse support
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-12 23:21:19 -07:00
らりお (YOSHIOKA Takuma) 5dad4919a2 Enable SRGB (#1178)
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-12 23:11:56 -07:00
Christian Duerr b9ad0cfad3 Prevent negative cell dimensions (#1181)
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-12 23:07:40 -07:00
Jesse Cooke 1977215b0b Add completion install instructions for Fish 2018-03-12 23:06:04 -07:00
Jesse Cooke d993a45e82 Added -d & -e to fish completions 2018-03-12 23:06:04 -07:00
Jesse Cooke 753d1b00b4 Add fish shell completions 2018-03-12 23:06:04 -07:00
ashwinath cb05e72be2 Add centos missing dependency 2018-03-09 18:04:31 -08:00
Michael Schumacher 8cab01740d Add caret key 2018-03-09 09:54:45 -08:00
Christian Duerr 546e5d1b43 Fix benchmarks 2018-03-09 09:51:27 -08:00
Christian Duerr f298ebb217
Add shell completions and manpage
* Add manpage

Adds a basic manpage that was autogenerated with `help2man` and then
slightly adjusted with information from the README.md and better
formatting.

* Add zsh completions

Add completions for the zsh shell. These should be complete and even
allow completion of the command inside `--command` and `-e`.

* Add bash completions

The bash completions are almost on the same level as the zsh
completions. The only little thing the bash completions do not do is
complete inside of `--command` and `-e`, instead bash just stops
completion after these options.

* Update readme with manpage and completions

Added the install instructions for the manpage and completions to the
README.md.

Also tweaked the current readme a slight bit because the build section
was structured in a slightly confusing way.
2018-03-07 21:34:05 +00: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
MindTooth 0afc86cba0 Fix heading for NixOS/Nixpkgs
The level of heading were one to high.
2018-02-27 18:57:19 -08:00
Oliver Jan Krylow 03f9e0cd9a Add install instructions via cargo --git 2018-02-13 16:36:25 +00:00