mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
make menus have active entry selected by default
This commit is contained in:
parent
7a0eea5d69
commit
7907e809b8
2
ani-cli
2
ani-cli
@ -929,7 +929,7 @@ main() {
|
|||||||
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 -only-match -sep '|' -a "$cur_quality" -mesg "$(generate_span "Current quality: $quality")" \
|
||||||
-p "Choose quality:" <<< "$qualities")
|
-p "Choose quality:" -selected-row "$cur_quality" <<< "$qualities")
|
||||||
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"
|
||||||
|
@ -426,11 +426,12 @@ main() {
|
|||||||
# choose theme
|
# choose theme
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
[ -z "$THEMES" ] && seppuku "No themes provided... exiting"
|
[ -z "$THEMES" ] && seppuku "No themes provided... exiting"
|
||||||
|
theme_idx="$(get_theme_idx)"
|
||||||
choice=$(rofi -dmenu -config "$CFG_FILE" -dpi "$DPI" \
|
choice=$(rofi -dmenu -config "$CFG_FILE" -dpi "$DPI" \
|
||||||
-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 '|' \
|
-only-match -l 4 -i -p "Choose theme: " -sep '|' \
|
||||||
-theme-str 'listview { columns: 2; }' \
|
-theme-str 'listview { columns: 2; }' \
|
||||||
-a "$(get_theme_idx)" <<< "$THEMES")
|
-a "$theme_idx" -selected-row "$theme_idx" <<< "$THEMES")
|
||||||
theme=$(awk '{ print $1 }' <<< "$choice")
|
theme=$(awk '{ print $1 }' <<< "$choice")
|
||||||
set_theme "$theme"
|
set_theme "$theme"
|
||||||
main
|
main
|
||||||
|
Loading…
Reference in New Issue
Block a user