Commit Graph
386 Commits
Author SHA1 Message Date
Danny Dulai e04584b082 support for inverting the cursor or using colors 2017-01-29 16:06:29 -08:00
Joe Wilm 2b478e7b9c Fix section headers in README
Resolves #367
2017-01-28 17:54:19 -08:00
Niklas Claesson 019daa8b69 Add support for -e argument 2017-01-28 12:25:57 -08:00
Joe Wilm 08f348ecea Optimize glyph cache access
Loading a glyph from the cache is a very hot operation in the renderer.
The original implementation would first check if a glyph was loaded and
then call `get()` which would have to search a second time. This showed
up as a very slow point in profiles.

This patch addresses glyph cache access in two ways: by using a faster
hasher optimized for small keys (fnv), and by using the entry API for
fetching a cached glyph. The `fnv` hasher is faster than the default and
is very efficient for small keys. Using the entry API on the HashMap
means only 1 lookup instead of two. The entry API has a downside where
the key needs to get cloned on fetches.

Reducing the GlyphKey width to 64-bits helps in both areas. Copying an
8-byte wide type is very cheap and thus limits downside of the entry
API. The small width also helps with the hasher performance.

Over all, this patch reduced typical render times by several hundred
microseconds on a 2013 MacBook Pro with a full screen terminal full of
text.
2017-01-26 08:43:53 -08:00
DerNorbert 4ebcbf1c4d Add Slackware section to README.md 2017-01-26 07:41:06 -08:00
Niklas Claesson 6eb8b10a95 fix config file 2017-01-26 07:32:53 -08:00
Niklas Claesson 04c5ad372a Implement argument passing in config
This commit implements the following syntax in the config file:

