mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 15:04:36 +03:00
x11: default use_ime=true, add xim_im_name option
This commit is contained in:
parent
d031342b72
commit
52c198ab8c
@ -1155,8 +1155,11 @@ pub struct Config {
|
||||
#[serde(default = "default_true")]
|
||||
pub scroll_to_bottom_on_input: bool,
|
||||
|
||||
#[serde(default)]
|
||||
#[serde(default = "default_use_ime")]
|
||||
pub use_ime: bool,
|
||||
#[serde(default)]
|
||||
pub xim_im_name: Option<String>,
|
||||
|
||||
#[serde(default = "default_true")]
|
||||
pub use_dead_keys: bool,
|
||||
|
||||
@ -1896,6 +1899,14 @@ fn default_ratelimit_line_prefetches_per_second() -> u32 {
|
||||
10
|
||||
}
|
||||
|
||||
fn default_use_ime() -> bool {
|
||||
if cfg!(target_os = "macos") {
|
||||
false
|
||||
} else {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
fn default_true() -> bool {
|
||||
true
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
* quickselect: we now de-duplicate labels for results with the same textual content. [#1271](https://github.com/wez/wezterm/issues/1271)
|
||||
* The default `CompleteSelectionOrOpenLinkAtMouseCursor` left button release assignment now also accepts SHIFT being held in order to make SHIFT-click `ExtendSelectionToMouseCursor` feel more ergonomic if the mouse button is released before the SHIFT key. [#1204](https://github.com/wez/wezterm/issues/1204)
|
||||
* Unicode BIDI and other zero-width graphemes are now filtered out from the terminal model. It's not ideal in the sense that that information is essentially lost when copying to the clipboard, but it makes the presentation correct. [#1422](https://github.com/wez/wezterm/issues/1422)
|
||||
* [use_ime](config/lua/config/use_ime.md) now defaults to `true` on X11 systems
|
||||
|
||||
#### Updated and Improved
|
||||
|
||||
|
@ -22,7 +22,15 @@ return {
|
||||
|
||||
Changing `use_ime` usually requires re-launching WezTerm to take full effect.
|
||||
|
||||
*since: 20200620-160318-e00b076c*
|
||||
*Since: 20200620-160318-e00b076c*
|
||||
|
||||
The default for `use_ime` is false. The default in earlier releases was `true`.
|
||||
|
||||
|
||||
*Since: nightly builds only*
|
||||
|
||||
The default for X11 systems is now `true`. Please ensure that the `XMODIFIERS`
|
||||
environment variable or the new [xim_im_name](xim_im_name.md) configuration
|
||||
option is set appropriately before wezterm is launched! For
|
||||
example, Gnome users will probably want to set `XMODIFIERS=@im=ibus`.
|
||||
|
||||
|
22
docs/config/lua/config/xim_im_name.md
Normal file
22
docs/config/lua/config/xim_im_name.md
Normal file
@ -0,0 +1,22 @@
|
||||
# `xim_im_name`
|
||||
|
||||
*Since: nightly builds only*
|
||||
|
||||
Explicitly set the name of the IME server to which wezterm will connect
|
||||
via the XIM protocol when using X11 and [use_ime](use_ime.md) is `true`.
|
||||
|
||||
By default, this option is not set which means that wezterm will consider
|
||||
the value of the `XMODIFIERS` environment variable.
|
||||
|
||||
If for some reason the environment isn't set up correctly, or you want
|
||||
to quickly evaluate a different input method server, then you could
|
||||
update your config to specify it explicitly:
|
||||
|
||||
```lua
|
||||
return {
|
||||
xim_im_name = "fcitx",
|
||||
}
|
||||
```
|
||||
|
||||
will cause wezterm to connect to fcitx regardless of the value of `XMODIFIERS`.
|
||||
|
@ -478,7 +478,7 @@ impl XConnection {
|
||||
&conn,
|
||||
screen_num,
|
||||
xcb_imdkit::InputStyle::DEFAULT,
|
||||
None,
|
||||
config::configuration().xim_im_name.as_deref(),
|
||||
)
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user