firefox-profile 411 B

1234567891011121314151617181920
  1. #!/bin/sh --
  2. set -ue
  3. : "${FF_PROFILES:=${HOME}/.mozilla/firefox/profiles.ini}"
  4. profile="$(
  5. in_profile=0
  6. while read -r line; do
  7. case "${line}" in
  8. '[Profile'[0-9]*']') in_profile=1;;
  9. '['*) in_profile=0;;
  10. *)
  11. [ "${in_profile}" -eq 1 ] || continue
  12. [ "${line%%=*}" != Name ] || echo "${line#*=}"
  13. esac
  14. done < "${FF_PROFILES}" | sort | dmenu -i
  15. )"
  16. [ "${profile}" ] && exec firefox -P "${profile}"