Fix Profile configurations

This commit is contained in:
Fabio Scotto di Santolo
2024-12-28 13:51:29 +01:00
parent 3a93f11774
commit e477042df2
9 changed files with 53 additions and 28 deletions

View File

@@ -97,13 +97,13 @@ function up(){
if [ -z "$d" ]; then if [ -z "$d" ]; then
d=.. d=..
fi fi
cd $d cd "$d" || exit
} }
# create an directory and directly cd into it # create an directory and directly cd into it
function mcd() { function mcd() {
mkdir -p $1 mkdir -p "$1"
cd $1 cd "$1" || exit
} }
function parse_git_branch() { function parse_git_branch() {
@@ -111,8 +111,8 @@ function parse_git_branch() {
} }
function my_ip() { function my_ip() {
INTERFACE=`ip addr | awk '/state UP/ {print $2}' | sed 's/.$//'` INTERFACE=$(ip addr | awk '/state UP/ {print $2}' | sed 's/.$//')
echo `/sbin/ifconfig $INTERFACE | awk "/inet/ {print $2} " | sed -e s/addr://` echo "$(/sbin/ifconfig $INTERFACE | awk "/inet/ {print $2} " | sed -e s/addr://)"
} }
function welcome() { function welcome() {
@@ -134,7 +134,7 @@ function welcome() {
echo ""; echo "";
} }
[ -r $HOME/.bashrc.aliases ] && . $HOME/.bashrc.aliases [ -r "$HOME/.bashrc.aliases" ] && . "$HOME/.bashrc.aliases"
# export QT_STYLE_OVERRIDE=gtk # export QT_STYLE_OVERRIDE=gtk
# export QT_SELECT=qt5 # export QT_SELECT=qt5
@@ -147,12 +147,12 @@ if [ -n "$SSH_CLIENT" ]; then
ssh_placeholder=' {SSH::SESSION}' ssh_placeholder=' {SSH::SESSION}'
fi fi
if [ -f $HOME/.bash-git-prompt/gitprompt.sh ]; then if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
# To only show the git prompt in or under a repository directory # To only show the git prompt in or under a repository directory
GIT_PROMPT_ONLY_IN_REPO=0 GIT_PROMPT_ONLY_IN_REPO=0
# To use upstream's default theme # To use upstream's default theme
GIT_PROMPT_THEME=Custom GIT_PROMPT_THEME=Custom
source $HOME/.bash-git-prompt/gitprompt.sh source "$HOME/.bash-git-prompt/gitprompt.sh"
fi fi
# enable programmable completion features (you don't need to enable # enable programmable completion features (you don't need to enable
@@ -170,14 +170,23 @@ fi
[ -e "$HOME/.dircolors" ] && DIR_COLORS="$HOME/.dircolors" [ -e "$HOME/.dircolors" ] && DIR_COLORS="$HOME/.dircolors"
[ -e "$DIR_COLORS" ] || DIR_COLORS="" [ -e "$DIR_COLORS" ] || DIR_COLORS=""
# Initialize Homebrew [ -f "$HOME/.ghcup/env" ] && . "$HOME/.ghcup/env"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# Initialize Starship if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then
eval "$(starship init bash)" # Initialize Homebrew
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
# Initialize Zoxide if command -v oh-my-posh > /dev/null 2>&1; then
eval "$(zoxide init bash)" eval "$(oh-my-posh init bash --config "$(brew --prefix oh-my-posh)/themes/peru.omp.json")"
fi
# Activete Mise JDX if command -v zoxide > /dev/null 2>&1; then
eval "$(mise activate bash)" # Initialize Zoxide
eval "$(zoxide init bash)"
fi
if command -v mise > /dev/null 2>&1; then
# Activate Mise JDX
eval "$(mise activate bash)"
fi

View File

@@ -46,4 +46,4 @@ alias folders='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn'
alias vpn-add='nmcli connection import type openvpn file' alias vpn-add='nmcli connection import type openvpn file'
alias pbcopy='xsel --clipboard --input' alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output' alias pbpaste='xsel --clipboard --output'
alias stow='stow --dotfiles' alias stow='stow --dotfiles -d ~/.dotfiles '

View File

@@ -1,4 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export GOPATH=$HOME/Library/Go case $(uname -s) in
"Linux")
export GOPATH="$HOME/.local/share/Go";;
"Darwin")
export GOPATH="$HOME/Library/Go";;
*)
echo "Operating System unknown";;
esac
export GOBIN=$GOPATH/bin export GOBIN=$GOPATH/bin

View File

@@ -1 +1,3 @@
export GRAALVM_HOME="${SDKMAN_CANDIDATES_DIR}/java/21.0.1-graal" #!/usr/bin/env bash
export GRAALVM_HOME="${HOME}/.local/share/mise/installs/java/graalvm-community-23.0.1"

View File

@@ -1 +1,5 @@
export HELPDIR=/usr/share/zsh/"${ZSH_VERSION}"/help #!/usr/bin/env bash
if [[ $SHELL == "zsh" ]]; then
export HELPDIR=/usr/share/zsh/"${ZSH_VERSION}"/help
fi

View File

@@ -1,2 +1,3 @@
#export JAVA_HOME=$(/usr/libexec/java_home -v 18) #!/usr/bin/env bash
export JAVA_HOME="$SDKMAN_CANDIDATES_DIR/java/current"
export JAVA_HOME="${HOME}/.local/share/mise/installs/java/23.0.1"

View File

@@ -1,2 +1,4 @@
export JMETER_HOME=`which jmeter` #!/usr/bin/env bash
JMETER_HOME="$(which jmeter)"
export JMETER_HOME

View File

@@ -1,3 +0,0 @@
#!/usr/bin/env bash
export LIQUIBASE_HOME="/opt/homebrew/Cellar/liquibase/4.12.0/libexec"

View File

@@ -1,4 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export ZSH_HIGHLIGHT_DIR=/opt/homebrew/share/zsh-syntax-highlighting if [ "$(uname -o)" == "Darwin" ]; then
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters export ZSH_HIGHLIGHT_DIR=/opt/homebrew/share/zsh-syntax-highlighting
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters
fi