-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add dynamic MOTD tips and image info (#847)
- Loading branch information
Showing
6 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
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 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/dracula.json /usr/share/ublue-os/motd/design/bluefin.md | sed -e "s/%IMAGE_NAME%/$IMAGE_NAME/g" -e "s/%IMAGE_TAG%/$IMAGE_TAG/g" -e "s/%TIP%/$TIP/g" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
# Welcome to Bluefin | ||
*Your image: `%IMAGE_NAME%:%IMAGE_TAG%`* | ||
|
||
| Command | Description | | ||
| ------- | ----------- | | ||
| `ujust bluefin-cli` | Configure the terminal | | ||
| `ujust toggle-user-motd` | Toggle this banner on/off | | ||
| `ujust` | List all available commands | | ||
|
||
*tip: the Project Bluefin team will use this banner to share important information and occasional tips.* | ||
*Tip: %TIP%* | ||
|
||
- [Documentation](http://docs.projectbluefin.io/) | ||
- [Discuss](https://community.projectbluefin.io/) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The Project Bluefin team will use this banner to share important information and occasional tips. |