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

5548 Commits

Author SHA1 Message Date
Wez Furlong
1b0f5cf256 fonts: treat "charcell" spacing as monospace
Some versions of fontconfig classify some fonts as having charcell
spacing.  We need to consider those as monospace as well.

refs: https://github.com/wez/wezterm/issues/1820
2022-04-06 08:11:34 -07:00
Wez Furlong
a0ce1f9526 env: unset WINDOWID
I can't think of a reason for this to ever want to be passed down
from above, so remove it.
2022-04-06 07:48:10 -07:00
Wez Furlong
1908d35d03 Improve exit_behavior messaging
refs: https://github.com/wez/wezterm/issues/1791#issuecomment-1090059541
2022-04-06 07:43:12 -07:00
Wez Furlong
a1b573c3c5 fix parsing raw: keycodes
refs: #1824
2022-04-06 07:01:10 -07:00
Wez Furlong
16e5a3604d ls-fonts: show pixel_sizes for font-dirs and built-ins 2022-04-05 20:55:15 -07:00
Wez Furlong
11a19a589a fonts: remember bdfs with multiple sizes found in font_dirs
We were using a simple hashmap of name -> parsed file, but for
something like Terminus where there are ~10 files per weight
but for different pixel sizes, we'd end up forgetting files
beyond the first.

This commit tracks the full list in the font db.

related to #1820 in the sense that I needed this to confirm that
we do handle BDFs, but it is not the issue reported there because
that was sourcing fonts via fontconfig on linux.
2022-04-05 20:46:28 -07:00
David Rios
33e0858f8d fix incorrect mouse position reporting for split panes
fixes #1822
2022-04-05 17:38:22 -07:00
Wez Furlong
8a0072add1 docs: clarify same domain for OSC 7 in cwd determination 2022-04-05 09:15:15 -07:00
Wez Furlong
b2ba7383b0 windows: procinfo: extra defensive coding around reading proc info
Might possibly help with #1699
2022-04-05 08:54:05 -07:00
Wez Furlong
27217992f2 docs: update colorschemes screenshots
I really want to replace these with simple html to avoid bloating
the repo too much over time.
2022-04-05 08:18:01 -07:00
Wez Furlong
713d9e0124 term: change default selection fg/bg to translucent purplish color
I think this looks less jarring than the yellowish selection color,
and the translucency looks nicer than changing the fg color completely
black as it did previously.
2022-04-05 07:47:32 -07:00
Wez Furlong
9ee2d0f6b2 clientpane: delay before re-sync
The fix for f478672fd8 regressed
the one for b398eaf656.

Compensate by adding a short delay.

refs: #1752
2022-04-05 07:29:57 -07:00
Wez Furlong
de615080b2 Restore window creation error logging
revert 4f59c17f19 as it didn't help
2022-04-05 07:17:07 -07:00
Wez Furlong
dc33a5b081 docs: clarify Menlo fi ligature changelog entry 2022-04-05 07:13:30 -07:00
Wez Furlong
30bc258628 docs: fix typo in changelog 2022-04-05 07:12:40 -07:00
Wez Furlong
e3c143ea8a docs: tweak how Space is shown in the default-keys table 2022-04-05 07:03:09 -07:00
Wez Furlong
c62e2364dd docs: changelog for https://github.com/wez/wezterm/issues/1794
closes: https://github.com/wez/wezterm/issues/1794
2022-04-04 20:51:48 -07:00
Wez Furlong
520f1e994a docs: changelog for https://github.com/wez/wezterm/issues/1804
closes: https://github.com/wez/wezterm/issues/1804
2022-04-04 20:49:49 -07:00
Wez Furlong
526cc26b1e allow disabling aa for custom block glyphs
This is definitely in the band-aid category, but two issues have
mentioned the AA in custom block glyphs recently.

This commit adds an `anti_alias_custom_block_glyphs` option that can be
set to false to prevent the custom block glyphs from enabling AA.

I think a better long term fix would be some kind of hinting to avoid
the degenerate AA case, but when I made an enquiry about this class of
issue in tiny skia in the past, the author didn't want to diverge from
skia-compatible behavior, so I think we'd need to find (or build!) an
alternative rasterizer for these path instructions.

