diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/blog/2026-06-28-tmux-open-urls/tmux-open-urls.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/blog/2026-06-28-tmux-open-urls/tmux-open-urls.md b/src/blog/2026-06-28-tmux-open-urls/tmux-open-urls.md index aaaf3a6..4547a5a 100644 --- a/src/blog/2026-06-28-tmux-open-urls/tmux-open-urls.md +++ b/src/blog/2026-06-28-tmux-open-urls/tmux-open-urls.md | |||
| @@ -52,3 +52,27 @@ If a URL is broken into multiple lines, my `urlgrep` script is only going to | |||
| 52 | select it until the end of the first line, so you won't be able to open | 52 | select it until the end of the first line, so you won't be able to open |
| 53 | it correctly with this configuration. However, I found this to be a common | 53 | it correctly with this configuration. However, I found this to be a common |
| 54 | issue in many terminal emulators. | 54 | issue in many terminal emulators. |
| 55 | |||
| 56 | ## Update 2026-07-05 | ||
| 57 | |||
| 58 | Shortly after this post was published, a reader emailed me his modified | ||
| 59 | version of the binding: | ||
| 60 | |||
| 61 | ``` | ||
| 62 | bind u { | ||
| 63 | capture-pane -J | ||
| 64 | display-popup -w 80% -T "Select URL to open" -E "tmux show-buffer | urlview" | ||
| 65 | } | ||
| 66 | ``` | ||
| 67 | |||
| 68 | This taught me three things: | ||
| 69 | |||
| 70 | 1. `urlview` can replace my custom combo of scripts - cool! But I kinda like | ||
| 71 | my scripts, I think I'll keep using them. | ||
| 72 | 2. Using `display-popup` to show a "window" inside the tmux session. This can | ||
| 73 | be useful e.g. if one is not running a graphical session at all. I can | ||
| 74 | use it together with the `-m fzf` option for my `dmenu-urlselect`. | ||
| 75 | 3. The `-J` option for `capture-pane` to preserve trailing spaces and join | ||
| 76 | any wrapped lines. This may solve the caveat I mentioned above! | ||
| 77 | |||
| 78 | Thanks Johannes! | ||
