Skip to content

Commit

Permalink
Merge pull request #64 from SqrtMinusOne/main
Browse files Browse the repository at this point in the history
Fix check for missing colors in xresources
  • Loading branch information
darrenburns authored Jul 26, 2024
2 parents 15fff17 + 64e6c1a commit ecdbd1a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/posting/xresources.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import itertools
import subprocess
from typing import Any

Expand Down Expand Up @@ -33,11 +34,11 @@ def load_xresources_themes() -> dict[str, Theme]:
for kwarg in XRDB_MAPPING.get(name.strip(), []):
supplied_colors[kwarg] = value.strip()

missing_colors = set(XRDB_MAPPING.values()) - supplied_colors.keys()
missing_colors = (
set(itertools.chain(*XRDB_MAPPING.values())) - supplied_colors.keys()
)
if missing_colors:
missing_colors_string = ", ".join(
[", ".join(color) for color in missing_colors]
)
missing_colors_string = ", ".join(missing_colors)
raise RuntimeError(f"Missing colors from xrdb: {missing_colors_string}")

return {
Expand Down

0 comments on commit ecdbd1a

Please sign in to comment.