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

View File

@ -19,6 +19,7 @@ IS_CUSTOM_THEME=0
IS_DOWNLOAD=0 IS_DOWNLOAD=0
IS_PLAY_FROM_FILE=0 IS_PLAY_FROM_FILE=0
IS_ROFI=1 IS_ROFI=1
IS_SYNC=0
VERBOSE=0 VERBOSE=0
SILENT=0 SILENT=0
@ -70,7 +71,7 @@ quit() {
} }
run() { 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 get_quality
fi fi
if ((SILENT == 1)); then if ((SILENT == 1)); then
@ -98,7 +99,8 @@ 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 -a 0 \ -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") -sep '|' -only-match <<< "$QUALITIES")
QUALITY=$(awk '{print $2}' <<< "$selection") QUALITY=$(awk '{print $2}' <<< "$selection")
else else
@ -248,6 +250,7 @@ check_flags() {
get_dl_dir() { get_dl_dir() {
dl_dir=$( dl_dir=$(
rofi -dpi "$DPI" -dmenu -config "$CFG_FILE" \ 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/")" \ -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:" -l 1 -p "Enter download dir:"
) )
@ -262,6 +265,7 @@ 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 -only-match -sep '|' \
-theme-str 'listview {columns: 1;} window {width: 45%;}' \
-config "$CFG_FILE" -l 7 -i -p "Aniwrapper") -config "$CFG_FILE" -l 7 -i -p "Aniwrapper")
[ "$choice" == "$quit" ] && quit [ "$choice" == "$quit" ] && quit
@ -299,6 +303,7 @@ main() {
IS_PLAY_FROM_FILE=1 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")") 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" \ 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:") -l 1 -mesg "$span" -p "Enter path to starting directory:")
if [ -z "$play_dir" ]; then if [ -z "$play_dir" ]; then
mkdir -p "$DEFAULT_DOWNLOAD" || seppuku "error creating default download directory" mkdir -p "$DEFAULT_DOWNLOAD" || seppuku "error creating default download directory"
@ -310,14 +315,15 @@ main() {
;; ;;
5.) 5.)
lg "Sync history database" lg "Sync history database"
IS_SYNC=1
roficmd="rofi -dpi $DPI -dmenu -config $CFG_FILE -l 0 -p" 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" [ -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" [ -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 [ -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 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..." lg "Aniwrapper was unable to sync the databases..."
exit 1 exit 1
@ -332,6 +338,7 @@ main() {
# ----------------------------------------------------------------- # -----------------------------------------------------------------
[ -z "$THEMES" ] && seppuku "No themes provided... exiting" [ -z "$THEMES" ] && seppuku "No themes provided... exiting"
choice=$(rofi -dmenu -config "$CFG_FILE" -dpi "$DPI" \ 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 '|' \ -only-match -l 4 -i -p "Choose theme: " -sep '|' \
-theme-str 'listview { columns: 2; }' <<< "$THEMES") -theme-str 'listview { columns: 2; }' <<< "$THEMES")
theme=$(awk '{ print $1 }' <<< "$choice") theme=$(awk '{ print $1 }' <<< "$choice")

View File

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

View File

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