|
| 1 | +#!/bin/bash |
| 2 | +# USAGE: This just loops through colours and template |
| 3 | + |
| 4 | +######## INIT VARIABLES ######## |
| 5 | + |
| 6 | +themes=("BLUEBERRY" "MINT" "LIME" "BANANA" "ORANGE" "STRAWBERRY" "BUBBLEGUM" "GRAPE" "COCOA" "SLATE" "SILVER" "BLACK" "LATTE") |
| 7 | + |
| 8 | +# | tr '[:upper:]' '[:lower:]' |
| 9 | + |
| 10 | +######## SCRIPT ######## |
| 11 | + |
| 12 | +for accent_color in ${themes[*]}; |
| 13 | +do |
| 14 | + |
| 15 | +lessshouting="$(echo $accent_color | tr '[:upper:]' '[:lower:]')" |
| 16 | +echo $lessshouting |
| 17 | +stylesheet="${lessshouting}.css" |
| 18 | + |
| 19 | +cat << EOF > $stylesheet |
| 20 | +
|
| 21 | +/* |
| 22 | +* Copyright (c) 2017-2024 Lains |
| 23 | +* Copyright (c) 2025 Stella (teamcons on GitHub) and the Ellie_Commons community |
| 24 | +* |
| 25 | +
|
| 26 | +/* Autogenerated theme for ${accent_color} |
| 27 | +Accent colors are defined in the elementary OS stylesheet and like @BLUEBERRY_900 |
| 28 | +The higher the number the stronger the color. |
| 29 | +
|
| 30 | +Normal accent color for, for example BANANANA, is simply |
| 31 | +mix(@BANANA_500, @BANANA_700, 0.3); |
| 32 | +
|
| 33 | +we cannot simply replace the values of @accent_color_* because css errors and nothing happens |
| 34 | +Alas. |
| 35 | +*/ |
| 36 | +
|
| 37 | +
|
| 38 | +window.${accent_color} { |
| 39 | + background-color: @${accent_color}_100; |
| 40 | +} |
| 41 | +
|
| 42 | +window.${accent_color} undershoot.top { |
| 43 | + background: |
| 44 | + linear-gradient( |
| 45 | + @${accent_color}_100 0%, |
| 46 | + alpha(@${accent_color}_100, 0) 50% |
| 47 | + ); |
| 48 | +} |
| 49 | +
|
| 50 | +window.${accent_color} undershoot.bottom { |
| 51 | + background: |
| 52 | + linear-gradient( |
| 53 | + alpha(@${accent_color}_100, 0) 50%, |
| 54 | + @${accent_color}_100 100% |
| 55 | + ); |
| 56 | +} |
| 57 | +
|
| 58 | +window.${accent_color} overshoot.top { |
| 59 | +background: linear-gradient(to top, alpha(@${accent_color}_900, 0) 80%, alpha(@${accent_color}_900, 0.25) 100%); } |
| 60 | +
|
| 61 | +window.${accent_color} overshoot.right { |
| 62 | +background: linear-gradient(to right, alpha(@${accent_color}_900, 0) 80%, alpha(@${accent_color}_900, 0.25) 100%); } |
| 63 | +
|
| 64 | +window.${accent_color} overshoot.bottom { |
| 65 | +background: linear-gradient(to bottom, alpha(@${accent_color}_900, 0) 80%, alpha(@${accent_color}_900, 0.25) 100%); } |
| 66 | +
|
| 67 | +window.${accent_color} overshoot.left { |
| 68 | +background: linear-gradient(to left, alpha(@${accent_color}_900, 0) 80%, alpha(@${accent_color}_900, 0.25) 100%); } |
| 69 | +
|
| 70 | +window.${accent_color} textview text selection, |
| 71 | +window.${accent_color} editablelabel text selection { |
| 72 | + color: shade(@${accent_color}_100, 1.88); |
| 73 | + background-color: @${accent_color}_900; |
| 74 | +} |
| 75 | +
|
| 76 | +window.${accent_color} titlebar, |
| 77 | +window.${accent_color} titlebar image, |
| 78 | +window.${accent_color} actionbar, |
| 79 | +window.${accent_color} actionbar image, |
| 80 | +window.${accent_color} windowcontrols, |
| 81 | +window.${accent_color} windowcontrols image, |
| 82 | +window.${accent_color} { |
| 83 | + color: @${accent_color}_900; |
| 84 | +} |
| 85 | +
|
| 86 | +window.${accent_color} titlebar, |
| 87 | +window.${accent_color} textview, |
| 88 | +window.${accent_color} textview text, |
| 89 | +window.${accent_color} editablelabel.editing text { |
| 90 | + background-color: transparent; |
| 91 | + border-bottom-color: @${accent_color}_100; |
| 92 | + color: shade(@${accent_color}_900, 0.77); |
| 93 | +} |
| 94 | +
|
| 95 | +/* Fix the emoticon entry having note color background */ |
| 96 | +window.${accent_color} entry { |
| 97 | + background-color: white; |
| 98 | + color: black; |
| 99 | +} |
| 100 | +
|
| 101 | +window.${accent_color} editablelabel { |
| 102 | + color: @${accent_color}_900; |
| 103 | +} |
| 104 | +
|
| 105 | +window.${accent_color} editablelabel:hover, |
| 106 | +window.${accent_color} editablelabel:focus { |
| 107 | + border: 1px solid alpha(mix(@${accent_color}_500, @${accent_color}_700, 0.3),0.7); |
| 108 | +} |
| 109 | +
|
| 110 | +window.${accent_color} editablelabel.editing { |
| 111 | + border: 1px solid mix(@${accent_color}_500, @${accent_color}_700, 0.3); |
| 112 | + box-shadow: inset 0 0 2px 2px mix(@${accent_color}_100, @${accent_color}_500, 0.3); |
| 113 | +} |
| 114 | +
|
| 115 | +window.${accent_color}:backdrop textview text, |
| 116 | +window.${accent_color}:backdrop titlebar, |
| 117 | +window.${accent_color}:backdrop editablelabel, |
| 118 | +window.${accent_color}:backdrop actionbar, |
| 119 | +window.${accent_color}:backdrop actionbar image, |
| 120 | +window.${accent_color}:backdrop windowcontrols, |
| 121 | +window.${accent_color}:backdrop windowcontrols image { |
| 122 | + color: shade(@${accent_color}_500, 0.77); |
| 123 | +} |
| 124 | +
|
| 125 | +EOF |
| 126 | + |
| 127 | +done |
0 commit comments