Updates thread

Building upon the script that @phreed shared, I modified my Starship prompt (y’all are using ujust bluefin-cli right?)

I do not reboot my computer very often either, so I thought it would be cool to have a subtle indication when there are updates staged and ready to go.

❯ cat ~/.config/starship.toml

[custom.update]
command = "/bin/bash -c 'if /usr/bin/rpm-ostree status --json | /usr/bin/jq -e \".deployments[0].booted == false\" > /dev/null; then echo \"(Bluefin Update Available)\"; fi'"
when = true
format = " [($output)]($style) "
style = "bold green"

By adding this block to starship.toml file (you may have to create it, if you haven’t made one), it preserves the default behavior of Starship prompt but will add “(Bluefin Update Available)” when one will be applied on next boot.

image

Edit: I wanted to add a symbol and clean it up, this is the improved version.

❯ cat ~/.config/starship.toml
[custom.update]
when = "/usr/bin/rpm-ostree status --json | /usr/bin/jq -e \".deployments[0].booted == false\" > /dev/null;"
command = 'echo "Bluefin update staged"'
symbol = "♻"
format = " $symbol [($output)]($style) "
style = "italic green"

image

8 Likes