From 472fa7e56384f616f7091f3c00241d6545a65ba1 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Wed, 2 Dec 2020 10:19:27 +0100 Subject: [PATCH] Dedicated function to start qutebrowser --- qb | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/qb b/qb index 4909e94..74aaa80 100755 --- a/qb +++ b/qb @@ -46,30 +46,40 @@ debug_message() { # {{{ return 0 } # }}} - -main() { # {{{ +launch_qutebrowser() { # {{{ # Version with user's venv if [ -f ~/src/qutebrowser-venv/bin/python3 ]; then + debug_message "launch_qutebrowser − \ +Start qutebrowser from ${RED}venv${COLOR_DEBUG}." ~/src/qutebrowser-venv/bin/python3 -m qutebrowser - exit 0 fi # Version from APT package if dpkg -l | grep -q qutebrowser ; then + debug_message "launch_qutebrowser − \ +Start qutebrowser from ${RED}package${COLOR_DEBUG}." command qutebrowser - exit 0 fi # Version from Git repository if [ -f ~/repos/qutebrowser/qutebrowser.py ]; then - ~/repos/qutebrowser/qutebrowser.py --backend webengine "$@" - exit 0 + debug_message "launch_qutebrowser − \ +Start qutebrowser from ${RED}Git repository${COLOR_DEBUG}." + ~/repos/qutebrowser/qutebrowser.py --backend webengine fi } # }}} +main() { # {{{ + + launch_qutebrowser \ + && exit 0 + +} +# }}} + # Manage arguments # {{{ ## If there is argument(s)