Compare commits

..

No commits in common. "a872594dee4694ed18aadea2b890cf20a974b1f5" and "372e193483069a09578dcb39a0c01bc94bbc315a" have entirely different histories.

7 changed files with 1 additions and 140 deletions

View file

@ -1,6 +1,5 @@
@import "./theme.scss";
@import "./bar/style.scss";
@import "./music/style.scss";
@import "./timer/style.scss";
@import "./freqtrade/style.scss";

View file

@ -1,5 +1,4 @@
(include "./bar/widget.yuck")
(include "./music/widget.yuck")
(include "./timer/widget.yuck")
(include "./freqtrade/widget.yuck")

View file

@ -1,47 +0,0 @@
.music {
background-color: $background;
border-radius: 20px;
padding: 20px;
.art {
background-size: cover;
min-width: 200px;
min-height: 200px;
border-radius: 20px;
transition: opacity 1s ease-in-out;
}
.player-container {
min-width: 300px;
.title {
font-size: 20px;
color: $purple;
}
.artist {
font-size: 16px;
color: $yellow;
}
button {
min-width: 32px;
min-height: 32px;
font-size: 20px;
}
button.playpause {
border-radius: 50%;
background-color: $green;
color: $background;
padding-top: 4px;
padding-right: 2px;
padding-left: 2px;
}
}
}

View file

@ -1,74 +0,0 @@
(defvar COVER_HIDDEN false) ; Bcz sometimes I listen to Geoxor, so, yeah...
(defvar FALLBACK_COVER "/home/gaspard/Images/Icons/music-disk.png")
(defvar PLAY_STATUS "⏸︎")
(deflisten music_info :initial '{"title": "", "artist": "", "artUrl": "", "status": ""}' "~/.config/eww/scripts/get-music-info")
(defwidget music []
(box
:class "music"
:orientation "h"
:spacing 25
:space-evenly false
(button
:class "art"
:vexpand false
:hexpand false
:style "background-image: url('${COVER_HIDDEN ? FALLBACK_COVER : music_info.artUrl ?: FALLBACK_COVER }');"
:onclick `
if [ "$(eww get COVER_HIDDEN)" == "true" ]; then
eww update COVER_HIDDEN=false
else
eww update COVER_HIDDEN=true
fi
`)
(box
:class "player-container"
:orientation "v"
:vexpand true
:space-evenly false
:spacing 25
(label
:class "title"
:limit-width 22
:text "${music_info.title ?: "Not playing"}")
(label
:class "artist"
:limit-width 26
:text "${music_info.artist}")
(box
:orientation "h"
:halign "center"
:valign "center"
:spacing 25
:space-evenly false
:vexpand true
(button
:vexpand false
:onclick "playerctl previous"
:class "previous" " ⏪︎")
(button
:vexpand false
:onclick "playerctl play-pause"
:class "playpause" "${music_info.status == "Playing" ? "⏸︎" : "⏵︎"}")
(button
:vexpand false
:onclick "playerctl next"
:class "next" " ⏩︎")
)
)
)
)
(defwindow music
:namespace "eww.music"
:monitor 0
:geometry (geometry
:x "19%"
:y "10%"
:anchor "top left")
:stacking "bg"
:focusable false
:exclusive true
(music)
)

View file

@ -1,14 +0,0 @@
#!/bin/bash
info (){
title=$(playerctl metadata xesam:title 2> /dev/null)
artist=$(playerctl metadata xesam:artist 2> /dev/null)
artUrl=$(playerctl metadata mpris:artUrl 2> /dev/null)
status=$(playerctl status 2> /dev/null)
echo "{\"title\": \"${title}\", \"artist\": \"${artist}\", \"artUrl\": \"${artUrl}\", \"status\": \"${status}\"}"
}
info
dbus-monitor "path=/org/mpris/MediaPlayer2,member=PropertiesChanged" | while read -r line; do
info
done

View file

@ -27,11 +27,9 @@
:initial "first"
:run-while {timer-state == "pause"}
`if [ "$(eww get timer-pause-period)" == "first" ]; then
mpv ~/.local/share/sfx/uplifting-flute.wav &
eww update timer-start-time=$(date +%s)
echo next
else
mpv ~/.local/share/sfx/uplifting-flute.wav &
notify-send -i ~/Images/Icons/moai.jpg "Pause period over" "Back to grinding we go."
eww update timer-state=work
echo first

View file

@ -8,7 +8,7 @@ font='FiraCode Nerd Font' 11
anchor=bottom-right
outer-margin=0,30,0,0
# on-notify=exec mpv ~/.local/share/sfx/gaming-lock.wav
on-notify=exec mpv ~/.local/share/sfx/gaming-lock.wav
[urgency=low]
border-color=#cccccc