1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-24 07:46:59 +03:00
Commit Graph

493 Commits

Author SHA1 Message Date
Jared Baur
2408367e6f Improve XDG configuration searching
In addition to XDG_CONFIG_HOME, use XDG_CONFIG_DIRS
(https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html)
to append paths for searching for configuration files.
2023-03-15 23:11:02 -07:00
Wez Furlong
5e5f816f83
add log_unknown_escape_sequences config option 2023-03-15 22:47:32 -07:00
Jalil David Salamé Messina
c6dc38b7f3 fix(clippy): Derive Default where possible 2023-03-15 10:21:11 -07:00
Wez Furlong
b021551080
maybe fix win32 build 2023-02-11 10:07:31 -07:00
Wez Furlong
797d3819b7
wsl: default_cwd is now ~
This matches up better to most peoples expectations

refs: https://github.com/wez/wezterm/issues/2826
2023-02-11 08:21:18 -07:00
Wez Furlong
66ec3f6eb6
make command palette font a little larger
refs: https://github.com/wez/wezterm/issues/1485
2023-02-10 15:24:45 -07:00
Wez Furlong
69fce071ea
config: allow config_builder to work with set_config_overrides
refs: https://github.com/wez/wezterm/issues/3079
2023-02-08 21:24:26 -07:00
Wez Furlong
2b298f5f96
mux: pass gui window position through from new mux window
Threads through a GuiPosition from mux window creation to allow it to be
used when the corresponding gui window is created.

SpawnCommand now has an optional position field to use for that purpose.

```lua
wezterm.mux.spawn_window {
  position = {
    x = 10,
    y = 300,
    -- Optional origin to use for x and y.
    -- Possible values:
    -- * "ScreenCoordinateSystem" (this is the default)
    -- * "MainScreen" (the primary or main screen)
    -- * "ActiveScreen" (whichever screen hosts the active/focused window)
    -- * {Named="HDMI-1"} - uses a screen by name. See wezterm.gui.screens()
    -- origin = "ScreenCoordinateSystem"
  },
}
```

refs: https://github.com/wez/wezterm/issues/2976
2023-02-05 21:43:37 -07:00
Wez Furlong
6968ad5c3c
Add quit_when_all_windows_are_closed config option
refs: https://github.com/wez/wezterm/issues/3057
2023-02-05 16:55:56 -07:00
Wez Furlong
e4ae8a844d
Add wezterm.plugin module, allows loading modules from git
Brief usage notes here:

```lua
local wezterm = require 'wezterm'
local a_plugin = wezterm.plugin.require "https://github.com/owner/repo"

local config = wezterm.config_builder()

a_plugin.apply_to_config(config)

return config
```

The referenced repo is expected to have a `plugin/init.lua` file,
and by convention, return a module that exports an `apply_to_config`
function that accepts at least a config builder parameter, but may
pass other parameters, or a lua table with a `config` field that maps
to a config build parameter.

`wezterm.plugin.require` will clone the repo if it doesn't already
exist and store it in the runtime dir under `plugins/NAME` where
`NAME` is derived from the repo URL.  Once cloned, the repo is
NOT automatically updated.

Only HTTP (or local filesystem) repos are allowed for the git URL;
we cannot currently use ssh for this due to conflicting version
requirements that I'll take a look at later.

`wezterm.plugin.require` will then perform `require "NAME"`,
and since the default `package.path` now includes the appropriate
location from the runtime dir, the module should load.

Two other functions are available:

`wezterm.plugin.list()` will list the plugin repos.

