From b33fe46c57ba1abeef623f9563964f26bdf5c804 Mon Sep 17 00:00:00 2001 From: Jerry Starke <42114389+JerrySM64@users.no-reply.github.com> Date: Sun, 11 Feb 2024 18:45:06 -0600 Subject: [PATCH 1/2] Add 24h time option --- config/home/waybar.nix | 6 ++++-- options.nix | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config/home/waybar.nix b/config/home/waybar.nix index 4c9a41c..08079ab 100644 --- a/config/home/waybar.nix +++ b/config/home/waybar.nix @@ -2,7 +2,7 @@ let palette = config.colorScheme.palette; - inherit (import ../../options.nix) slickbar; + inherit (import ../../options.nix) slickbar clock24h; in with lib; { # Configure & Theme Waybar programs.waybar = { @@ -26,7 +26,9 @@ in with lib; { on-scroll-down = "hyprctl dispatch workspace e-1"; }; "clock" = { - format = "{: %I:%M %p}"; + format = if clock24h == true then ''{: %H:%M}'' + else ''{: %I:%M %p}''; + max-length = 25; tooltip = false; }; "hyprland/window" = { diff --git a/options.nix b/options.nix index 0c55531..4f228e4 100644 --- a/options.nix +++ b/options.nix @@ -20,6 +20,7 @@ in { terminal = "alacritty"; # System Settings + clock24h = false; theLocale = "en_US.UTF-8"; theKBDLayout = "us"; theSecondKBDLayout = "pl"; From 5e0c24d39c5b136024dfbc998f8b78571fa9556f Mon Sep 17 00:00:00 2001 From: Jerry Starke <42114389+JerrySM64@users.no-reply.github.com> Date: Sun, 11 Feb 2024 19:08:12 -0600 Subject: [PATCH 2/2] Forgot to remove the max-length line, I added while debugging, oops --- config/home/waybar.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/config/home/waybar.nix b/config/home/waybar.nix index 08079ab..cf419ee 100644 --- a/config/home/waybar.nix +++ b/config/home/waybar.nix @@ -28,7 +28,6 @@ in with lib; { "clock" = { format = if clock24h == true then ''{: %H:%M}'' else ''{: %I:%M %p}''; - max-length = 25; tooltip = false; }; "hyprland/window" = {