9 Commits

Author SHA1 Message Date
5784d733d6 rm 2026-02-14 22:40:20 -05:00
5d6db8b9be Add yakuakerc.
If this gets too annoying, I can add these files to .stow-local-ignore
and 'install' them by copying with the setup.sh?
2026-02-14 22:38:42 -05:00
3c04a3a24a Fix if. 2026-02-14 22:33:58 -05:00
060dd0b44f Update setup script. 2026-02-14 22:33:58 -05:00
72f807aaf0 Test install. 2026-02-14 22:33:58 -05:00
6d59e72866 Reapply "Add blerc."
This reverts commit b2734d8e54.
2026-02-14 22:33:58 -05:00
90f24b1edd Revert "Add blerc."
This reverts commit fdf5dcfe9d.
2026-02-14 22:33:58 -05:00
4b41cbe467 Install ble.sh in setup script. 2026-02-14 22:33:58 -05:00
bb77a3a032 Add blerc. 2026-02-14 22:33:58 -05:00
9 changed files with 54 additions and 72 deletions

View File

@@ -1,28 +0,0 @@
alias ,git='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"'
# Some aliases don't make sense in the docker image, like shortcuts to fix plasmashell.
if [ -f /.dockerenv ]; then
alias ,update='apt update -y && apt upgrade -y && apt upgrade --fix-broken --fix-missing --auto-remove'
alias ,init='apt update -y && apt install -y $DOT_PACKAGES'
alias ,swap='swapoff -a && swapon -a'
else
alias ,update='sudo apt update -y && sudo apt upgrade -y && sudo apt upgrade --fix-broken --fix-missing --auto-remove'
alias ,init='sudo apt update -y && sudo apt install -y $DOT_PACKAGES'
# Clear kscreen cached settings
alias ,kscreen='rm -rf ~/.local/share/kscreen/*'
# Restart plasmashell
alias ,plasmashell='plasmashell --replace &> /dev/null &'
alias ,swap='sudo swapoff -a && sudo swapon -a'
alias ,vbox="ps aux www |grep 'VBoxClient --draganddrop' | awk '{print $2}' | xargs kill"
fi
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Don't use tmux in vscode to avoid 'failure to resolve shell' errors.
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
if ! pstree -s $$ | grep -wq code; then
exec tmux >/dev/null 2>&1
fi
fi

View File

@@ -1,8 +0,0 @@
# $1: Version
# $2: Path to Qt; defaults to $HOME/Qt
function assistant {
local version=${1:-6\.7\.3}
local path=${2:-$HOME/Qt}
nohup ${path%/}/$version/gcc_64/bin/assistant > /dev/null 2>&1 &
}

View File

@@ -1,15 +0,0 @@
# Source ble.sh if installed.
if [ -f ~/.local/share/blesh/ble.sh ]; then
source -- ~/.local/share/blesh/ble.sh
fi
# Source rust things if they exist
if [ -f ~/.cargo/env ]; then
. ~/.cargo/env
fi
# Source a top-secret alias file
if [ -e ~/.bash_secrets ]; then
. ~/.bash_secrets
fi

View File

