mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
change -only-match to -no-custom to allow ESC to quit rofi menus
This commit is contained in:
parent
4c2d7ae27e
commit
1461c3bc62
6
ani-cli
6
ani-cli
@ -394,7 +394,7 @@ find_media() {
|
||||
fi
|
||||
|
||||
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" \
|
||||
-p "Enter selection" -window-title 'aniwrapper' <<< "$inputlist")"
|
||||
lg "SELECTION: $selection" 1> /dev/stderr
|
||||
@ -496,7 +496,7 @@ anime_selection() {
|
||||
|
||||
# get the anime from indexed list
|
||||
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 '|' \
|
||||
-mesg "$msg" -a "$searched" -p "Enter selection" -window-title 'aniwrapper' <<< "$menu")"
|
||||
choice="${selection%%.*}" # remmove everything from . to end
|
||||
@ -908,7 +908,7 @@ main() {
|
||||
done <<< "$qualities"
|
||||
choice=$(rofi -dmenu -dpi "$DPI" -config "$ROFI_CFG" \
|
||||
-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")
|
||||
quality=$(awk '{ print $2 }' <<< "$choice")
|
||||
else
|
||||
|
@ -116,7 +116,7 @@ get_quality() {
|
||||
-l 6 -selected-row 0 -a 0 -window-title 'aniwrapper' \
|
||||
-theme-str 'listview {columns: 1;} window {width: 25%;}' \
|
||||
-p "Choose video quality:" \
|
||||
-sep '|' -only-match <<< "$QUALITIES")
|
||||
-sep '|' -no-custom <<< "$QUALITIES")
|
||||
QUALITY=$(awk '{print $2}' <<< "$selection")
|
||||
else
|
||||
qualities="best|1080p|720p|480p|360p|worst"
|
||||
@ -314,7 +314,7 @@ get_dl_dir() {
|
||||
main() {
|
||||
((SILENT != 1)) && lg "CONFIG DIR: $CFG_DIR"
|
||||
((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%;}' \
|
||||
-config "$CFG_FILE" -l 7 -i -p "Aniwrapper" -window-title 'aniwrapper')
|
||||
|
||||
@ -396,7 +396,7 @@ main() {
|
||||
theme_idx="$(get_theme_idx)"
|
||||
choice=$(rofi -dmenu -config "$CFG_FILE" -dpi "$DPI" -window-title 'aniwrapper' \
|
||||
-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; }' \
|
||||
-a "$theme_idx" -selected-row "$theme_idx" <<< "$THEMES")
|
||||
theme=$(awk '{ print $1 }' <<< "$choice")
|
||||
|
Loading…
Reference in New Issue
Block a user