`wezterm.plugin.update_all()` will attempt to fast-forward or `pull
--rebase` each of the repos it finds. It doesn't currently do anything
proactive to reload the configuration afterwards; the user will need to
do that themselves.
2023-01-31 20:07:42 -07:00
Wez Furlong
df12dd9d00
deps: update toml -> 0.7, cargo update 2023-01-29 21:08:25 -07:00
Wez Furlong
6f62a0f2b1
config: capture warnings and show them in config error window
This allows deprecated and invalid fields to be surfaced more visibly
in the config error window.
2023-01-24 14:18:15 -07:00
Wez Furlong
3578211282
cargo fmt 2023-01-24 12:01:14 -07:00
Wez Furlong
252817b0b8
config: add wezterm.config_builder
config_builder helps to make issues more visible/useful in the case
where you may have typod a config option, or otherwise assigned
an incorrect value.
2023-01-24 11:57:07 -07:00
gzliew
15bb1a87a1 feat(wezterm-gui): Support move to word end 2023-01-19 19:08:07 -08:00
Wez Furlong
b01aa129f7
add WindowOps::focus, ActivateWindow, window:focus()
Only implemented on X11 so far.
Note that Wayland doesn't support this action at all.

refs: https://github.com/wez/wezterm/issues/2973
2023-01-18 22:58:48 -07:00
ProspectPyxis
087a3cef9a feat: hide_mouse_cursor_when_typing config option 2023-01-12 08:08:42 -08:00
Wez Furlong
b86f5365a1
sync color schemes 2023-01-11 16:30:58 -07:00
Wez Furlong
c65db44d3e
config: fix typo in error message
refs:  https://github.com/wez/wezterm/issues/2932
2023-01-10 06:46:49 -07:00
Wez Furlong
4ec428ff75
config: allow using bright but not bold text when brightening text
In https://github.com/wez/wezterm/issues/2932 the user desired to have
brightened text without the boldness, as they were accustomed to that
behavior in a couple of other terminal emulators.

This commit changes the `bold_brightens_ansi_colors` from a simple
boolean to a tristate that allows for not changing the brightness,
changing the brightness, and changing the brightness while adjusting
the boldness down to normal levels.

boolean values are accepted for backwards compatibility.
2023-01-09 15:19:17 -07:00
Wez Furlong
ab8a4f129c
command palette: first pass
This commit introduces a rough first pass at a command palette modal.
It is an adaptation of the emoji character selector and needs
refinement.

Importantly, the default pane selector key assignment now calls
into this new command palette instead.

refs: https://github.com/wez/wezterm/issues/1485
2022-12-22 20:24:57 -07:00
Wez Furlong
6479df63b9
removed deprecated Copy, Paste, PastePrimarySelection actions
These have been deprecated since early 2021; time to remove them
and simplify a little.
2022-12-22 07:31:18 -07:00
Wez Furlong
37b5dd91a5
move OpenInBrowser -> KeyAssignment
This allows defining those help actions that open URLs in the main
commands list, and not just for the macOS Help menu.

refs: https://github.com/wez/wezterm/issues/1485
2022-12-21 07:04:51 -07:00
Wez Furlong
e70f97903b
disable window title reporting escape sequence by default 2022-12-18 10:37:21 -07:00
Wez Furlong
9923ae20b5
env_logger -> 0.10
closes: https://github.com/wez/wezterm/pull/2803
2022-11-27 21:37:25 -07:00
Wez Furlong
4b8515e69f
cleanup: a few references to the Last Resort font
It was removed in the latest release, so these no longer apply
2022-11-22 15:40:17 -07:00
Peter Nguyen
b26da03085 wezterm-gui: implement move_by_page function 2022-11-22 07:35:09 -08:00
Peter Nguyen
9fa44574a8 wezterm-gui: support half page up/down navigation 2022-11-22 07:35:09 -08:00
Wez Furlong
2dd3968b9e
allow disabling tabs, new tab button in tab bar
refs: https://github.com/wez/wezterm/issues/2082
2022-11-19 13:54:10 -07:00
Wez Furlong
e0aa66489f
webgpu: improve messaging when no adapters are found
refs: #2756
2022-11-19 07:30:08 -07:00
Wez Furlong
783b39aae1
add some config options to influence webgpu selection 2022-11-18 10:03:49 -07:00
Wez Furlong
8479be7465
Basic useless wgpu based rendering foundation 2022-11-18 10:03:49 -07:00
Wez Furlong
6aceb97ded keys: add prevent_fallback option for ActivateKeyTable
The behavior is to prevent falling back to a later key table
if no key matched.

