12/29
This commit is contained in:
3
artist.sh
Executable file
3
artist.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
playerctl metadata --format 'by {{ artist }}' 2>/dev/null
|
||||||
39
eww.scss
39
eww.scss
@@ -27,11 +27,46 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.clock-time {
|
.clock-time {
|
||||||
font-size: 60px;
|
font-size: 80px;
|
||||||
font-weight: 600;
|
font-weight: 800;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clock-date {
|
.clock-date {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.media {
|
||||||
|
background-color: rgba(0,0,0,0.25);
|
||||||
|
padding: 0px;
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-family: "Source Code Pro Black", monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.media button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
font-size: 40px;
|
||||||
|
padding: 0px;
|
||||||
|
border-radius: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.media button:hover {
|
||||||
|
background-color: rgba(255, 255, 255, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.media button:active {
|
||||||
|
background-color: rgba(255, 255, 255, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tlabel {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alabel {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|||||||
55
eww.yuck
55
eww.yuck
@@ -60,9 +60,9 @@
|
|||||||
(defwindow ports
|
(defwindow ports
|
||||||
:monitor 0
|
:monitor 0
|
||||||
:geometry (geometry
|
:geometry (geometry
|
||||||
:x "5%"
|
:x "32px"
|
||||||
:y "5%"
|
:y "32px"
|
||||||
:anchor "top left"
|
:anchor "top right"
|
||||||
:width "200px"
|
:width "200px"
|
||||||
)
|
)
|
||||||
:stacking "bg"
|
:stacking "bg"
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
(defpoll clock-date
|
(defpoll clock-date
|
||||||
:interval "60s"
|
:interval "60s"
|
||||||
"date '+%A %b %d'")
|
"date '+%A %B %d'")
|
||||||
|
|
||||||
(defwidget clock-widget []
|
(defwidget clock-widget []
|
||||||
(box
|
(box
|
||||||
@@ -92,8 +92,53 @@
|
|||||||
:x "32px"
|
:x "32px"
|
||||||
:y "32px"
|
:y "32px"
|
||||||
:anchor "bottom right"
|
:anchor "bottom right"
|
||||||
:width "225px")
|
:width "300px")
|
||||||
:stacking "bg" ; appear behind other windows
|
:stacking "bg" ; appear behind other windows
|
||||||
:focusable false
|
:focusable false
|
||||||
(clock-widget))
|
(clock-widget))
|
||||||
|
|
||||||
|
(defpoll track :interval "2s"
|
||||||
|
"bash ~/.config/eww/title.sh")
|
||||||
|
|
||||||
|
(defpoll artist :interval "2s"
|
||||||
|
"bash ~/.config/eww/artist.sh")
|
||||||
|
|
||||||
|
(defpoll art :interval "2s"
|
||||||
|
"playerctl metadata mpris:artUrl 2>/dev/null \
|
||||||
|
| sed 's/^file:\\/\\///' \
|
||||||
|
| tr -d '\\n'")
|
||||||
|
|
||||||
|
(defwindow media_popup
|
||||||
|
:monitor 0
|
||||||
|
:geometry (geometry
|
||||||
|
:x "0px"
|
||||||
|
:y "40px"
|
||||||
|
:width "550px"
|
||||||
|
:height "80px"
|
||||||
|
:anchor "top center")
|
||||||
|
:exclusive false
|
||||||
|
:focusable false
|
||||||
|
:stacking "overlay"
|
||||||
|
(media-box :art art))
|
||||||
|
|
||||||
|
(defwidget media-box [art]
|
||||||
|
(box
|
||||||
|
; :class (list "media" playing_class)
|
||||||
|
:class "media"
|
||||||
|
:orientation "horizontal"
|
||||||
|
:space-evenly true
|
||||||
|
(image :path art :image-width 185 :image-height 185)
|
||||||
|
(box
|
||||||
|
:orientation "vertical"
|
||||||
|
(label :text track :class "tlabel")
|
||||||
|
(label :text artist :class "alabel")
|
||||||
|
(box
|
||||||
|
(button :onclick "playerctl previous" "⏮")
|
||||||
|
(button :onclick "playerctl play-pause" "⏯")
|
||||||
|
(button :onclick "playerctl next" "⏭")
|
||||||
|
)
|
||||||
|
(label :text "SUPER + M to close" :class "notice")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|||||||
3
title.sh
Executable file
3
title.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
playerctl metadata --format '{{ title }}' 2>/dev/null
|
||||||
11
toggle-media.sh
Executable file
11
toggle-media.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
STATE="$HOME/.config/eww/media_open"
|
||||||
|
|
||||||
|
if [ -f "$STATE" ]; then
|
||||||
|
eww close media_popup
|
||||||
|
rm "$STATE"
|
||||||
|
else
|
||||||
|
eww open media_popup
|
||||||
|
touch "$STATE"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user