feat: add some stuff for eww

This commit is contained in:
matt1432 2023-08-22 21:15:03 -04:00
parent 914a6950e3
commit c0175571fd
5 changed files with 14 additions and 7 deletions

View file

@ -1,4 +1,5 @@
(defvar showqs false)
(defvar showplayer false)
(defwidget quick-settings-smol []
(box :class "quick-settings-smol"
@ -321,9 +322,11 @@
:style "margin-bottom: 10px;"
(label)
(eventbox :cursor "pointer"
:onclick "${expand_player == 'true' ? 'eww update expand_player=false' : 'eww update expand_player=true'}"
"${expand_player == 'true' ? ' ' : ' ' }"
(revealer :reveal showplayer
(eventbox :cursor "pointer"
:onclick "${expand_player == 'true' ? 'eww update expand_player=false' : 'eww update expand_player=true'}"
"${expand_player == 'true' ? ' ' : ' ' }"
)
)
(label)

View file

@ -71,9 +71,11 @@ get_cover() {
get_accents
fi
if [[ -f "/tmp/cover.jpg" ]]; then
if [[ -s "/tmp/cover.jpg" ]]; then
eww update showplayer=true
echo "/tmp/cover.jpg"
else
eww update showplayer=false
echo "randomfile"
fi
}

View file

@ -40,7 +40,6 @@
border-right: 2px solid $contrastbg;
min-height: 14px;
min-width: 105px;
margin-top: -10px;
background-color: $bg;
transition: all 0.5s;
}

View file

@ -128,6 +128,7 @@
(defwidget notif-panel []
(box :orientation "v"
:space-evenly false
:spacing 0
(eventbox :class "${notif-panel-state == 'true' ? 'toggle-on' : 'toggle-off'}"
:onclick "${notif-panel-state == 'true' ? turn-notif-off : turn-notif-on}"
:cursor "pointer"
@ -139,7 +140,9 @@
(label :text " ${notif_icon} ")
)
)
(expander :expanded notif-panel-state
(revealer :reveal notif-panel-state
:duration anim_duration
:transition "slideup"
:height 0
(box :class "filler"
:height 0

View file

@ -20,7 +20,7 @@
(deflisten br_icon "$EWW_PATH/brightness.sh icon")
(defpoll br :interval "1s" "$EWW_PATH/brightness.sh br")
(defvar anim_duration "550ms")
(defvar anim_duration "200ms")
(defpoll completeday :interval "1h" "date '+%A, %d %B'")
(defpoll lithour :interval "30m" "date +%H")