refs: https://github.com/wez/wezterm/issues/1753
refs: #1817
2022-04-04 20:39:30 -07:00
Wez Furlong
59a5b5ab12 gui: assume --always-new-process if --position is specified
To fix this correctly, the mux protocol would need to have some
special cases for talk to a gui server implementation, and we don't
have those today.

refs: #1794
2022-04-04 20:07:10 -07:00
Wez Furlong
24b2597183 ls-fonts: improve output for custom_block_glyphs
Print the correct text fragment, and clarify why wezterm
is drawing a glyph.

refs: #1817
2022-04-04 20:03:05 -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
53cae843c8 Clear key table stack on config reload 2022-04-04 09:30:04 -07:00
Wez Furlong
4f59c17f19 window: include debug repr of window creation errors
The glium IncompatibleOpenGl Display doesn't include any of the
useful context to explain what the issue was, so this commit
renders the error both in human friendly and Debug form to
see if we can understand more about what is happening.

refs: https://github.com/wez/wezterm/issues/1813
2022-04-04 07:06:27 -07:00
Wez Furlong
6c5e54c47e deps: unpin glium from git, use latest release
We were pinned on the revision where I had added dual source blending,
because I wanted that feature ahead of the crate being published.

Since then a couple of releases have been made so we can unpin.

On Windows 11, we had a report of glium complaining about the opengl
version. I can't find that error message string in the current version
of the code so it's possible that that situation has been resolved.

refs: https://github.com/wez/wezterm/issues/1813
2022-04-04 06:54:49 -07:00
Wez Furlong
cd634af43e docs: tweak default_cwd text 2022-04-03 22:17:18 -07:00
Wez Furlong
2a8ff9ca75 docs: adopt mermaid-js for flowchart
This is a bit more compact and easier to edit.

