Compare commits

..

No commits in common. "cf7cf4b591f552515f77c77f9dae8cd041886399" and "0d97d3857a4cda672e5ec72e62d1e16dc5789e66" have entirely different histories.

4 changed files with 12 additions and 22 deletions

View File

@ -569,7 +569,6 @@ 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" \
@ -949,7 +948,6 @@ 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,7 +19,6 @@ 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
@ -71,7 +70,7 @@ quit() {
} }
run() { run() {
if ((IS_PLAY_FROM_FILE == 0 && IS_SYNC == 0 && GET_QUALITY == 1)); then if ((IS_PLAY_FROM_FILE == 0 && GET_QUALITY == 1)); then
get_quality get_quality
fi fi
if ((SILENT == 1)); then if ((SILENT == 1)); then
@ -99,8 +98,7 @@ 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;} window {width: 20%;}' \ -theme-str 'listview {columns: 1;}' -p "Choose video quality:" \
-p "Choose video quality:" \
-sep '|' -only-match <<< "$QUALITIES") -sep '|' -only-match <<< "$QUALITIES")
QUALITY=$(awk '{print $2}' <<< "$selection") QUALITY=$(awk '{print $2}' <<< "$selection")
else else
@ -250,7 +248,6 @@ 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:"
) )
@ -265,7 +262,6 @@ 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
@ -303,7 +299,6 @@ 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"
@ -315,15 +310,14 @@ 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:" -theme-str 'window {width: 45%;}') username=$($roficmd "Enter the username of the remote user:")
[ -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):" -theme-str 'window {width: 45%;}') host=$($roficmd "Enter the host for the remote machine (eg 192.168.1.99):")
[ -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]:" -theme-str 'window {width: 45%;}') port=$($roficmd "Enter in the ssh port for remote machine or leave blank for default [22]:")
[ -z "$port" ] && port=22 [ -z "$port" ] && port=22
keypath=$($roficmd "Enter path to private key (leave blank if not needed or if unsure):" -theme-str 'window {width: 45%;}') keypath=$($roficmd "Enter path to private key (leave blank if not needed or if unsure):")
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
@ -338,7 +332,6 @@ 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: 45%; width: 25%;
orientation: vertical; orientation: vertical;
children: [mainbox]; children: [mainbox];
border: 2px 2px 2px 0px; border: 2px 2px 2px 0px;

View File

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