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

5026 Commits

Author SHA1 Message Date
Wez Furlong
4ebbc6688d tmux: capture initial screen contents
refs: #1090
2022-01-17 14:36:57 -07:00
Wez Furlong
0eb1417c84 tmux: fix send-keys
Needs the % prefix to find the pane by id

refs: #1090
2022-01-17 14:20:05 -07:00
Wez Furlong
1c38c611f3 Split up some of the tmux state 2022-01-17 14:15:41 -07:00
Wez Furlong
e4ed2c93e2 encoding my preferred import grouping in the rustfmt config
This uses an unstable option in rustfmt, you `cargo +nightly fmt`
needs to be used to format the code correctly.
2022-01-17 13:50:51 -07:00
Wez Furlong
8f31aed3f1 move tmux-cc crate to be module inside termwiz
refs: #1090
2022-01-17 13:43:35 -07:00
Wez Furlong
db01691359 fix build
refs: #1090
2022-01-17 13:29:40 -07:00
g4c
9b7489ed97 buffer extra large message before write to mux 2022-01-17 13:08:41 -07:00
g4c
cf22db9b96 clean unwrap 2022-01-17 13:08:41 -07:00
g4c
1bdc952d9d fix log level 2022-01-17 13:08:41 -07:00
g4c
8ee5c295f7 doc and cleanup 2022-01-17 13:08:41 -07:00
g4c
6928415461 fix send-keys tmux command 2022-01-17 13:08:41 -07:00
dixeran
071aefc822 fix windows build 2022-01-17 13:08:41 -07:00
g4c
1a73a2feaa write into tmux 2022-01-17 13:08:41 -07:00
g4c
3054fd045e concat tmux parser buffer and unparsed bytes 2022-01-17 13:08:41 -07:00
g4c
64d38c94c5 nicely quit tmux mode 2022-01-17 13:08:41 -07:00
g4c
ac4d1a2a26 condvar for session release 2022-01-17 13:08:41 -07:00
g4c
b899c81d19 create gui when attach to exist session 2022-01-17 13:08:41 -07:00
g4c
a26f190c7c it worked! 2022-01-17 13:08:39 -07:00
g4c
e45a268ed1 [WIP] sync tmux panes 2022-01-17 13:08:14 -07:00
g4c
b0f0050daf send tmux output 2022-01-17 13:08:14 -07:00
g4c
b0ff7707aa tmux pty 2022-01-17 13:08:14 -07:00
g4c
007a0c1b27 split out tmux command process 2022-01-17 13:08:12 -07:00
g4c
8e04f49d03 split out tmux commands 2022-01-17 13:07:36 -07:00
g4c
18dd3e90bc tmux domain handle events 2022-01-17 13:06:03 -07:00
g4c
a7b60c8d88 handle tmux events DCS event 2022-01-17 13:06:03 -07:00
g4c
f36d4c6734 parse tmux control mode events
when in tmux mode, bypass vtparse
2022-01-17 13:06:03 -07:00
Wez Furlong
6a167252b6 docs: SwitchToWorkspace
refs: https://github.com/wez/wezterm/issues/1531
2022-01-17 11:32:23 -07:00
Wez Furlong
b6d121dd52 Add wezterm cli send-text command
refs: #888
2022-01-17 10:23:22 -07:00
Wez Furlong
db8f588c5e Add SwitchWorkspaceRelative key assignment 2022-01-17 09:54:11 -07:00
Wez Furlong
8d3d3e02a7 add default_workspace config option
refs: #1322
refs: #1531
2022-01-17 09:31:20 -07:00
Wez Furlong
d169088694 fix clipping issue in fancy tab bar
We budget size based on the x_advance, which can be 1 pixel less
than the width of the glyph texture, so we could often end up
omitting the last character in "Launcher" or "default" in the
tab title or right status area.

This commit uses x_advance in both places.
2022-01-17 09:24:23 -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
91c684b702 docs: fix typo 2022-01-17 08:21:30 -07:00
Wez Furlong
7eec41c284 Add ShowLauncherArgs key assignment
refs: https://github.com/wez/wezterm/issues/1485
2022-01-17 08:16:18 -07:00
Wez Furlong
631f7869a5 launcher: consistently order entries 2022-01-16 20:59:51 -07:00
Wez Furlong
b6141d650e launcher: improve scrolling through options and mouse selection
Make the scrolling mostly independent of the active row; adjust
the top row when hitting the top/bottom edges of the display.

