Compare commits

...

6 Commits

Author SHA1 Message Date
ksyasuda
cf7cf4b591 update sizing of sync menus 2022-02-05 14:35:24 -08:00
ksyasuda
1fddd452fe update sizing of reselect quality menu 2022-02-05 14:27:29 -08:00
ksyasuda
5aad3a7263 update episode selection menu width 2022-02-05 14:24:09 -08:00
ksyasuda
a6e80c1ad0 update default flamingo width to work with new menu sizings 2022-02-05 14:23:54 -08:00
ksyasuda
c5bf198466 update sizing of rofi menus 2022-02-05 14:20:05 -08:00
ksyasuda
1a54bf3b44 update default theme 2022-02-05 14:19:29 -08:00
4 changed files with 22 additions and 12 deletions

View File

@ -569,6 +569,7 @@ episode_selection() {
choice=$(
seq 1 "$last_ep_number" |
rofi -dpi "$DPI" -dmenu -l 12 \
-theme-str 'window {width: 45%;}' \
-a "$watch_history" \
-p "Select Episode [1, $last_ep_number]:" \
-mesg "$msg" \
@ -948,6 +949,7 @@ main() {
;;
esac
choice=$(rofi -dmenu -dpi "$DPI" -config "$ROFI_CFG" \
-theme-str 'listview {columns: 1;} window {width: 20%;}' \
-i -l 5 -only-match -sep '|' -a "$cur_quality" -mesg "$(generate_span "Current quality: $quality")" \
-p "Choose quality:" <<< "1. best|2. 1080p|3. 720p|4. 360p|5. worst")
quality=$(awk '{ print $2 }' <<< "$choice")

View File

@ -19,6 +19,7 @@ IS_CUSTOM_THEME=0
IS_DOWNLOAD=0
IS_PLAY_FROM_FILE=0
IS_ROFI=1
IS_SYNC=0
VERBOSE=0
SILENT=0
@ -70,7 +71,7 @@ quit() {
}
run() {
if ((IS_PLAY_FROM_FILE == 0 && GET_QUALITY == 1)); then
if ((IS_PLAY_FROM_FILE == 0 && IS_SYNC == 0 && GET_QUALITY == 1)); then
get_quality
fi
if ((SILENT == 1)); then
@ -98,7 +99,8 @@ get_quality() {
if ((IS_ROFI == 1)); then
selection=$(rofi -dpi "$DPI" -dmenu -config "$CFG_FILE" \
-l 5 -selected-row 0 -a 0 \
-theme-str 'listview {columns: 1;}' -p "Choose video quality:" \
-theme-str 'listview {columns: 1;} window {width: 20%;}' \
-p "Choose video quality:" \
-sep '|' -only-match <<< "$QUALITIES")
QUALITY=$(awk '{print $2}' <<< "$selection")
else
@ -248,6 +250,7 @@ check_flags() {
get_dl_dir() {
dl_dir=$(
rofi -dpi "$DPI" -dmenu -config "$CFG_FILE" \
-theme-str 'listview {columns: 1;} window {width: 45%;}' \
-mesg "$(generate_span "Enter the path to the download directory, or leave blank to go with the default: $HOME/Videos/sauce/")" \
-l 1 -p "Enter download dir:"
)
@ -262,6 +265,7 @@ 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 '|' \
-theme-str 'listview {columns: 1;} window {width: 45%;}' \
-config "$CFG_FILE" -l 7 -i -p "Aniwrapper")
[ "$choice" == "$quit" ] && quit
@ -299,6 +303,7 @@ main() {
IS_PLAY_FROM_FILE=1
span=$(printf '%s\n%s\n' "$(generate_span "Provide a valid path to a directory or leave blank to go with the default: $HOME/Videos/sauce/")" "$(generate_span "The program will begin searching for media files from the supplied directory")")
play_dir=$(rofi -dpi "$DPI" -dmenu -config "$CFG_FILE" \
-theme-str 'listview {columns: 1;} window {width: 45%;}' \
-l 1 -mesg "$span" -p "Enter path to starting directory:")
if [ -z "$play_dir" ]; then
mkdir -p "$DEFAULT_DOWNLOAD" || seppuku "error creating default download directory"
@ -310,14 +315,15 @@ main() {
;;
5.)
lg "Sync history database"
IS_SYNC=1
roficmd="rofi -dpi $DPI -dmenu -config $CFG_FILE -l 0 -p"
username=$($roficmd "Enter the username of the remote user:")
username=$($roficmd "Enter the username of the remote user:" -theme-str 'window {width: 45%;}')
[ -z "$username" ] && seppuku "No username provided... exiting"
host=$($roficmd "Enter the host for the remote machine (eg 192.168.1.99):")
host=$($roficmd "Enter the host for the remote machine (eg 192.168.1.99):" -theme-str 'window {width: 45%;}')
[ -z "$host" ] && seppuku "No host provided... exiting"
port=$($roficmd "Enter in the ssh port for remote machine or leave blank for default [22]:")
port=$($roficmd "Enter in the ssh port for remote machine or leave blank for default [22]:" -theme-str 'window {width: 45%;}')
[ -z "$port" ] && port=22
keypath=$($roficmd "Enter path to private key (leave blank if not needed or if unsure):")
keypath=$($roficmd "Enter path to private key (leave blank if not needed or if unsure):" -theme-str 'window {width: 45%;}')
if ! printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "$keypath" | run -s; then
lg "Aniwrapper was unable to sync the databases..."
exit 1
@ -332,6 +338,7 @@ main() {
# -----------------------------------------------------------------
[ -z "$THEMES" ] && seppuku "No themes provided... exiting"
choice=$(rofi -dmenu -config "$CFG_FILE" -dpi "$DPI" \
-theme-str 'listview {columns: 1;} window {width: 45%;}' \
-only-match -l 4 -i -p "Choose theme: " -sep '|' \
-theme-str 'listview { columns: 2; }' <<< "$THEMES")
theme=$(awk '{ print $1 }' <<< "$choice")

View File

@ -39,7 +39,7 @@ window {
location: west;
anchor: west;
height: 70%;
width: 25%;
width: 45%;
orientation: vertical;
children: [mainbox];
border: 2px 2px 2px 0px;

View File

@ -86,16 +86,17 @@ listview {
margin: 0px 0px 1px 0px;
}
element {
border: 2px;
border: 3px;
border-color: #d19a66;
padding: 2px 15px;
padding: 3px 15px;
margin: 1px;
}
element-text {
background-color: inherit;
text-color: inherit;
}
element.normal.normal {
background-color: @normal-background;
background-color: @alternate-normal-background;
text-color: @normal-foreground;
}
element.normal.urgent {
@ -103,7 +104,7 @@ element.normal.urgent {
text-color: @urgent-foreground;
}
element.normal.active {
background-color: @active-background;
background-color: @alternate-normal-background;
border-color: @blue;
text-color: @blue;
}
@ -184,7 +185,7 @@ prompt {
inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
padding: 15px 0px;
padding: 1px 0px;
}
textbox-prompt-colon {