tessen

default description
git clone https://git.awy.one/tessen.git
Log | Files | Refs | README | LICENSE

commit e335d8a23f91740f27be1d5ff420444cfc64c03e
parent 4c3e80bdf45ab1a4ac6a7b620787da4d87cc9049
Author: Ayush Agarwal <ayush@fastmail.in>
Date:   Wed, 16 Feb 2022 22:15:23 +0530

refactor: key_url isn't needed anymore

key_action is taking care of this

Diffstat:
Mtessen | 32++------------------------------
1 file changed, 2 insertions(+), 30 deletions(-)

diff --git a/tessen b/tessen @@ -396,36 +396,8 @@ key_otp() { unset -v tmp_otp } -# THIRD MENU: optional, this function is used if TESSEN_URLKEY is found. -# Instead of showing 'autotype', it will show 'open'. -# This function could've been combined with 'key_action()' but it would've -# become a bit more complex than I like. -key_url() { - local arg="$1" - - case "$tsn_action" in - autotype) - key_open_url "$arg" || _die - _clear - ;; - copy) wld_copy "$arg" ;; - both) - key_open_url "$arg" - wld_copy "$arg" - ;; - "") - get_key "$tsn_urlkey" - if [[ "$chosen_key" == "open" ]]; then - key_open_url "$arg" || _die - _clear - else - wld_copy "$arg" - fi - ;; - esac -} - -# use either xdg-open or $BROWSER to open the selected URL +# open the url using either xdg-open or tsn_web_browser +# if tsn_web_browser is defined, xdg-open won't be used key_open_url() { if is_installed xdg-open; then xdg-open "$1" 2> /dev/null || {