waybar: split clock into date and time modules
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
0c275d22df
commit
140359c992
1 changed files with 15 additions and 10 deletions
|
@ -80,6 +80,7 @@ in {
|
||||||
|
|
||||||
### SETTINGS ###
|
### SETTINGS ###
|
||||||
# https://github.com/Alexays/Waybar/wiki/Configuration
|
# https://github.com/Alexays/Waybar/wiki/Configuration
|
||||||
|
# https://docs.gtk.org/Pango/pango_markup.html#pango-markup
|
||||||
#?? pkill -SIGUSR2 -x waybar
|
#?? pkill -SIGUSR2 -x waybar
|
||||||
settings = let
|
settings = let
|
||||||
## INHERIT ##
|
## INHERIT ##
|
||||||
|
@ -140,7 +141,8 @@ in {
|
||||||
(mkIf config.custom.desktops.niri.enable "niri/workspaces")
|
(mkIf config.custom.desktops.niri.enable "niri/workspaces")
|
||||||
];
|
];
|
||||||
modules-center = [
|
modules-center = [
|
||||||
"clock"
|
"clock#date"
|
||||||
|
"clock#time"
|
||||||
"custom/weather"
|
"custom/weather"
|
||||||
];
|
];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
|
@ -231,10 +233,10 @@ in {
|
||||||
cava = cava-config;
|
cava = cava-config;
|
||||||
|
|
||||||
# https://github.com/Alexays/Waybar/wiki/Module:-Clock
|
# https://github.com/Alexays/Waybar/wiki/Module:-Clock
|
||||||
clock = {
|
"clock#date" = {
|
||||||
# https://fmt.dev/latest/syntax.html#chrono-specs
|
format = "{:%a %b %d}";
|
||||||
format = "{:%a %b %d %I:%M %p}"; # Mon Jan 01 12:00 AM
|
|
||||||
tooltip-format = "{calendar}";
|
tooltip-format = "{calendar}";
|
||||||
|
|
||||||
calendar.format = {
|
calendar.format = {
|
||||||
months = "<span color='#eee8d5'>{}</span>";
|
months = "<span color='#eee8d5'>{}</span>";
|
||||||
weeks = "<span color='#eee8d5'>{}</span>";
|
weeks = "<span color='#eee8d5'>{}</span>";
|
||||||
|
@ -242,11 +244,12 @@ in {
|
||||||
days = "<span color='#586e75'>{}</span>";
|
days = "<span color='#586e75'>{}</span>";
|
||||||
today = "<span color='#eee8d5'>{}</span>";
|
today = "<span color='#eee8d5'>{}</span>";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# FIXME: Click release event sends to incorrect layer without sleeping
|
"clock#time" = {
|
||||||
# https://github.com/hyprwm/Hyprland/issues/1348
|
# https://fmt.dev/latest/syntax/#chrono-format-specifications
|
||||||
|
format = "<span text_transform='lowercase'>{:%I:%M%p}</span>";
|
||||||
on-click = "${swaync-client} --toggle-panel";
|
on-click = "${swaync-client} --toggle-panel";
|
||||||
# on-click-right = easyeffects;
|
|
||||||
on-scroll-up = "${swayosd-client} --output-volume raise";
|
on-scroll-up = "${swayosd-client} --output-volume raise";
|
||||||
on-scroll-down = "${swayosd-client} --output-volume lower";
|
on-scroll-down = "${swayosd-client} --output-volume lower";
|
||||||
};
|
};
|
||||||
|
@ -286,7 +289,7 @@ in {
|
||||||
mpris = {
|
mpris = {
|
||||||
format = "{player_icon} {dynamic}";
|
format = "{player_icon} {dynamic}";
|
||||||
format-paused = "{status_icon} {dynamic}";
|
format-paused = "{status_icon} {dynamic}";
|
||||||
dynamic-len = 50;
|
dynamic-len = 25;
|
||||||
dynamic-order = [
|
dynamic-order = [
|
||||||
"title"
|
"title"
|
||||||
"artist"
|
"artist"
|
||||||
|
@ -363,6 +366,8 @@ in {
|
||||||
# https://github.com/Alexays/Waybar/wiki/Module:-Battery
|
# https://github.com/Alexays/Waybar/wiki/Module:-Battery
|
||||||
"battery" = {
|
"battery" = {
|
||||||
format = "{icon} {power:.0f}W";
|
format = "{icon} {power:.0f}W";
|
||||||
|
interval = 5;
|
||||||
|
|
||||||
format-icons = [
|
format-icons = [
|
||||||
""
|
""
|
||||||
""
|
""
|
||||||
|
@ -376,13 +381,13 @@ in {
|
||||||
""
|
""
|
||||||
""
|
""
|
||||||
];
|
];
|
||||||
interval = 5;
|
|
||||||
states = {
|
states = {
|
||||||
critical = 15;
|
critical = 15;
|
||||||
warning = 30;
|
warning = 30;
|
||||||
};
|
};
|
||||||
|
|
||||||
on-click = power; # Toggle power-saver mode
|
on-click = power;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue