This commit is contained in:
ksyasuda 2021-11-03 11:43:16 -07:00
parent 0fdda43e65
commit c20a0e8568
7 changed files with 161 additions and 23 deletions

View File

@ -123,7 +123,7 @@
<!-- Music -->
<def name="music">
<box class="genwin" orientation="h" space-evenly="false" vexpand="false" hexpand="false">
<box class="album_art" vexpand="false" hexpand="false" style="background-image: url('{{COVER}}');">
<box class="album_art" vexpand="false" hexpand="false" style="background-image: url('.coverart/cover.png);">
</box>
<box orientation="v" spacing="20" space-evenly="false" vexpand="false" hexpand="false">
<label halign="center" class="song" wrap="true" limit-width="20" text="{{SONG}}"/>

View File

@ -62,30 +62,33 @@ get_ttime() {
## Get cover
get_cover() {
ffmpeg -i "${MUSIC_DIR}/$(mpc current -f %file%)" "${COVER}" -y &> /dev/null
STATUS=$?
# # Check if the file has a embbeded album art
# if [ "$STATUS" -eq 0 ];then
# echo "$COVER"
# else
# echo "cover.png"
# fi
# echo "GETTING COVER" >> ~/.config/eww/a.out
current=$(mpc current -f '%file%')
# echo "$current" >> ~/.config/eww/a.out
artist=$(printf "%s\n" "$current" | awk -F '/' '{print $1}')
album=$(printf "%s\n" "$current" | awk -F '/' '{print $2}')
# echo "$artist $album" >> ~/.config/eww/a.out
dir="$MUSIC_DIR/$artist/$album"
cover_path=$(find "$dir/" -type f -name "cover*")
if [[ $(echo "$cover_path" | wc -l) -eq 1 ]]; then
lines=$(printf "%s\n" "$cover_path" | wc -l)
if [[ "$lines" -eq 1 ]]; then
cp "$cover_path" "$HOME/.config/eww/.coverart/cover.png"
return 0
[ "$?" -eq 0 ] && return 0 || return 1
else
song=$(printf "%s\n" "$current" | awk -F "/" '{print $3}')
dir="$MUSIC_DIR/$artist/$album/$song/cover.png"
[ ! -f "$dir" ] && dir="$MUSIC_DIR/$artist/$album/$song/cover.jpg"
[ ! -f "$dir" ] && exit 1
# pth=$(echo "$dir" | sed -E 's/ /\\ /g')
echo "$dir"
cp "$dir" "$HOME/.config/eww/.coverart/cover.png"
[ "$?" -eq 0 ] && return 0 || return 1
fi
}

147
rofi/flat-orange-4k.rasi Normal file
View File

@ -0,0 +1,147 @@
/**
* ROFI Color theme
* User: mbfraga
* Copyright: Martin B. Fraga
*/
/* global settings and color variables */
* {
maincolor: #ed8712;
highlight: bold #ed8712;
urgentcolor: #e53714;
fgwhite: #cfcfcf;
blackdarkest: #1d1d1d;
blackwidget: #262626;
blackentry: #292929;
blackselect: #303030;
darkgray: #848484;
scrollbarcolor: #505050;
font: "DejaVu Sans Mono Regular 34";
background-color: @blackdarkest;
}
window {
background-color: @blackdarkest;
anchor: north;
location: north;
y-offset: 20%;
}
mainbox {
background-color: @blackdarkest;
spacing:0px;
children: [inputbar, message, mode-switcher, listview];
}
message {
padding: 6px 10px;
background-color:@blackwidget;
}
textbox {
text-color:@darkgray;
background-color:@blackwidget;
}
listview {
fixed-height: false;
dynamic: true;
scrollbar: true;
spacing: 0px;
padding: 1px 0px 0px 0px;
margin: 0px 0px 1px 0px;
background: @blackdarkest;
}
element {
padding: 2px 15px;
}
element normal.normal {
padding: 0px 15px;
background-color: @blackentry;
text-color: @fgwhite;
}
element normal.urgent {
background-color: @blackentry;
text-color: @urgentcolor;
}
element normal.active {
background-color: @blackentry;
text-color: @maincolor;
}
element selected.normal {
background-color: @blackselect;
text-color: @fgwhite;
}
element selected.urgent {
background-color: @urgentcolor;
text-color: @blackdarkest;
}
element selected.active {
background-color: @maincolor;
text-color: @blackdarkest;
}
element alternate.normal {
background-color: @blackentry;
text-color: @fgwhite;
}
element alternate.urgent {
background-color: @blackentry;
text-color: @urgentcolor;
}
element alternate.active {
background-color: @blackentry;
text-color: @maincolor;
}
scrollbar {
background-color: @blackwidget;
handle-color: @darkgray;
handle-width: 15px;
}
mode-switcher {
background-color: @blackwidget;
}
button {
background-color: @blackwidget;
text-color: @darkgray;
}
button selected {
text-color: @maincolor;
}
inputbar {
background-color: @blackdarkest;
spacing: 0px;
}
prompt {
padding: 6px 9px;
background-color: @maincolor;
text-color:@blackwidget;
}
entry {
padding:6px 10px;
background-color:@blackwidget;
text-color:@fgwhite;
}
case-indicator {
padding:6px 10px;
text-color:@maincolor;
background-color:@blackwidget;
}

View File

@ -20,7 +20,8 @@ updates="$((updates_arch + updates_aur))"
if [ "$updates" -gt 0 ]; then
#echo " ($(format $updates_arch)/$(format $updates_aur))"
# echo " ($(format $updates_arch)/$(format $updates_aur))"
dunstify " Outdated Packages: ($(format $updates_arch)/$(format $updates_aur))"
# dunstify " Outdated Packages: ($(format $updates_arch)/$(format $updates_aur))"
echo " ($(format $updates_arch)/$(format $updates_aur))"
else
echo
fi

View File

@ -12,7 +12,7 @@ ARGS=(
)
CHOICE=$(
printf "%s\n" "${ARGS[@]}" | rofi -config ~/SudacodeRice/rofi/flat-orange.rasi -dmenu -l 5 -i -p "SSH Helper"
printf "%s\n" "${ARGS[@]}" | rofi -config "$1" -dmenu -l 5 -i -p "SSH Helper"
)
if [[ "$CHOICE" == "Quit" ]]; then

View File

@ -1,13 +0,0 @@
#!/usr/bin/env bash
HOSTS=(
"DEPOT02 - dc1lxsdepot02.westlakefinancial.com"
)
CHOICE=$(printf '%s\n' "${HOSTS[@]}" | rofi -dmenu -i -l 10)
echo $CHOICE
# print hostname
printf "%s\n" "${HOSTS[@]}" | awk '{print $NF}'