A downside is that the search engine highlight can break the diagram and
cause it to emit a syntax error.
2022-04-03 22:09:17 -07:00
Wez Furlong
e76525b695 deps: harfbuzz -> 4.2.0 2022-04-03 18:37:25 -07:00
Wez Furlong
2629e50a93 docs: changelog for #1805
closes: https://github.com/wez/wezterm/issues/1199
closes: https://github.com/wez/wezterm/issues/1386
closes: https://github.com/wez/wezterm/issues/354
2022-04-03 18:32:39 -07:00
Wez Furlong
018f5df7d5 cargo fmt after resolving conflicts via GH UI 2022-04-03 18:29:59 -07:00
Wez Furlong
c205bdc5dc cargo update 2022-04-03 18:29:47 -07:00
David Rios
c5687acf8c
gui: improve mouse text selection (#1805)
* gui: improve mouse text selection
* implement mouse press capture between the terminal and UI, so when you
  start selecting text from the terminal the tabs won't activate and
  vice-versa
* selecting from the top and bottom lines won't scroll the viewport
  anymore, it will only scroll if the mouse is moved out of line bounds
* change cell selection so that it behaves like text selection usually
  does in other popular software

refs: https://github.com/wez/wezterm/issues/1199
refs: https://github.com/wez/wezterm/issues/1386
refs: https://github.com/wez/wezterm/issues/354
2022-04-03 18:29:31 -07:00
Wez Furlong
0284bcdd3d x11: set position only if explicitly requested
refs: #1794
2022-04-03 18:00:27 -07:00
Wez Furlong
603f6d69ce try harder to set the x,y position on x11
refs: #1794
2022-04-03 17:01:03 -07:00
Wez Furlong
54d503de9d keys: add ActivateKeyTable assignment
`ActivateKeyTable` pushes a new named key table entry onto the stack.

It has some parameters:

* name - required; the name of a entry in `key_tables` that should be
  activated.
* timeout_milliseconds - how long the entry should remain active.
  When this duration elapses, the entry will pop itself from the
  stack. If omitted, the entry will not pop itself due to time.
* one_shot - if true (or omitted; true is default), the entry will pop
  itself after one use.  If false the entry will not pop itself after use.
  But note that if timeout_milliseconds is set then it may pop itself
  due to time.
* replace_current - if true, will pop the current stack entry before
  activating the current entry. Most useful when combined with some
  other one_shot=false activation.

`PopKeyTable` explicitly pops the top of the key table stack.
Most useful with `one_shot=false` activations.

`ClearKeyTableStack` clears the key table stack. Most useful with
`one_shot=false` activations.

```
local wezterm = require 'wezterm';

wezterm.on("update-right-status", function(window, pane)
  local name = window:active_key_table()
  if name then
    name = "TABLE: " .. name
  end
  window:set_right_status(name or "")
end);

return {
  debug_key_events = true,
  keys = {
    -- Activate the "woot" table as a one-shot with
    -- a 2 second timeout, after which it will restore
    -- the default table.
    {
      key="a", mods="CTRL",
      action=wezterm.action{
        ActivateKeyTable={
          name="woot",
          timeout_milliseconds=2000,
        }
      }
    },

    -- Activate the "woot" table.
    -- The table will remain active until explicitly popped
    -- by the `PopKeyTable` action. See the Escape binding below!
    {
      key="b", mods="CTRL",
      action=wezterm.action{
        ActivateKeyTable={
          name="woot",
          one_shot = false,
        }
      }
    },

    -- Activate the "woot" table as a one-shot with
    -- no timeout. It will remain active until a key is pressed,
    -- after which is will restore the default table.
    {
      key="c", mods="CTRL",
      action=wezterm.action{
        ActivateKeyTable={
          name="woot",
        }
      }
    },

  },
  key_tables = {
    woot = {
      {key="a", action=wezterm.action{SendString="woot"}},
      {key="Escape", action="PopKeyTable"},
    },
  },
}
```
2022-04-03 14:49:23 -07:00
Wez Furlong
3c4eb0846f keyboard: define keytable related types
This commit introduces a new `key_tables` config option that allows
defining named groups of key assignments, but that have no effect yet.

To support this change, the InputMap type has been adjusted to allow
for the idea that multiple tables can exist.

refs: https://github.com/wez/wezterm/discussions/1812
2022-04-03 13:45:21 -07:00
Wez Furlong
366c2fd807 docs: changelog for https://github.com/wez/wezterm/pull/1810 2022-04-03 13:01:49 -07:00
tantei3
60ec82554b
Added support for kitty images protocol using Shared Memory (#1810)
* termwiz: add support for kitty image using shm mode
* termwiz: kitty image shm cleanup error handling
* termwiz: kitty image shm create wrapper for HANDLE and impl Drop for it
* termwiz: kitty image shm refactor windows implementation

Signed-off-by: Shreesh Adiga <16567adigashreesh@gmail.com>
2022-04-03 12:59:58 -07:00
Wez Furlong
14323a08d1 fonts: adjust descender for scaled fallback fonts
The gist of the issue is that when setting eg: scale=1.2 to draw
a larger CJK glyph, it is drawn at the same descender level, which
makes it more likely to leave the top of the cell.

This commit adjusts the y position by the difference between the
original and the scaled descender so that is less likely to cause
problems.

refs: https://github.com/wez/wezterm/issues/1803
2022-04-03 09:39:48 -07:00
Wez Furlong
7526b0567c x11: add KP_End keysym mapping
refs: #1804
2022-04-03 07:36:48 -07:00
nmreadelf
a3d4f09b07 fix MoveTab config document error 2022-04-03 06:38:36 -07:00
Wez Furlong
02d5d9425d x11: improve trace logging for keyboard handling
refs: #1804
2022-04-03 06:32:42 -07:00
Wez Furlong
8d699fccb7 keys: only synthesize ctrl+uppercase from ctrl+shift+key if actually uppercase
This prevents the ctrl+shift+space assignment from also binding
ctrl+space
2022-04-03 06:02:19 -07:00
Wez Furlong
33e640bb98 debian needs randr package
refs: #1794
2022-04-02 23:09:39 -07:00
Wez Furlong
e95707fe70 flesh out % based and named display for positioning on X11
refs: #1794
2022-04-02 22:45:13 -07:00
Wez Furlong
13bfa27d2e flesh out % based and named display for positioning on macOS
refs: #1794
2022-04-02 15:40:09 -07:00
Wez Furlong
9a324385eb flesh out % based and named display for positioning on Windows
refs: #1794
2022-04-02 11:11:28 -07:00
Wez Furlong
02aae83794 fix windows build
refs: #1794
2022-04-02 09:46:36 -07:00
Muhammed Zakir
021ebbede1 docs: keys.md: SHIFT modifier missing for TogglePaneZoomState 2022-04-02 09:43:22 -07:00
Wez Furlong
52edc8bb11 window: speculative code to enable initial position on windows
need to move this to my windows machine to try it

refs: #1794
2022-04-02 09:40:41 -07:00