1
0
Fork 0
mirror of synced 2024-12-22 14:51:05 -05:00

introduced tmux_conf_urlscan_options to configure urlscan invocation, resolves #745

This commit is contained in:
Gregory Pakosz 2024-05-19 22:12:54 +02:00
parent dc88d389a2
commit cd3744965a
2 changed files with 22 additions and 10 deletions

View file

@ -101,11 +101,6 @@ bind Tab last-window # move to last active window
bind m run "cut -c3- '#{TMUX_CONF}' | sh -s _toggle_mouse"
# -- urlview -------------------------------------------------------------------
bind U run "cut -c3- '#{TMUX_CONF}' | sh -s _urlview '#{pane_id}'"
# -- facebook pathpicker -------------------------------------------------------
bind F run "cut -c3- '#{TMUX_CONF}' | sh -s _fpp '#{pane_id}' '#{pane_current_path}'"
@ -991,6 +986,13 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# perl -n -i -e "if ($. != $line) { print }" "$cfg.in"
# done
# fi
#
# tmux_conf_urlscan_options=${tmux_conf_urlscan_options:---compact --dedupe}
# if command -v urlscan > /dev/null 2>&1; then
# tmux bind U run "cut -c3- '#{TMUX_CONF}' | sh -s _urlscan '#{pane_id}' $tmux_conf_urlscan_options"
# elif command -v urlview > /dev/null 2>&1; then
# tmux bind U run "cut -c3- '#{TMUX_CONF}' | sh -s _urlview '#{pane_id}'"
# fi
# }
#
# _apply_theme() {
@ -1714,11 +1716,15 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# }
#
# _urlview() {
# 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'
# 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'"
# pane_id="$1"; shift
# tmux capture-pane -J -S - -E - -b "urlview-$pane_id" -t "$pane_id"
# tmux split-window "'$TMUX_PROGRAM' ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} show-buffer -b 'urlview-$pane_id' | urlview || true; '$TMUX_PROGRAM' ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} delete-buffer -b 'urlview-$pane_id'"
# }
#
# _urlscan() {
# pane_id="$1"; shift
# tmux capture-pane -J -S - -E - -b "urlscan-$pane_id" -t "$pane_id"
# tmux split-window "'$TMUX_PROGRAM' ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} show-buffer -b 'urlscan-$pane_id' | urlscan $* || true; '$TMUX_PROGRAM' ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} delete-buffer -b 'urlscan-$pane_id'"
# }
#
# _fpp() {

View file

@ -364,6 +364,12 @@ tmux_conf_theme_clock_style="24"
tmux_conf_copy_to_os_clipboard=false
# -- urlscan -------------------------------------------------------------------
# options passed to urlscan
tmux_conf_urlscan_options="--compact --dedupe"
# -- user customizations -------------------------------------------------------
# this is the place to override or undo settings