220 lines · 6.3 KB
#!/usr/bin/env bash

# Where our dotfiles repo lives
export DOTFILES="$HOME/.dotfiles"

os="$(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]\$ '

        # Services
        alias sv="sudo sv"

        # General aliases
        alias hey="nohup chromium --new-window --app=https://app.hey.com > /dev/null 2>&1 &"
        alias calendar="nohup chromium --new-window --app=https://calendar.google.com/calendar/u/2 > /dev/null 2>&1 &"
        alias thunderbolt-up=thunderboltUp
        alias sv-restart="ls /etc/sv | gum filter --height=20 | xargs sudo sv restart"

        # Fixes for various things on demand
        alias make-firefox-default="xdg-settings set default-web-browser firefox.desktop"
        alias fix-display='xrandr --output DP-0 --mode 2560x2880 --pos 0x0 --output DP-2 --mode 2560x2880 --pos 2560x0'