added hyprsunset
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
:halign 'end'
|
||||
(hyprsunset)
|
||||
(datetime)
|
||||
(stray)
|
||||
)
|
||||
|
@@ -1,4 +1,5 @@
|
||||
@import 'widgets/media';
|
||||
@import 'widgets/datetime.scss';
|
||||
@import 'widgets/systray';
|
||||
@import 'widgets/hyprsunset';
|
||||
@import 'widgets/lorem-text';
|
||||
|
@@ -1,4 +1,5 @@
|
||||
(include "widgets/media.yuck")
|
||||
(include "widgets/datetime.yuck")
|
||||
(include "widgets/systray.yuck")
|
||||
(include "widgets/hyprsunset.yuck")
|
||||
(include "widgets/lorem-text.yuck")
|
||||
|
4
.config/eww/widgets/hyprsunset.scss
Normal file
4
.config/eww/widgets/hyprsunset.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
.hypr-sunset {
|
||||
background: #003366;
|
||||
color: #e5e6e7;
|
||||
}
|
16
.config/eww/widgets/hyprsunset.yuck
Normal file
16
.config/eww/widgets/hyprsunset.yuck
Normal file
@@ -0,0 +1,16 @@
|
||||
(defvar temperature "4500k")
|
||||
(defvar display-fix "off")
|
||||
(defwidget hyprsunset []
|
||||
(box
|
||||
:class "hypr-sunset"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
:onclick `${display-fix == "off"
|
||||
? "eww update display-fix=on && nohup hyprsunset -t ${temperature} > /dev/null 2>&1 &"
|
||||
: "eww update display-fix=off && pkill hyprsunset"}`
|
||||
`${display-fix == "off" ? " Off" : " On"}`
|
||||
)
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user