@@ -1,13 +1,39 @@
# Used in setup script and dockerfile.
# Source ble.sh if installed.
if [ -f ~/.local/share/blesh/ble.sh ]; then
source -- ~/.local/share/blesh/ble.sh
fi
# Source rust things if they exist
if [ -f ~/.cargo/env ]; then
. ~/.cargo/env
fi
alias ,git='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"'
# Some aliases don't make sense in the docker image, like shortcuts to fix plasmashell.
if [ -f /.dockerenv ]; then
export DOT_PACKAGES='git stow vim tmux ranger clang wget curl golang-go'
alias ,update='apt update -y && apt upgrade -y && apt upgrade --fix-broken --fix-missing --auto-remove'
alias ,init='apt update -y && apt install -y $DOT_PACKAGES'
alias ,swap='swapoff -a && swapon -a'
else
export DOT_PACKAGES='git stow vim vim-gtk3 xsel xclip tmux ranger clang yakuake wget curl golang-go gawk'
alias ,update='sudo apt update -y && sudo apt upgrade -y && sudo apt upgrade --fix-broken --fix-missing --auto-remove'
alias ,init='sudo apt update -y && sudo apt install -y $DOT_PACKAGES'
# Clear kscreen cached settings
alias ,kscreen='rm -rf ~/.local/share/kscreen/*'
# Restart plasmashell
alias ,plasmashell='plasmashell --replace &> /dev/null &'
alias ,swap='sudo swapoff -a && sudo swapon -a'
alias ,vbox="ps aux www |grep 'VBoxClient --draganddrop' | awk '{print $2}' | xargs kill"
alias ,assistant="nohup $HOME/Qt/6.9.0/gcc_64/bin/assistant > /dev/null 2>&1 &"
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
export EDITOR="vim"
export VISUAL="vim"
export LS_COLORS="di=1;34:ln=31;47:so=32:pi=33:ex=1;32:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43"
@@ -17,6 +43,17 @@ export DOTNET_ROOT=$HOME/.dotnet
# Example path for autocompletion using libclang-9-dev package, obtained by the following command
export LIBCLANG="$(command -v clang &>/dev/null && ldconfig -p | sort | grep libclang-[0-9]. | awk -F "> " '{print$2}' | tail -n 1)"
# Source a top-secret alias file
if [ -e ~/.bash_secrets ]; then
. ~/.bash_secrets
fi
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
if ! pstree -s $$ | grep -wq code; then
exec tmux >/dev/null 2>&1
fi
fi
# Set the default terminal to use konsole, with kapper profile
# + Execute tmux on start
if [ -e ~/.local/share/konsole/kapper.profile ]; then
@@ -61,6 +98,15 @@ export LESS='--mouse --wheel-lines 2'
# + -#2 to shift 2 columns horizontally when right / left arrow is pressed
export LESS="$LESS -R -w -#2"
if ! [ command -v conda &>/dev/null ] && [ -e ~/Code/Clones/mambaforge/bin/conda ] && ! grep -e conda ~/.bashrc &>/dev/null; then
if ! (~/Code/Clones/mambaforge/bin/conda init | awk -F "==>" '{print $1}'); then
echo "[dot] ERROR: Failed to initialize Conda."
fi
echo "[dot] WARN: Ran \`conda init\`; Conda was installed but not initialized"
source ~/.bashrc
fi
# For shared systems where history is not desired.
# ln -sf /dev/null ~/.bash_history
# HISTFILE=/dev/null

11
.bashrc
View File

@@ -100,20 +100,11 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# Source all files in ~/.bash.d, if it exists.
# This can contain .bash_aliases, or other configs to append to your shell.
if [ -d ~/.bash.d ]; then
for f in ~/.bash.d/.*; do
if [ -f $f ]; then
. $f
fi
done
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).

2
.gitignore vendored
View File

@@ -14,8 +14,6 @@
.config/Code/Network*
**/.config/.brightness
.local/share/fonts/.uuid
.local/share/blesh
.local/share/doc
# Byte-compiled / optimized / DLL files
*__pycache__/

View File

@@ -1,4 +1,2 @@
# This will automatically trigger reverse search when using up / down in bash
# However it doesn't feel natural with ble.sh, so it's commented out for now.
#"\e[A": history-search-backward
#"\e[B": history-search-forward
"\e[A": history-search-backward
"\e[B": history-search-forward

View File

@@ -16,10 +16,10 @@ fi
git submodule update --init --recursive
# Use alias for installing packages so we don't maintain several dependency lists.
if ! [[ -f .bash.d/.bash_exports ]]; then
fatal "Failed to locate .bash.d/.bash_exports in path: $(pwd)" 3
if ! [[ -f .bash_aliases ]]; then
fatal "Failed to locate .bash_aliases in path: $(pwd)" 3
fi
. .bash.d/.bash_exports
. .bash_aliases
if [[ -z ${DOT_PACKAGES:-} ]]; then
fatal "DOT_PACKAGES variable not found after sourcing $(pwd)/.bash_aliases" 4