1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00
Commit Graph

329 Commits

Author SHA1 Message Date
Wez Furlong
8ee6739ece config: expand canonicalize_pasted_newlines
This setting now allows specifying what the canonical format is;
previously it was a boolean that meant "don't change anything"
if false, and rewrite to CRLF if true.

It's now an enum with None, CR, LF, and CRLF variants that express
more control.

The config accepts true (maps to CRLF) and false (maps to None)
for backwards compatibility.

The default behavior is unchanged by this commit, however, I did
uncover a bug in the canonicalizer for inputs like `\r\r\n`.

refs: #1575
2022-01-22 09:46:27 -07:00
Wez Furlong
0fe7a22f67 expose pixel positioning config option
refs: #1563
2022-01-18 08:13:30 -07:00
Wez Furlong
e4ed2c93e2 encoding my preferred import grouping in the rustfmt config
This uses an unstable option in rustfmt, you `cargo +nightly fmt`
needs to be used to format the code correctly.
2022-01-17 13:50:51 -07:00
Wez Furlong
db8f588c5e Add SwitchWorkspaceRelative key assignment 2022-01-17 09:54:11 -07:00
Wez Furlong
8d3d3e02a7 add default_workspace config option
refs: #1322
refs: #1531
2022-01-17 09:31:20 -07:00
Wez Furlong
7eec41c284 Add ShowLauncherArgs key assignment
refs: https://github.com/wez/wezterm/issues/1485
2022-01-17 08:16:18 -07:00
Wez Furlong
4b457da62f cargo fmt 2022-01-16 18:48:26 -07:00
Wez Furlong
54e92b6858 Add module to map nerd font symbol names to codepoints
I generated nerdfonts_data.rs with this shell script; it uses `i_all.sh`
from the nerdfonts repo to get the base mapping:

```
source ./lib/i_all.sh

echo "//! Data mapping nerd font symbol names to their char codepoints"
echo "pub const NERD_FONT_GLYPHS: &[(&str, char)] = &["
for var in "${!i@}"; do
  # trim 'i_' prefix
  glyph_name=${var#*_}
  glyph_char=${!var}
  glyph_code=$(printf "%x" "'$glyph_char'")
  echo "(\"$glyph_name\", '\u{$glyph_code}'), // $glyph_char"
done
echo "];"
```

Then intent is to use it in wezterm:

```
local wezterm = require 'wezterm'

wezterm.log_info(wezterm.nerdfonts.dev_mozilla)
```
2022-01-16 17:25:08 -07:00
Wez Furlong
070c4030c6 Bundle Symbols Nerd Font Mono
Built using:

```
./FontForge-2020-11-07-21ad4a1-x86_64.AppImage --script $PWD/font-patcher "$PWD/src/unpatched-fonts/NerdFontsSymbolsOnly/NerdFontsSymbolsOnly Template 1000 em.ttf" --powerline --use-single-width-glyphs -out /tmp/nerd-fonts-out --fontawesome --fontawesomeextension --fontlinux --octicons --codicons --powersymbols --powerline --powerlineextra --mdi --weathericons
```

