#!/usr/bin/env bash

rofi_command="rofi"

original_args=("$@")
for ((i = 0; i <= "${#original_args[@]}"; i++)); do
  if [ "${original_args[i]}" == "-color" ]; then
    for ((j = 0; j <= "${#original_args[@]}"; j++)); do
      if [ "${original_args[j]}" == "-theme" ]; then
        echo "with theme: $i : ${original_args[i]} ${original_args[i + 1]}"
      fi
    done
  fi
done

# for ((index = 0; index <= ${#lines_ary[@]}; index++)); do
#   if [ "${lines_ary[index]}" == "Release:" ]; then
#     echo "${lines_ary[index + 1]}"
#   fi
# done

$rofi_command "${original_args[@]}"

# if [ -z "${color}" ]; then
#   command rofi "${original_args[@]}"
# fi

# echo "color = ${color}"