```yaml
shell:
  program: /bin/bash
  args:
    - --login
    - --norc
```
2017-01-25 08:50:28 -08:00
Kurnevsky Evgeny 1dca5617e2 Use clap as cli parser. 2017-01-24 08:38:38 -08:00
Niklas Claesson 6e51e9e27b Change to process::Command 2017-01-23 21:08:00 -08:00
Joe Wilm e118431d16 Remove debug_print! macros
The logging macros should be used instead.
2017-01-23 09:14:01 -08:00
Joe Wilm ee37dc86ab Return an error from logging::initialize
Logging initialization now shares the same error handling code as the
rest of the `run` function.
2017-01-23 09:14:01 -08:00
Joe Wilm abd3958cb5 Minor formatting fixes 2017-01-23 09:14:01 -08:00
Joe Wilm db5f65637a Changes to Logger logic
The logger implementation will now only show items from Alacritty.
Additionally, the module info is omitted from the log output. If the
origin of a log item must be found, it can easily be grepped for.
2017-01-23 09:14:01 -08:00
Lukas Lueg 64b42cd2f3 Use the log-crate instead of printing to stdout 2017-01-23 09:14:01 -08:00
Joe Wilm b23ed6ed4c Capture test output by default
The `rustc-test` crate has this feature disabled by default causing all
of the test `println!` output to be displayed.
2017-01-23 08:59:54 -08:00
Steven Fackler 2ffdc8d9ca Remove line_wrap test
This doesn't pass, and was mistakenly never actually enabled in the old
ref.rs macro.
2017-01-23 08:59:54 -08:00
Steven Fackler 41f99dc4c0 Dynamically generate test harness
This uses the rustc-test crate, a copy of the standard test crate, to
dynamically create tests for each reference test. No need to remember to
update the macro, just add the directory to ref!
2017-01-23 08:59:54 -08:00
Richard Palethorpe 6229477190 ansi: Designate and invoke graphic character sets
Implement the designation of graphic character sets G0-G3 to ASCII or the
Special character and line drawing glyphs. As well as the invokation/selection
of the character sets (shift in, shift out and lock shifting).
2017-01-21 12:09:21 -08:00
Joe Wilm 6d0abe2607 Merge pull request #336 from lukaslueg/patch-3
Mention talk at Rust Meetup in README.md
2017-01-21 12:04:55 -08:00
lukaslueg 35e60dfe86 Mention talk at Rust Meetup in README.md 2017-01-21 19:00:07 +01:00
Joe Wilm 8644a0551b Mention our IRC channel in the README 2017-01-18 23:02:53 -08:00
Joe Wilm 8cab0aa623 Use latest nightly on travis
Pinning should no longer be necessary.
2017-01-18 22:28:46 -08:00
Oula Kuuva 77f95f1477 Remove unnecessary feature
Proc_macro has been stable since 1.15.0, attribute no longer needed.
2017-01-18 22:28:46 -08:00
Oula Kuuva e2741adfbe Update rustc-version 2017-01-18 22:28:46 -08:00
johalun 398e31fa37 Make it run on FreeBSD 2017-01-18 22:28:16 -08:00
Joe Wilm a2cd4b647c Cleanup getpwuid_r wrapper
The wrapper had some transmutes still from an earlier implementation,
and they are not needed now.
2017-01-15 16:39:22 -08:00
Tom Crayford 67aba7f4e4 add suggestive fallback messages on unavailable fonts
as per https://github.com/jwilm/alacritty/issues/39
2017-01-12 21:21:14 -08:00
Tom Crayford f85cc353a6 make thin stroke rendering configurable
Makes thin stroke rendering for darwin configurable by a new toplevel
key under `font:` in the config file. Defaults to false, has no impact
on non macos.
2017-01-12 21:19:40 -08:00
Joe Wilm 32cfca7727 Merge pull request #298 from mbrumlow/line_wrap_test
Adding test for line wrap.
2017-01-11 22:49:30 -08:00
Michael Brumlow e8b8bda9f9 Adding test for line wrap.
This test ensures we can enable and disable line wrap.
2017-01-12 00:29:10 -06:00
Michael Brumlow 06d213fbc7 Proposal for line wrap - ^[[7h and ^[[7l (private)
These changes provide support for disabling auto line wrap which is
currently default to on.

'tput rman' will now disable auto line wrap and alacritty will now not
automatically wrap lines.

'tput sman' will now (re)enable auto line wrap and alacritty will now
automatically wrap lines once it reaches the end of the line.

My testing showed this to work the same as gnome-terminal.

I should note that simply having ^[[7h or ^[[7l in a recording does not
enable and disable line wrapping. This is the same behavior as
gnome-terminal and xterm. Those cape codes come through as private
which are not handled yet. I behave this is the correct behavior.
2017-01-11 22:10:48 -08:00
Joe Wilm a7fc46afce Fix bug where event loop could get stuck reading
One symptom of this bug was being unable to send C-c during `cat
/dev/urandom`.

cc #271
2017-01-11 10:33:56 -08:00
Joe Wilm dfb1b3bb5c Add support for setting title from OSC
Resolves #23
Resolves #144
2017-01-11 09:07:31 -08:00
lukaslueg 4fb7801ba3 Update README.md
`cmake` is required everywhere in order to build `expat-sys`
2017-01-10 09:33:56 -08:00
Joe Wilm ec339f728a Merge pull request #268 from mbrumlow/urandom_panic
Fixing panic on cat /dev/urandom
2017-01-09 23:19:07 -08:00
Joe Wilm 6656df1401 Fix last panic with cat /dev/urandom 2017-01-09 23:10:12 -08:00
Michael Brumlow b99fda5214 Fixing panic on cat /dev/urandom
- Checks to make sure lines count coming from the pty are within a proper
range before doing scrolling.

- Sanitizes scroll region when being set.

- Changes panic for unimplemented screen clear to a print statement.

The first two changes ensure scrolling won't crash us. By sanitizing the
region on set we don't have to complicate the scroll code with limits,
mins, or maxes to ensure the scroll operation is within the range.
Checking if the lines is greater than the total region allows us to
simply clear the region and avoid subtracting large numbers from small
ones.
2017-01-10 00:57:49 -06:00
Joe Wilm ff5156040e Merge pull request #255 from igravious/patch-1
Update README.md
2017-01-09 09:34:20 -08:00
Alberto Corona c314fb25cd Add another optional config path $HOME/.alacritty.yml
- Added note about the default file created if no path is found
2017-01-09 09:23:32 -08:00
Alberto Corona 929403386c Support config path $XDG_CONFIG/alacritty.yml
- Update README to reflect changes
2017-01-09 09:23:32 -08:00
Alberto Corona 987b8555de Conform to XDG spec for configuration
- Use $XDG_CONFIG_HOME/alacritty/alacritty.yml for loading the
	  configuration file falling back to $HOME/.config/alacritty/alacritty.yml
	- Closes #203
2017-01-09 09:23:32 -08:00
igravious 1bda79edff Update README.md
Tiny grammar fix.
2017-01-09 09:40:15 +00:00
Joe Wilm 2fa271419c Merge pull request #236 from tcrayford/print_glutin_events
print glutin events if --print-events is passed
2017-01-08 21:43:27 -08:00
Joe Wilm 9e856bc9d2 Remove some dead code 2017-01-08 17:08:52 -08:00
Joe Wilm b7f43ac023 Fix parsing of coalesced SGR attributes
cc #116
2017-01-08 16:35:59 -08:00
Tom Crayford d7a5981048 print glutin events if --print-events is passed
When debugging many issues, it's often very helpful to have the raw
glutin events printed out to stderr as they come in. This does that.

Note that since `glutin::Event` doesn't implement `Display`, we just use
rust's debugging output for now via `{:?}`.
2017-01-08 21:09:02 +00:00
Joe Wilm 9e713189cc Merge pull request #216 from mbrumlow/better_bounds_checking
Better bounds checking.
2017-01-07 21:24:55 -08:00
Joe Wilm e0e88c0748 Merge pull request #224 from valarauca/master
Enabled Rustc's Link Time Optimization
2017-01-07 21:08:51 -08:00
cody fa73c56245 Enabled Rustc' Link Time Optimization 2017-01-07 23:56:29 -05:00
Michael Brumlow 5642624f40 Changes requested.
- Rename wrap to input_needs_wrap and providing documentation.
- Standardize on min.
- Optimization on subtracting col.
2017-01-07 21:46:02 -06:00