rehauled time and added more timezones
This commit is contained in:
parent
1a6e0f68f7
commit
ac16c49d2e
2 changed files with 91 additions and 48 deletions
116
eww/eww.yuck
116
eww/eww.yuck
|
@ -5,21 +5,8 @@
|
||||||
;; left
|
;; left
|
||||||
|
|
||||||
|
|
||||||
(defwidget time []
|
|
||||||
(box
|
|
||||||
:class "barbox"
|
|
||||||
:space-evenly false
|
|
||||||
:spacing 3
|
|
||||||
(space)
|
|
||||||
(eventbox
|
|
||||||
:onclick ``
|
|
||||||
:class "smallBox"
|
|
||||||
:valign "center"
|
|
||||||
:height 20
|
|
||||||
:width 70
|
|
||||||
(label
|
|
||||||
:text "${formattime(EWW_TIME, "%H:%M:%S")}"))
|
|
||||||
(space)))
|
|
||||||
|
|
||||||
;; center
|
;; center
|
||||||
|
|
||||||
|
@ -105,24 +92,18 @@
|
||||||
;; Widget blocks
|
;; Widget blocks
|
||||||
|
|
||||||
(defwidget media []
|
(defwidget media []
|
||||||
(box
|
|
||||||
:class "barbox"
|
|
||||||
:visible {media.status == "Playing" ? true : false}
|
|
||||||
:spacing 3
|
|
||||||
:space-evenly false
|
|
||||||
:halign "end"
|
|
||||||
:valign "center"
|
|
||||||
:height 30
|
|
||||||
(space)
|
|
||||||
(box
|
(box
|
||||||
:class "smallBox"
|
:class "smallBox"
|
||||||
:height 20
|
:height 20
|
||||||
:valign "center"
|
:valign "center"
|
||||||
|
:spacing 1
|
||||||
|
:space-evenly false
|
||||||
|
(space)
|
||||||
(label
|
(label
|
||||||
:text {media.name}
|
:text {media.name}
|
||||||
:tooltip {media.name}
|
:tooltip {media.name}
|
||||||
:truncate true))
|
:truncate true)
|
||||||
(space)))
|
(space)))
|
||||||
|
|
||||||
(defwidget processing []
|
(defwidget processing []
|
||||||
(eventbox
|
(eventbox
|
||||||
|
@ -195,6 +176,31 @@
|
||||||
(power)
|
(power)
|
||||||
(smallSpacer))))
|
(smallSpacer))))
|
||||||
|
|
||||||
|
;; Boxes
|
||||||
|
|
||||||
|
(defwidget timeBox []
|
||||||
|
(box
|
||||||
|
:class "barbox"
|
||||||
|
:spacing 3
|
||||||
|
:space-evenly false
|
||||||
|
:halign "end"
|
||||||
|
:valign "center"
|
||||||
|
:height 30
|
||||||
|
(testtime)))
|
||||||
|
|
||||||
|
(defwidget mediaBox []
|
||||||
|
(box
|
||||||
|
:class "barbox"
|
||||||
|
:visible {media.status == "Playing" ? true : false}
|
||||||
|
:spacing 3
|
||||||
|
:space-evenly false
|
||||||
|
:halign "end"
|
||||||
|
:valign "center"
|
||||||
|
:height 30
|
||||||
|
(space)
|
||||||
|
(media)
|
||||||
|
(space)))
|
||||||
|
|
||||||
|
|
||||||
(defwidget start []
|
(defwidget start []
|
||||||
(box
|
(box
|
||||||
|
@ -204,9 +210,9 @@
|
||||||
:halign "start"
|
:halign "start"
|
||||||
:valign "center"
|
:valign "center"
|
||||||
:spacing 3
|
:spacing 3
|
||||||
(time)
|
(timeBox)
|
||||||
(media)
|
(mediaBox)
|
||||||
(space)))
|
(box)))
|
||||||
|
|
||||||
(defwidget center [monitor]
|
(defwidget center [monitor]
|
||||||
(box
|
(box
|
||||||
|
@ -250,37 +256,51 @@
|
||||||
|
|
||||||
(defwidget end []
|
(defwidget end []
|
||||||
(box
|
(box
|
||||||
:class "barbox"
|
|
||||||
:spacing 2
|
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
:spacing 3
|
||||||
:height 30
|
:height 30
|
||||||
:valign "center"
|
:valign "center"
|
||||||
:halign "end"
|
:halign "end"
|
||||||
(space)
|
(testtime
|
||||||
;; (systray
|
:name "US East"
|
||||||
;; :spacing 2
|
:timezone "EST")
|
||||||
;; :orientation "h"
|
(testtime
|
||||||
;; :space-evenly true
|
:name "Asia"
|
||||||
;; :icon-size 16)
|
:timezone "Asia/Seoul")
|
||||||
;;
|
(box
|
||||||
;; (seperator)
|
:class "barbox"
|
||||||
|
:spacing 2
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly false
|
||||||
|
:height 30
|
||||||
|
:valign "center"
|
||||||
|
:halign "end"
|
||||||
|
|
||||||
|
(space)
|
||||||
|
;; (systray
|
||||||
|
;; :spacing 2
|
||||||
|
;; :orientation "h"
|
||||||
|
;; :space-evenly true
|
||||||
|
;; :icon-size 16)
|
||||||
|
;;
|
||||||
|
;; (seperator)
|
||||||
|
|
||||||
(processing)
|
(processing)
|
||||||
|
|
||||||
(seperator)
|
(seperator)
|
||||||
|
|
||||||
(controlls)
|
(controlls)
|
||||||
|
|
||||||
(seperator)
|
(seperator)
|
||||||
|
|
||||||
(wireless)
|
(wireless)
|
||||||
|
|
||||||
(seperator)
|
(seperator)
|
||||||
|
|
||||||
(energy)
|
(energy)
|
||||||
|
|
||||||
(space)))
|
(space))))
|
||||||
|
|
||||||
(defwidget bar [monitor]
|
(defwidget bar [monitor]
|
||||||
(centerbox
|
(centerbox
|
||||||
|
|
|
@ -86,3 +86,26 @@
|
||||||
:valign "center"
|
:valign "center"
|
||||||
:text "|"
|
:text "|"
|
||||||
)))
|
)))
|
||||||
|
|
||||||
|
(defwidget testtime [?name ?icon ?timezone]
|
||||||
|
(box
|
||||||
|
:class "barbox"
|
||||||
|
:space-evenly false
|
||||||
|
:spacing 3
|
||||||
|
(space)
|
||||||
|
(box
|
||||||
|
:onclick ``
|
||||||
|
:class "smallBox"
|
||||||
|
:spacing 1
|
||||||
|
:space-evenly false
|
||||||
|
:valign "center"
|
||||||
|
:height 20
|
||||||
|
(space)
|
||||||
|
(eventbox
|
||||||
|
(label
|
||||||
|
:truncate {name != "" ? true : false }
|
||||||
|
:truncate-left {name != "" ? true : false }
|
||||||
|
:text {timezone != "" ? "${name} ${formattime(EWW_TIME, "%H:%M", timezone)}" : "${formattime(EWW_TIME, "%H:%M:%S")}"}
|
||||||
|
:tooltip {timezone != "" ? "${formattime(EWW_TIME, "%A %d.%m.%G", timezone)}" : "${formattime(EWW_TIME, "%A %d.%m.%G")}"}))
|
||||||
|
(space))
|
||||||
|
(space)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue