Changed colorscheme and updated tmux config +++

This commit is contained in:
2025-02-23 15:35:10 +01:00
parent 49040e91e9
commit 233daaf97d
29 changed files with 796 additions and 308 deletions

120
.zshrc
View File

@@ -97,6 +97,8 @@ export DBUS_SESSION_BUS_ADRESS="unix:path=$DBUS_LAUNCHD_SESSION_BUS_SOCKET"
# on startup
clear
function colorscript ()
{
ls ~/.config/colorscripts |sort -R |tail -1 |while read file; do
@@ -114,6 +116,9 @@ alias srz="source ~/.zshrc"
alias l="eza --tree --level=2 --color=always --long --git --no-filesize --icons=always --no-time --no-user --no-permissions"
alias python="python3.12"
alias pip="pip3.12"
function ct {
clear
colorscript
@@ -133,48 +138,10 @@ function z () {
zathura $1 &>/dev/null &
}
# Git Schortcuts
alias gs="git status"
alias ga="git add ."
alias gp="git push"
alias gcm="git checkout master"
alias config="/usr/bin/git --git-dir=/Users/jirayu/Projects/Private/dotfiles.git --work-tree=/Users/jirayu/"
function gc () {
git commit -m $1
function s () {
sioyek $1 --new-window &>/dev/null &
}
function gb () {
git checkout -b $1
}
function gcb () {
git checkout $1
}
function gmb () {
git merge $1
}
function gmb () {
git branch -d $1
}
# Directory Shortcuts
alias KSBG="cd ~/Nextcloud/Bildung/KSBG"
alias TechLab="cd ~/Nextcloud/TechLab"
alias Layout="cd ~/Nextcloud/Layouts"
alias Nextcloud="cd ~/Nextcloud"
# Latex
function theory () {
@@ -201,66 +168,24 @@ function graph () {
rm fig/$1.py
}
function importpdf () {
# Define a function to sanitize filenames
sanitize_filename() {
echo $1 | tr -c '[:alnum:]' '_'
}
# Rename Word documents, PowerPoint presentations, and PDF files
for file in *.docx *.pptx *.pdf; do
if [[ -e $file ]]; then
new_name=$(sanitize_filename $file)
mv "$file" "$new_name"
fi
done
# Convert Word documents and PowerPoint presentations to PDF
for file in *.docx *.pptx; do
if [[ -e $file ]]; then
pdf_name="${file%.*}.pdf"
pandoc "$file" -o "$pdf_name"
fi
done
# Move PDF files to the specified folder
for pdf_file in *.pdf; do
if [[ -e $pdf_file ]]; then
mv "$pdf_file" pdf/
fi
done
# Import PDF files into LaTeX file (assuming LaTeX file is named main.tex)
for pdf_file in "$pdf_folder"/*.pdf; do
if [[ -e $pdf_file ]]; then
# Check if the PDF file is already imported in the LaTeX file
grep -q "$(basename "$pdf_file")" main.tex
if [ $? -ne 0 ]; then
# If not imported, add the import statement to LaTeX file
echo "\\includepdf[pages=-]{$pdf_file}" >> main.tex
fi
fi
done
# Skript of Professors
function update {
rm Ziltener_Notizen_Analysis_1_ITET_RW.pdf
wget https://metaphor.ethz.ch/x/2024/hs/401-0231-10L/Ziltener_Notizen_Analysis_1_ITET_RW.pdf
}
function importimg {
for image_file in *.png *.jpg; do
if [[ -e $image_file ]]; then
# Check if the image file is already imported in the LaTeX file
grep -q "$(basename "$image_file")" main.tex
if [ $? -ne 0 ]; then
# If not imported, add the import statement to LaTeX file
echo "\\includegraphics[width=\\textwidth]{$(sanitize_filename "$image_file")}" >> main.tex
fi
fi
done
}
# Calcurse
#
alias calanalysis="calcurse -D ~/.config/calcurse/analysis"
alias calnus="calcurse -D ~/.config/calcurse/nus"
alias callinalg="calcurse -D ~/.config/calcurse/linalg"
alias caldigitech="calcurse -D ~/.config/calcurse/digitech"
alias caltechmech="calcurse -D ~/.config/calcurse/techmech"
# Initialize Oh My Posh
eval "$(oh-my-posh init zsh --config ~/.config/ohmyposh/config.toml)"
# Initialize Starship
eval "$(starship init zsh)"
export STARSHIP_CONFIG=~/.config/starship/starship.toml
# Setup fzf key bindings and fuzzy completion
eval "$(fzf --zsh)"
@@ -269,3 +194,6 @@ eval "$(/usr/libexec/path_helper)"
# BAT (better cat)
export BAT_THEME=Dracula
# Created by `pipx` on 2024-11-21 21:29:27
export PATH="$PATH:/Users/jirayu/.local/bin"