mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-22 12:49:32 -08:00
added sun-based gradient background to dash clock
This commit is contained in:
parent
aa716f0e35
commit
0417c202a2
3 changed files with 27 additions and 2 deletions
|
@ -4,10 +4,15 @@
|
|||
}
|
||||
|
||||
.dash_clock {
|
||||
background-image: linear-gradient(45deg, #7d7d7d, #262626 30%, #262626 60%, #10384a);
|
||||
// background-image: linear-gradient(45deg, #7d7d7d, #262626 30%, #262626 60%, #10384a);
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.dash_clock_bg {
|
||||
border-radius: 16px;
|
||||
background-color: #262626;
|
||||
}
|
||||
|
||||
.dash_clock_time {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,14 @@
|
|||
:onaccept "eww update show_elevation_prompt=false;eww close elevate_to_windows; echo \"{}\" | sudo -S grub-reboot 1 && systemctl reboot")
|
||||
))))
|
||||
|
||||
(defpoll clock_gradient :interval "5m"
|
||||
{"gcal --resource-file=/home/nixolas/.config/eww/scripts/gcalinfo -H no | ewwtilities calendar-background"})
|
||||
|
||||
(defwidget dash_clock_bg []
|
||||
(box :class "dash_clock_bg"
|
||||
:style "background-image: ${clock_gradient}"
|
||||
))
|
||||
|
||||
(defwidget dash_clock []
|
||||
(box :class "dash_clock"
|
||||
:orientation "v"
|
||||
|
@ -77,6 +85,17 @@
|
|||
(dash_clock)
|
||||
)
|
||||
|
||||
(defwindow dash_clock_bg
|
||||
:stacking "bg"
|
||||
:focusable "false"
|
||||
:monitor 0
|
||||
:geometry (geometry :x 760
|
||||
:y 200
|
||||
:width 400
|
||||
:height 150)
|
||||
(dash_clock_bg)
|
||||
)
|
||||
|
||||
(defwindow logout
|
||||
:stacking "bg"
|
||||
:focusable "false"
|
||||
|
|
|
@ -44,7 +44,8 @@ in
|
|||
|
||||
exec-once = [
|
||||
"${pkgs.swww}/bin/swww init & sleep 0.5 & ${pkgs.swww}/bin/swww /home/nixolas/Downloads/RecountERD.png"
|
||||
"eww open bar;eww open logout;eww open restart;eww open shutdown;eww open reboot_windows;eww open dash_clock"
|
||||
"eww open bar;eww open logout;eww open restart;eww open shutdown;eww open reboot_windows"
|
||||
"eww open dash_clock_bg;eww open dash_clock" # the order here matters
|
||||
];
|
||||
|
||||
input = {
|
||||
|
|
Loading…
Reference in a new issue