diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/udt-accent | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/bin/udt-accent b/bin/udt-accent index 3cb9438..391664b 100755 --- a/bin/udt-accent +++ b/bin/udt-accent @@ -9,6 +9,7 @@ Usage: udt-accent <wallpaper-path> The extraction deliberately calls pywal's colorz backend directly rather than running `wal -i`, because `wal -i` rewrites the whole ~/.cache/wal directory +(which this no longer writes to, but pywal still would) including the terminal's ANSI colors. See the design spec for why that matters. """ @@ -29,17 +30,22 @@ from udt_colors import ACCENTS, FALLBACK, PALETTE, SCHEME # noqa: E402 MIN_CHROMA = 10.0 -OUTPUT = Path.home() / ".cache" / "wal" / "udt-accent.rasi" -BORDER_OUTPUT = Path.home() / ".cache" / "wal" / "udt-border.lua" +CACHE = Path.home() / ".cache" / "udt" +OUTPUT = CACHE / "udt-accent.rasi" +BORDER_OUTPUT = CACHE / "udt-border.lua" SUBLIME = (Path.home() / ".config" / "sublime-text" / "Packages" / "User" / "udt.sublime-color-scheme") -QML_OUTPUT = Path.home() / ".cache" / "wal" / "udt-palette.qml" +QML_OUTPUT = CACHE / "udt-palette.qml" # The installed rofi palette, itself generated by udt-palette. Read rather than # duplicated so the QML singleton carries exactly the colours rofi uses, under # the same names. PALETTE_RASI = Path.home() / ".config" / "rofi" / "udt" / "palette.rasi" -COLORS_JSON = Path.home() / ".cache" / "wal" / "colors.json" +# pywalfox hardcodes <cache>/wal/colors.json and honours only XDG_CACHE_HOME, +# which would move every cache, so this one file is written where it looks. +# install.sh symlinks ~/.cache/wal/colors.json here, so the real file lives +# with the rest of the palette and ~/.cache/wal holds nothing but that link. +COLORS_JSON = CACHE / "colors.json" def write_atomic(path, content): @@ -238,7 +244,7 @@ def write_colors_json(name, image): doc = { # Resolved, not as passed: wallp gives the real file but a caller may - # give ~/.cache/wal/wpaper, the symlink to it. Same wallpaper either + # give ~/.cache/udt/wpaper, the symlink to it. Same wallpaper either # way, so record one spelling. "wallpaper": os.path.realpath(image), "alpha": "100", |
