2024-09-04 00:54:15 +06:00
|
|
|
#!/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
|
|
|
|
# Получение списка профилей
|
2024-09-16 22:32:45 +06:00
|
|
|
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)
|
2024-09-04 00:54:15 +06:00
|
|
|
if [ ! "$profile" = "" ]; then
|
|
|
|
firefox -P "$profile";
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|