arch/roles/dots/files/home/bin/firefox_profiles.sh

28 lines
957 B
Bash
Raw Normal View History

2024-09-04 00:54:15 +06:00
#!/bin/bash
# Путь к файлу profiles.ini
PROFILES_INI="$HOME/.mozilla/firefox/profiles.ini"
2025-02-15 20:38:47 +06:00
2025-02-18 01:36:51 +06:00
# if [ "$XDG_SESSION_TYPE" == "wayland" ]; then
if [ "$XDG_SESSION_TYPE" == "no" ]; then
# while read -r line; do export "$line"; done < /home/fs/scale_vars
2024-09-04 00:54:15 +06:00
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-10-27 00:29:18 +06:00
while read -r line; do export "$line"; done < /home/fs/scale_vars
2025-02-18 01:36:51 +06:00
dpi="100"
2025-02-15 20:38:47 +06:00
# profile=$(grep '\[Profile' -A 2 "$PROFILES_INI" | grep "Name=" | sed 's/Name=//' | rofi -dmenu -dpi $dpi)
profile=$(grep '\[Profile' -A 2 "$PROFILES_INI" | grep "Name=" | sed 's/Name=//' | dmenu -l 15)
2024-09-04 00:54:15 +06:00
if [ ! "$profile" = "" ]; then
firefox -P "$profile";
fi
fi