diff options
Diffstat (limited to 'overlays/wttrbar')
-rw-r--r-- | overlays/wttrbar/default.nix | 7 | ||||
-rw-r--r-- | overlays/wttrbar/icons.patch | 145 |
2 files changed, 152 insertions, 0 deletions
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 @@ | |||
1 | { prev, ... }: { | ||
2 | wttrbar = prev.wttrbar.overrideAttrs (oldAttrs: { | ||
3 | patches = (oldAttrs.patches or []) ++ [ | ||
4 | ./icons.patch | ||
5 | ]; | ||
6 | }); | ||
7 | } | ||
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 @@ | |||
1 | diff --git a/src/constants.rs b/src/constants.rs | ||
2 | index 81b1926..36e26ac 100644 | ||
3 | --- a/src/constants.rs | ||
4 | +++ b/src/constants.rs | ||
5 | @@ -1,64 +1,52 @@ | ||
6 | pub const WEATHER_CODES: &[(i32, &str)] = &[ | ||
7 | - (113, "âī¸"), | ||
8 | - (116, "đ¤ī¸"), | ||
9 | - (119, "âī¸"), | ||
10 | - (122, "đĨī¸"), | ||
11 | - (143, "đĢī¸"), | ||
12 | - (176, "đĻī¸"), | ||
13 | - (179, "đ§ī¸"), | ||
14 | - (182, "đ¨ī¸"), | ||
15 | - (185, "đ¨ī¸"), | ||
16 | - (200, "đŠī¸"), | ||
17 | - (227, "âī¸"), | ||
18 | - (230, "âī¸"), | ||
19 | - (248, "đĢī¸"), | ||
20 | - (260, "đĢī¸"), | ||
21 | - (263, "đ§ī¸"), | ||
22 | - (266, "đ§ī¸"), | ||
23 | - (281, "đĻī¸"), | ||
24 | - (284, "đĻī¸"), | ||
25 | - (293, "đ§ī¸"), | ||
26 | - (296, "đ§ī¸"), | ||
27 | - (299, "đ§ī¸"), | ||
28 | - (302, "đ§ī¸"), | ||
29 | - (305, "đ§ī¸"), | ||
30 | - (308, "đ§ī¸"), | ||
31 | - (311, "đ§ī¸"), | ||
32 | - (314, "đ§ī¸"), | ||
33 | - (317, "đ§ī¸"), | ||
34 | - (320, "đ¨ī¸"), | ||
35 | - (323, "đ¨ī¸"), | ||
36 | - (326, "đ¨ī¸"), | ||
37 | - (329, "đ¨ī¸"), | ||
38 | - (332, "đ¨ī¸"), | ||
39 | - (335, "đ¨ī¸"), | ||
40 | - (338, "đ¨ī¸"), | ||
41 | - (350, "đ¨ī¸"), | ||
42 | - (353, "đ§ī¸"), | ||
43 | - (356, "đ§ī¸"), | ||
44 | - (359, "đ§ī¸"), | ||
45 | - (362, "đ¨ī¸"), | ||
46 | - (365, "đ¨ī¸"), | ||
47 | - (368, "đ¨ī¸"), | ||
48 | - (371, "đ¨ī¸"), | ||
49 | - (374, "đ¨ī¸"), | ||
50 | - (377, "đ¨ī¸"), | ||
51 | - (386, "đŠī¸"), | ||
52 | - (389, "đ¨ī¸"), | ||
53 | - (392, "đ¨ī¸"), | ||
54 | - (395, "đ¨ī¸"), | ||
55 | - (398, "đ¨ī¸"), | ||
56 | - (401, "đ¨ī¸"), | ||
57 | - (404, "đ¨ī¸"), | ||
58 | - (407, "đ¨ī¸"), | ||
59 | - (410, "đ¨ī¸"), | ||
60 | - (413, "đ¨ī¸"), | ||
61 | - (416, "đ¨ī¸"), | ||
62 | - (419, "đ¨ī¸"), | ||
63 | - (422, "đ¨ī¸"), | ||
64 | - (425, "đ¨ī¸"), | ||
65 | - (428, "đ¨ī¸"), | ||
66 | - (431, "đ¨ī¸"), | ||
67 | + (113, "î"), | ||
68 | + (116, "î"), | ||
69 | + (119, "îŊ"), | ||
70 | + (122, "î"), | ||
71 | + (143, "î"), | ||
72 | + (176, "î"), | ||
73 | + (179, "î"), | ||
74 | + (182, "îĒ"), | ||
75 | + (185, "îĒ"), | ||
76 | + (200, "î"), | ||
77 | + (227, "î"), | ||
78 | + (230, "î"), | ||
79 | + (248, "î"), | ||
80 | + (260, "î"), | ||
81 | + (263, "î"), | ||
82 | + (266, "î"), | ||
83 | + (281, "îĒ"), | ||
84 | + (284, "îĒ"), | ||
85 | + (293, "î"), | ||
86 | + (296, "î"), | ||
87 | + (299, "î"), | ||
88 | + (302, "î"), | ||
89 | + (305, "î"), | ||
90 | + (308, "î"), | ||
91 | + (311, "îĒ"), | ||
92 | + (314, "îĒ"), | ||
93 | + (317, "îĒ"), | ||
94 | + (320, "î"), | ||
95 | + (323, "î"), | ||
96 | + (326, "î"), | ||
97 | + (329, "î"), | ||
98 | + (332, "î"), | ||
99 | + (335, "î"), | ||
100 | + (338, "î"), | ||
101 | + (350, "îĒ"), | ||
102 | + (353, "î"), | ||
103 | + (356, "î"), | ||
104 | + (359, "î"), | ||
105 | + (362, "î"), | ||
106 | + (365, "î"), | ||
107 | + (368, "î"), | ||
108 | + (371, "î"), | ||
109 | + (374, "î"), | ||
110 | + (377, "îĒ"), | ||
111 | + (386, "î"), | ||
112 | + (389, "î"), | ||
113 | + (392, "îĨ"), | ||
114 | + (395, "î"), | ||
115 | ]; | ||
116 | |||
117 | pub const ICON_PLACEHOLDER: &str = "{ICON}"; | ||
118 | diff --git a/src/main.rs b/src/main.rs | ||
119 | index 6ac4654..8f9ed6a 100644 | ||
120 | --- a/src/main.rs | ||
121 | +++ b/src/main.rs | ||
122 | @@ -175,20 +175,20 @@ fn main() { | ||
123 | |||
124 | if args.fahrenheit { | ||
125 | tooltip += &format!( | ||
126 | - "âŦī¸ {}° âŦī¸ {}° ", | ||
127 | + "ķ°¸ {}° ķ°¸ {}° ", | ||
128 | day["maxtempF"].as_str().unwrap(), | ||
129 | day["mintempF"].as_str().unwrap(), | ||
130 | ); | ||
131 | } else { | ||
132 | tooltip += &format!( | ||
133 | - "âŦī¸ {}° âŦī¸ {}° ", | ||
134 | + "ķ°¸ {}° ķ°¸ {}° ", | ||
135 | day["maxtempC"].as_str().unwrap(), | ||
136 | day["mintempC"].as_str().unwrap(), | ||
137 | ); | ||
138 | }; | ||
139 | |||
140 | tooltip += &format!( | ||
141 | - "đ {} đ {}\n", | ||
142 | + "î {} î {}\n", | ||
143 | format_ampm_time(day, "sunrise", args.ampm), | ||
144 | format_ampm_time(day, "sunset", args.ampm), | ||
145 | ); | ||