Skip to content

Commit

Permalink
chore: Add Greenboot status to MOTD
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Jan 3, 2025
1 parent d394401 commit dcd91aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion system_files/desktop/shared/usr/libexec/ublue-motd
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,15 @@ if [[ -f "$TIP_FILE" ]]; then
THEME=${THEME//\'/}
THEME=${MOTD_FORCE_THEME:-$THEME}

sed -e "s/%IMAGE_NAME%/$IMAGE_NAME_ESCAPED/g" -e "s/%IMAGE_BRANCH%/$IMAGE_BRANCH_ESCAPED/g" -e "s/%TIP%/$TIP_ESCAPED/g" /usr/share/ublue-os/motd/bazzite.md | tr '~' '\n' | /usr/bin/glow -s /usr/share/ublue-os/motd/themes/$COLOR_SCHEME/$THEME.json -w 78 -
GREENBOOT=''
if [[ -f /run/motd.d/boot-status ]]; then
if grep -q "GREEN" /run/motd.d/boot-status && grep -q "SUCCESS" /run/motd.d/boot-status; then
GREENBOOT='Boot Status: 󰄳'
else
GREENBOOT=$(cat /run/motd.d/boot-status)
fi
fi
GREENBOOT_ESCAPED=$(escape "$GREENBOOT")

sed -e "s/%IMAGE_NAME%/$IMAGE_NAME_ESCAPED/g" -e "s/%IMAGE_BRANCH%/$IMAGE_BRANCH_ESCAPED/g" -e "s/%TIP%/$TIP_ESCAPED/g" -e "s/%GREENBOOT%/$GREENBOOT_ESCAPED/g" /usr/share/ublue-os/motd/bazzite.md | tr '~' '\n' | /usr/bin/glow -s /usr/share/ublue-os/motd/themes/$COLOR_SCHEME/$THEME.json -w 78 -
fi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Welcome to Bazzite 󰊴
󱋩 `%IMAGE_NAME%:%IMAGE_BRANCH%`
󰟀 `%GREENBOOT%`

|  Command | Description |
| ------- | ----------- |
Expand Down

0 comments on commit dcd91aa

Please sign in to comment.