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

350 Commits

Author SHA1 Message Date
Benoit de Chezelles
0d355e4d72 glyph: Comment the actual char for easy visualization 2021-07-04 07:33:41 -07:00
Wez Furlong
e05ddb1737 fix force_reverse_video_cursor 2021-06-28 09:18:13 -07:00
Wez Furlong
4f9532f9d8 window: plumb font config to underlying window impl 2021-06-26 22:58:42 -07:00
Wez Furlong
e69869efa7 refactor deps so that window can depend on wezterm-font
I want to use this to render the font in the title bar
2021-06-26 22:58:42 -07:00
Wez Furlong
8ab025b7fc Allow building without wayland support
You can run `cargo build --release --no-default-features` to build
without wayland support.

This is useful for systems that do not have wayland (eg: the `slint`
distro).
2021-06-26 22:58:42 -07:00
Wez Furlong
2fc143e6dd click to focus window now focuses the pane under the mouse cursor
refs: https://github.com/wez/wezterm/issues/881
2021-06-26 15:24:17 -07:00
Wez Furlong
e786968578 adjust hinting for box drawing
This looks better at more sizes

refs: #584
2021-06-26 13:56:16 -07:00
Wez Furlong
b7f504b15e complete box drawing glyphs
refs: #584
2021-06-26 13:45:45 -07:00
Wez Furlong
24fbba66c2 even more box drawing glyphs 2021-06-26 12:28:11 -07:00
Wez Furlong
29f28885fa box drawing: cell arcs 2021-06-26 10:37:09 -07:00
Wez Furlong
4e7f73fab7 box drawing: half lines and mixed lines 2021-06-26 10:16:12 -07:00
Wez Furlong
08fb4eb858 more dashes, and the diagonals 2021-06-26 09:55:45 -07:00
Wez Furlong
0b5444ccfd always use own box glyphs for pane splits
This section of the code wasn't looking up the custom glyphs
and would always use the font.  We can make rendering a little
more efficient if we skip the font resolution for this case,
and the code is much simpler if we just use our own box drawing
glyphs, so that's what we're doing here.

refs: #584
2021-06-26 09:26:10 -07:00
Wez Furlong
843dd88bb5 improve box drawing rendering at smaller font sizes 2021-06-26 08:54:01 -07:00
Wez Furlong
4c0d789ac3 zeno -> tiny_skia
Mostly so that we can turn off anti-aliasing for smaller sizes,
but it also happens to be more complete anyway.
2021-06-25 22:55:42 -07:00
Wez Furlong
fad09eddda even more box drawing glyphs 2021-06-25 21:56:24 -07:00
Wez Furlong
f846f0c9e8 missed the chonky 4 vertical dash 2021-06-25 10:04:49 -07:00
Wez Furlong
8a3fb11598 more box drawing glyphs 2021-06-25 09:58:51 -07:00
Wez Furlong
d7975b15c5 more box glyphs 2021-06-25 09:23:01 -07:00
Wez Furlong
afe63357d3 top left line box glyphs
refs: #584
2021-06-25 00:23:42 -07:00
Wez Furlong
e0ea161673 Custom glyphs for box drawings solid and dashed lines
closes: #588
refs: #584
2021-06-24 23:19:09 -07:00
Wez Furlong
1e8b9ec0bb block glyphs: adjust poly to allow per-path stroke/weight 2021-06-23 10:03:29 -07:00
Wez Furlong
8f676bda36 remove dead code 2021-06-23 09:48:36 -07:00
Wez Furlong
709f33561b ls-fonts: indicate when we're using a custom glyph
```
; ./target/debug/wezterm ls-fonts --text '├─░'
├    \u{251c}     glyph=915  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
─    \u{2500}     glyph=891  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
░    \u{2591}     drawn by wezterm: Full(Light)
```
2021-06-23 09:20:35 -07:00
Wez Furlong
ea95f3f735 don't round mouse coords when mouse is grabbed
refs: https://github.com/wez/wezterm/issues/898
2021-06-22 20:39:51 -07:00
Wez Furlong
9b6fa8d6af remove extraneous log::warn 2021-06-20 17:24:12 -07:00
Wez Furlong
ae4bfae5c4 mouse cursor -> Arrow when app grabs mouse
closes: https://github.com/wez/wezterm/issues/859
2021-06-19 17:35:16 -07:00
Wez Furlong
fdf871c3cb fonts: add wezterm ls-fonts --text "hello" to explain per-glyph font
```
; ./target/debug/wezterm ls-fonts --text "␉ ␌ ␍ ␊ ␋"
␉    \u{2409}     glyph=885  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
     \u{20}       glyph=2    wezterm.font("Operator Mono SSm Lig", weight="DemiLight", stretch="Normal", italic=false)
                             /home/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
␌    \u{240c}     glyph=888  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
     \u{20}       glyph=2    wezterm.font("Operator Mono SSm Lig", weight="DemiLight", stretch="Normal", italic=false)
                             /home/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
␍    \u{240d}     glyph=889  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
     \u{20}       glyph=2    wezterm.font("Operator Mono SSm Lig", weight="DemiLight", stretch="Normal", italic=false)
                             /home/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
␊    \u{240a}     glyph=886  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
     \u{20}       glyph=2    wezterm.font("Operator Mono SSm Lig", weight="DemiLight", stretch="Normal", italic=false)
                             /home/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
␋    \u{240b}     glyph=887  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
```
2021-06-19 16:55:45 -07:00
Wez Furlong
d57bc9b3dc CloseCurrentPane on last pane in a tab results in window closing
The issue is that the pane was only removed from the tab when explicitly
closed, leaving it to be later detected and flushed.

