mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
update rofi config file and add db cleanup option
This commit is contained in:
parent
28666ca70a
commit
7c0f505231
@ -14,7 +14,7 @@ CFG_FILE="meh.rasi"
|
|||||||
|
|
||||||
options="1. Stream|2. Download|3. Continue|4. Playlist|5. Quit"
|
options="1. Stream|2. Download|3. Continue|4. Playlist|5. Quit"
|
||||||
|
|
||||||
choice=$(echo "${options[@]}" | rofi -dmenu -sep '|' -config "$CFG_DIR/$CFG_FILE" -l 5 -i -p "Enter choice:")
|
choice=$(echo "${options[@]}" | rofi -dmenu -sep '|' -config "$CFG_DIR/$CFG_FILE" -l 5 -i -p "Aniwrapper")
|
||||||
|
|
||||||
[ "$choice" == "5. Quit" ] && (
|
[ "$choice" == "5. Quit" ] && (
|
||||||
echo 'Quitting...'
|
echo 'Quitting...'
|
||||||
|
73
db.sh
73
db.sh
@ -7,39 +7,48 @@ log() {
|
|||||||
printf "%s\n" "$1"
|
printf "%s\n" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts 'cdrq' OPT; do
|
while getopts 'cdrqC' OPT; do
|
||||||
case "$OPT" in
|
case "$OPT" in
|
||||||
c)
|
c)
|
||||||
log "Creating database..."
|
log "Creating database..."
|
||||||
sqlite3 "$DIR"/"$DB" <sql/search_history_tbl.sql
|
sqlite3 "$DIR"/"$DB" <sql/search_history_tbl.sql
|
||||||
sqlite3 "$DIR"/"$DB" <sql/watch_history_tbl.sql
|
sqlite3 "$DIR"/"$DB" <sql/watch_history_tbl.sql
|
||||||
log "Created database..."
|
log "Created database..."
|
||||||
;;
|
;;
|
||||||
d)
|
d)
|
||||||
log "Deleting database..."
|
log "Deleting database..."
|
||||||
echo "$DIR/$DB"
|
echo "$DIR/$DB"
|
||||||
rm "$DIR/$DB"
|
rm "$DIR/$DB"
|
||||||
log "Database deleted..."
|
log "Database deleted..."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
r)
|
r)
|
||||||
log "Deleting database..."
|
log "Deleting database..."
|
||||||
rm -rf "$DIR"/"$DB"
|
rm -rf "$DIR"/"$DB"
|
||||||
mkdir -p "$DIR"
|
mkdir -p "$DIR"
|
||||||
log "Database deleted..."
|
log "Database deleted..."
|
||||||
log "Creating database..."
|
log "Creating database..."
|
||||||
sqlite3 "$DIR"/"$DB" <sql/search_history_tbl.sql
|
sqlite3 "$DIR"/"$DB" <sql/search_history_tbl.sql
|
||||||
sqlite3 "$DIR"/"$DB" <sql/watch_history_tbl.sql
|
sqlite3 "$DIR"/"$DB" <sql/watch_history_tbl.sql
|
||||||
log "Created database..."
|
log "Created database..."
|
||||||
;;
|
;;
|
||||||
q)
|
q)
|
||||||
log "Connecting to database..."
|
log "Connecting to database..."
|
||||||
sqlite3 "$DIR/$DB"
|
sqlite3 "$DIR/$DB"
|
||||||
log "Ending connection to databse..."
|
log "Ending connection to databse..."
|
||||||
;;
|
;;
|
||||||
*)
|
C)
|
||||||
log "Don't get here"
|
log "Cleaning up database..."
|
||||||
exit 1
|
stmt="DELETE FROM search_history WHERE anime_name IS NULL or anime_name = ''"
|
||||||
;;
|
log "Cleaning up search history..."
|
||||||
|
sqlite3 "$DIR/$DB" <<<"$stmt"
|
||||||
|
stmt="DELETE FROM watch_history WHERE anime_name IS NULL or anime_name = ''"
|
||||||
|
log "Cleaning up watch history..."
|
||||||
|
sqlite3 "$DIR/$DB" <<<"$stmt"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
log "Does not exist or not implemented yet..."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
configuration {
|
configuration {
|
||||||
font: "Open Sans 35";
|
font: "Open Sans 15";
|
||||||
display-drun: "Dmenu";
|
display-drun: "Dmenu";
|
||||||
scroll-method: 0;
|
scroll-method: 0;
|
||||||
disable-history: false;
|
disable-history: false;
|
||||||
@ -7,6 +7,7 @@ configuration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
|
selected-normal-foreground: rgba ( 255, 147, 5, 100 % );
|
||||||
selected-normal-foreground: rgba ( 255, 147, 5, 100 % );
|
selected-normal-foreground: rgba ( 255, 147, 5, 100 % );
|
||||||
/* foreground: rgba ( 196, 203, 212, 100 % ); */
|
/* foreground: rgba ( 196, 203, 212, 100 % ); */
|
||||||
foreground: #ecbe7b;
|
foreground: #ecbe7b;
|
||||||
@ -14,19 +15,18 @@ configuration {
|
|||||||
alternate-normal-background: rgba ( 45, 48, 59, 1 % );
|
alternate-normal-background: rgba ( 45, 48, 59, 1 % );
|
||||||
red: #ff6c6b;
|
red: #ff6c6b;
|
||||||
selected-urgent-foreground: rgba ( 249, 249, 249, 100 % );
|
selected-urgent-foreground: rgba ( 249, 249, 249, 100 % );
|
||||||
blue: #51afef;
|
blue: #1E90FF;
|
||||||
urgent-foreground: rgba ( 204, 102, 102, 100 % );
|
urgent-foreground: rgba ( 204, 102, 102, 100 % );
|
||||||
alternate-urgent-background: rgba ( 75, 81, 96, 90 % );
|
alternate-urgent-background: rgba ( 75, 81, 96, 90 % );
|
||||||
active-foreground: #51afef;
|
active-foreground: #51afef;
|
||||||
lightbg: rgba ( 238, 232, 213, 100 % );
|
lightbg: rgba ( 238, 232, 213, 100 % );
|
||||||
selected-active-foreground: #1E90FF;
|
selected-active-foreground: #1E90FF;
|
||||||
alternate-active-background: rgba ( 45, 48, 59, 88 % );
|
alternate-active-background: rgba ( 45, 48, 59, 95 % );
|
||||||
background: rgba ( 45, 48, 59, 88 % );
|
background: #282c34;
|
||||||
alternate-normal-foreground: @foreground;
|
alternate-normal-foreground: @foreground;
|
||||||
normal-background: rgba ( 45, 48, 59, 1 % );
|
normal-background: rgba ( 45, 48, 59, 1 % );
|
||||||
lightfg: rgba ( 88, 104, 117, 100 % );
|
lightfg: rgba ( 88, 104, 117, 100 % );
|
||||||
selected-normal-background: rgba ( 24, 26, 32, 100 % );
|
selected-normal-background: rgba ( 24, 26, 32, 80 % );
|
||||||
border-color: rgba ( 124, 131, 137, 100 % );
|
|
||||||
spacing: 2;
|
spacing: 2;
|
||||||
separatorcolor: rgba ( 45, 48, 59, 1 % );
|
separatorcolor: rgba ( 45, 48, 59, 1 % );
|
||||||
urgent-background: rgba ( 45, 48, 59, 15 % );
|
urgent-background: rgba ( 45, 48, 59, 15 % );
|
||||||
@ -34,19 +34,22 @@ configuration {
|
|||||||
alternate-urgent-foreground: @urgent-foreground;
|
alternate-urgent-foreground: @urgent-foreground;
|
||||||
background-color: rgba ( 0, 0, 0, 0 % );
|
background-color: rgba ( 0, 0, 0, 0 % );
|
||||||
alternate-active-foreground: @active-foreground;
|
alternate-active-foreground: @active-foreground;
|
||||||
active-background: rgba ( 29, 31, 33, 17 % );
|
active-background: rgba ( 29, 31, 33, 24 % );
|
||||||
selected-active-background: rgba ( 26, 28, 35, 100 % );
|
selected-active-background: rgba ( 26, 28, 35, 100 % );
|
||||||
black: #464b55;
|
black: #464b55;
|
||||||
blackwidget: #262626;
|
blackwidget: #262626;
|
||||||
|
magenta: #c678dd;
|
||||||
|
blue2: #51afef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
window {
|
window {
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
border: 0;
|
border: 5px;
|
||||||
anchor: north;
|
border-radius: 7px;
|
||||||
location: north;
|
border-color: #2C4762;
|
||||||
y-offset: 25%;
|
anchor: center;
|
||||||
|
location: center;
|
||||||
padding: 25;
|
padding: 25;
|
||||||
width: 69%;
|
width: 69%;
|
||||||
}
|
}
|
||||||
@ -57,26 +60,26 @@ listview {
|
|||||||
|
|
||||||
mainbox {
|
mainbox {
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 12;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
message {
|
message {
|
||||||
border: 2px 0px 0px ;
|
border: 0;
|
||||||
border-color: @separatorcolor;
|
border-color: @separatorcolor;
|
||||||
padding: 1px ;
|
padding: 1px ;
|
||||||
text-color: @active-foreground;
|
text-color: @active-foreground;
|
||||||
padding: 6px 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
textbox {
|
textbox {
|
||||||
|
border: 0;
|
||||||
text-color: @foreground;
|
text-color: @foreground;
|
||||||
background-color: @blackwidget;
|
background-color: @blackwidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
listview {
|
listview {
|
||||||
|
border: 0;
|
||||||
dynamic: true;
|
dynamic: true;
|
||||||
fixed-height: 0;
|
fixed-height: 0;
|
||||||
border: 8px 0px 0px ;
|
|
||||||
border-color: @separatorcolor;
|
|
||||||
spacing: 10px ;
|
spacing: 10px ;
|
||||||
scrollbar: false;
|
scrollbar: false;
|
||||||
padding: 2px 0px 0px 0px;
|
padding: 2px 0px 0px 0px;
|
||||||
@ -101,12 +104,13 @@ element.normal.urgent {
|
|||||||
}
|
}
|
||||||
element.normal.active {
|
element.normal.active {
|
||||||
background-color: @active-background;
|
background-color: @active-background;
|
||||||
text-color: #51afef;
|
border-color: @blue;
|
||||||
border-color: #51afef;
|
text-color: @blue;
|
||||||
}
|
}
|
||||||
element.selected.normal {
|
element.selected.normal {
|
||||||
background-color: @selected-normal-background;
|
background-color: @selected-normal-background;
|
||||||
text-color: @selected-normal-foreground;
|
border-color: #ecbe7b;
|
||||||
|
text-color: #1E90FF;
|
||||||
}
|
}
|
||||||
element.selected.urgent {
|
element.selected.urgent {
|
||||||
background-color: @selected-urgent-background;
|
background-color: @selected-urgent-background;
|
||||||
@ -114,8 +118,9 @@ element.selected.urgent {
|
|||||||
}
|
}
|
||||||
element.selected.active {
|
element.selected.active {
|
||||||
background-color: @selected-active-background;
|
background-color: @selected-active-background;
|
||||||
border-color: #1E90FF;
|
text-color: @blue2;
|
||||||
text-color: #1E90FF;
|
border-color: @blue2;
|
||||||
|
text-color: #1E90FF;
|
||||||
}
|
}
|
||||||
element.alternate.normal {
|
element.alternate.normal {
|
||||||
background-color: @alternate-normal-background;
|
background-color: @alternate-normal-background;
|
||||||
@ -127,9 +132,8 @@ element.alternate.urgent {
|
|||||||
}
|
}
|
||||||
element.alternate.active {
|
element.alternate.active {
|
||||||
background-color: @alternate-active-background;
|
background-color: @alternate-active-background;
|
||||||
/* text-color: @alternate-active-foreground; */
|
border-color: @blue;
|
||||||
text-color: #51afef;
|
text-color: @blue;
|
||||||
border-color: #51afef;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollbar {
|
scrollbar {
|
||||||
@ -167,14 +171,14 @@ case-indicator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
entry {
|
entry {
|
||||||
padding: 6px 10px;
|
padding: 4px 8px;
|
||||||
spacing: 0;
|
spacing: 0;
|
||||||
text-color: @normal-foreground;
|
text-color: #1E90FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt {
|
prompt {
|
||||||
spacing: 0;
|
spacing: 0;
|
||||||
text-color: #51afef;
|
text-color: #c678dd;
|
||||||
padding: 4px 0px;
|
padding: 4px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,6 +191,6 @@ textbox-prompt-colon {
|
|||||||
expand: false;
|
expand: false;
|
||||||
str: ":";
|
str: ":";
|
||||||
margin: 0px 0.3em 0em 0em ;
|
margin: 0px 0.3em 0em 0em ;
|
||||||
text-color: #51afef;
|
text-color: #1E90FF;
|
||||||
padding: 4px 0px;
|
padding: 4px 0px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user