refactor of yuck files
This commit is contained in:
@@ -1,33 +1,38 @@
|
||||
(include "./widgets.yuck")
|
||||
|
||||
(defwindow dp-2 :monitor "DP-2"
|
||||
:geometry (geometry :x 0
|
||||
:y 0
|
||||
:width "100%"
|
||||
:height "20px"
|
||||
:anchor "top center")
|
||||
:stacking "bg"
|
||||
:exclusive true
|
||||
:focusable "ondemand"
|
||||
:namespace "dp-2"
|
||||
(defwindow dp-2
|
||||
:monitor "DP-2"
|
||||
:geometry (geometry
|
||||
:x 0
|
||||
:y 0
|
||||
:width "100%"
|
||||
:height "20px"
|
||||
:anchor "top center")
|
||||
:stacking "bg"
|
||||
:exclusive true
|
||||
:focusable "ondemand"
|
||||
:namespace "dp-2"
|
||||
(top)
|
||||
)
|
||||
|
||||
(defwindow dp-1 :monitor "DP-1"
|
||||
:geometry (geometry :x 0
|
||||
:y 0
|
||||
:width "100%"
|
||||
:height "20px"
|
||||
:anchor "top center")
|
||||
:stacking "bg"
|
||||
:exclusive true
|
||||
:focusable "ondemand"
|
||||
:namespace "dp-1"
|
||||
(defwindow dp-1
|
||||
:monitor "DP-1"
|
||||
:geometry (geometry
|
||||
:x 0
|
||||
:y 0
|
||||
:width "100%"
|
||||
:height "20px"
|
||||
:anchor "top center")
|
||||
:stacking "bg"
|
||||
:exclusive true
|
||||
:focusable "ondemand"
|
||||
:namespace "dp-1"
|
||||
(top)
|
||||
)
|
||||
|
||||
(defwidget top []
|
||||
(centerbox :orientation "h"
|
||||
(centerbox
|
||||
:orientation "h"
|
||||
(left)
|
||||
(center)
|
||||
(right)
|
||||
@@ -35,30 +40,33 @@
|
||||
)
|
||||
|
||||
(defwidget left []
|
||||
(box :orientation 'h'
|
||||
:class 'left'
|
||||
:space-evenly true
|
||||
:spacing 5
|
||||
:halign 'start'
|
||||
(box
|
||||
:orientation 'h'
|
||||
:class 'left'
|
||||
:space-evenly true
|
||||
:spacing 5
|
||||
:halign 'start'
|
||||
(loremText :text "Workspaces")
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget center []
|
||||
(box :orientation 'h'
|
||||
:class 'center'
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
(box
|
||||
:orientation 'h'
|
||||
:class 'center'
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
(media)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget right []
|
||||
(box :orientation 'h'
|
||||
:class 'right'
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
:halign 'end'
|
||||
(box
|
||||
:orientation 'h'
|
||||
:class 'right'
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
:halign 'end'
|
||||
(hyprsunset)
|
||||
(datetime)
|
||||
(stray)
|
||||
|
@@ -1,7 +1,8 @@
|
||||
(defwidget datetime []
|
||||
(box :class "datetime"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
(box
|
||||
:class "datetime"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
{ time == ''
|
||||
? ''
|
||||
: time
|
||||
@@ -10,8 +11,9 @@
|
||||
)
|
||||
|
||||
(defvar time-visible false)
|
||||
(defpoll time :interval "1s"
|
||||
:initial "initial-value" ; optional, defaults to poll at startup
|
||||
:run-while time-visible ; optional, defaults to 'true'
|
||||
(defpoll time
|
||||
:interval "1s"
|
||||
:initial "initial-value" ; optional, defaults to poll at startup
|
||||
: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
|
||||
)
|
||||
|
@@ -1,5 +1,6 @@
|
||||
(defwidget loremText [text]
|
||||
(label :text text
|
||||
:class 'lorem-text'
|
||||
(label
|
||||
:text text
|
||||
:class 'lorem-text'
|
||||
)
|
||||
)
|
||||
|
@@ -11,14 +11,15 @@
|
||||
(defvar ellipsisArtist 20) ; set length for ellipsis on artist
|
||||
(defvar ellipsisTitle 25) ; set length for ellipsis on title
|
||||
(defwidget media []
|
||||
(box :class "media"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:class { playerctl == '' || objectlength(playerctl) == 0
|
||||
? 'music--off'
|
||||
: matches(playerctl.player, playerRegex)
|
||||
? 'music--' + playerctl.player
|
||||
: 'music--on' }
|
||||
(box
|
||||
:class "media"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:class { playerctl == '' || objectlength(playerctl) == 0
|
||||
? 'music--off'
|
||||
: matches(playerctl.player, playerRegex)
|
||||
? 'music--' + playerctl.player
|
||||
: 'music--on' }
|
||||
{ playerctl == '' || objectlength(playerctl) == 0
|
||||
? ''
|
||||
: matches(playerctl.player, playerRegex)
|
||||
@@ -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 }}"}'`
|
||||
)
|
||||
|
Reference in New Issue
Block a user