diff options
| author | Pavel Egorov <[email protected]> | 2025-12-19 08:16:13 +0300 |
|---|---|---|
| committer | Pavel Egorov <[email protected]> | 2025-12-19 08:17:02 +0300 |
| commit | 247edf39ddd9804f4b399377c57bb927941112eb (patch) | |
| tree | b123887e183baa4ca629d04306db6e4a7138b4cd /.config/fastfetch | |
| parent | fb971217291ca77a6d5bbcfc352d6292d09478bc (diff) | |
| download | dotfiles-247edf39ddd9804f4b399377c57bb927941112eb.tar.gz dotfiles-247edf39ddd9804f4b399377c57bb927941112eb.zip | |
[fastfetch] add colors module and breaks
Diffstat (limited to '')
| -rw-r--r-- | .config/fastfetch/confgen.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/.config/fastfetch/confgen.py b/.config/fastfetch/confgen.py index c0fd979..cc66bfd 100644 --- a/.config/fastfetch/confgen.py +++ b/.config/fastfetch/confgen.py | |||
| @@ -17,7 +17,7 @@ def flatten(obj) -> Iterator[Any]: | |||
| 17 | 17 | ||
| 18 | class Node: | 18 | class Node: |
| 19 | module: str | 19 | module: str |
| 20 | key: str | 20 | key: Optional[str] |
| 21 | format: Optional[str] | 21 | format: Optional[str] |
| 22 | text: Optional[str] | 22 | text: Optional[str] |
| 23 | additional_entries: Optional[dict[str, type[Any]]] | 23 | additional_entries: Optional[dict[str, type[Any]]] |
| @@ -27,7 +27,7 @@ class Node: | |||
| 27 | def __init__( | 27 | def __init__( |
| 28 | self, | 28 | self, |
| 29 | module, | 29 | module, |
| 30 | key, | 30 | key=None, |
| 31 | format=None, | 31 | format=None, |
| 32 | additional_entries=None, | 32 | additional_entries=None, |
| 33 | text=None, | 33 | text=None, |
| @@ -50,7 +50,7 @@ class Node: | |||
| 50 | def construct_module(self) -> dict[str, type[Any]]: | 50 | def construct_module(self) -> dict[str, type[Any]]: |
| 51 | 51 | ||
| 52 | module = {"type": self.module} | 52 | module = {"type": self.module} |
| 53 | key = {"key": self.key} | 53 | key = {"key": self.key} if self.key else {} |
| 54 | format = {"format": self.format} if self.format else {} | 54 | format = {"format": self.format} if self.format else {} |
| 55 | text = {"text": self.text} if self.text else {} | 55 | text = {"text": self.text} if self.text else {} |
| 56 | additional_entries = self.additional_entries if self.additional_entries else {} | 56 | additional_entries = self.additional_entries if self.additional_entries else {} |
| @@ -134,6 +134,8 @@ graphics = { | |||
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | modules = { | 136 | modules = { |
| 137 | "break": Node("break"), | ||
| 138 | "colors": Node("colors", additional_entries={"symbol": "star"}), | ||
| 137 | "software_root": Node("custom", "Software", font_effect=font_effects["software"]), | 139 | "software_root": Node("custom", "Software", font_effect=font_effects["software"]), |
| 138 | "os": Node("os", "OS", font_effect=font_effects["os"]), | 140 | "os": Node("os", "OS", font_effect=font_effects["os"]), |
| 139 | "bootmgr": Node("bootmgr", "Boot", format="{name}"), | 141 | "bootmgr": Node("bootmgr", "Boot", format="{name}"), |
| @@ -245,6 +247,7 @@ roots = [ | |||
| 245 | modules["nodejs"], | 247 | modules["nodejs"], |
| 246 | ), | 248 | ), |
| 247 | ), | 249 | ), |
| 250 | modules["break"], | ||
| 248 | modules["hardware_root"].add_children( | 251 | modules["hardware_root"].add_children( |
| 249 | modules["chassis"].add_children( | 252 | modules["chassis"].add_children( |
| 250 | modules["host"], | 253 | modules["host"], |
| @@ -262,6 +265,7 @@ roots = [ | |||
| 262 | modules["gamepad"], | 265 | modules["gamepad"], |
| 263 | ), | 266 | ), |
| 264 | ), | 267 | ), |
| 268 | modules["break"], | ||
| 265 | modules["network_root"].add_children( | 269 | modules["network_root"].add_children( |
| 266 | modules["bluetooth"], | 270 | modules["bluetooth"], |
| 267 | modules["dns"], | 271 | modules["dns"], |
| @@ -269,6 +273,7 @@ roots = [ | |||
| 269 | # modules["public_ip"], | 273 | # modules["public_ip"], |
| 270 | modules["wifi"], | 274 | modules["wifi"], |
| 271 | ), | 275 | ), |
| 276 | modules["break"], | ||
| 272 | modules["misc_root"].add_children( | 277 | modules["misc_root"].add_children( |
| 273 | modules["browser"], | 278 | modules["browser"], |
| 274 | modules["datetime"], | 279 | modules["datetime"], |
| @@ -276,6 +281,8 @@ roots = [ | |||
| 276 | modules["os_age"], | 281 | modules["os_age"], |
| 277 | modules["version"], | 282 | modules["version"], |
| 278 | ), | 283 | ), |
| 284 | modules["break"], | ||
| 285 | modules["colors"], | ||
| 279 | ] | 286 | ] |
| 280 | 287 | ||
| 281 | 288 | ||
