diff options
author | Ayush Agarwal <ayush@fastmail.in> | 2022-02-16 22:15:23 +0530 |
---|---|---|
committer | Ayush Agarwal <ayush@fastmail.in> | 2022-02-16 22:15:23 +0530 |
commit | e335d8a23f91740f27be1d5ff420444cfc64c03e (patch) | |
tree | 30db2850d7842e05fe9e61ab91df7c7fcb036d03 /tessen | |
parent | 4c3e80bdf45ab1a4ac6a7b620787da4d87cc9049 (diff) |
refactor: key_url isn't needed anymore
key_action is taking care of this
Diffstat (limited to 'tessen')
-rwxr-xr-x | tessen | 32 |
1 files changed, 2 insertions, 30 deletions
@@ -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 || { |