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

29 Commits

Author SHA1 Message Date
Wez Furlong
7885b9269e docs: update for 20220408-101518-b908e2dd release 2022-04-08 17:44:41 -07:00
Wez Furlong
327984d1d1 docs: add info about key tables. break key binding apart
The keys section was way too big; this splits it up into more
manageable pieces, adds a nice flow chart to show how key events
are processed and adds an example of using the new key tables feature.
2022-04-04 09:30:04 -07:00
Wez Furlong
ee5d5714ca docs: update for 20220319-142410-0fcdea07 2022-03-19 16:37:27 -07:00
Wez Furlong
e8900d47cd add window:active_workspace()
refs: #1531
refs: https://github.com/wez/wezterm/discussions/1322#discussioncomment-1984256
2022-01-17 09:11:06 -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
6cf6084c6d docs: clarify timeout for toast notifications
cc: @plscks

refs: #1514
2022-01-06 12:31:58 -07:00
Wez Furlong
028026049d add window:dead_key_is_active window:leader_is_active
This commit adds a couple of helper methods that provide insight into
the state of the keyboard layer.

The intent is for users to add status information about the keyboard
state.

This commit also ensures that we schedule an update when the leader
key duration expires, and ensures that we close out the leader state
for an invalid key press.

refs: #686
closes: #688

```lua
local wezterm = require 'wezterm';

wezterm.on("update-right-status", function(window, pane)
  local leader = ""
  if window:leader_is_active() then
    leader = "LEADER"
  end
  local dead = ""
  if window:dead_key_active() then
    dead = "DEAD"
  end
  window:set_right_status(leader .. " " .. dead)
end);

return {
  leader = { key="a", mods="CTRL" },
  colors = {
    dead_key_cursor = "orange",
  },
}
```
2022-01-02 19:41:21 -07:00
follower
c51c282ad8 Typo fix: "overriden" -> "overridden" 2021-10-02 14:33:06 -07:00
Wez Furlong
aaa9e3562d docs: tweak get_appearance docs a little 2021-09-03 09:11:00 -07:00
Daniel Poulin
0acda5852d Simply GNOME Wayland appearance documentation and implementation 2021-09-03 09:04:16 -07:00
Daniel Poulin
343727f4df Document workaround for get_appearance on GNOME Wayland 2021-09-03 09:04:16 -07:00
Wez Furlong
10812c936d docs: update for new 20210814-124438-54e29167 release 2021-08-14 14:15:05 -07:00
Wez Furlong
613bc5a4f1 docs: fix some broken links/typos 2021-07-25 08:46:10 -07:00
Wez Furlong
adc0ff276f docs: show how to switch color schemes for dark/light mode changes
refs: #806
2021-07-18 15:28:04 -07:00
Wez Furlong
fbcea3a2f4 docs: update for 20210502-154244-3f7122cb 2021-05-02 16:13:32 -07:00
Wez Furlong
a69447fc2a nominally support toast notif timeouts
I've built this on linux, which doesn't respect the timeout.
I've made speculative changes that should build on mac and windows,
but that don't plumb the timeout functionality on those systems
as of yet.

refs: #619
2021-04-25 08:52:43 -07:00
Wez Furlong
e5665e80a1 add window:toast_notification method
refs: https://github.com/wez/wezterm/issues/619
2021-04-11 22:01:06 -07:00
Glenn Waters
5c7e07bb60 Update docs/config/lua/window/get_dimensions.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2021-04-07 19:00:28 -07:00
Glenn Waters
84a9cd6da3 Create get_dimensions.md
Missing document.

Was not sure how to populate "Since" from the git has. Here is the commit: ba5d50ba9e
2021-04-07 19:00:28 -07:00
Wez Furlong
7be590ecc0 docs: update for 20210404-112810-b63a949d release 2021-04-04 11:30:58 -07:00
Wez Furlong
0643e8b0ed add window:get_selection_text_for_pane
refs: https://github.com/wez/wezterm/issues/575
2021-03-25 22:10:29 -07:00
Wez Furlong
46227a741f docs: update for version 20210314-114017-04b7cedd 2021-03-14 11:55:12 -07:00
Wez Furlong
da2239f1be docs: fixup screenshot links
refs: #500
2021-03-10 19:32:23 -08:00
Wez Furlong
d853be02ad docs: for the new status bar feature
refs: https://github.com/wez/wezterm/issues/500
2021-03-10 19:29:17 -08:00
Wez Furlong
229df874b7 docs: break out events into their own pages
Take the existing open-uri docs and move to their own page.
Add docs for the new window events.
2021-03-09 21:50:48 -08:00
Wez Furlong
db08b8c1dc add window:set_config_overrides lua method
This commit expands on the prior commits to introduce the concept
of per-window configuration overrides.

Each TermWindow maintains json compatible object value holding
a map of config key -> config value overrides.

When the window notices that the config has changed, the config
file is loaded, the CLI overrides (if any) are applied, and then
finally the per-window overrides, before attempting to coerce
the resultant lua value into a Config object.

This mechanism has some important constraints:

* Only data can be assigned to the overrides.  Closures or special
  lua userdata object handles are not permitted.  This is because
  the lifetime of those objects is tied to the lua context in which
  they were parsed, which doesn't really exist in the context of
  the window.
* Only simple keys are supported for the per-window overrides.
  That means that trying to override a very specific field of
  a deeply structured value (eg: something like `font_rules[1].italic = false`
  isn't able to be expressed in this scheme.  Instead, you would
  need to assign the entire `font_rules` key.  I don't anticipate
  this being a common desire at this time; if more advance manipulations
  are required, then I have some thoughts on an event where arbitrary
  lua modifications can be applied.

The implementation details are fairly straight-forward, but in testing
the two examplary use cases I noticed that some hangovers from
supporting overrides for a couple of font related options meant that the
window-specific config wasn't being honored.  I've removed the code that
handled those overrides in favor of the newer more general CLI option
override support, and threaded the config through to the font code.

closes: #469
closes: #329
2021-02-27 14:53:19 -08:00
Wez Furlong
60be1a98a0 lua: add window::effective_config() method
Expose the current window configuration to lua scripts.

refs: https://github.com/wez/wezterm/issues/469
2021-02-27 12:39:22 -08:00
Wez Furlong
bb49ecca98 docs: update for 20201031-154415-9614e117 release 2020-10-31 15:51:08 -07:00
Wez Furlong
b009e8c0d4 docs: add docs for the window object
refs: #225
2020-10-09 23:34:35 -07:00