From 09de308050836733544a32165fac529e4d2e34bb Mon Sep 17 00:00:00 2001 From: Tulip Blossom Date: Thu, 5 Dec 2024 17:30:17 -0300 Subject: [PATCH] fix(accent-color): light theme for accent colored motd (#2008) --- system_files/shared/usr/libexec/ublue-motd | 12 ++- .../ublue-os/motd/themes/{ => dark}/blue.json | 0 .../motd/themes/{ => dark}/green.json | 0 .../motd/themes/{ => dark}/orange.json | 0 .../ublue-os/motd/themes/{ => dark}/pink.json | 0 .../motd/themes/{ => dark}/purple.json | 0 .../ublue-os/motd/themes/{ => dark}/red.json | 0 .../motd/themes/{ => dark}/slate.json | 0 .../ublue-os/motd/themes/{ => dark}/teal.json | 0 .../motd/themes/{ => dark}/yellow.json | 0 .../ublue-os/motd/themes/light/blue.json | 90 +++++++++++++++++++ .../ublue-os/motd/themes/light/green.json | 90 +++++++++++++++++++ .../ublue-os/motd/themes/light/orange.json | 90 +++++++++++++++++++ .../ublue-os/motd/themes/light/pink.json | 90 +++++++++++++++++++ .../ublue-os/motd/themes/light/purple.json | 90 +++++++++++++++++++ .../share/ublue-os/motd/themes/light/red.json | 90 +++++++++++++++++++ .../ublue-os/motd/themes/light/slate.json | 90 +++++++++++++++++++ .../ublue-os/motd/themes/light/teal.json | 90 +++++++++++++++++++ .../ublue-os/motd/themes/light/yellow.json | 90 +++++++++++++++++++ 19 files changed, 821 insertions(+), 1 deletion(-) rename system_files/shared/usr/share/ublue-os/motd/themes/{ => dark}/blue.json (100%) rename system_files/shared/usr/share/ublue-os/motd/themes/{ => dark}/green.json (100%) rename system_files/shared/usr/share/ublue-os/motd/themes/{ => dark}/orange.json (100%) rename system_files/shared/usr/share/ublue-os/motd/themes/{ => dark}/pink.json (100%) rename system_files/shared/usr/share/ublue-os/motd/themes/{ => dark}/purple.json (100%) rename system_files/shared/usr/share/ublue-os/motd/themes/{ => dark}/red.json (100%) rename system_files/shared/usr/share/ublue-os/motd/themes/{ => dark}/slate.json (100%) rename system_files/shared/usr/share/ublue-os/motd/themes/{ => dark}/teal.json (100%) rename system_files/shared/usr/share/ublue-os/motd/themes/{ => dark}/yellow.json (100%) create mode 100644 system_files/shared/usr/share/ublue-os/motd/themes/light/blue.json create mode 100644 system_files/shared/usr/share/ublue-os/motd/themes/light/green.json create mode 100644 system_files/shared/usr/share/ublue-os/motd/themes/light/orange.json create mode 100644 system_files/shared/usr/share/ublue-os/motd/themes/light/pink.json create mode 100644 system_files/shared/usr/share/ublue-os/motd/themes/light/purple.json create mode 100644 system_files/shared/usr/share/ublue-os/motd/themes/light/red.json create mode 100644 system_files/shared/usr/share/ublue-os/motd/themes/light/slate.json create mode 100644 system_files/shared/usr/share/ublue-os/motd/themes/light/teal.json create mode 100644 system_files/shared/usr/share/ublue-os/motd/themes/light/yellow.json diff --git a/system_files/shared/usr/libexec/ublue-motd b/system_files/shared/usr/libexec/ublue-motd index de1bc2ffc13..8271eefba08 100755 --- a/system_files/shared/usr/libexec/ublue-motd +++ b/system_files/shared/usr/libexec/ublue-motd @@ -32,9 +32,19 @@ KEY_WARN_ESCAPED=$(escape "$KEY_WARN") THEME=$(gsettings get org.gnome.desktop.interface accent-color || echo "'slate'") THEME=${THEME//\'/} +COLOR_SCHEME=$(gsettings get org.gnome.desktop.interface color-scheme || echo "'prefer-dark'") +COLOR_SCHEME=${COLOR_SCHEME//\'/} +case $COLOR_SCHEME in + "default") + COLOR_SCHEME="light" + ;; + *) + COLOR_SCHEME="dark" + ;; +esac sed -e "s/%IMAGE_NAME%/$IMAGE_NAME_ESCAPED/g" \ -e "s/%IMAGE_TAG%/$IMAGE_TAG_ESCAPED/g" \ -e "s/%TIP%/$TIP_ESCAPED/g" \ -e "s/%KEY_WARN%/$KEY_WARN_ESCAPED/g" \ - /usr/share/ublue-os/motd/bluefin.md | tr '~' '\n' | /usr/bin/glow -s /usr/share/ublue-os/motd/themes/$THEME.json -w 78 - + /usr/share/ublue-os/motd/bluefin.md | tr '~' '\n' | /usr/bin/glow -s /usr/share/ublue-os/motd/themes/$COLOR_SCHEME/$THEME.json -w 78 - diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/blue.json b/system_files/shared/usr/share/ublue-os/motd/themes/dark/blue.json similarity index 100% rename from system_files/shared/usr/share/ublue-os/motd/themes/blue.json rename to system_files/shared/usr/share/ublue-os/motd/themes/dark/blue.json diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/green.json b/system_files/shared/usr/share/ublue-os/motd/themes/dark/green.json similarity index 100% rename from system_files/shared/usr/share/ublue-os/motd/themes/green.json rename to system_files/shared/usr/share/ublue-os/motd/themes/dark/green.json diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/orange.json b/system_files/shared/usr/share/ublue-os/motd/themes/dark/orange.json similarity index 100% rename from system_files/shared/usr/share/ublue-os/motd/themes/orange.json rename to system_files/shared/usr/share/ublue-os/motd/themes/dark/orange.json diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/pink.json b/system_files/shared/usr/share/ublue-os/motd/themes/dark/pink.json similarity index 100% rename from system_files/shared/usr/share/ublue-os/motd/themes/pink.json rename to system_files/shared/usr/share/ublue-os/motd/themes/dark/pink.json diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/purple.json b/system_files/shared/usr/share/ublue-os/motd/themes/dark/purple.json similarity index 100% rename from system_files/shared/usr/share/ublue-os/motd/themes/purple.json rename to system_files/shared/usr/share/ublue-os/motd/themes/dark/purple.json diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/red.json b/system_files/shared/usr/share/ublue-os/motd/themes/dark/red.json similarity index 100% rename from system_files/shared/usr/share/ublue-os/motd/themes/red.json rename to system_files/shared/usr/share/ublue-os/motd/themes/dark/red.json diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/slate.json b/system_files/shared/usr/share/ublue-os/motd/themes/dark/slate.json similarity index 100% rename from system_files/shared/usr/share/ublue-os/motd/themes/slate.json rename to system_files/shared/usr/share/ublue-os/motd/themes/dark/slate.json diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/teal.json b/system_files/shared/usr/share/ublue-os/motd/themes/dark/teal.json similarity index 100% rename from system_files/shared/usr/share/ublue-os/motd/themes/teal.json rename to system_files/shared/usr/share/ublue-os/motd/themes/dark/teal.json diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/yellow.json b/system_files/shared/usr/share/ublue-os/motd/themes/dark/yellow.json similarity index 100% rename from system_files/shared/usr/share/ublue-os/motd/themes/yellow.json rename to system_files/shared/usr/share/ublue-os/motd/themes/dark/yellow.json diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/light/blue.json b/system_files/shared/usr/share/ublue-os/motd/themes/light/blue.json new file mode 100644 index 00000000000..e9cfa8d3245 --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/motd/themes/light/blue.json @@ -0,0 +1,90 @@ +{ + "document": { + "margin": 2 + }, + "block_quote": { + "indent": 1, + "indent_token": "│ " + }, + "paragraph": {}, + "list": { + "level_indent": 2 + }, + "heading": { + "block_suffix": "\n", + "color": "33", + "bold": true + }, + "h1": { + "block_prefix": "\n", + "block_suffix": "\n" + }, + "h2": { + "prefix": "▌ " + }, + "h3": { + "prefix": "┃ " + }, + "h4": { + "prefix": "│ " + }, + "h5": { + "prefix": "┆ " + }, + "h6": { + "prefix": "┊ ", + "bold": false + }, + "text": {}, + "strikethrough": { + "crossed_out": true + }, + "emph": { + "italic": true + }, + "strong": { + "bold": true + }, + "hr": { + "color": "33", + "format": "\n──────\n" + }, + "item": { + "block_prefix": "• " + }, + "enumeration": { + "block_prefix": ". " + }, + "task": { + "ticked": "[✓] ", + "unticked": "[ ] " + }, + "link": { + "color": "69", + "underline": true + }, + "link_text": { + "bold": true + }, + "image": { + "underline": true + }, + "image_text": { + "format": "Image: {{.text}}" + }, + "code": { + "prefix": " ", + "suffix": " ", + "color": "33", + "background_color": "254" + }, + "code_block": {}, + "table": {}, + "definition_list": {}, + "definition_term": {}, + "definition_description": { + "block_prefix": "\n🠶 " + }, + "html_block": {}, + "html_span": {} +} diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/light/green.json b/system_files/shared/usr/share/ublue-os/motd/themes/light/green.json new file mode 100644 index 00000000000..b22dbe42a79 --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/motd/themes/light/green.json @@ -0,0 +1,90 @@ +{ + "document": { + "margin": 2 + }, + "block_quote": { + "indent": 1, + "indent_token": "│ " + }, + "paragraph": {}, + "list": { + "level_indent": 2 + }, + "heading": { + "block_suffix": "\n", + "color": "34", + "bold": true + }, + "h1": { + "block_prefix": "\n", + "block_suffix": "\n" + }, + "h2": { + "prefix": "▌ " + }, + "h3": { + "prefix": "┃ " + }, + "h4": { + "prefix": "│ " + }, + "h5": { + "prefix": "┆ " + }, + "h6": { + "prefix": "┊ ", + "bold": false + }, + "text": {}, + "strikethrough": { + "crossed_out": true + }, + "emph": { + "italic": true + }, + "strong": { + "bold": true + }, + "hr": { + "color": "34", + "format": "\n──────\n" + }, + "item": { + "block_prefix": "• " + }, + "enumeration": { + "block_prefix": ". " + }, + "task": { + "ticked": "[✓] ", + "unticked": "[ ] " + }, + "link": { + "color": "28", + "underline": true + }, + "link_text": { + "bold": true + }, + "image": { + "underline": true + }, + "image_text": { + "format": "Image: {{.text}}" + }, + "code": { + "prefix": " ", + "suffix": " ", + "color": "34", + "background_color": "254" + }, + "code_block": {}, + "table": {}, + "definition_list": {}, + "definition_term": {}, + "definition_description": { + "block_prefix": "\n🠶 " + }, + "html_block": {}, + "html_span": {} +} diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/light/orange.json b/system_files/shared/usr/share/ublue-os/motd/themes/light/orange.json new file mode 100644 index 00000000000..b3339724fa7 --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/motd/themes/light/orange.json @@ -0,0 +1,90 @@ +{ + "document": { + "margin": 2 + }, + "block_quote": { + "indent": 1, + "indent_token": "│ " + }, + "paragraph": {}, + "list": { + "level_indent": 2 + }, + "heading": { + "block_suffix": "\n", + "color": "208", + "bold": true + }, + "h1": { + "block_prefix": "\n", + "block_suffix": "\n" + }, + "h2": { + "prefix": "▌ " + }, + "h3": { + "prefix": "┃ " + }, + "h4": { + "prefix": "│ " + }, + "h5": { + "prefix": "┆ " + }, + "h6": { + "prefix": "┊ ", + "bold": false + }, + "text": {}, + "strikethrough": { + "crossed_out": true + }, + "emph": { + "italic": true + }, + "strong": { + "bold": true + }, + "hr": { + "color": "208", + "format": "\n──────\n" + }, + "item": { + "block_prefix": "• " + }, + "enumeration": { + "block_prefix": ". " + }, + "task": { + "ticked": "[✓] ", + "unticked": "[ ] " + }, + "link": { + "color": "130", + "underline": true + }, + "link_text": { + "bold": true + }, + "image": { + "underline": true + }, + "image_text": { + "format": "Image: {{.text}}" + }, + "code": { + "prefix": " ", + "suffix": " ", + "color": "208", + "background_color": "254" + }, + "code_block": {}, + "table": {}, + "definition_list": {}, + "definition_term": {}, + "definition_description": { + "block_prefix": "\n🠶 " + }, + "html_block": {}, + "html_span": {} +} diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/light/pink.json b/system_files/shared/usr/share/ublue-os/motd/themes/light/pink.json new file mode 100644 index 00000000000..3888bcfbba9 --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/motd/themes/light/pink.json @@ -0,0 +1,90 @@ +{ + "document": { + "margin": 2 + }, + "block_quote": { + "indent": 1, + "indent_token": "│ " + }, + "paragraph": {}, + "list": { + "level_indent": 2 + }, + "heading": { + "block_suffix": "\n", + "color": "212", + "bold": true + }, + "h1": { + "block_prefix": "\n", + "block_suffix": "\n" + }, + "h2": { + "prefix": "▌ " + }, + "h3": { + "prefix": "┃ " + }, + "h4": { + "prefix": "│ " + }, + "h5": { + "prefix": "┆ " + }, + "h6": { + "prefix": "┊ ", + "bold": false + }, + "text": {}, + "strikethrough": { + "crossed_out": true + }, + "emph": { + "italic": true + }, + "strong": { + "bold": true + }, + "hr": { + "color": "212", + "format": "\n──────\n" + }, + "item": { + "block_prefix": "• " + }, + "enumeration": { + "block_prefix": ". " + }, + "task": { + "ticked": "[✓] ", + "unticked": "[ ] " + }, + "link": { + "color": "163", + "underline": true + }, + "link_text": { + "bold": true + }, + "image": { + "underline": true + }, + "image_text": { + "format": "Image: {{.text}}" + }, + "code": { + "prefix": " ", + "suffix": " ", + "color": "212", + "background_color": "254" + }, + "code_block": {}, + "table": {}, + "definition_list": {}, + "definition_term": {}, + "definition_description": { + "block_prefix": "\n🠶 " + }, + "html_block": {}, + "html_span": {} +} diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/light/purple.json b/system_files/shared/usr/share/ublue-os/motd/themes/light/purple.json new file mode 100644 index 00000000000..741613a548d --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/motd/themes/light/purple.json @@ -0,0 +1,90 @@ +{ + "document": { + "margin": 2 + }, + "block_quote": { + "indent": 1, + "indent_token": "│ " + }, + "paragraph": {}, + "list": { + "level_indent": 2 + }, + "heading": { + "block_suffix": "\n", + "color": "165", + "bold": true + }, + "h1": { + "block_prefix": "\n", + "block_suffix": "\n" + }, + "h2": { + "prefix": "▌ " + }, + "h3": { + "prefix": "┃ " + }, + "h4": { + "prefix": "│ " + }, + "h5": { + "prefix": "┆ " + }, + "h6": { + "prefix": "┊ ", + "bold": false + }, + "text": {}, + "strikethrough": { + "crossed_out": true + }, + "emph": { + "italic": true + }, + "strong": { + "bold": true + }, + "hr": { + "color": "165", + "format": "\n──────\n" + }, + "item": { + "block_prefix": "• " + }, + "enumeration": { + "block_prefix": ". " + }, + "task": { + "ticked": "[✓] ", + "unticked": "[ ] " + }, + "link": { + "color": "164", + "underline": true + }, + "link_text": { + "bold": true + }, + "image": { + "underline": true + }, + "image_text": { + "format": "Image: {{.text}}" + }, + "code": { + "prefix": " ", + "suffix": " ", + "color": "165", + "background_color": "254" + }, + "code_block": {}, + "table": {}, + "definition_list": {}, + "definition_term": {}, + "definition_description": { + "block_prefix": "\n🠶 " + }, + "html_block": {}, + "html_span": {} +} diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/light/red.json b/system_files/shared/usr/share/ublue-os/motd/themes/light/red.json new file mode 100644 index 00000000000..39c11cf6bf9 --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/motd/themes/light/red.json @@ -0,0 +1,90 @@ +{ + "document": { + "margin": 2 + }, + "block_quote": { + "indent": 1, + "indent_token": "│ " + }, + "paragraph": {}, + "list": { + "level_indent": 2 + }, + "heading": { + "block_suffix": "\n", + "color": "203", + "bold": true + }, + "h1": { + "block_prefix": "\n", + "block_suffix": "\n" + }, + "h2": { + "prefix": "▌ " + }, + "h3": { + "prefix": "┃ " + }, + "h4": { + "prefix": "│ " + }, + "h5": { + "prefix": "┆ " + }, + "h6": { + "prefix": "┊ ", + "bold": false + }, + "text": {}, + "strikethrough": { + "crossed_out": true + }, + "emph": { + "italic": true + }, + "strong": { + "bold": true + }, + "hr": { + "color": "203", + "format": "\n──────\n" + }, + "item": { + "block_prefix": "• " + }, + "enumeration": { + "block_prefix": ". " + }, + "task": { + "ticked": "[✓] ", + "unticked": "[ ] " + }, + "link": { + "color": "124", + "underline": true + }, + "link_text": { + "bold": true + }, + "image": { + "underline": true + }, + "image_text": { + "format": "Image: {{.text}}" + }, + "code": { + "prefix": " ", + "suffix": " ", + "color": "203", + "background_color": "254" + }, + "code_block": {}, + "table": {}, + "definition_list": {}, + "definition_term": {}, + "definition_description": { + "block_prefix": "\n🠶 " + }, + "html_block": {}, + "html_span": {} +} diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/light/slate.json b/system_files/shared/usr/share/ublue-os/motd/themes/light/slate.json new file mode 100644 index 00000000000..edaead94ed0 --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/motd/themes/light/slate.json @@ -0,0 +1,90 @@ +{ + "document": { + "margin": 2 + }, + "block_quote": { + "indent": 1, + "indent_token": "│ " + }, + "paragraph": {}, + "list": { + "level_indent": 2 + }, + "heading": { + "block_suffix": "\n", + "color": "104", + "bold": true + }, + "h1": { + "block_prefix": "\n", + "block_suffix": "\n" + }, + "h2": { + "prefix": "▌ " + }, + "h3": { + "prefix": "┃ " + }, + "h4": { + "prefix": "│ " + }, + "h5": { + "prefix": "┆ " + }, + "h6": { + "prefix": "┊ ", + "bold": false + }, + "text": {}, + "strikethrough": { + "crossed_out": true + }, + "emph": { + "italic": true + }, + "strong": { + "bold": true + }, + "hr": { + "color": "104", + "format": "\n──────\n" + }, + "item": { + "block_prefix": "• " + }, + "enumeration": { + "block_prefix": ". " + }, + "task": { + "ticked": "[✓] ", + "unticked": "[ ] " + }, + "link": { + "color": "104", + "underline": true + }, + "link_text": { + "bold": true + }, + "image": { + "underline": true + }, + "image_text": { + "format": "Image: {{.text}}" + }, + "code": { + "prefix": " ", + "suffix": " ", + "color": "250", + "background_color": "254" + }, + "code_block": {}, + "table": {}, + "definition_list": {}, + "definition_term": {}, + "definition_description": { + "block_prefix": "\n🠶 " + }, + "html_block": {}, + "html_span": {} +} diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/light/teal.json b/system_files/shared/usr/share/ublue-os/motd/themes/light/teal.json new file mode 100644 index 00000000000..11e53ba84df --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/motd/themes/light/teal.json @@ -0,0 +1,90 @@ +{ + "document": { + "margin": 2 + }, + "block_quote": { + "indent": 1, + "indent_token": "│ " + }, + "paragraph": {}, + "list": { + "level_indent": 2 + }, + "heading": { + "block_suffix": "\n", + "color": "44", + "bold": true + }, + "h1": { + "block_prefix": "\n", + "block_suffix": "\n" + }, + "h2": { + "prefix": "▌ " + }, + "h3": { + "prefix": "┃ " + }, + "h4": { + "prefix": "│ " + }, + "h5": { + "prefix": "┆ " + }, + "h6": { + "prefix": "┊ ", + "bold": false + }, + "text": {}, + "strikethrough": { + "crossed_out": true + }, + "emph": { + "italic": true + }, + "strong": { + "bold": true + }, + "hr": { + "color": "44", + "format": "\n──────\n" + }, + "item": { + "block_prefix": "• " + }, + "enumeration": { + "block_prefix": ". " + }, + "task": { + "ticked": "[✓] ", + "unticked": "[ ] " + }, + "link": { + "color": "38", + "underline": true + }, + "link_text": { + "bold": true + }, + "image": { + "underline": true + }, + "image_text": { + "format": "Image: {{.text}}" + }, + "code": { + "prefix": " ", + "suffix": " ", + "color": "44", + "background_color": "254" + }, + "code_block": {}, + "table": {}, + "definition_list": {}, + "definition_term": {}, + "definition_description": { + "block_prefix": "\n🠶 " + }, + "html_block": {}, + "html_span": {} +} diff --git a/system_files/shared/usr/share/ublue-os/motd/themes/light/yellow.json b/system_files/shared/usr/share/ublue-os/motd/themes/light/yellow.json new file mode 100644 index 00000000000..6edace61751 --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/motd/themes/light/yellow.json @@ -0,0 +1,90 @@ +{ + "document": { + "margin": 2 + }, + "block_quote": { + "indent": 1, + "indent_token": "│ " + }, + "paragraph": {}, + "list": { + "level_indent": 2 + }, + "heading": { + "block_suffix": "\n", + "color": "220", + "bold": true + }, + "h1": { + "block_prefix": "\n", + "block_suffix": "\n" + }, + "h2": { + "prefix": "▌ " + }, + "h3": { + "prefix": "┃ " + }, + "h4": { + "prefix": "│ " + }, + "h5": { + "prefix": "┆ " + }, + "h6": { + "prefix": "┊ ", + "bold": false + }, + "text": {}, + "strikethrough": { + "crossed_out": true + }, + "emph": { + "italic": true + }, + "strong": { + "bold": true + }, + "hr": { + "color": "220", + "format": "\n──────\n" + }, + "item": { + "block_prefix": "• " + }, + "enumeration": { + "block_prefix": ". " + }, + "task": { + "ticked": "[✓] ", + "unticked": "[ ] " + }, + "link": { + "color": "178", + "underline": true + }, + "link_text": { + "bold": true + }, + "image": { + "underline": true + }, + "image_text": { + "format": "Image: {{.text}}" + }, + "code": { + "prefix": " ", + "suffix": " ", + "color": "220", + "background_color": "254" + }, + "code_block": {}, + "table": {}, + "definition_list": {}, + "definition_term": {}, + "definition_description": { + "block_prefix": "\n🠶 " + }, + "html_block": {}, + "html_span": {} +}