Adds little icon for current hour
This commit is contained in:
parent
a459185bb8
commit
1ec52c1412
3 changed files with 43 additions and 16 deletions
|
|
@ -3,6 +3,26 @@
|
||||||
(defwidget bar-time []
|
(defwidget bar-time []
|
||||||
(box
|
(box
|
||||||
:class "widget default-padding"
|
:class "widget default-padding"
|
||||||
|
:space-evenly false
|
||||||
|
:spacing 10
|
||||||
{bar-time-display}
|
{bar-time-display}
|
||||||
|
"|"
|
||||||
|
|
||||||
|
(label
|
||||||
|
:visible {hour-time <= 6 || hour-time > 22}
|
||||||
|
:text ""
|
||||||
|
)
|
||||||
|
(label
|
||||||
|
:visible {hour-time > 6 && hour-time <= 10}
|
||||||
|
:text ""
|
||||||
|
)
|
||||||
|
(label
|
||||||
|
:visible {hour-time > 10 && hour-time <= 18}
|
||||||
|
:text ""
|
||||||
|
)
|
||||||
|
(label
|
||||||
|
:visible {hour-time > 18 && hour-time <= 22}
|
||||||
|
:text ""
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
.default-padding {
|
.default-padding {
|
||||||
padding: 0.5rem 1rem;
|
padding: 0.5rem 1rem;
|
||||||
|
padding-right: 1.3rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,7 @@
|
||||||
(defpoll hour-time :interval '1s' :initial '0' `date +"%H"`)
|
(defpoll hour-time :interval '1s' :initial '0' `date +"%H"`)
|
||||||
|
|
||||||
(defwidget hour-notify []
|
(defwidget hour-icon []
|
||||||
(eventbox
|
|
||||||
:onclick "${EWW_CMD} close hour"
|
|
||||||
(box
|
(box
|
||||||
:class "widget default-padding"
|
|
||||||
:height 150
|
|
||||||
:width 150
|
|
||||||
:orientation "v"
|
|
||||||
:space-evenly false
|
|
||||||
(image
|
(image
|
||||||
:visible {hour-time <= 6 || hour-time > 22}
|
:visible {hour-time <= 6 || hour-time > 22}
|
||||||
:icon "time_moon"
|
:icon "time_moon"
|
||||||
|
|
@ -25,6 +18,19 @@
|
||||||
:visible {hour-time > 18 && hour-time <= 22}
|
:visible {hour-time > 18 && hour-time <= 22}
|
||||||
:icon "time_sun_to_moon"
|
:icon "time_sun_to_moon"
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget hour-notify []
|
||||||
|
(eventbox
|
||||||
|
:onclick "${EWW_CMD} close hour"
|
||||||
|
(box
|
||||||
|
:class "widget default-padding"
|
||||||
|
:height 150
|
||||||
|
:width 150
|
||||||
|
:orientation "v"
|
||||||
|
:space-evenly false
|
||||||
|
(hour-icon)
|
||||||
(label
|
(label
|
||||||
:text "Now: ${hour-time}:00"
|
:text "Now: ${hour-time}:00"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue