added dashboard clock

This commit is contained in:
Nickiel12 2023-11-06 17:01:22 -08:00
parent 43ca30abd1
commit 1db0b948ba
7 changed files with 46 additions and 6 deletions

View file

@ -6,11 +6,12 @@ in
{
home.packages = with pkgs; [
alsa-utils
gcal
jq
playerctl
pw-volume
alsa-utils
socat
jq
];
programs.eww = {

View file

@ -3,6 +3,19 @@
border-radius: 16px;
}
.dash_clock {
background-image: linear-gradient(45deg, #7d7d7d, #262626 30%, #262626 60%, #10384a);
border-radius: 16px;
}
.dash_clock_time {
font-size: 30px;
}
.dash_clock_date {
font-size: 20px;
}
.btn_logout, .btn_restart, .btn_shutdown, .btn_switch_windows {
font-size: 40px;
font-weight: bold;

View file

@ -18,6 +18,21 @@
:onaccept "eww update show_elevation_prompt=false;eww close elevate_to_windows; echo \"{}\" | sudo -S grub-reboot 1 && systemctl reboot")
))))
(defwidget dash_clock []
(box :class "dash_clock"
:orientation "v"
:vexpand "false"
:hexpand "false"
:spacing 1
(label :class "dash_clock_time"
:halign "center"
:text {formattime(EWW_TIME, "%H:%M:%S")})
(label :class "dash_clock_date"
:halign "center"
:text {formattime(EWW_TIME, "%B, %d %Y")})
(box :vexpand "true")
))
(defwidget logout []
(box :class "dash_window"
:vexpand "false"
@ -50,10 +65,17 @@
:onclick "eww open elevate_to_windows; eww update show_elevation_prompt=true"
"")))
;; Set up prompt window for sudo password
;; that trigglers on reboot_windows,
;; and runs the windows command
(defwindow dash_clock
:stacking "bg"
:focusable "false"
:monitor 0
:geometry (geometry :x 760
:y 200
:width 400
:height 150)
(dash_clock)
)
(defwindow logout
:stacking "bg"
@ -95,6 +117,9 @@
:height 75)
(reboot_windows))
;; Set up prompt window for sudo password
;; that trigglers on reboot_windows,
;; and runs the windows command
(defwindow elevate_to_windows
:monitor 0
:exclusive false

View file

@ -0,0 +1 @@

View file

@ -44,7 +44,7 @@ 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 bar;eww open logout;eww open restart;eww open shutdown;eww open reboot_windows;eww open dash_clock"
];
input = {