which is everything *except* Pomicons at the time of writing, pending
clarifications of its distribution license
(https://github.com/ryanoasis/nerd-fonts/issues/266)

refs: https://github.com/wez/wezterm/issues/1521
2022-01-16 16:04:35 -07:00
Wez Furlong
6d288696c8 Add SwitchToWorkspace keyassignment action
This action causes the active workspace for the gui to change.

If the name is omitted a random name will be generated.
If the workspace doesn't exist, it will be be created.
The optional spawn parameter can be used to launch a specific
program into the new workspace; if omitted, the default prog
will be used.

The gui only supports a single active workspace. Switching workspaces
will repurpose existing gui windows and re-assign them to windows
in the new workspace, adjusting their size to fit those windows,
spawning new windows or closing unused windows as required.

The gui now exits when there are no panes in the active workspace,
rather than no panes at all.

refs: #1531
2022-01-15 13:53:34 -07:00
Wez Furlong
1704af88ba refactor: move logic -> Mux::spawn_tab_or_window
Tidies up some code duplication within the mux protocol handler.
Move some of the logic into Mux, remove legacy Spawn Pdu to reduce
more duplication.

I want to dedup some of the similar logic that exists in the gui
spawn implementation as well in a follow up.
2022-01-14 22:28:35 -07:00
Wez Furlong
a9427aca63 Remove ALT-number default key assignments
The issue is that we work hard to match the keys pre-composition,
but for French and Norwegian layouts ALT-number are valid,
useful punctuation keys.  It's awkward to make exceptions for
ALT keys when matching assignments, especially on macOS, and
the simplest thing to do is simply to remove the assignments
and leave it to our users to add their own if they want them.

The ctrl-shift and cmd based assignments are generally much
easier to keep, because those key combinations are not widely
used default mappings on any keyboard layout.

refs: #1543
refs: #1542
refs: https://github.com/wez/wezterm/pull/1132
2022-01-14 22:24:40 -07:00
Wez Furlong
91f8a341dd input: ALT-<number> default keys are now post-mapping assignments
This resolves some issues with non-US layouts (French, Norweigan)
where ALT-number are important and useful punctuation that we were
otherwise blocking.

This new behavior seems consistent with eg: vte terminals on linux
when switching to a French layout.

refs: #1543
refs: #1542
2022-01-14 08:49:34 -07:00
Wez Furlong
b5dfbc392c make use_ime=true the default for all platforms
The key repeat issues that were blocking this from being enabled
on macos have been resolved.
2022-01-13 09:19:23 -07:00
Howard Huang
5b353df78e STYLE: Fix code format
Using `cargo fmt --all`
2022-01-12 17:01:38 -08:00
Howard Huang
e01f9c0e7d FEATURE: Allow ScrollByPage f64 values
`ScrollByPage` can accept non-integer values in the configuration.
This allows fractional page scrolling, such as by half a page.

The default remains the same, at 1 page.
2022-01-12 17:01:38 -08:00
Wez Furlong
f48e2d9a85 SshDomain: assume_unix -> assume_shell = "Posix" 2022-01-10 08:27:09 -07:00
Wez Furlong
1357480ce6 SshDomain: add assume_unix option; enables setting cwd for new panes
If we know that the remote host is a unix system, and that it uses some
version of the posix shell, then we can adjust our command line to cd to
the requested directory (as set by OSC 7) and then exec the requested
command.

That's what SshDomain::assume_unix indicates and what this commit does.
2022-01-09 21:32:09 -07:00
Wez Furlong
b3987bec12 ssh: allow setting default_prog for SshDomain when multiplexing=None
```
return {
  ssh_domains = {
    {
      name = "woot",
      remote_address = "192.168.1.8",
      multiplexing = "None",
      default_prog = {"fish"},
    }
  },

  default_domain = "woot",
}
```

refs: https://github.com/wez/wezterm/issues/1456
2022-01-09 20:09:53 -07:00
Wez Furlong
3593a288ea ssh: rename use_multiplexer to multiplexing
This puts us in a better position for the future to be able
to configure whether we use wezterm, tmux or no multiplexing.

Today we allow wezterm or no multiplexing.

Add docs on this new setting.

refs: https://github.com/wez/wezterm/issues/1456
2022-01-09 19:16:54 -07:00
Wez Furlong
f69177b022 ssh: allow setting SshDomain::use_multiplexer = false
Currently has no effect.

refs: #1456
2022-01-09 13:13:54 -07:00
Wez Furlong
42a13f63df cargo fmt 2022-01-09 11:12:14 -07:00
Wez Furlong
daf83b49a8 config: avoid ambiguous naming
weird that this doesn't error locally, but breaks CI
2022-01-09 10:47:29 -07:00
Wez Furlong
31f16375ed refactor: move Config into own module
That top level config/src/lib.rs has been too big for too long.
Break it up a little.

(I recommend running `cargo clean` if you're updating across
this change to avoid a rust ICE with it cached on-disk state)
2022-01-09 10:06:50 -07:00
Wez Furlong
3000223585 config: revise how skip-config (-n) works
Previously, it would skip loading the initial config and allow
loading it later by using the reload hotkey.  That reload behavior
was an accident!

Another problem with the old approach is that everything else was
set up as if the config had been loaded, which is now causing
confusion for code that wants to decide whether we are using
that configuration or not.

This commit formalizes the skip by remembering that state globally.

This change helps to simplify some special cases around command
line overrides as well, as well as allows cli overrides to take
effect when the user doesn't have a config file.
2022-01-09 09:33:02 -07:00
Wez Furlong
627001762e rename dead_key_is_active -> composition_status, dead_key_cursor -> compose_cursor
Since the composition state isn't strictly tied to dead keys, use
a name that better reflects that.
2022-01-09 08:39:21 -07:00
Wez Furlong
3e99390299 LocalDomain: don't use global default_prog/default_cwd for WslDomains
They have their own versions of these options, and logically it doesn't
make sense to use the default_prog from the `local` domain with a wsl
domain.

refs: #1242
2022-01-08 16:07:22 -07:00
Wez Furlong
2f9ca151c2 lua: add wezterm.default_wsl_domains()
This returns the default set of domains that would be populated
in the wsl_domains config.  This is useful if you want to override
eg: the default_prog for specific domain(s), or want to otherwise
add additional variations on the default list.
2022-01-08 15:07:36 -07:00
Wez Furlong
b2ee6793f9 Add default_domain option
When set, changes the default domain to the domain with the specified
name, which potentially affects the default program.

eg: default_domain = "WSL:Ubuntu-18.04" will cause the initial tab
to be spawned via WSL.
2022-01-08 15:05:05 -07:00
Wez Furlong
cdf3fc89f7 launcher: remove WSL items from list
These are now redundant with the list of wsl_domains.

The `add_wsl_distributions_to_launch_menu` option has been removed.
2022-01-08 15:05:05 -07:00
Wez Furlong
0e9924e585 new: WslDomain, a variant on the local domain
The idea is that we want to be able to spawn into wsl with the
convenience of a local domain, but without the awkwardness of
it having a different filesystem namespace.

It would also be great to be able to spawn a new tab or pane
in the same domain and pick up the cwd of the existing one.

The WslDomain allows the user to explicitly list WslDomains
and control eg: default shell, username and so on, but wezterm
will pre-fill a default list of domains based on the `wsl -l`
output that we were already using in the launcher menu.

The existing LocalDomain has been augmented to understand that
it may need to fixup a command invocation and that gives it
the opportunity to rewrite the command so that we can launch
it via `wsl.exe` and pass down the cwd and so on.

This same technique might be extensible to eg: docker instances
in the future.

This commit:

* Introduces `wsl_domains` config and its default list of wsl
  distributions
* Creates LocalDomain instances from that list
* The launcher menu allows spawning a new tab via one of those domains
2022-01-08 15:05:05 -07:00
Wez Furlong
b109730b18 disable win32-input-mode by default
Until we can figure out why running wsl breaks CTRL modifiers!

refs: https://github.com/wez/wezterm/issues/1509
2022-01-08 09:37:48 -07:00
Wez Furlong
e8995c5370 wezterm-gui start now prefers to run via existing gui instance
Using the new publish/discovery stuff from the past couple of commits,
if we can find a matching socket path for a running gui, and the
configuration is likely a match, then use the mux protocol to talk
to the already running gui and ask it to spawn the equivalent program
into the same process.

refs: https://github.com/wez/wezterm/discussions/1486
2022-01-07 17:12:35 -07:00
Wez Furlong
4524abcdba gui: revise win32-input-mode flow
We need 100% of the info for it to work correctly, so this commit:

* Exposes the keyboard encoding mode via the Pane trait
* Adds the scan code to the RawKeyEvent
* Has the GUI perform the encoding if the keyboard is set that way
* Removes the basic encoder from termwiz in favor of the gui level one

The net result is that we bypass the Pane::key_up/Pane::key_down methods
in almost all cases when the encoding mode is set to win32-input-mode.

There is now a config option: allow_win32_input_mode that can be
used to prevent using this mode.

refs: #1509
2022-01-07 13:02:09 -07:00
Wez Furlong
3c6bc2c366 add ActivatePaneByIndex key assignment action
refs: #1517
2022-01-07 07:30:17 -07:00
Wez Furlong
dc204c03d6 term: propagate wezterm debug_key_events config
Log the sequence being sent to the terminal when enabled.
2022-01-06 08:01:25 -07:00
Wez Furlong
5ddb40c7c8 add Display + Debug impl for SpawnCommand
This makes it look tidier in the launcher menu
2022-01-03 23:19:11 -07:00
Wez Furlong
509122c152 Improve launcher menu
* Allow selecting the first few rows by number
* Allow scrolling through long lists of items
* Add actions from key assignments to list

refs: #1485
refs: #1413
2022-01-03 23:07:54 -07:00
Wez Furlong
29eb6dde23 input: key assignments now default to physical mappings
This commit adjusts the config parsing layer so that:

```
return {
  keys = {
    {key="a", ...}
  }
}
```

is now treated as being implicitly the same as `key="phys:A"`.

You can explicitly use `key="mapped:a"` to use the post-keyboard-map
processed value of a key to trigger an assignment, rather than
the physical key location.

refs: #1483
2022-01-03 12:33:19 -07:00
Wez Furlong
c0502012d5 redefine key assignments in terms of physical key location
and then remove horrible mac hacks.

This resolves the root cause for some horrible mac key mapping stuff
that is responsible for at least 3 different user issues by making the
default key assignments work from the physical key location.  That makes
them unambiguous.

refs: https://github.com/wez/wezterm/issues/601
refs: https://github.com/wez/wezterm/issues/760
refs: https://github.com/wez/wezterm/issues/1080
refs: https://github.com/wez/wezterm/issues/1483
2022-01-03 00:22:51 -07:00
Wez Furlong
c29212be49 add colors.dead_key_cursor to signal dead and leader key processing
When set, the cursor will change to this color during dead key
or leader key processing.

```lua
return {
  colors = {
    dead_key_cursor = "orange",
  },
}
```

refs: #686
refs: #688
2022-01-02 17:49:32 -07:00
Wez Furlong
b15907f61f input-types: introduce PhysKeyCode type
Based on the mac constants of the equivalent functionality;
may need some tweaking for other OS's.

refs: https://github.com/wez/wezterm/issues/1483
2022-01-01 21:35:37 -07:00
Wez Furlong
52c198ab8c x11: default use_ime=true, add xim_im_name option 2021-12-31 09:55:17 -07:00
Wez Furlong
f175c5f6c0 add wezterm.get_builtin_color_schemes() 2021-12-29 09:20:12 -07:00
Wez Furlong
494a0983ee gui: cache shaping and layout of fancy tab bar, allow placing at bottom
We only need to recompute when the tab content changes, or when
the window is resized, plus invalidations of the shape cache
of texture atlas filling up.

Hover events don't need to re-shape.

We can now also place the tab bar at the bottom of the screen again.
2021-12-28 12:29:54 -07:00
Wez Furlong
f4fab10e69 gui: box model style layout/render for fancy tab bar
This commit adds a CSS box model inspired element / layout
facility, and replaces the hand implemented fancy tab bar
element render.

This makes the code for fancy tab bar much easier to read
and update.

The right status area now expands to the full height of the
tab bar area, and uses a line height of 2.0, which makes
it line up nicely in the tab bar.
2021-12-28 00:14:54 -07:00
Wez Furlong
c4257ab8d6 config: fix asymmetric serialization of keycode and modifiers
This adds string serialization for the keycode and modifiers as
used in the config.

We can't simply tell the base types to serialize in this form because
we may serialize and pass those via the mux protocol and the default
derived serializers are more efficient for that purpose.

This allows:

```lua
local wezterm = require 'wezterm'

return {
  keys = {
    {key="a", mods="ALT", action=wezterm.action{SendKey={key="b"}}}
  },
}
```

to parse: previously, wrapping `SendKey` in `wezterm.action` would fail
to round-trip the the `SendKey` and lead to an error loading the
config.
2021-12-25 12:11:59 -07:00
Wez Furlong
714e74e7af fonts: move computation of title font to wezterm-fonts
Rather than hardcode a fixed default value in the config crate, define
the default as optional and leave it to the font crate to compute
the value.

This is a step towards allow introducing system dependent GUI related
code to resolve/understand the title font: we can't put that directly
in the config crate.
2021-12-25 07:49:46 -07:00
Wez Furlong
153861a639 config: fix default WindowFrameConfig
There was a discrepancy between leaving it out of the config
and having it partially initialized; fix that up.

Make the default title font size larger on !Windows, as it
looks a bit better.

We might need to make this larger size mac specific.

refs: #1180
2021-12-24 18:49:01 -07:00
Wez Furlong
8eb7c3cff4 gui: fancy tab bars are now the default
Adjust the rendering and coloring a bit to make the defaults
look pretty reasonable.

refs: #1180
2021-12-24 16:23:01 -07:00
Wez Furlong
6c1710f87d mux: remove ProgDomain; just pass down default prog/cwd as appropriate
This allows making these values configurable per-domain in the
future.

refs: #1456
2021-12-24 07:52:02 -07:00
Wez Furlong
bd6072b320 avoid default_prog, default_cwd when spawning panes via ssh
refs: https://github.com/wez/wezterm/issues/1456
2021-12-23 23:24:42 -07:00
Wez Furlong
225d15c9aa ActivatePaneDirection now supports Next and Prev
This allows cycling through all the panes in a tab

refs: #976
2021-12-23 21:00:26 -07:00
Wez Furlong
1d064e0913 Add get_foreground_process_name, expose it and cwd in PaneInformation
Add `get_foreground_process_name` to both Pane and the lua wrapper.

Add `foreground_process_name` and `current_working_dir` fields to
`PaneInformation`.  In order for those to be dynamically fetched,
switch the lua conversion for `PaneInformation` to be a UserData
with field access methods.  It's a little more verbose but allows
us to lazily compute these two new fields.

refs: https://github.com/wez/wezterm/discussions/1421
refs: https://github.com/wez/wezterm/issues/915
refs: https://github.com/wez/wezterm/issues/876
2021-12-23 18:49:17 -07:00
Wez Furlong
38087755e1 quickselect: allow changing label for custom actions 2021-12-23 16:32:20 -07:00
Wez Furlong
d25580d10f cargo fmt 2021-12-23 12:35:20 -07:00
Wez Furlong
0e6c75c026 allow left-button-release to copy to selection when shift is held
This is really a timing issue: if shift-click extension of the mouse
selection is used, the user may release the mouse button slightly
after the SHIFT key (which is fine) or vice versa (which was not
previously matched)

refs: #1204
2021-12-23 12:33:51 -07:00
Wez Furlong
668d41ad5d quickselect: add QuickSelectArgs and helpers for opening urls
This commit expands quick select mode so that you can trigger it
with distinct sets of patterns (eg: urls on one key assignment,
hashes on a different key assignment), different alphabets,
and lastly, the option to perform a different action from
the default copy action.

You can pair this with `action_callback` to run lua code to
do something with the selected text.

This commit also adds `wezterm.open_with`, a helper function
for opening documents/URLs.

refs: #846
refs: #1362
2021-12-23 10:55:44 -07:00
Wez Furlong
6a265d9f72 new ActivateTabRelativeNoWrap key assignment
refs: #1414
2021-12-23 09:32:49 -07:00
Wez Furlong
5c222cfcdc term: allow iterm2 file transfer protocol
Adds some plumbing to allow the GUI to implement a download handler
and connect that up for iterm2 image/file transfers that have their
inline property set to false.

Previously we'd just log an error.

Now we will by default download the file to the user's download
directory.

This behavior can be turned off via the new `allow_download_protocols`
configuration setting.

File transfers can be initiated on a remote host via the
https://iterm2.com/utilities/it2dl script.

When the download completes, a toast notification is shown that will
open the file when clicked.

refs: https://github.com/wez/wezterm/discussions/1450
2021-12-22 09:21:39 -07:00
Wez Furlong
008b7f3796 config: skip UTF-8 BOM in primary config file
This is a semi-effective band-aid, as it won't change lua's own
lack of BOM support when importing files via `require`.

refs: #1452
2021-12-22 07:34:34 -07:00
Wez Furlong
dd150131b7 fonts: allow setting harfbuzz and freetype options per-font
`wezterm.font` and `wezterm.font_with_fallback` can now specify
harfbuzz_features and freetype load/render target and flags as
options on a per-font basis.

This allows you to do things such as adjust shaping (eg: ligatures) or
rendering (eg: disable bitmaps, or adjust hinting) for a single font in
a fallback rather than globally for all fonts.
2021-12-20 21:56:59 -07:00
Wez Furlong
4358e718c3 fix doc comment
refs: #1406
refs: #986
2021-12-15 20:20:25 -07:00
Wez Furlong
5500bd64e4 kitty: default to enabling kitty support
refs: https://github.com/wez/wezterm/issues/1406
refs: https://github.com/wez/wezterm/issues/986
2021-12-15 17:59:08 -07:00
Wez Furlong
20e424f54b add default_gui_startup_args config
closes: https://github.com/wez/wezterm/issues/1030
2021-12-11 23:18:22 -07:00
Wez Furlong
e352c40905 ssh domains now support ssh_config overrides
closes: https://github.com/wez/wezterm/issues/1149
2021-12-11 22:30:54 -07:00
Wez Furlong
66908eabb4 add ScrollToTop and ScrollToBottom key assignments
refs: https://github.com/wez/wezterm/issues/1360
2021-12-11 22:02:31 -07:00
Wez Furlong
1ce261f7a9 mux: add proxy_command to unix_domains
Potentially enables using the mux with WSL 2 on Windows,
although this commit was authored and tested on a mac.
2021-12-11 17:29:37 -07:00
Wez Furlong
bde2c728bf ci: use consistent git core.abbrev setting for TAGNAME
refs: https://github.com/wez/wezterm/issues/1365
2021-12-05 19:21:06 -07:00
Wez Furlong
955b37ff64 mux server: redirect stdout,stderr to log file on Windows
This got lost somewhere along the way.

Importantly, we need to explicitly set the pty to use invalid stdio
handles for the spawned child in order to avoid a weird situation
where eg: cmd or powershell would end up writing to the log file
despite it being spawned into its own PTY.

refs: #1358
2021-12-05 10:11:43 -08:00
Wez Furlong
cabcfb70f9 mux: prefer to use wezterm relative to current exe
I think this will help with some PATH related issues, such as
refs: https://github.com/wez/wezterm/issues/1359
2021-12-02 21:52:17 -07:00
Wez Furlong
b71e1ad618 Revise appimage env comment 2021-12-02 21:21:29 -07:00
Srevin Saju
37c3403241 fix: do not propagate $APPIMAGE and $APPDIR env vars to child processes 2021-12-02 21:21:29 -07:00
Wez Furlong
225e7a1243 introduce unicode_version config
This is a fairly far-reaching commit. The idea is:

* Introduce a unicode_version config that specifies the default level
  of unicode conformance for each newly created Terminal (each Pane)
* The unicode_version is passed down to the `grapheme_column_width`
  function which interprets the width based on the version
* `Cell` records the width so that later calculations don't need to
  know the unicode version

In a subsequent diff, I will introduce an escape sequence that allows
setting/pushing/popping the unicode version so that it can be overridden
via eg: a shell alias prior to launching an application that uses a
different version of unicode from the default.

This approach allows output from multiple applications with differing
understanding of unicode to coexist on the same screen a little more
sanely.

Note that the default `unicode_version` is set to 9, which means that
emoji presentation selectors are now by-default ignored.  This was
selected to better match the level of support in widely deployed
applications.

I expect to raise that default version in the future.

Also worth noting: there are a number of callers of
`unicode_column_width` in things like overlays and lua helper functions
that pass `None` for the unicode version: these will assume the latest
known-to-wezterm/termwiz version of unicode to be desired. If those
overlays do things with emoji presentation selectors, then there may be
some alignment artifacts. That can be tackled in a follow up commit.

refs: #1231
refs: #997
2021-11-25 09:00:45 -07:00
Jonathan
e9ed2b4d3e
Unzoom when switching panes (#1301)
* mux: unzoom when switching panes

Add `unzoom_on_switch_pane` config option:

When switching to another pane with ActivatePaneDirection, if the
current pane is zoomed, unzoom and then switch instead of doing nothing.

* Apply suggestions from code review

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2021-11-13 11:43:15 -08:00
Wez Furlong
4225610c09 add config option to enable resize increments, disable by default
refs: #1254
refs: #1289
2021-11-09 08:30:58 -07:00
Wez Furlong
04768fd1e2 Speculative fix for wonky vertical alignment
The issue seems to correlate with fractional pixels produced
by 0.5cell padding, so let's round down to avoid the fraction.

refs: https://github.com/wez/wezterm/issues/1228
2021-10-21 18:56:11 -07:00
Wez Furlong
c1a766404c config: add ssh_backend config, and default to libssh
refs: #1014
2021-10-21 07:16:42 -07:00
Wez Furlong
24875004f6 add canonicalize_pasted_newlines config option
refs: #1213
2021-10-17 13:14:16 -07:00
Wez Furlong
3b12aa1038 mux: mux_env_remove config to control which env var are removed
closes: #1225
2021-10-17 12:46:16 -07:00
Wez Furlong
32d18905cc Add wezterm.background_child_process 2021-10-17 10:37:47 -07:00
Wez Furlong
7e59916c5c fixup title font selection on linux
Was mistakenly trying to use the windows font because of negative logic.
Tidy up, and prefer the gnome default theme font (Cantarell), but fall
back to DejaVu Sans.
2021-10-09 08:12:26 -07:00
Wez Furlong
854ea8f2d1 change default window padding
This makes the default terminal config look a little nicer.
2021-10-08 20:38:28 -07:00
Wez Furlong
5d765e2efe config: adjust default title bar font
Make it a little large, bold, and pick a better approximation of the macOS
titlebar font on macOS.
2021-10-08 19:30:40 -07:00
Wez Furlong
8c3477006f Allow using unit like "1cell" or "5%" for window_padding
This commit introduces the `Dimension` type which allows specifying
a value in a variety of units; pixels, points, cells, percent.

`Dimension` needs contextual information to be evaluated as pixel
values, which makes resolving the value from the config slightly
more of a chore.

However, this type allows more flexible configurations that scale
with the font size and display dpi.

refs: #1124, #291, #195
2021-10-07 19:26:22 -07:00
Wez Furlong
49d77138ae gui: refine text positioning math around fancy tab bar
Avoid accidentally scaling the tab bar when using IncreaseFontSize.

Use a "better" default title font based on the platform.

Avoid a gap between bottom of tab button and dividing line at
certain font sizes.
2021-10-04 23:13:21 -07:00
Wez Furlong
962e44bbfb WIP: fancier tab bar
`use_fancy_tab_bar` switches to an alternate rendering of the tab
bar that uses the window_frame config to get a proportional
title font to use to render tabs, as well as rendering a few
additional elements to space out and make the tabs feel more
like tabs.

Computing the number of tabs doesn't respect the alternate font
at this time.

Formatted tab item foreground and background colors are also
not respected at this time.

refs: #1180
2021-10-04 17:35:54 -07:00
Wez Furlong
ca89181098 bell: allow changing the cursor color when the bell is rung
I find this less distracting than both the audible and the default
background color flashing.
2021-09-29 08:02:34 -07:00
Wez Furlong
72cb110b65 add audible_bell config option
This allows using the system beep sound, currently only on macos.

refs: #3
2021-09-26 12:55:19 -07:00
Benoit de Chezelles
317772fe8f lua: Add wezterm.action_callback to help define key callbacks 2021-09-25 15:42:08 -07:00
Wez Furlong
0c1ad718d0 add visual bell
refs: #3
2021-09-25 12:40:22 -07:00
Frieder Bluemle
3f4ea691af Add additional tab activation key assignments 2021-09-12 09:52:11 -07:00
Wez Furlong
93e18b2a01 deps: colorgrad -> 0.5 2021-09-05 23:27:01 -07:00
Wez Furlong
4c8ccf8efc Add Multiple key assignment
refs: https://github.com/wez/wezterm/pull/1091
2021-09-04 13:01:34 -07:00
Wez Furlong
bc4ed3735d Add SendKey key assignment
refs: https://github.com/wez/wezterm/pull/1091
2021-09-03 12:07:17 -07:00
Wez Furlong
b53a6059de increase max fps to 60 by default, improve coalesce
* Trigger a paint immediately from invalidate if not throttled
* Otherwise defer the other events until we're about to sleep for xcb
  events, which should maximize the coalesce around resize/expose events

refs: #1051
2021-09-02 08:53:03 -07:00
Jonas Belouadi
703f2c4d67 Remove explicit deref in 256-colors loop. 2021-08-23 16:32:43 -07:00
Jonas Belouadi
4565fc4ebd Deserialize indexed keys into 'u8' instead of 'String'. 2021-08-23 16:32:43 -07:00
Jonas Belouadi
46ea5d73e7 Format code with cargo fmt. 2021-08-23 16:32:43 -07:00
Jonas Belouadi
4b3853fb0f Add support for setting arbitrary colors ranging from 16 to 256. 2021-08-23 16:32:43 -07:00