Skip to content

Commit

Permalink
Clean up lots of stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenfyhn committed Aug 19, 2024
1 parent 561bc0f commit ca37e78
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 36 deletions.
File renamed without changes.
14 changes: 0 additions & 14 deletions .config/dotfiles/env-shared.sh

This file was deleted.

6 changes: 2 additions & 4 deletions .config/dotfiles/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ echo "Done"

# Setup ZSH with oh-my-zsh
bold "Setting up Oh My Zsh"
if [[ -d ~/.oh-my-zsh ]]; then
echo "Oh My Zsh already installed"
else
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
if [[ ! -d ~/.oh-my-zsh ]]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
echo "Done"

Expand Down
45 changes: 27 additions & 18 deletions .zshrc
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
DOTFILES="${HOME}/.config/dotfiles"

function source_if_found { [[ -f "$1" ]] && source "$1"; }

############################################################
# environment #
# ZSH setup #
############################################################

source "$DOTFILES"/env-shared.sh
source_if_found "$DOTFILES"/env-machine-specific.sh
source "$DOTFILES"/aliases.sh

############################################################
# shell #
############################################################
export ZSH=$HOME/.oh-my-zsh

# Set up prompt
ZSH_THEME="bullet-train"
BULLETTRAIN_STATUS_EXIT_SHOW=true
BULLETTRAIN_EXEC_TIME_ELAPSED=1
BULLETTRAIN_PROMPT_CHAR=
BULLETTRAIN_PROMPT_SEPARATE_LINE=false
BULLETTRAIN_PROMPT_ADD_NEWLINE=false
BULLETTRAIN_PROMPT_ORDER=(status custom dir git hg cmd_exec_time)

ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=2" # Green autosuggestion text.

# Distinct prompt in Docker
Expand All @@ -30,15 +22,32 @@ then
BULLETTRAIN_PROMPT_CHAR=🐋
fi

plugins=(gitfast zsh-autosuggestions zsh-256color)
plugins=(
git
zsh-autosuggestions
)

source $ZSH/oh-my-zsh.sh

############################################################
# environment setup #
############################################################

export CC=clang
export CXX=clang++

# Add ccache to path
[[ ! "$PATH" =~ /usr/lib/ccache ]] && export PATH="/usr/lib/ccache:$PATH"

source "$ZSH/oh-my-zsh.sh"
# Add ~/.local/bin to path
[[ ! "$PATH" =~ "$HOME/.local/bin" ]] && export PATH="$PATH:$HOME/.local/bin"

setopt nonomatch
source ~/.aliases
[[ -e ~/.zshrc-local ]] && source ~/.zshrc-local

############################################################
# keyboard #
# ROS #
############################################################

# Make sure AltGr + Space produces normal, not non-breaking, space.
command -v setxkbmap > /dev/null && setxkbmap -option "nbsp:none"
# shellcheck disable=SC2016
export ROSCONSOLE_FORMAT='[${severity}] [${node}] [${time}]: ${message}'

0 comments on commit ca37e78

Please sign in to comment.