From 943bd8277c7f265b335035607aac59299d1fa9f1 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 14 Aug 2024 02:50:57 +0200 Subject: ... --- accounts/gkleen@sif/default.nix | 5 +- overlays/wttrbar/default.nix | 7 ++ overlays/wttrbar/icons.patch | 145 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+), 3 deletions(-) create mode 100644 overlays/wttrbar/default.nix create mode 100644 overlays/wttrbar/icons.patch diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 0fe68a55..a29826b4 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -517,7 +517,7 @@ in { } window#waybar { - background-color: rgba(0, 0, 0, 0.5); + background-color: rgba(0, 0, 0, 0.66); color: @white; } @@ -549,8 +549,7 @@ in { } #custom-weather, #custom-keymap { - color: @white; - opacity: 0.33; + color: @grey; } #tray { diff --git a/overlays/wttrbar/default.nix b/overlays/wttrbar/default.nix new file mode 100644 index 00000000..876fa699 --- /dev/null +++ b/overlays/wttrbar/default.nix @@ -0,0 +1,7 @@ +{ prev, ... }: { + wttrbar = prev.wttrbar.overrideAttrs (oldAttrs: { + patches = (oldAttrs.patches or []) ++ [ + ./icons.patch + ]; + }); +} diff --git a/overlays/wttrbar/icons.patch b/overlays/wttrbar/icons.patch new file mode 100644 index 00000000..9382ee88 --- /dev/null +++ b/overlays/wttrbar/icons.patch @@ -0,0 +1,145 @@ +diff --git a/src/constants.rs b/src/constants.rs +index 81b1926..36e26ac 100644 +--- a/src/constants.rs ++++ b/src/constants.rs +@@ -1,64 +1,52 @@ + pub const WEATHER_CODES: &[(i32, &str)] = &[ +- (113, "☀ī¸"), +- (116, "🌤ī¸"), +- (119, "☁ī¸"), +- (122, "đŸŒĨī¸"), +- (143, "đŸŒĢī¸"), +- (176, "đŸŒĻī¸"), +- (179, "🌧ī¸"), +- (182, "🌨ī¸"), +- (185, "🌨ī¸"), +- (200, "🌩ī¸"), +- (227, "❄ī¸"), +- (230, "❄ī¸"), +- (248, "đŸŒĢī¸"), +- (260, "đŸŒĢī¸"), +- (263, "🌧ī¸"), +- (266, "🌧ī¸"), +- (281, "đŸŒĻī¸"), +- (284, "đŸŒĻī¸"), +- (293, "🌧ī¸"), +- (296, "🌧ī¸"), +- (299, "🌧ī¸"), +- (302, "🌧ī¸"), +- (305, "🌧ī¸"), +- (308, "🌧ī¸"), +- (311, "🌧ī¸"), +- (314, "🌧ī¸"), +- (317, "🌧ī¸"), +- (320, "🌨ī¸"), +- (323, "🌨ī¸"), +- (326, "🌨ī¸"), +- (329, "🌨ī¸"), +- (332, "🌨ī¸"), +- (335, "🌨ī¸"), +- (338, "🌨ī¸"), +- (350, "🌨ī¸"), +- (353, "🌧ī¸"), +- (356, "🌧ī¸"), +- (359, "🌧ī¸"), +- (362, "🌨ī¸"), +- (365, "🌨ī¸"), +- (368, "🌨ī¸"), +- (371, "🌨ī¸"), +- (374, "🌨ī¸"), +- (377, "🌨ī¸"), +- (386, "🌩ī¸"), +- (389, "🌨ī¸"), +- (392, "🌨ī¸"), +- (395, "🌨ī¸"), +- (398, "🌨ī¸"), +- (401, "🌨ī¸"), +- (404, "🌨ī¸"), +- (407, "🌨ī¸"), +- (410, "🌨ī¸"), +- (413, "🌨ī¸"), +- (416, "🌨ī¸"), +- (419, "🌨ī¸"), +- (422, "🌨ī¸"), +- (425, "🌨ī¸"), +- (428, "🌨ī¸"), +- (431, "🌨ī¸"), ++ (113, ""), ++ (116, ""), ++ (119, "îŒŊ"), ++ (122, ""), ++ (143, ""), ++ (176, ""), ++ (179, ""), ++ (182, "îŽĒ"), ++ (185, "îŽĒ"), ++ (200, ""), ++ (227, ""), ++ (230, ""), ++ (248, ""), ++ (260, ""), ++ (263, ""), ++ (266, ""), ++ (281, "îŽĒ"), ++ (284, "îŽĒ"), ++ (293, ""), ++ (296, ""), ++ (299, ""), ++ (302, ""), ++ (305, ""), ++ (308, ""), ++ (311, "îŽĒ"), ++ (314, "îŽĒ"), ++ (317, "îŽĒ"), ++ (320, ""), ++ (323, ""), ++ (326, ""), ++ (329, ""), ++ (332, ""), ++ (335, ""), ++ (338, ""), ++ (350, "îŽĒ"), ++ (353, ""), ++ (356, ""), ++ (359, ""), ++ (362, ""), ++ (365, ""), ++ (368, ""), ++ (371, ""), ++ (374, ""), ++ (377, "îŽĒ"), ++ (386, ""), ++ (389, ""), ++ (392, "îĨ"), ++ (395, ""), + ]; + + pub const ICON_PLACEHOLDER: &str = "{ICON}"; +diff --git a/src/main.rs b/src/main.rs +index 6ac4654..8f9ed6a 100644 +--- a/src/main.rs ++++ b/src/main.rs +@@ -175,20 +175,20 @@ fn main() { + + if args.fahrenheit { + tooltip += &format!( +- "âŦ†ī¸ {}° âŦ‡ī¸ {}° ", ++ "ķ°¸ƒ {}° ķ°¸‚ {}° ", + day["maxtempF"].as_str().unwrap(), + day["mintempF"].as_str().unwrap(), + ); + } else { + tooltip += &format!( +- "âŦ†ī¸ {}° âŦ‡ī¸ {}° ", ++ "ķ°¸ƒ {}° ķ°¸‚ {}° ", + day["maxtempC"].as_str().unwrap(), + day["mintempC"].as_str().unwrap(), + ); + }; + + tooltip += &format!( +- "🌅 {} 🌇 {}\n", ++ " {}  {}\n", + format_ampm_time(day, "sunrise", args.ampm), + format_ampm_time(day, "sunset", args.ampm), + ); -- cgit v1.2.3