From 20be7f3bcc128a62984e5d92283b6616fdcd8b1f Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Tue, 17 Sep 2019 22:13:02 +0100 Subject: [PATCH] Add urlscan as alternative to urlview Since urlview is not available with pacman but urlscan is, first check and integrate urlscan then fallback to urlview. --- .conduit.yaml | 1 + tmux.conf | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.conduit.yaml b/.conduit.yaml index 47c371f..325e451 100644 --- a/.conduit.yaml +++ b/.conduit.yaml @@ -11,6 +11,7 @@ - pacman: - tmux - xclip + - urlscan - symlink: - {src: tmux.conf, dst: ~/.tmux.conf} - {src: layouts/session-main, dst: ~/.local/share/tmux/layouts/session-main} diff --git a/tmux.conf b/tmux.conf index 357a344..522fb2f 100644 --- a/tmux.conf +++ b/tmux.conf @@ -69,8 +69,10 @@ bind -n C-k if $in_vim 'send-keys C-k' 'select-pane -U' bind -n C-l if $in_vim 'send-keys C-l' 'select-pane -R' bind -n C-\ if $in_vim 'send-keys C-\\' 'select-pane -l' -# Integrate urlview -bind u capture-pane \; split-window 'tmux show-buffer | urlview -' +# Integrate urlscan or fallback to urlview +if -b 'which urlscan' \ + 'bind u capture-pane \; split-window "tmux show-buffer | urlscan"' \ + 'bind u capture-pane \; split-window "tmux show-buffer | urlview -"' # Unbind copy mode defaults so pane selection works unbind -T copy-mode-vi C-h