refactor of yuck files
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
(include "./widgets.yuck")
|
(include "./widgets.yuck")
|
||||||
|
|
||||||
(defwindow dp-2 :monitor "DP-2"
|
(defwindow dp-2
|
||||||
:geometry (geometry :x 0
|
:monitor "DP-2"
|
||||||
|
:geometry (geometry
|
||||||
|
:x 0
|
||||||
:y 0
|
:y 0
|
||||||
:width "100%"
|
:width "100%"
|
||||||
:height "20px"
|
:height "20px"
|
||||||
@@ -13,8 +15,10 @@
|
|||||||
(top)
|
(top)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defwindow dp-1 :monitor "DP-1"
|
(defwindow dp-1
|
||||||
:geometry (geometry :x 0
|
:monitor "DP-1"
|
||||||
|
:geometry (geometry
|
||||||
|
:x 0
|
||||||
:y 0
|
:y 0
|
||||||
:width "100%"
|
:width "100%"
|
||||||
:height "20px"
|
:height "20px"
|
||||||
@@ -27,7 +31,8 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(defwidget top []
|
(defwidget top []
|
||||||
(centerbox :orientation "h"
|
(centerbox
|
||||||
|
:orientation "h"
|
||||||
(left)
|
(left)
|
||||||
(center)
|
(center)
|
||||||
(right)
|
(right)
|
||||||
@@ -35,7 +40,8 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(defwidget left []
|
(defwidget left []
|
||||||
(box :orientation 'h'
|
(box
|
||||||
|
:orientation 'h'
|
||||||
:class 'left'
|
:class 'left'
|
||||||
:space-evenly true
|
:space-evenly true
|
||||||
:spacing 5
|
:spacing 5
|
||||||
@@ -45,7 +51,8 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(defwidget center []
|
(defwidget center []
|
||||||
(box :orientation 'h'
|
(box
|
||||||
|
:orientation 'h'
|
||||||
:class 'center'
|
:class 'center'
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:spacing 5
|
:spacing 5
|
||||||
@@ -54,7 +61,8 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(defwidget right []
|
(defwidget right []
|
||||||
(box :orientation 'h'
|
(box
|
||||||
|
:orientation 'h'
|
||||||
:class 'right'
|
:class 'right'
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:spacing 5
|
:spacing 5
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
(defwidget datetime []
|
(defwidget datetime []
|
||||||
(box :class "datetime"
|
(box
|
||||||
|
:class "datetime"
|
||||||
:halign "center"
|
:halign "center"
|
||||||
:valign "center"
|
:valign "center"
|
||||||
{ time == ''
|
{ time == ''
|
||||||
@@ -10,7 +11,8 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(defvar time-visible false)
|
(defvar time-visible false)
|
||||||
(defpoll time :interval "1s"
|
(defpoll time
|
||||||
|
:interval "1s"
|
||||||
:initial "initial-value" ; optional, defaults to poll at startup
|
:initial "initial-value" ; optional, defaults to poll at startup
|
||||||
:run-while time-visible ; optional, defaults to 'true'
|
:run-while time-visible ; optional, defaults to 'true'
|
||||||
`date +"%H:%M - %a, %d %b"` ; https://www.man7.org/linux/man-pages/man1/date.1.html
|
`date +"%H:%M - %a, %d %b"` ; https://www.man7.org/linux/man-pages/man1/date.1.html
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
(defwidget loremText [text]
|
(defwidget loremText [text]
|
||||||
(label :text text
|
(label
|
||||||
|
:text text
|
||||||
:class 'lorem-text'
|
:class 'lorem-text'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@@ -11,7 +11,8 @@
|
|||||||
(defvar ellipsisArtist 20) ; set length for ellipsis on artist
|
(defvar ellipsisArtist 20) ; set length for ellipsis on artist
|
||||||
(defvar ellipsisTitle 25) ; set length for ellipsis on title
|
(defvar ellipsisTitle 25) ; set length for ellipsis on title
|
||||||
(defwidget media []
|
(defwidget media []
|
||||||
(box :class "media"
|
(box
|
||||||
|
:class "media"
|
||||||
:halign "center"
|
:halign "center"
|
||||||
:valign "center"
|
:valign "center"
|
||||||
:class { playerctl == '' || objectlength(playerctl) == 0
|
:class { playerctl == '' || objectlength(playerctl) == 0
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(deflisten playerctl :initial ""
|
(deflisten playerctl
|
||||||
|
:initial ""
|
||||||
`playerctl --follow metadata --format '{"player": "{{ playerName }}", "trackid": "{{ mpris:trackid }}", "length": "{{ duration(mpris:length) }}", "artUrl": "{{ mrpis:artUrl }}", "album": "{{ album }}", "albumArtist": "{{ xesam:albumArtist }}", "artist": "{{ artist }}", "autoRating": "{{ xesam:autoRating }}", "discNumber": "{{ xesam:discNumber }}", "title": "{{ title }}", "trackNumber": "{{ xesam:trackNumber }}", "url": "{{ xesam:url }}", "position": "{{ position }}"}'`
|
`playerctl --follow metadata --format '{"player": "{{ playerName }}", "trackid": "{{ mpris:trackid }}", "length": "{{ duration(mpris:length) }}", "artUrl": "{{ mrpis:artUrl }}", "album": "{{ album }}", "albumArtist": "{{ xesam:albumArtist }}", "artist": "{{ artist }}", "autoRating": "{{ xesam:autoRating }}", "discNumber": "{{ xesam:discNumber }}", "title": "{{ title }}", "trackNumber": "{{ xesam:trackNumber }}", "url": "{{ xesam:url }}", "position": "{{ position }}"}'`
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user