aboutsummaryrefslogtreecommitdiff
path: root/.config/mode
diff options
context:
space:
mode:
Diffstat (limited to '.config/mode')
-rwxr-xr-x.config/mode/switch.d/chromium (renamed from .config/mode/switch.d/chrome)25
1 files changed, 13 insertions, 12 deletions
diff --git a/.config/mode/switch.d/chrome b/.config/mode/switch.d/chromium
index 4c596c3..532510a 100755
--- a/.config/mode/switch.d/chrome
+++ b/.config/mode/switch.d/chromium
@@ -1,15 +1,17 @@
#!/bin/sh
-(
- cd ~/.cache/wal/chromium
- rm -f 'Cached Theme.pak' 'bg.png' 'manifest.json'
- convert -size 100x100 "xc:$bg" bg.png
- bg_alt=$(mix_rgb $color7 $bg 0.20)
- fg_alt=$(mix_rgb $color15 $fg 0.60)
- bg="$(hex_to_rgb_array "$bg")"
- fg="$(hex_to_rgb_array "$fg")"
- bg_alt="$(hex_to_rgb_array "$bg_alt")"
- fg_alt="$(hex_to_rgb_array "$fg_alt")"
- cat << EOF > manifest.json
+PREFIX="$XDG_DATA_HOME/mode/chromium"
+
+mkdir -p "$PREFIX"
+rm -f "$PREFIX/Cached Theme.pak"
+
+convert -size 100x100 "xc:$bg" "$PREFIX/bg.png"
+bg_alt=$(mix_rgb $color7 $bg 0.20)
+fg_alt=$(mix_rgb $color15 $fg 0.60)
+bg="$(hex_to_rgb_array "$bg")"
+fg="$(hex_to_rgb_array "$fg")"
+bg_alt="$(hex_to_rgb_array "$bg_alt")"
+fg_alt="$(hex_to_rgb_array "$fg_alt")"
+cat << EOF > "$PREFIX/manifest.json"
{
"description": "colorscheme generated by mode",
"manifest_version": 2,
@@ -40,5 +42,4 @@
"version": "2"
}
EOF
-)