Files
TheaninovOS/home/desktops/hyprland/ags/scripts/utils/find_firefox_profile.sh

10 lines
305 B
Bash
Executable File

#!/bin/bash
cd ~/.mozilla/firefox/
if [[ $(grep '\[Profile[^0]\]' profiles.ini) ]]
then PROFPATH=$(grep -E '^\[Profile|^Path|^Default' profiles.ini | grep -1 '^Default=1' | grep '^Path' | cut -c6-)
else PROFPATH=$(grep 'Path=' profiles.ini | sed 's/^Path=//')
fi
echo "$HOME/.mozilla/firefox/$PROFPATH"