However, in the meantime, when performing eg: cursor blink maintenance,
if the set of panes in the tab is empty then the window would close.

The resolution is to ask the mux (rather than the tab) to kill the pane,
so that the cascading closure of the tab causes the window's active
tab to reference the correct remaining tab.

refs: #890
2021-06-19 11:06:14 -07:00
Wez Furlong
e0b62d07ca ls-fonts: add --list-system flag to list system fonts
heads up @bew!

This is implemented on windows and font-config systems;
needs to be fleshed out for macos.

refs: https://github.com/wez/wezterm/issues/347
2021-06-17 09:11:54 -07:00
Wez Furlong
1be3d016b1 deps: windows 0.9 -> 0.11
closes: #872
2021-06-16 08:29:09 -07:00
Wez Furlong
a4550385fc adjust zeno paths to allow for curves, add rounded powerline
refs: #584
2021-06-13 23:21:55 -07:00
Wez Furlong
1b3df56a91 custom powerline triangle glyphs
refs: #584
2021-06-13 22:04:42 -07:00
Wez Furlong
a217f96d6b Add some smooth mosaic custom glyphs
This proves the concept of using the zeno crate to draw filled
polygons.

refs: #584
refs: #588
2021-06-13 16:50:35 -07:00
Wez Furlong
6c702b568f glyphcache: adopt zeno crate for drawing
This changes the fill_rect function over to use the zeno crate.
zeno allows describing a path and filling or stroking.
This commit doesn't strictly need that, but it sets things
up for more interesting custom glyphs in later commits.

refs: #584
refs: #588
2021-06-13 15:49:37 -07:00
Wez Furlong
c036a7864b fix unused doc comment warning 2021-06-13 07:40:47 -07:00
nick black
5ca940c6d9 [sextants] fix copy-and-paste error on U+1FB06 2021-06-12 13:27:45 -07:00
Wez Furlong
ad0ee8f832 improve 1/8th block drawing
* Rename `draw_quad` to `fill_rect` to better indicate what it is doing.
* Switch the 1/8th block rendering to use `fill_rect` with math that is
  consistent with quad drawing to compute the bounds.

refs: https://github.com/dankamongmen/notcurses/issues/1715#issuecomment-860072690
2021-06-12 10:04:08 -07:00
Wez Furlong
2e7dc70eaf fixup tests 2021-06-10 20:40:57 -07:00
Wez Furlong
c7ec47e2c0 add sextant glyphs to custom block glyphs
While I'm in here, teach the font fallback code that it doesn't
need to search for these glyphs when custom block glyphs are
enabled.

refs: https://github.com/dankamongmen/notcurses/issues/1715
refs: #584
refs: #588
2021-06-10 20:38:48 -07:00
kas
4fcfb4b222 Use configured default program when running subcommand "start" with CWD option set and program unset
closes: https://github.com/wez/wezterm/pull/851
2021-06-10 07:11:40 -07:00
Wez Furlong
4feefdd04a cargo update 2021-06-07 08:32:05 -07:00
Roland Fredenhagen
e5806a6ac3 Better antialiasing for Undercurl 2021-05-31 16:33:20 -07:00
Wez Furlong
1a44255529 mux client: connect all mux panes in window to clipboard when attaching
refs: https://github.com/wez/wezterm/issues/836
2021-05-31 08:40:19 -07:00
Wez Furlong
b03e27adb1 deps: ordered-float 2.1 -> 2.5
closes: https://github.com/wez/wezterm/pull/831
2021-05-31 00:17:18 -07:00
Wez Furlong
5359f39dcf mux: fix an issue where auth window would linger before closing
Same vein as 8931afba5cee07ab12990f06c2ff34d6f8426b19; the auth
window could sometimes get stuck until an input event was sent
to it.

Wire up a mux event so that the window can close itself.
2021-05-31 00:11:47 -07:00
Wez Furlong
87cb593554 mux: client would prune out the empty window when connecting via ssh/tls domain
When the client connected to an empty remote mux, it would allocate an
empty window and then spawn a new tab into it.

Meanwhile, the authentication window would close and trigger a prune of
all empty windows, causing the in-flight spawn to fail because its
destination window was removed.

This commit defers window pruning while Activity is in progress;
the MuxWindowBuilder has an associated Activity count.
2021-05-30 23:50:13 -07:00
Wez Furlong
717a2157f6 fonts: synthesize dim when a light weight font is unavailable 2021-05-30 20:52:10 -07:00
Wez Furlong
cb4da18021 key assignment and docs for ShowDebugOverlay
refs: https://github.com/wez/wezterm/issues/641
2021-05-30 19:56:11 -07:00
Wez Furlong
f5f393bf2c term: notify embedding application when palette changes
refs: #748
2021-05-30 09:29:04 -07:00