From 1b73c0f3c70d0b0431cc053fab21b680c52f1999 Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Sat, 1 Apr 2023 09:57:35 -0400 Subject: Use slimmed down bash_profile from work PC This will require moving some of the deleted lines over the .pc_local_bash_profile on my machine - but this is where I need to put stuff like the KDE settings and everything. Looking at this more - I think the "go" and "rust" stuff could likely get moved as well, but we'll see. --- .bash_profile | 111 ++++++++++++++++++---------------------------------------- 1 file changed, 34 insertions(+), 77 deletions(-) mode change 100644 => 100755 .bash_profile diff --git a/.bash_profile b/.bash_profile old mode 100644 new mode 100755 index 358ba8a..097abb6 --- a/.bash_profile +++ b/.bash_profile @@ -1,118 +1,75 @@ -#export LC_ALL=en_US.UTF-8 -#export LANG=en_US.UTF-8 -#export LANGUAGE=en_US.UTF-8 -export TERM='xterm-256color' +## +# System Settings +## +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 +export LANGUAGE=en_US.UTF-8 +export TERM='st-256color' export TERMINAL=st export EDITOR='vim' export VISUAL='vim' - -export DESKTOP_SESSION=KDE -export XDG_CURRENT_DESKTOP=KDE -export SFML_DIR=/home/senders/Downloads/SFML-2.5.1 - -#Prompt Command Function CWD -function cwd { - pwd | awk '{ n=split($0,a,"/"); print a[n-1]"/"a[n] }' -} - -function vim { - if [ -f $PWD/.vimrc ]; then - /usr/bin/vim -u $PWD/.vimrc $@ - else - /usr/bin/vim $@ - fi -} +export PROMPT_COMMAND='echo -ne "\033]0;`cwd`\007"' +export PS1="\[$(tput setaf 12)\][\[$(tput bold)\]\[$(tput setaf 2)\]\u\[$(tput sgr0)\]\[$(tput setaf 12)\]]\[$(tput setaf 13)\]\\$ \[$(tput sgr0)\]" ## # Exports ## -export PROMPT_COMMAND='echo -ne "\033]0;`cwd`\007"' -export PS1="\[$(tput setaf 12)\][\[$(tput bold)\]\[$(tput setaf 2)\]\u\[$(tput sgr0)\]\[$(tput setaf 12)\]]\[$(tput setaf 13)\]\\$ \[$(tput sgr0)\]" export PRJ_HOME=$HOME/projects -export APP_HOME=$HOME/applications -export CONF_HOME=$HOME/configs -export JAVA_HOME=/usr/lib/jvm/default-runtime -export IDEA_JDK=$JAVA_HOME -#export IDEA_JDK=/usr/lib/jvm/jdk-jetbrains -export PLAYGROUND_HOME=$HOME/playground -export SCALA_HOME=$APP_HOME/scala-latest +export JAVA_HOME=/usr/lib/jvm/default/ export GO_HOME=/usr/local/go export GOPATH=$PLAYGROUND_HOME/go -export ARDOUR_HOME=/opt/Ardour-5.12.0/bin -export MPV_HOME=~/.config/ -export PATH=$PATH:/home/senders/.bin:$ARDOUR_HOME:$SCALA_HOME/bin:$HOME/.cargo/bin:/snap/bin:$GO_HOME/bin:/usr/local/include:$GOPATH:/usr/include +export CARGO_HOME=$HOME/.cargo/ +export PATH=$PATH:/snap/bin:$GO_HOME/bin:$GOPATH:/home/senders/.local/bin:$CARGO_HOME/bin ## # Alias ## -alias ccopy='xclip -selection clipboard' -alias cpaste='xclip -selection clipboard -o' alias tgz='tar czvf' alias utgz='tar xzvf' -alias volmute='amixer sset Master toggle' alias bgrand='fn_bg_rand' alias bgset='xsetroot -solid ' alias resource='source ~/.bash_profile' -alias whoisport='lsof -t tcp:' -alias checksum='openssl dgst -sha256' -alias mmoff='xrandr --output eDP-1 --off' -alias mmon='xrandr --output eDP-1 --auto' -alias exon='xrandr --output DP-1 --auto && mmoff' -alias exoff='mmon; xrandr --output DP-1 --off' alias ssh-evict='ssh-keygen -f "/home/senders/.ssh/known_hosts" -R' alias add-ssh='ssh-add ~/.ssh/id_rsa' -alias tlmgr='/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode' -alias nem='emacsclient -nw' -# Private Bash Profile for things I don't want in git -if [ -f ~/.pc_local_bash_profile ]; then - . ~/.pc_local_bash_profile -fi - -# Setup SSH to work with ST -# if [ "$TERM" == "st-256color"]; then -# alias ssh='TERM="xterm-256color"; ssh' -# fi - ## # Functions ## -function prj { - cd $PRJ_HOME/$1 -} - -function config { - cd $CONF_HOME/$1 -} -function play { - cd $PLAYGROUND_HOME/$1 +# Prompt Command Function CWD +function cwd { + pwd | awk '{ n=split($0,a,"/"); print a[n-1]"/"a[n] }' } -function clip { - cat $1 | ccopy +function prj { + cd $PRJ_HOME/$1 } -function print_clip { - cpaste -} function fn_bg_set { - xsetroot -solid "#$1" + xsetroot -solid "#$1" } + function fn_bg_rand { - __CLR=$(openssl rand -hex 3) - fn_bg_set $__CLR - echo "#"$__CLR - unset __CLR + local color=$(openssl rand -hex 3) + fn_bg_set $color + echo "#"$color + unset $color } + function mvnversion { mvn versions:set -DnewVersion=$1 -DgenerateBackupPoms=false } -export PATH="$HOME/.cargo/bin:$PATH" +function venv { + virtualenv ~/tmp/venv/$1 + source ~/tmp/venv/$1/bin/activate +} -GIT_AUTOCOMPLETE=/usr/share/git/completion/git-completion.bash +## +# Local PC Overrides +## -if [ -f $GIT_AUTOCOMPLETE ]; then - source $GIT_AUTOCOMPLETE +# Private Bash Profile for things I don't want in git +if [ -f ~/.pc_local_bash_profile ]; then + . ~/.pc_local_bash_profile fi -- cgit v1.2.3-54-g00ecf