Mouse movement no longer changes the scroll position.  Instead,
the wheel is used to scroll the list.

refs: https://github.com/wez/wezterm/issues/1485
2022-01-16 20:28:46 -07:00
Autumn Lamonte
d3df2920d0
Filter out per-pixel mouse movement when not in SGR-Pixels mode (#1549)
* #1457 Initial commit compiles but doesn't yet work

* #1457 Fix cell offsets

* #1457 refactor, ClickPosition

* fix nits

* #1457 filter per-pixel motion when not in SGR-Pixels mode

* Much cleaner match condition for filtering mouse events based on encoding protocol
2022-01-16 19:31:56 -07:00
Wez Furlong
11567c2097 ci: put fmt check into separate workflow 2022-01-16 19:07:47 -07:00
Wez Furlong
4b457da62f cargo fmt 2022-01-16 18:48:26 -07:00
Wez Furlong
6c19e5af5f cargo update 2022-01-16 18:46:30 -07:00
Wez Furlong
d164178b9d docs for wezterm.nerdfonts
refs: https://github.com/wez/wezterm/issues/1521
2022-01-16 18:45:13 -07:00
Wez Furlong
54e92b6858 Add module to map nerd font symbol names to codepoints
I generated nerdfonts_data.rs with this shell script; it uses `i_all.sh`
from the nerdfonts repo to get the base mapping:

```
source ./lib/i_all.sh

echo "//! Data mapping nerd font symbol names to their char codepoints"
echo "pub const NERD_FONT_GLYPHS: &[(&str, char)] = &["
for var in "${!i@}"; do
  # trim 'i_' prefix
  glyph_name=${var#*_}
  glyph_char=${!var}
  glyph_code=$(printf "%x" "'$glyph_char'")
  echo "(\"$glyph_name\", '\u{$glyph_code}'), // $glyph_char"
done
echo "];"
```

Then intent is to use it in wezterm:

```
local wezterm = require 'wezterm'

wezterm.log_info(wezterm.nerdfonts.dev_mozilla)
```
2022-01-16 17:25:08 -07:00
Wez Furlong
070c4030c6 Bundle Symbols Nerd Font Mono
Built using:

```
./FontForge-2020-11-07-21ad4a1-x86_64.AppImage --script $PWD/font-patcher "$PWD/src/unpatched-fonts/NerdFontsSymbolsOnly/NerdFontsSymbolsOnly Template 1000 em.ttf" --powerline --use-single-width-glyphs -out /tmp/nerd-fonts-out --fontawesome --fontawesomeextension --fontlinux --octicons --codicons --powersymbols --powerline --powerlineextra --mdi --weathericons
```

which is everything *except* Pomicons at the time of writing, pending
clarifications of its distribution license
(https://github.com/ryanoasis/nerd-fonts/issues/266)

refs: https://github.com/wez/wezterm/issues/1521
2022-01-16 16:04:35 -07:00
Wez Furlong
3ee9270e3c support MarkEndOfPromptAndStartOfInputUntilEndOfLine semantic mode
It's a little ambiguous whether we should cancel the mode when moving
the cursor explicitly; I opted to do it when we move it due to newline
processing, or when its y position is changed.

refs: #1539
2022-01-16 12:49:19 -07:00
Wez Furlong
c6acd544ed docs: document tab bar edge option
closes: #1547
2022-01-16 12:24:38 -07:00
Wez Furlong
25c0540875 fix bar cursors when moving through double-width cells
Don't render two copies of the cursor in the same cell,
and compute different graphics for double wide cells.

refs: #1548
2022-01-16 12:19:49 -07:00
Wez Furlong
71630844c8 fix warning 2022-01-16 09:53:34 -07:00
Wez Furlong
e575bc9ff9 simplify window reconciliation logic
refs: https://github.com/wez/wezterm/issues/1531
2022-01-16 09:50:16 -07:00
Wez Furlong
12f32aeda8 tidy up front end accessors 2022-01-15 21:46:40 -07:00
Wez Furlong
39c2da3bdf avoid race condition when closing last window in a workspace
This isn't ideal, but it is better than previously: we would
close the window and before the Drop impl had updated the
list of known windows, we'd try to re-assign that window
to another mux window in a different workspace, but it would
never appear because the window was closed.

refs: https://github.com/wez/wezterm/issues/1531
2022-01-15 20:02:14 -07:00