diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-09-23 11:39:48 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-09-23 11:39:48 +0200 |
commit | df924a12accc06b0fdfd55f4bc82c2238f0c7181 (patch) | |
tree | 8c7f9ba0b87a9cb7628dd2745a3a0f196f0ae08d | |
parent | 4028eaa4f3ee2b5d570a3f0025b3eba798041cf9 (diff) |
start page color switch
-rw-r--r-- | .config/startpage/index.html | 1 | ||||
-rw-r--r-- | .config/startpage/style.css (renamed from .config/startpage/style.css##template) | 19 | ||||
-rwxr-xr-x | .local/share/bin/mode | 27 |
3 files changed, 28 insertions, 19 deletions
diff --git a/.config/startpage/index.html b/.config/startpage/index.html index 6a46387..1a8ed1b 100644 --- a/.config/startpage/index.html +++ b/.config/startpage/index.html @@ -5,6 +5,7 @@ <meta http-equiv='X-UA-Compatible' content='IE=edge'> <title>New Tab</title> <meta name='viewport' content='width=device-width, initial-scale=1'> + <link rel='stylesheet' type='text/css' media='screen' href='colors.css'> <link rel='stylesheet' type='text/css' media='screen' href='style.css'> <script src="jquery.min.js"></script> <script src="script.js" defer></script> diff --git a/.config/startpage/style.css##template b/.config/startpage/style.css index 26e4fba..d7aa8d6 100644 --- a/.config/startpage/style.css##template +++ b/.config/startpage/style.css @@ -1,5 +1,4 @@ :root { -{% if yadm.hostname == "thoncc" %} --color0: #fdf9f7; --color1: #8c627a; --color2: #628c6e; @@ -16,24 +15,6 @@ --color13: #5a5072; --color14: #506872; --color15: #393b3b; -{% else %} - --color0: #0f1419; - --color1: #ff3f4f; - --color2: #81f900; - --color3: #ffd945; - --color4: #45a1ed; - --color5: #ef47c5; - --color6: #19d1e5; - --color7: #f8f8f0; - --color8: #495162; - --color9: #f95c76; - --color10: #7dfc5a; - --color11: #f9ce70; - --color12: #6395f2; - --color13: #ea79fc; - --color14: #88f0fc; - --color15: #fffff4; -{% endif %} } html, body { diff --git a/.local/share/bin/mode b/.local/share/bin/mode index 3af37c2..654f0fe 100755 --- a/.local/share/bin/mode +++ b/.local/share/bin/mode @@ -103,6 +103,32 @@ EOF echo "$conf" | cat ~/.local/share/fcitx5/themes/loek/base.conf - > ~/.local/share/fcitx5/themes/loek/theme.conf } +switch_startpage() { + read -r -d '' conf << EOF +/* AUTOMATICALLY GENERATED, DO NOT EDIT */ + +:root { + --color0: $(get_color color0); + --color1: $(get_color color1); + --color2: $(get_color color2); + --color3: $(get_color color3); + --color4: $(get_color color4); + --color5: $(get_color color5); + --color6: $(get_color color6); + --color7: $(get_color color7); + --color8: $(get_color color8); + --color9: $(get_color color9); + --color10: $(get_color color10); + --color11: $(get_color color11); + --color12: $(get_color color12); + --color13: $(get_color color13); + --color14: $(get_color color14); + --color15: $(get_color color15); +} +EOF + echo "$conf" > ~/.config/startpage/colors.css +} + switch_chrome() { cd ~/.cache/wal/chromium rm -f Cached Theme.pak bg.png manifest.json @@ -162,6 +188,7 @@ switch_cfgs() { switch_gtk $1 switch_fcitx5 $1 switch_chrome $1 + switch_startpage $1 mkdir -p ~/.local/share/mode echo $1 > ~/.local/share/mode/active |