243 lines · 7.1 KB
#!/usr/bin/env bash

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

thisdir=$(dirname "$(realpath ~/.bashrc)")
os="$($thisdir/utils/which-os)"

function thunderboltUp() {
    local $id
    case "$HOSTNAME" in
    stardust)
        id="00968984-4c6a-1e00-ffff-ffffffffffff"
        ;;
    *) # lightningbolt
        id="00b62260-4590-1e00-ffff-ffffffffffff"
        ;;
    esac
    sudo boltctl authorize "$id"
}

# OS/Distro specific stuff
case "$os" in

    void )

        alias ls='ls --color=auto'
        PS1='[\u@\h \W]\$ '

        # Git prompt
        git_prompt="/usr/share/git/git-prompt.sh"
        if [ -f $git_prompt ]; then
            export GIT_PS1_SHOWDIRTYSTATE=true
            export GIT_PS1_SHOWUNTRACKEDFILES=true
            export GIT_PS1_SHOWSTASHSTATE=true
            # shellcheck disable=1090
            source $git_prompt
        fi

        # Services