Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add MOTD thanks to @bsherman and @castrojo #717

Merged
merged 1 commit into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions system_files/desktop/shared/usr/etc/profile.d/user-motd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if test -d "$HOME"; then
if test ! -e "$HOME"/.config/no-show-user-motd; then
if test -x "/usr/libexec/ublue-motd"; then
/usr/libexec/ublue-motd
fi
fi
fi
9 changes: 9 additions & 0 deletions system_files/desktop/shared/usr/libexec/ublue-motd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/bash
TIP_FILE=$(ls "/usr/share/ublue-os/motd/tips/"* | shuf -n 1)
if [[ -f "$TIP_FILE" ]]; then
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
IMAGE_TAG=$(jq -r '."image-tag"' < $IMAGE_INFO)
TIP=$(shuf -n 1 "$TIP_FILE")
/usr/bin/glow -s /usr/share/ublue-os/motd/design/dark.json /usr/share/ublue-os/motd/design/bazzite.md | sed -e "s/%IMAGE_NAME%/$IMAGE_NAME/g" -e "s/%IMAGE_TAG%/$IMAGE_TAG/g" -e "s/%TIP%/$TIP/g"
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Welcome to Bazzite 󰊴
󱋩 `%IMAGE_NAME%:%IMAGE_TAG%`

| Command | Description |
| ------- | ----------- |
| `ujust` | List all available commands |
| `ujust toggle-user-motd` | Toggle this banner on/off |
| `neofetch` | View system information |

*󰋼 %TIP%*
- [󰙯 Discord](https://discord.bazzite.gg/)
- [󰈙 Documentation](http://docs.bazzite.gg/)
195 changes: 195 additions & 0 deletions system_files/desktop/shared/usr/share/ublue-os/motd/design/dark.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
{
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "252",
"margin": 2
},
"block_quote": {
"indent": 1,
"indent_token": "│ "
},
"paragraph": {},
"list": {
"level_indent": 2
},
"heading": {
"block_suffix": "\n",
"color": "39",
"bold": true
},
"h1": {
"prefix": " ",
"suffix": " ",
"color": "228",
"background_color": "63",
"bold": true
},
"h2": {
"prefix": "## "
},
"h3": {
"prefix": "### "
},
"h4": {
"prefix": "#### "
},
"h5": {
"prefix": "##### "
},
"h6": {
"prefix": "###### ",
"color": "35",
"bold": false
},
"text": {},
"strikethrough": {
"crossed_out": true
},
"emph": {
"italic": true
},
"strong": {
"bold": true
},
"hr": {
"color": "240",
"format": "\n--------\n"
},
"item": {
"block_prefix": "• "
},
"enumeration": {
"block_prefix": ". "
},
"task": {
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "30",
"underline": true
},
"link_text": {
"color": "35",
"bold": true
},
"image": {
"color": "212",
"underline": true
},
"image_text": {
"color": "243",
"format": "Image: {{.text}} →"
},
"code": {
"prefix": " ",
"suffix": " ",
"color": "203",
"background_color": "236"
},
"code_block": {
"color": "244",
"margin": 2,
"chroma": {
"text": {
"color": "#C4C4C4"
},
"error": {
"color": "#F1F1F1",
"background_color": "#F05B5B"
},
"comment": {
"color": "#676767"
},
"comment_preproc": {
"color": "#FF875F"
},
"keyword": {
"color": "#00AAFF"
},
"keyword_reserved": {
"color": "#FF5FD2"
},
"keyword_namespace": {
"color": "#FF5F87"
},
"keyword_type": {
"color": "#6E6ED8"
},
"operator": {
"color": "#EF8080"
},
"punctuation": {
"color": "#E8E8A8"
},
"name": {
"color": "#C4C4C4"
},
"name_builtin": {
"color": "#FF8EC7"
},
"name_tag": {
"color": "#B083EA"
},
"name_attribute": {
"color": "#7A7AE6"
},
"name_class": {
"color": "#F1F1F1",
"underline": true,
"bold": true
},
"name_constant": {},
"name_decorator": {
"color": "#FFFF87"
},
"name_exception": {},
"name_function": {
"color": "#00D787"
},
"name_other": {},
"literal": {},
"literal_number": {
"color": "#6EEFC0"
},
"literal_date": {},
"literal_string": {
"color": "#C69669"
},
"literal_string_escape": {
"color": "#AFFFD7"
},
"generic_deleted": {
"color": "#FD5B5B"
},
"generic_emph": {
"italic": true
},
"generic_inserted": {
"color": "#00D787"
},
"generic_strong": {
"bold": true
},
"generic_subheading": {
"color": "#777777"
},
"background": {
"background_color": "#373737"
}
}
},
"table": {
"center_separator": "┼",
"column_separator": "│",
"row_separator": "─"
},
"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,5 @@
It is always better to install packages with Distrobox than to layer them with rpm-ostree.
Packages installed in Distrobox can be exported to appear like any other application.
Update break something? You can roll back and pin the previous release or rebase by build date.
Lutris is pre-installed for better handling of non-Steam games.
BTRFS is used by default for external drives, and we recommend that or EXT4 over NTFS.
Loading