feat: add day countdown timer

This commit is contained in:
Flinner Yuu 2026-03-05 02:20:32 +03:00
parent 7125d4f6bf
commit 241c936383
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
2 changed files with 15 additions and 1 deletions

View File

@ -5,7 +5,7 @@
// Choose the order of the modules // Choose the order of the modules
"reload_style_on_change": true, "reload_style_on_change": true,
"modules-left": ["hyprland/workspaces"], "modules-left": ["hyprland/workspaces"],
"modules-center": ["custom/org-clock", "pulseaudio","custom/prayers", "network", "cpu", "memory", "clock", "upower#headset", "custom/music"], "modules-center": ["custom/org-clock", "custom/daysleft", "pulseaudio","custom/prayers", "network", "cpu", "memory", "clock", "upower#headset", "custom/music"],
// "modules-right": ["pulseaudio", "cpu", "backlight", "battery", "clock", "tray", "custom/lock", "custom/power"], // "modules-right": ["pulseaudio", "cpu", "backlight", "battery", "clock", "tray", "custom/lock", "custom/power"],
"modules-right": ["tray", "custom/lock", "custom/power"], "modules-right": ["tray", "custom/lock", "custom/power"],
"hyprland/workspaces": { "hyprland/workspaces": {
@ -57,6 +57,12 @@
"on-click": "", "on-click": "",
"max-length": 50 "max-length": 50
}, },
"custom/daysleft": {
"format": "{} days left!",
"return-type": "json",
"interval": 3600, // Update once an hour
"exec": "echo '{\"text\": \"'$((($(date -d '2026-04-16' +%s) - $(date +%s)) / 86400))'\"}'"
},
"custom/music": { "custom/music": {
"format": " {}", "format": " {}",
"escape": true, "escape": true,

View File

@ -39,6 +39,7 @@
#custom-music, #custom-music,
#upower.headset, #upower.headset,
#custom-org-clock, #custom-org-clock,
#custom-daysleft,
#cpu, #cpu,
#memory, #memory,
#network, #network,
@ -102,7 +103,14 @@
#custom-org-clock { #custom-org-clock {
color: @yellow; color: @yellow;
border-radius: 1rem; border-radius: 1rem;
margin-right: 1rem;
} }
#custom-daysleft {
color: lavender;
border-radius: 1rem;
}
#custom-music { #custom-music {
color: @mauve; color: @mauve;
border-radius: 1rem; border-radius: 1rem;