update quality selection menu

This commit is contained in:
ksyasuda 2022-02-03 15:25:15 -08:00
parent 985a19fcf0
commit 24f3c25142
2 changed files with 3 additions and 3 deletions

View File

@ -970,7 +970,7 @@ main() {
esac esac
choice=$(rofi -dmenu -dpi "$DPI" -config "$ROFI_CFG" \ choice=$(rofi -dmenu -dpi "$DPI" -config "$ROFI_CFG" \
-i -l 5 -only-match -sep '|' -a "$cur_quality" -mesg "$(generate_span "Current quality: $quality")" \ -i -l 5 -only-match -sep '|' -a "$cur_quality" -mesg "$(generate_span "Current quality: $quality")" \
-p "Choose quality:" <<< "1. best (default)|2. 1080p|3. 720p|4. 360p|5. worst") -p "Choose quality:" <<< "1. best|2. 1080p|3. 720p|4. 360p|5. worst")
quality=$(awk '{ print $2 }' <<< "$choice") quality=$(awk '{ print $2 }' <<< "$choice")
else else
qualities="best|1080p|720p|480p|360p|worst" qualities="best|1080p|720p|480p|360p|worst"

View File

@ -11,7 +11,7 @@ CFG_FILE="$CFG_DIR/themes/aniwrapper.rasi"
DEFAULT_DOWNLOAD="$HOME/Videos/sauce" DEFAULT_DOWNLOAD="$HOME/Videos/sauce"
ROFI_THEME="aniwrapper.rasi" ROFI_THEME="aniwrapper.rasi"
THEMES="aniwrapper (default)|dracula|doomone|fancy|flamingo|material|nord|onedark" THEMES="aniwrapper (default)|dracula|doomone|fancy|flamingo|material|nord|onedark"
QUALITIES="1. best (default)|2. 1080p|3. 720p|4. 360p|5. worst" QUALITIES="1. best|2. 1080p|3. 720p|4. 360p|5. worst"
QUALITY=best QUALITY=best
DPI=96 DPI=96
GET_QUALITY=0 GET_QUALITY=0
@ -98,7 +98,7 @@ run() {
get_quality() { get_quality() {
if ((IS_ROFI == 1)); then if ((IS_ROFI == 1)); then
selection=$(rofi -dpi "$DPI" -dmenu -config "$CFG_FILE" \ selection=$(rofi -dpi "$DPI" -dmenu -config "$CFG_FILE" \
-l 5 -selected-row 0 \ -l 5 -selected-row 0 -a 0 \
-theme-str 'listview {columns: 1;}' -p "Choose video quality:" \ -theme-str 'listview {columns: 1;}' -p "Choose video quality:" \
-sep '|' -only-match <<< "$QUALITIES") -sep '|' -only-match <<< "$QUALITIES")
QUALITY=$(awk '{print $2}' <<< "$selection") QUALITY=$(awk '{print $2}' <<< "$selection")