init commit
This commit is contained in:
26
config/bash/.bashrc
Normal file
26
config/bash/.bashrc
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
export PANAMA_PATH="$HOME/.local/share/Panama"
|
||||
export PANAMA_BASH="$PANAMA_PATH/config/bash"
|
||||
|
||||
[ -f /etc/bashrc ] && . /etc/bashrc
|
||||
|
||||
if [ -d ~/.bashrc.d ]; then
|
||||
for rc in ~/.bashrc.d/*; do
|
||||
if [ -f "$rc" ]; then
|
||||
. "$rc"
|
||||
fi
|
||||
done
|
||||
unset rc
|
||||
fi
|
||||
|
||||
if [ -d "$PANAMA_BASH" ]; then
|
||||
for f in "$PANAMA_BASH"/*; do
|
||||
[ -f "$f" ] && . "$f"
|
||||
done
|
||||
unset f
|
||||
else
|
||||
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
|
||||
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
|
||||
fi
|
||||
export PATH
|
||||
fi
|
||||
25
config/bash/.bashrc.bak
Normal file
25
config/bash/.bashrc.bak
Normal file
@@ -0,0 +1,25 @@
|
||||
# .bashrc
|
||||
|
||||
# Source global definitions
|
||||
if [ -f /etc/bashrc ]; then
|
||||
. /etc/bashrc
|
||||
fi
|
||||
|
||||
# User specific environment
|
||||
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
|
||||
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
|
||||
fi
|
||||
export PATH
|
||||
|
||||
# Uncomment the following line if you don't like systemctl's auto-paging feature:
|
||||
# export SYSTEMD_PAGER=
|
||||
|
||||
# User specific aliases and functions
|
||||
if [ -d ~/.bashrc.d ]; then
|
||||
for rc in ~/.bashrc.d/*; do
|
||||
if [ -f "$rc" ]; then
|
||||
. "$rc"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
unset rc
|
||||
47
config/bash/aliases
Normal file
47
config/bash/aliases
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/share/env bash
|
||||
|
||||
# Aliases I like
|
||||
alias :q="exit"
|
||||
alias :wq="exit"
|
||||
alias startsunshine="systemctl --user restart sunshine.service"
|
||||
alias sourcerc="source ~/.bashrc"
|
||||
alias c="clear"
|
||||
alias shutdown="systemctl poweroff"
|
||||
alias update-grub="sudo grub-mkconfig -o /etc/grub2-efi.cfg"
|
||||
alias nvidia-smi-docker='sudo docker run --rm --gpus all --privileged nvidia/cuda:12.8.1-base-ubuntu24.04 nvidia-smi'
|
||||
alias ncconnect='sudo docker exec -u www-data -it nextcloud-aio-nextcloud bash'
|
||||
|
||||
# Docker Shortcuts
|
||||
alias docker-up='sudo docker compose up -d'
|
||||
alias docker-down='sudo docker compose down'
|
||||
alias docker-stop='sudo docker compose stop'
|
||||
alias docker-update='sudo docker compose down && sudo docker compose up -d'
|
||||
alias docker-restart='sudo docker compose restart'
|
||||
|
||||
# Finger Print
|
||||
alias fprint-on='sudo authselect enable-feature with-fingerprint'
|
||||
alias fprint-off='sudo authselect disable-feature with-fingerprint'
|
||||
|
||||
# File system
|
||||
alias ls='eza -lh --group-directories-first --icons'
|
||||
alias lsa='ls -a'
|
||||
alias lt='eza --tree --level=2 --long --icons --git'
|
||||
alias lta='lt -a'
|
||||
alias ff="fzf --preview 'batcat --style=numbers --color=always {}'"
|
||||
|
||||
# Directories
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
|
||||
# Tools
|
||||
alias n='nvim'
|
||||
alias n.="nvim ."
|
||||
alias ns="nvim src"
|
||||
alias nlc="nvim lc"
|
||||
alias watchsmi="watch -n 1 nvidia-smi"
|
||||
alias watchamdsmi="watch -n 1 rocm-smi"
|
||||
|
||||
# Compression
|
||||
compress() { tar -czf "${1%/}.tar.gz" "${1%/}"; }
|
||||
alias decompress="tar -xzf"
|
||||
31
config/bash/shell
Normal file
31
config/bash/shell
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Editor used by CLI
|
||||
export EDITOR="nvim"
|
||||
export SUDO_EDITOR="$EDITOR"
|
||||
export SSH_ASKPASS=/usr/bin/ksshaskpass
|
||||
export SSH_ASKPASS_REQUIRE=prefer
|
||||
|
||||
# Define Paths
|
||||
export CARGO_PATH="$HOME/.cargo"
|
||||
export BUN_INSTALL="$HOME/.bun"
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
export PNPM_HOME="$HOME/.local/share/pnpm"
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
export ANDROID_SDK_HOME="$HOME/.local/share/Android"
|
||||
export GOPATH="$HOME/.local/share/go"
|
||||
export DOTNETPATH="$HOME/.dotnet/tools"
|
||||
|
||||
# Set complete path
|
||||
export PATH="$HOME/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PANAMA_PATH/bin:$BUN_INSTALL/bin:$CARGO_PATH/bin:$PNPM_HOME:$PYENV_ROOT/bin:$HOME/.rbenv/bin:/usr/lib/ccache/bin/:$GOPATH/bin:$DOTNETPATH"
|
||||
|
||||
# Nvm
|
||||
set -h
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
# Zoxide
|
||||
eval "$(zoxide init bash)"
|
||||
|
||||
# Oh My Posh
|
||||
eval "$(oh-my-posh init bash --config $PANAMA_PATH/config/dot/ohmyposh/gib.omp.json)"
|
||||
Reference in New Issue
Block a user