refs: https://github.com/wez/wezterm/issues/2702
2022-11-04 07:02:36 -07:00
Wez Furlong
de466cfa64 config: validate consistency of domain names
refs: https://github.com/wez/wezterm/issues/2618
2022-10-11 06:59:12 -07:00
Wez Furlong
4e5945c061 Add ResetTerminal and pane:inject_output method
refs: https://github.com/wez/wezterm/discussions/2606
2022-10-08 10:25:22 -07:00
Wez Furlong
fa4fced599 validate the config to prevent div by 0 for initial_cols/initial_rows
refs: https://github.com/wez/wezterm/issues/2593
2022-10-07 09:04:37 -07:00
Wez Furlong
47a15153b9 rename normalize_to_nfc to normalize_output_to_unicode_nfc
Makes it a bit more verbose, but also a bit clearer what it does.

refs: #2482
2022-09-24 19:41:37 -07:00
Wez Furlong
a0afe9c5ae mux: disable the lag indicator by default
I'd like to push that into the status bar, so nudge people towards
that in the docs for this.

There is a config option to restore it. I'd like to ultimately
remove that though.

refs: https://github.com/wez/wezterm/discussions/2542
2022-09-22 06:46:56 -07:00
Wez Furlong
8508860136 config: derive some metadata about the config
This isn't used by anything yet, but will enable some runtime
config editing functions that I have planeed for the future.
2022-09-22 06:09:31 -07:00
Wez Furlong
7f65c2242b copy-mode: vim style jump to character motion
refs: https://github.com/wez/wezterm/issues/2528
2022-09-20 19:52:20 -07:00
Antoine Büsch
36f47ec3f6
Expose activate-pane-direction cli command (#2526)
* Expose `activate-pane-direction` cli command

Add a new subcommand for `wezterm cli` called `activate-pane-direction`.
It allows switching the active pane in the current tab in the given
direction.

* Bump codec version

* Replace boolean flags with a single direction arg

* Run cargo fmt
2022-09-20 08:37:05 -07:00
Wez Furlong
295677ed52 config: cursor_thickness, strikethrough_position, underline_position, underline_thickness
refs: https://github.com/wez/wezterm/issues/2326
refs: https://github.com/wez/wezterm/issues/2505
2022-09-10 18:34:35 -07:00
Wez Furlong
39dd4cdd82 Add config options to control various cache sizes
These are more for low level testing than they are intended
for users to play with, so they are deliberately undocumented
at this time.
2022-09-09 07:30:53 -07:00
unrelentingtech
d8a7d76cf5 colors: regenerate scheme data after previous commits 2022-09-08 06:51:01 -07:00
Wez Furlong
c0fff4e843 Add wezterm.gui.default_key_tables()
This provides a means for more easily extending the default key
tables without forcing the user to recreate the entire config
for themselves.

wezterm.gui.default_keys is also added by this, but it is likely
not as useful.
2022-09-07 10:21:54 -07:00
Funami580
cd2c2a1a83 charselect: add option to cycle to previous group of characters 2022-09-07 10:21:35 -07:00
Wez Furlong
c25e6820ef add normalize_to_nfc config option
refs: #2482
2022-09-06 08:58:09 -07:00
Wez Furlong
7d4b8249d7 add switch_to_last_active_tab_when_closing_tab config option
refs: https://github.com/wez/wezterm/issues/2487
2022-09-05 10:28:02 -07:00
Wez Furlong
7158c435d5 lua: patch os.getenv with our own function
ad9490ee8f unset SHELL from the
environment on startup which had the consequence of causing
`os.getenv("SHELL")` to return `nil` when used in the config file.

Rather than simply restoring SHELL env var, recognize that reading
the environment from a long lived process is prone to seeing
stable environment forever.

We already compensate for this in the pty crate's understanding
of the base environment, so this commit patches `os.getenv`
and replaces it with our own imlementation that uses that same
logic.

The base environment logic has been extended to set SHELL from
the passwd database to round things out.

refs: https://github.com/wez/wezterm/discussions/2481
2022-09-04 15:39:28 -07:00
Wez Furlong
587b0e50ff cargo update 2022-09-03 18:58:35 -07:00