Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion bin/omakub-sub/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CHOICES=(
"Ollama Run LLMs, like Meta's Llama3, locally"
"Retroarch Play retro games"
"Spotify Stream music from the world's most popular service"
"Starship Command line prompt for astronauts"
"Steam Play games from Valve's store"
"Tailscale Mesh VPN based on WireGuard and with Magic DNS"
"VirtualBox Virtual machines to run Windows/Linux"
Expand All @@ -27,7 +28,7 @@ CHOICES=(
"<< Back "
)

CHOICE=$(gum choose "${CHOICES[@]}" --height 26 --header "Install application")
CHOICE=$(gum choose "${CHOICES[@]}" --height 27 --header "Install application")

if [[ "$CHOICE" == "<< Back"* ]] || [[ -z "$CHOICE" ]]; then
# Don't install anything
Expand All @@ -50,6 +51,7 @@ else
"ollama") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/optional/app-ollama.sh" ;;
"tailscale") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/optional/app-tailscale.sh" ;;
"geekbench") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/optional/app-geekbench.sh" ;;
"starship") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/app-starship.sh" ;;
*) INSTALLER_FILE="$OMAKUB_PATH/install/desktop/optional/app-$INSTALLER.sh" ;;
esac

Expand Down
32 changes: 32 additions & 0 deletions configs/starship.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
add_newline = true
command_timeout = 200
format = "[$directory$git_branch$git_status]($style)$character"

[character]
error_symbol = "[✗](bold cyan)"
success_symbol = "[❯](bold cyan)"

[directory]
truncation_length = 2
truncation_symbol = "…/"
repo_root_style = "bold cyan"
repo_root_format = "[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "

[git_branch]
format = "[$branch]($style) "
style = "italic cyan"

[git_status]
format = '[$all_status]($style)'
style = "cyan"
ahead = "⇡${count} "
diverged = "⇕⇡${ahead_count}⇣${behind_count} "
behind = "⇣${count} "
conflicted = " "
up_to_date = " "
untracked = "? "
modified = " "
stashed = ""
staged = ""
renamed = ""
deleted = ""
4 changes: 4 additions & 0 deletions defaults/bash/init
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ if command -v mise &> /dev/null; then
eval "$(mise activate bash)"
fi

if command -v starship &> /dev/null; then
eval "$(starship init bash)"
fi

if command -v zoxide &> /dev/null; then
eval "$(zoxide init bash)"
fi
Expand Down
5 changes: 5 additions & 0 deletions install/terminal/app-starship.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

curl -sS https://starship.rs/install.sh | sh -s -- -y

cp ~/.local/share/omakub/configs/starship.toml ~/.config/starship.toml
6 changes: 6 additions & 0 deletions migrations/1761747063.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

gum confirm "Do you want to install Starship?" && {
source $OMAKUB_PATH/install/terminal/app-starship.sh
cp "$OMAKUB_PATH/configs/starship.toml" ~/.config/starship.toml
} || true
4 changes: 4 additions & 0 deletions uninstall/app-starship.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

sudo rm -rf /usr/local/bin/starship
sudo rm -rf ~/.cache/starship