Search results
From the blog
Posted 2024-10-21
Using resurrect.wezterm to manage Wezterm session state
One of my goals when adopting Wezterm was to replace tmux. To do that, I needed not just the ability to open additional tabs/windows and to split into panes, but also a feature I'd come to rely on heavily in the tmux ecosystem: session saving and restoration, which I accomplished with the tmux-resurrect plugin.
I tried a number of options, but was eventually pointed to resurrect.wezterm.
In this post, I'll detail how I've configured it, as well as a workflow I've developed for interacting with it that gives me (a) reasonable satisfaction that I won't lose work, and (b) additional flexibility for branching off work.
From the blog
Posted 2024-10-21
Managing Wezterm Keybindings, or Merging with Lua
As I expand my Wezterm usage, I find that either (a) a third-party module will have default keybinding configuration I want to adopt, and/or (b) I want to segregate keybindings related to specific contexts into separate modules to simplify my configuration.
Keybindings are stored as a list of tables (what we call associative arrays in PHP). Simple, right?
Unlike in other languages I use, Lua doesn't have a built-in way to merge lists.
So, I wrote up a re-usable function.
From the blog
Posted 2024-10-21
Wezterm GUI Notifications
Wezterm has a utility for raising GUI system notifications, window:toast_notification(), which is a handy way to bring notifications to you that you might otherwise miss if the window is hidden or if a given tab is inactive.
However, on Linux, it's a far from ideal tool, at least under gnome-shell. (I don't know how it does on KDE or other desktop environments.) It raises the notification, but the notification never times out, even if you provide a timeout value (fourth argument to the function). This means that you have to manually dismiss the notification, which can be annoying, particularly if the notifications happen regularly.
So, I worked up my own utility.
From the blog
Posted 2024-09-23
Fixing Generation of wl-clipboard Transient Windows When Used with Neovim
I have been plagued recently with issues stemming from neovim's interaction with the system clipboard. Every time I would copy text in nvim, I'd get a transient wl-clipboard window. Inside nvim, paste would work fine, but outside it, the system clipboard seemed not to get the contents.
I finally tracked it down to how Wezterm is interacting with Wayland.
And the culprit appears to be... the muxer.
From the blog
Posted 2024-09-17
Wezterm Dropdown in Gnome
In a previous article, I detailed how I use Wezterm.
One goal I had when switching to Wezterm to was to ensure I was able to continue using a dropdown terminal, and in that article, I detailed using the tdrop
utility to implement this... but with the caveat that it didn't work well under the Wayland environment.
Well, I've now found a better solution.
/postroll
Wezterm Quick Select Mode
wezfurlong.org
Quick select mode in Wezterm allows you to identify patterns in the current visible screen; Wezterm then highlights each and provides a key to each allowing you to copy and/or paste the associated value. Activate it with Ctrl-Shift-Space
.
As examples:
- It matches sha1 and md5 values. Use these to match a git ref in a log so you can then inspect it.
- It matches Docker container identifiers; use these to match a container identifier so you can run a command in it or copy a file from or to it.
- It matches URLs; use it to identify a URL to pass to HTTPie.
- It matches paths; use it to match a path to perform a file operation on.
From the blog
Posted 2024-07-04
How I use Wezterm
I use the terminal a lot. Until the past few years, I basically used only a browser and a terminal. (The primary changes in the past couple years are that I'm using Logseq for tracking notes and todos, and now use native apps for Zoom and Slack.)
Today I'm going to detail my exploration of Wezterm, my current daily driver.
Search tips
- Use
#{some tag}
ortag:{some tag}
to filter by tag; using this more than once will find results that match all tags. - Use
year:{year}
to filter by year. If you use this multiple times, the last one wins. - Use
begin:{year-month-day}
to restrict to results beginning on that day. Last one wins. - Use
end:{year-month-day}
to restrict to results ending on that day. Last one wins.