Skip to content

Commit

Permalink
feat: bluefin cli now sources bling (#1441)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2Giles authored Jun 24, 2024
1 parent 7eeacbe commit 447ad1a
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 18 deletions.
3 changes: 3 additions & 0 deletions build_files/base/fetch-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ install -c -m 0755 /tmp/starship /usr/bin
# shellcheck disable=SC2016
echo 'eval "$(starship init bash)"' >> /etc/bashrc

# Bash Prexec
curl -Lo /usr/share/bash-prexec https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh

# Topgrade Install
pip install --prefix=/usr topgrade

Expand Down
17 changes: 0 additions & 17 deletions just/bluefin-apps.just
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,6 @@ install-jetbrains-toolbox:
echo "Launching JetBrains Toolbox"
./jetbrains-toolbox-"${BUILD_VERSION}"/jetbrains-toolbox
alias atuin := install-atuin

# Add atuin
install-atuin:
#!/usr/bin/bash
shell=$(basename $SHELL)
if test $shell = "fish"; then
echo "Adding atuin to your config.fish"
printf '\nif status is-interactive\n\tif type -q atuin\n\t\tatuin init fish | source\n\tend\nend\n' >> ${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish
elif test $shell = "zsh"; then
echo "Adding atuin to your .zshrc"
printf '\n[[ "$(command -v atuin)" ]] && eval "$(atuin init zsh)"\n' >> ${ZDOTDIR:-$HOME}/.zshrc
elif test $shell = "bash"; then
echo "Adding bash-prexec and atuin to your .bashrc"
printf '\n[[ -f /usr/share/bash-prexec ]] && source /usr/share/bash-prexec\n[[ "$(command -v atuin)" ]] && eval "$(atuin init bash)"\n' >> ~/.bashrc
fi

alias incus := install-incus

# Install and configure Incus
Expand Down
18 changes: 17 additions & 1 deletion just/bluefin-system.just
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,23 @@ benchmark:

# Configure Bluefin-CLI Terminal Experience with Brew
bluefin-cli:
@brew bundle --file /usr/share/ublue-os/homebrew/bluefin-cli.Brewfile --no-lock
#!/usr/bin/bash
echo 'Installing bling from Homebrew 🍻🍻🍻'
brew bundle --file /usr/share/ublue-os/homebrew/bluefin-cli.Brewfile --no-lock
echo 'Setting up your Shell 🐚🐚🐚'
shell=$(basename $SHELL)
if test $shell -eq "fish"; then
echo 'Adding bling to your config.fish 🐟🐟🐟'
printf 'source /usr/share/ublue-os/bluefin-cli/bling.fish' >> ${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish
elif test $shell -eq "zsh"; then
echo 'Adding bling to your .zshrc 💤💤💤'
printf 'source /usr/share/ublue-os/bluefin-cli/bling.sh' >> ${ZDOTDIR:-$HOME}/.zshrc
elif test $shell -eq "bash"; then
echo 'Adding bling to your .bashrc 💥💥💥'
printf 'source /usr/share/ublue-os/bluefin-cli/bling.sh' >> ${HOME}/.bashrc
else
echo 'Unknown Shell ... You are on your own'
fi
echo 'Installation complete ... please close and reopen your terminal!'

# Configure Bluefin-CLI Terminal Experience
Expand Down
18 changes: 18 additions & 0 deletions system_files/shared/usr/share/ublue-os/bluefin-cli/bling.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ls aliases
alias ll='eza -l --icons=auto --group-directories-first'
alias l.='eza -d .*'
alias ls='eza'
alias l1='eza -1'

# ugrep for grep
alias grep='ug'
alias egrep='ug -E'
alias fgrep='ug -F'
alias xzgrep='ug -z'
alias xzegrep='ug -zE'
alias xzfgrep='ug -zF'

if status is-interactive
eval "$(atuin init fish)"
eval "$(zoxide init fish)"
end
24 changes: 24 additions & 0 deletions system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env sh

# ls aliases
alias ll='eza -l --icons=auto --group-directories-first'
alias l.='eza -d .*'
alias ls='eza'
alias l1='eza -1'

# ugrep for grep
alias grep='ug'
alias egrep='ug -E'
alias fgrep='ug -F'
alias xzgrep='ug -z'
alias xzegrep='ug -zE'
alias xzfgrep='ug -zF'

if [ $(basename $SHELL) -eq "bash" ]; then
source /usr/share/bash-prexec
eval "$(atuin init bash)"
eval "$(zoxide init bash)"
elif [ $(basename $SHELL) -eq "zsh" ]; then
eval "$(atuin init zsh)"
eval "$(zoxide init zsh)"
fi

0 comments on commit 447ad1a

Please sign in to comment.