From dd9502a09a9d5a4c97c271670e7ca7cb2171ab7f Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Mon, 18 Dec 2023 23:22:35 +0100 Subject: [PATCH] added support for urlscan, preferred over urlview which is now unmaintained, resolves #695 --- .tmux.conf | 5 ++++- README.md | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 5e4b49a..f283d9b 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1637,7 +1637,10 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration' # # _urlview() { # tmux capture-pane -J -S - -E - -b "urlview-$1" -t "$1" -# tmux split-window "'$TMUX_PROGRAM' ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} show-buffer -b 'urlview-$1' | urlview || true; '$TMUX_PROGRAM' ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} delete-buffer -b 'urlview-$1'" +# command='false' +# command -v urlview > /dev/null 2>&1 && command='urlview' +# command -v urlscan > /dev/null 2>&1 && command='urlscan --compact --dedupe' +# 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'" # } # # _fpp() { 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