#!/bin/bash # Путь к файлу profiles.ini PROFILES_INI="$HOME/.mozilla/firefox/profiles.ini" if [ "$XDG_SESSION_TYPE" == "wayland" ]; then profiles_ini="$HOME/.mozilla/firefox/profiles.ini" profiles=$(grep '\[Profile' -A 2 "$profiles_ini" | grep 'Name=' | cut -d '=' -f 2) selected_profile=$(echo "$profiles" | wofi --dmenu --prompt "Choose Firefox Profile:") if [ ! "$selected_profile" = "" ]; then firefox -P "$selected_profile"; fi else # Получение списка профилей while read -r line; do export "$line"; done < /home/fs/scale_vars dpi="125" profile=$(grep '\[Profile' -A 2 "$PROFILES_INI" | grep "Name=" | sed 's/Name=//' | rofi -dmenu -dpi $dpi) if [ ! "$profile" = "" ]; then firefox -P "$profile"; fi fi