Bash stuff

This commit is contained in:
2025-12-03 21:25:16 -05:00
parent ec17337d63
commit e58f4341f8
4 changed files with 56 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
if [ -z "$PS1" ]; then
exit 0
fi
unset HISTFILE
export PS1="\u@\h \W \$ "
if [ -f ~/.config/dg-bash/aliases.sh ]; then
source ~/.config/dg-bash/aliases.sh
fi
if [ -f ~/.config/dg-bash/functions.sh ]; then
source ~/.config/dg-bash/functions.sh
fi
if [ -x "$(command -v fastfetch)" ]; then
if [ -f ~/.config/fastfetch/minimal.jsonc ]; then
fastfetch -c ~/.config/fastfetch/minimal.jsonc
else
fastfetch
fi
fi
echo -e "\nShall we play a game?"
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
alias c="clear"
alias pbcopy="xsel -i -b"
alias pbpaste="xsel -o -b"
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
function cv() {
mkdir -p ~/python-venv
python -m venv "~/python-venv/$1"
source "~/python-venv/$1/bin/activate"
}
function av() {
if [ -d "~/python-venv/$1" ]; then
source "~/python-venv/$1/bin/activate"
else
echo "Error: Venv does not exist"
fi
}
function mkcd() {
mkdir -p $1
cd $1
}
+6
View File
@@ -46,3 +46,9 @@ echo "Making links for shell"
ln -sf $PWD/.config/.dg-shell.zsh ~/.config/.dg-shell.zsh ln -sf $PWD/.config/.dg-shell.zsh ~/.config/.dg-shell.zsh
ln -sf $PWD/.zshrc ~/.zshrc ln -sf $PWD/.zshrc ~/.zshrc
echo "Shell links... Done." echo "Shell links... Done."
# Link for dg-bash
echo "Making Links for bash"
ln -sf $PWD/.config/dg-bash ~/.config/dg-bash
ln -sf $PWD/.bashrc ~/.bashrc
echo "Bash links... Done."