From 5de0bb3290d17a36cab3debd8e727842a6dc1a91 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Wed, 20 Dec 2023 12:31:59 +0100 Subject: [PATCH] fixup! added support for urlscan, preferred over urlview which is now unmaintained --- .tmux.conf | 2 +- README.md | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index d60d08c..6924cc4 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1639,7 +1639,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration' # tmux capture-pane -J -S - -E - -b "urlview-$1" -t "$1" # command='false' # command -v urlview > /dev/null 2>&1 && command='urlview' -# command -v urlscan > /dev/null 2>&1 && command='urlscan --compact --dedupe --regex "https?://.+"' +# command -v urlscan > /dev/null 2>&1 && command='urlscan --compact --dedupe --regex "https?://.+\.\w+"' # tmux split-window "'$TMUX_PROGRAM' ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} show-buffer -b 'urlview-$1' | $command || true; '$TMUX_PROGRAM' ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} delete-buffer -b 'urlview-$1'" # } # diff --git a/README.md b/README.md index 92f5e4c..ea6843b 100644 --- a/README.md +++ b/README.md @@ -131,13 +131,14 @@ Features on macOS, `xsel`, `xclip`, or `wl-copy` on Linux) - support for 4-digit hexadecimal Unicode characters - [Facebook PathPicker][] integration if available - - [Urlview][] integration if available + - [Urlscan][] (preferred) or [Urlview][] integration if available [Powerline]: https://github.com/Lokaltog/powerline [maximize-pane]: http://pempek.net/articles/2013/04/14/maximizing-tmux-pane-new-window/ [reattach-to-user-namespace]: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard [Facebook PathPicker]: https://facebook.github.io/PathPicker/ [Urlview]: https://packages.debian.org/stable/misc/urlview +[Urlscan]: https://github.com/firecat53/urlscan The "maximize any pane to a new window with ` +`" feature is different from builtin `resize-pane -Z` as it allows you to further split a maximized @@ -188,8 +189,8 @@ This configuration uses the following bindings: - ` m` toggles mouse mode on or off - - ` U` launches Urlview (if available) - - ` F` launches Facebook PathPicker (if available) + - ` U` launches Urlscan (preferred) or Urlview, if available + - ` F` launches Facebook PathPicker, if available - ` Enter` enters copy-mode - ` b` lists the paste-buffers