diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-03-09 00:04:46 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-03-09 00:04:46 +0100 |
commit | 2dc5ec7085e1c1bbc406f2089dddf8f6e1d9d206 (patch) | |
tree | 922afe93d8c8fb5bcf1d46cd3d6a732f3ce60f4a /.config/mode/switch.d | |
parent | dce8fe36eb7f550f648cb83ab890ce638ca819d0 (diff) |
more update (auto install betterdiscord)
Diffstat (limited to '.config/mode/switch.d')
-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 -) |