Skip to content

Commit

Permalink
fix(accent-color): light theme for accent colored motd (#2008)
Browse files Browse the repository at this point in the history
  • Loading branch information
tulilirockz authored Dec 5, 2024
1 parent 882d749 commit 09de308
Show file tree
Hide file tree
Showing 19 changed files with 821 additions and 1 deletion.
12 changes: 11 additions & 1 deletion system_files/shared/usr/libexec/ublue-motd
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
90 changes: 90 additions & 0 deletions system_files/shared/usr/share/ublue-os/motd/themes/light/blue.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
Original file line number Diff line number Diff line change
@@ -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": {}
}
Original file line number Diff line number Diff line change
@@ -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": {}
}
90 changes: 90 additions & 0 deletions system_files/shared/usr/share/ublue-os/motd/themes/light/pink.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
Loading

0 comments on commit 09de308

Please sign in to comment.