From c73f984982b839af52046ae0ba65e50a37b43b16 Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Fri, 28 Feb 2025 00:05:16 -0800 Subject: [PATCH] proper array implementation, browser-newtab added --- bin/sp-launcher | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/sp-launcher b/bin/sp-launcher index ae2c2af..a6ac9d1 100755 --- a/bin/sp-launcher +++ b/bin/sp-launcher @@ -5,12 +5,18 @@ source "/usr/lib/sp-functions" case $1 in file_manager ) launch_exec=${filemanager_cmd} - launch_arg=$( jq -r .[].home_directory "${conf_dir}/profiles/$( get_profile_id )/vars.json" ) + launch_arg=($( jq -r .[].home_directory "${conf_dir}/profiles/$( get_profile_id )/vars.json" )) ;; browser ) launch_exec=${browser_cmd} - launch_arg=$( jq -r .[].browser_profile "${conf_dir}/profiles/$( get_profile_id )/vars.json" ) + launch_arg=($( jq -r .[].browser_profile "${conf_dir}/profiles/$( get_profile_id )/vars.json" )) + ;; + browser-newtab ) + launch_exec=${browser_cmd} + launch_arg=($( jq -r .[].browser_profile "${conf_dir}/profiles/$( get_profile_id )/vars.json" )) + launch_arg+=( "--new-tab" ) + launch_arg+=($( jq -r .[].browser_newtab_url "${conf_dir}/profiles/$( get_profile_id )/vars.json" )) ;; esac -bash -c "${launch_exec} ${launch_arg}" +bash -c "${launch_exec} ${launch_arg[@]}"