proper array implementation, browser-newtab added

This commit is contained in:
Penelope Gwen 2025-02-28 00:05:16 -08:00
parent 4075d29444
commit c73f984982

View file

@ -5,12 +5,18 @@ source "/usr/lib/sp-functions"
case $1 in case $1 in
file_manager ) file_manager )
launch_exec=${filemanager_cmd} 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 ) browser )
launch_exec=${browser_cmd} 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 esac
bash -c "${launch_exec} ${launch_arg}" bash -c "${launch_exec} ${launch_arg[@]}"