change -only-match to -no-custom to allow ESC to quit rofi menus

This commit is contained in:
ksyasuda 2022-02-15 02:22:59 -08:00
parent 4c2d7ae27e
commit 1461c3bc62
2 changed files with 6 additions and 6 deletions

View File

@ -394,7 +394,7 @@ find_media() {
fi fi
get_directory_data "$inp" get_directory_data "$inp"
selection="$(rofi -dpi "$DPI" -dmenu -only-match -async-pre-read 33 -config "$ROFI_CFG" \ selection="$(rofi -dpi "$DPI" -dmenu -no-custom -async-pre-read 33 -config "$ROFI_CFG" \
-l 15 -i -sep '|' -mesg "$(generate_span "Current directory: $inp")" -a "$watched" \ -l 15 -i -sep '|' -mesg "$(generate_span "Current directory: $inp")" -a "$watched" \
-p "Enter selection" -window-title 'aniwrapper' <<< "$inputlist")" -p "Enter selection" -window-title 'aniwrapper' <<< "$inputlist")"
lg "SELECTION: $selection" 1> /dev/stderr lg "SELECTION: $selection" 1> /dev/stderr
@ -496,7 +496,7 @@ anime_selection() {
# get the anime from indexed list # get the anime from indexed list
msg="$(generate_span "Query: $query")" msg="$(generate_span "Query: $query")"
selection="$(rofi -dpi "$DPI" -dmenu -only-match \ selection="$(rofi -dpi "$DPI" -dmenu -no-custom \
-async-pre-read 33 -config "$ROFI_CFG" -l 15 -i -sep '|' \ -async-pre-read 33 -config "$ROFI_CFG" -l 15 -i -sep '|' \
-mesg "$msg" -a "$searched" -p "Enter selection" -window-title 'aniwrapper' <<< "$menu")" -mesg "$msg" -a "$searched" -p "Enter selection" -window-title 'aniwrapper' <<< "$menu")"
choice="${selection%%.*}" # remmove everything from . to end choice="${selection%%.*}" # remmove everything from . to end
@ -908,7 +908,7 @@ main() {
done <<< "$qualities" done <<< "$qualities"
choice=$(rofi -dmenu -dpi "$DPI" -config "$ROFI_CFG" \ choice=$(rofi -dmenu -dpi "$DPI" -config "$ROFI_CFG" \
-theme-str 'listview {columns: 1;} window {width: 25%;}' \ -theme-str 'listview {columns: 1;} window {width: 25%;}' \
-i -l 6 -only-match -sep '|' -a "$cur_quality" -mesg "$(generate_span "Current quality: $quality")" \ -i -l 6 -no-custom -sep '|' -a "$cur_quality" -mesg "$(generate_span "Current quality: $quality")" \
-p "Choose quality:" -window-title 'aniwrapper' -selected-row "$cur_quality" <<< "$qualities") -p "Choose quality:" -window-title 'aniwrapper' -selected-row "$cur_quality" <<< "$qualities")
quality=$(awk '{ print $2 }' <<< "$choice") quality=$(awk '{ print $2 }' <<< "$choice")
else else

View File

@ -116,7 +116,7 @@ get_quality() {
-l 6 -selected-row 0 -a 0 -window-title 'aniwrapper' \ -l 6 -selected-row 0 -a 0 -window-title 'aniwrapper' \
-theme-str 'listview {columns: 1;} window {width: 25%;}' \ -theme-str 'listview {columns: 1;} window {width: 25%;}' \
-p "Choose video quality:" \ -p "Choose video quality:" \
-sep '|' -only-match <<< "$QUALITIES") -sep '|' -no-custom <<< "$QUALITIES")
QUALITY=$(awk '{print $2}' <<< "$selection") QUALITY=$(awk '{print $2}' <<< "$selection")
else else
qualities="best|1080p|720p|480p|360p|worst" qualities="best|1080p|720p|480p|360p|worst"
@ -314,7 +314,7 @@ get_dl_dir() {
main() { main() {
((SILENT != 1)) && lg "CONFIG DIR: $CFG_DIR" ((SILENT != 1)) && lg "CONFIG DIR: $CFG_DIR"
((SILENT != 1)) && lg "ROFI CFG: $CFG_FILE" ((SILENT != 1)) && lg "ROFI CFG: $CFG_FILE"
choice=$(echo "${options[@]}" | rofi -dpi "$DPI" -dmenu -only-match -sep '|' \ choice=$(echo "${options[@]}" | rofi -dpi "$DPI" -dmenu -no-custom -sep '|' \
-theme-str 'listview {columns: 1;} window {width: 45%;}' \ -theme-str 'listview {columns: 1;} window {width: 45%;}' \
-config "$CFG_FILE" -l 7 -i -p "Aniwrapper" -window-title 'aniwrapper') -config "$CFG_FILE" -l 7 -i -p "Aniwrapper" -window-title 'aniwrapper')
@ -396,7 +396,7 @@ main() {
theme_idx="$(get_theme_idx)" theme_idx="$(get_theme_idx)"
choice=$(rofi -dmenu -config "$CFG_FILE" -dpi "$DPI" -window-title 'aniwrapper' \ choice=$(rofi -dmenu -config "$CFG_FILE" -dpi "$DPI" -window-title 'aniwrapper' \
-theme-str 'listview {columns: 1;} window {width: 45%;}' \ -theme-str 'listview {columns: 1;} window {width: 45%;}' \
-only-match -l 4 -i -p "Choose theme: " -sep '|' \ -no-custom -l 4 -i -p "Choose theme: " -sep '|' \
-theme-str 'listview { columns: 2; }' \ -theme-str 'listview { columns: 2; }' \
-a "$theme_idx" -selected-row "$theme_idx" <<< "$THEMES") -a "$theme_idx" -selected-row "$theme_idx" <<< "$THEMES")
theme=$(awk '{ print $1 }' <<< "$choice") theme=$(awk '{ print $1 }' <<< "$choice")