From e43eb1177872f52e949fb5f0f93396ed94b0d093 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 2 Aug 2026 14:48:29 +0200 Subject: move to chezmoi --- .../share/mode/switch.d/executable_chromium | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 home/dot_local/share/mode/switch.d/executable_chromium (limited to 'home/dot_local/share/mode/switch.d/executable_chromium') diff --git a/home/dot_local/share/mode/switch.d/executable_chromium b/home/dot_local/share/mode/switch.d/executable_chromium new file mode 100644 index 0000000..0ea2caa --- /dev/null +++ b/home/dot_local/share/mode/switch.d/executable_chromium @@ -0,0 +1,48 @@ +#!/bin/sh +[ $no_cfg -eq 1 ] && return + +mkcd "$XDG_CACHE_HOME/mode/chromium" + +rm -f 'Cached Theme.pak' + +magick -size 100x100 "xc:$bg" 'bg.png' +bg_alt=$(mix_rgb $bg $color0 0.65) +fg_alt=$(mix_rgb $fg $color15 0.35) + +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' +{ + "description": "colorscheme generated by mode", + "manifest_version": 2, + "name": "mode theme", + "theme": { + "images": { "theme_frame": "bg.png" }, + "colors": { + "frame": $bg_alt, + "button_background": $fg, + "ntp_background": $bg, + "ntp_text": $bg_alt, + "toolbar": $bg, + "toolbar_button_icon": $fg, + "tab_background_text": $fg_alt, + "tab_background_text_inactive": $fg_alt, + "tab_background_text_incognito": $fg_alt, + "tab_background_text_incognito_inactive": $fg_alt, + "bookmark_text": $fg, + "tab_text": $fg + }, + "tints": { + "buttons": [ -1, -1, -1 ], + "frame_inactive": [ -1, -1, -1 ], + "frame_incognito": [ -1, -1, -1 ], + "frame_incognito_inactive": [ -1, -1, -1 ] + } + }, + "version": "2" +} +EOF + -- cgit v1.2.3