Age | Commit message (Collapse) | Author |
|
There are a couple of cursor-related options in the Alacritty config
file now, however they aren't grouped together in any way.
To resolve this a new `cursor` field has been added where all cursor
configuration options (besides colors) have been moved.
The `custom_cursor_colors` option has also been removed, since it's not
necessary anymore. Simply making the `colors.cursor.*` fields optional,
allows overriding the cursor colors whenever one of them is present.
Like that the user doesn't have to think about a relation between two
separate configuration options.
This PR initially put the `hide_cursor_when_typing` variable under
`cursor.hide_when_typing`. However this field is completely unrelated to
the cursor, but instead relates to the mouse cursor.
Since the word `cursor` is already used for the active cell in the grid
of a terminal emulator, all occurences of the word `cursor` when talking
about the mouse have been replaced with the word `mouse`.
The configuration option has also been moved to
`mouse.hide_when_typing`, to make it clear what this option is changing.
This fixes #1080.
|
|
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.
|
|
The decorations config was changed from a bool to an enum.
`full` has taken the place of `true`, and `none`, has replaced `false`.
On macOS, there are now options for `transparent` and `buttonless`.
These options are explained in both the CHANGELOG and in the
configuration files.
|
|
Alacritty made the assumption that every window started as focused and
because of that the hollow cursor wouldn't show up for windows which are
launched without focus.
Since even the initial focus should be reported as a focus event by
winit, this could be easily fixed just setting the default window state
to unfocused instead of focused.
This fixes #1563.
|
|
|
|
|
|
|
|
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.
|
|
This may truly solve #921 (and issue caused by #1178)
<https://github.com/jwilm/alacritty/issues/921#issuecomment-372619121>.
|
|
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.
|
|
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)
|
|
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.
|
|
Some terminals have functionality around changing the type of mouse
cursor dynamically (arrow and text) based on which mode(s) the VTE is
in. For example, gnome-terminal changes the cursor from text (default)
to an arrow when opening programs that track mouse events (e.g. vim,
emacs, tmux, htop, etc.). The programs all allow using the mouse
interactively under some circumstances (like executing `set mouse=a` in
vim).
The programs that use an interactive mouse set the terminal mode to
different values. Though they're not entirely the same terminal mode
across programs, an emulator like vte (the library gnome-terminal
implements), changes the mouse cursor if the mouse mode is one of the
following:
- 1000: Mouse Click Tracking
- 1001: Mouse Highlight Tracking
- 1002: Mouse Cell Motion Tracking
- 1003: Mouse All Motion Tracking
- 1004: Mouse Focus Tracking
See https://github.com/GNOME/vte/blob/6acfa59dfcceef65c1f7e3570db37ab245f049c4/src/vteseq.cc#L708
for more information.
This commit adds functionality that changes the winit/glutin
`MouseCursor` when a mouse-listening mode of 1000-1004 is set. It
behaves similarly to when the window title changes.
|
|
|
|
Move/rename borderless into window_config as decorations
|
|
Until winit gives us more capabilities in regard to window decorations
this implements a simple switch that renders the window without any
title bar or border
|
|
This reverts commit a931d691a21a851ca4653cbab3542c600b72ff36.
Please see https://github.com/jwilm/alacritty/pull/907#issuecomment-345666727
for rationale w/ GIF.
> now alacritty starts "in stages". First it paints some small
> rectangle, and in a second in "boots" and fills up the available
> space.
|
|
|
|
On mac, compiling throws a warning due to `is_urgent` not being used within `set_urgent`. This can be changed just by using an underscore instead.
|
|
It seems that (as a rule) terminal emulators use the text mouse cursor rather
than the pointer that is used now. This commit changes the cursor to
using winit's built-in configuration function.
|
|
Sets the urgent WM flag when bell is emitted on X11 systems.
Additionally, the flag is cleared on focus because not all WMs clear it
automatically.
|
|
This reverts commit e17d38167e174a2cf664e430fe968ec6492e1f08.
Was breaking builds for mac users.
|
|
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.
|
|
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.
|
|
The option is an Alpha struct that ensures that the contained float is
between 0.0 and 1.0. Background colors are multiplied by the opacity
to properly alpha blend them.
|
|
|
|
Currently setting cursor visibility always fails on Wayland. It
shouldn't be a critical error on any platform.
|
|
|
|
* 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.
|
|
|
|
Padding can be configured by using the `padding` field in the config
file, like so:
padding:
x: 2
y: 2
which would result in a 2px padding within each side of the window.
|
|
Support is added for setting _NET_WM_PID automatically. This is to
support scripting of the window environment. For example, this makes it
possible to script opening a window with same CWD:
1. Retrieve the current window
2. (new) get PID of window
3. Check if it's Alacritty, find first child (presumably a shell), and
get the child's cwd.
4. Spawn new instance of terminal with cwd.
Unaddressed in this commit is how this will coexist on a Wayland system.
|
|
|
|
|
|
|
|
Resolves #23
Resolves #144
|
|
|
|
|
|
There was a lot of complexity around the threadsafe `Flag` type and
waking up the event loop. The idea was to prevent unnecessary calls to
the glutin window's wakeup_event_loop() method which can be expensive.
This complexity made it difficult to get synchronization between the pty
reader and the render thread correct. Now, the `dirty` flag on the
terminal is also used to prevent spurious wakeups. It is only changed
when the mutex is held, so race conditions associated with that flag
shouldn't happen.
|
|
All of the changes in this commit are due to clippy lints.
|
|
This is part of an ongoing decoupling effort across the codebase and
tidying effort in main.rs. Everything to do with showing the window with
a grid of characters is now managed by the `Display` type. It owns the
window, the font rasterizer, and the renderer. The only info needed from
it are dimensions of characters and the window itself for sizing the
terminal properly. Additionally, the I/O loop has access to wake it up
when new data arrives.
|
|
|
|
Adds a wrapper for the glutin::Window which provides strongly typed
APIs and more convenient interfaces. Moves some gl calls into the
opengl-based renderer.
The point of most of the changes here is to clean up main().
|