mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-22 20:59:32 -08:00
added dashboard clock
This commit is contained in:
parent
43ca30abd1
commit
1db0b948ba
7 changed files with 46 additions and 6 deletions
|
@ -6,11 +6,12 @@ in
|
||||||
{
|
{
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
alsa-utils
|
||||||
|
gcal
|
||||||
|
jq
|
||||||
playerctl
|
playerctl
|
||||||
pw-volume
|
pw-volume
|
||||||
alsa-utils
|
|
||||||
socat
|
socat
|
||||||
jq
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.eww = {
|
programs.eww = {
|
||||||
|
|
|
@ -3,6 +3,19 @@
|
||||||
border-radius: 16px;
|
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 {
|
.btn_logout, .btn_restart, .btn_shutdown, .btn_switch_windows {
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -18,6 +18,21 @@
|
||||||
:onaccept "eww update show_elevation_prompt=false;eww close elevate_to_windows; echo \"{}\" | sudo -S grub-reboot 1 && systemctl reboot")
|
: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 []
|
(defwidget logout []
|
||||||
(box :class "dash_window"
|
(box :class "dash_window"
|
||||||
:vexpand "false"
|
:vexpand "false"
|
||||||
|
@ -50,10 +65,17 @@
|
||||||
:onclick "eww open elevate_to_windows; eww update show_elevation_prompt=true"
|
: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
|
(defwindow logout
|
||||||
:stacking "bg"
|
:stacking "bg"
|
||||||
|
@ -95,6 +117,9 @@
|
||||||
:height 75)
|
:height 75)
|
||||||
(reboot_windows))
|
(reboot_windows))
|
||||||
|
|
||||||
|
;; Set up prompt window for sudo password
|
||||||
|
;; that trigglers on reboot_windows,
|
||||||
|
;; and runs the windows command
|
||||||
(defwindow elevate_to_windows
|
(defwindow elevate_to_windows
|
||||||
:monitor 0
|
:monitor 0
|
||||||
:exclusive false
|
:exclusive false
|
||||||
|
|
1
modules/ewwbar/eww-config/scripts/clock_background
Executable file
1
modules/ewwbar/eww-config/scripts/clock_background
Executable file
|
@ -0,0 +1 @@
|
||||||
|
|
0
modules/ewwbar/eww-config/scripts/moontime
Normal file
0
modules/ewwbar/eww-config/scripts/moontime
Normal file
0
modules/ewwbar/eww-config/scripts/suntime
Normal file
0
modules/ewwbar/eww-config/scripts/suntime
Normal file
|
@ -44,7 +44,7 @@ in
|
||||||
|
|
||||||
exec-once = [
|
exec-once = [
|
||||||
"${pkgs.swww}/bin/swww init & sleep 0.5 & ${pkgs.swww}/bin/swww /home/nixolas/Downloads/RecountERD.png"
|
"${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 = {
|
input = {
|
||||||
|
|
Loading…
Reference in a new issue