208 lines
8.0 KiB
Bash
208 lines
8.0 KiB
Bash
########################
|
|
# Initialize oh-my-zsh #
|
|
########################
|
|
export ZSH="$HOME/.oh-my-zsh"
|
|
|
|
#####################
|
|
# oh-my-zsh plugins #
|
|
#####################
|
|
plugins=(zsh-autosuggestions sudo zsh-syntax-highlighting)
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
######################
|
|
# User configuration #
|
|
######################
|
|
|
|
export DBUS_SESSION_BUS_ADRESS="unix:path=$DBUS_LAUNCHD_SESSION_BUS_SOCKET"
|
|
|
|
##############
|
|
# on startup #
|
|
##############
|
|
|
|
clear
|
|
fastfetch
|
|
|
|
eval $(thefuck --alias)
|
|
eval "$(zoxide init --cmd cd zsh)"
|
|
|
|
######################
|
|
# Terminal Shortcuts #
|
|
######################
|
|
|
|
alias srz="source ~/.zshrc"
|
|
|
|
alias l="eza --tree --level=2 --color=always --long --git --no-filesize --icons=always --no-time --no-user --no-permissions"
|
|
|
|
function ct {
|
|
clear
|
|
fastfetch
|
|
cd
|
|
}
|
|
|
|
function c {
|
|
clear
|
|
fastfetch
|
|
}
|
|
|
|
function li () {
|
|
eza --color=always --long --git --no-filesize --icons=always --no-time --no-user --no-permissions $1
|
|
}
|
|
|
|
function z () {
|
|
zathura $1 &>/dev/null &
|
|
}
|
|
|
|
function s () {
|
|
sioyek $1 --new-window --execute-command toggle_presentation_mode toggle_custom_color&>/dev/null &
|
|
}
|
|
|
|
##########
|
|
# Docker #
|
|
##########
|
|
|
|
function isfestart ()
|
|
{
|
|
cp ~/Projects/Private/isfe_exercises/template/Dockerfile .
|
|
cp ~/Projects/Private/isfe_exercises/template/install.sh .
|
|
cp ~/Projects/Private/isfe_exercises/template/docker-compose.yml .
|
|
cp -r ~/Projects/Private/isfe_exercises/template/files .
|
|
cp -r ~/Projects/Private/isfe_exercises/template/notebooks .
|
|
mv ex*_notebook.ipynb notebooks
|
|
docker-compose build --no-cache
|
|
docker-compose up -d
|
|
}
|
|
|
|
function isfestop ()
|
|
{
|
|
docker-compose down
|
|
mv notebooks/ex*_notebook.ipynb .
|
|
rm Dockerfile
|
|
rm install.sh
|
|
rm docker-compose.yml
|
|
rm -rf files
|
|
rm -rf notebooks
|
|
docker system prune -a
|
|
}
|
|
|
|
function pestart ()
|
|
{
|
|
cp ~/Projects/Private/class-hs25/template/Dockerfile .
|
|
cp ~/Projects/Private/class-hs25/template/docker-compose.yml .
|
|
docker-compose build --no-cache
|
|
docker-compose up -d
|
|
}
|
|
|
|
function pestop ()
|
|
{
|
|
docker-compose down
|
|
rm docker-compose.yml
|
|
rm Dockerfile
|
|
rm -rf .*
|
|
docker system prune -a
|
|
}
|
|
|
|
|
|
#########
|
|
# Latex #
|
|
#########
|
|
|
|
function theory () {
|
|
mkdir fig
|
|
cp ~/.config/nvim/templates/latex/theory/letterfonts.latex .
|
|
cp ~/.config/nvim/templates/latex/theory/macros.latex .
|
|
cp ~/.config/nvim/templates/latex/theory/preamble.latex .
|
|
cp ~/.config/nvim/templates/latex/theory/main.latex .
|
|
mv main.latex main.tex
|
|
mv preamble.latex preamble.tex
|
|
mv macros.latex macros.tex
|
|
mv letterfonts.latex letterfonts.tex
|
|
}
|
|
|
|
alias Facharbeit="cp ~/Nextcloud/Layouts/Facharbeit/Facharbeit.tex ."
|
|
|
|
alias Layout="cp ~/Nextcloud/Layouts/Layout/layout.tex ."
|
|
|
|
###########
|
|
# Prompts #
|
|
###########
|
|
|
|
function PromptAna {
|
|
local prompt_text="Write a short summary in German of the Presentation to the [] supplementing the summary with content from [] from the Script of my Professor. The Summary should be 3-4 Pages of length beginning with a short overview of the chapter followed up with the relevant information. Please use LaTeX to write this summary and output your answer in a codeblock. Do not use any numbers to indicate where you got the information from. I will input this chapter to the main file so leave out the preamble as well as the begin document section. In addition, please use normal sections i.e. \\section{...} and not \\section*{...} and do not numberate the section titles."
|
|
echo "$prompt_text" | pbcopy
|
|
}
|
|
|
|
function PromptISFE {
|
|
local prompt_text="Write a short summary of the Presentation to the [] supplementing the summary with content from [] from the 'Database Systems: The complete Book' Book. The Summary should be 3-4 Pages of length beginning with a short overview of the chapter followed up with the relevant information. Please use LaTeX to write this summary and output your answer in a codeblock. Do not use any numbers to indicate where you got the information from and do not citate anything from the presentation. Please rewrite the sentences from the presentation. I will input this chapter to the main file so leave out the preamble as well as the begin document section. In addition, please use normal sections i.e. \\section{...} and not \\section*{...} and do not numberate the section titles."
|
|
echo "$prompt_text" | pbcopy
|
|
}
|
|
|
|
function PromptMED {
|
|
local prompt_text="Write a short summary of the Presentation to the []. The Summary should be 4-5 Pages of length beginning with a short overview of the chapter followed up with the relevant information. Please use LaTeX to write this summary and do not use any numbers to indicate where you got the information from. Please use LaTeX to write this summary and output your answer in a codeblock. Do not use any numbers to indicate where you got the information from and do not citate anything from the presentation. Please rewrite the sentences from the presentation. I will input this chapter to the main file so leave out the preamble as well as the begin document section. In addition, please use normal sections i.e. \\section{...} and not \\section*{...} and do not numberate the section titles."
|
|
echo "$prompt_text" | pbcopy
|
|
}
|
|
|
|
function PromptMikro {
|
|
local prompt_text="Write a short summary in German of the Presentation to the [] supplementing the summary with content from [] from the 'Grundzüge der Mirkoökonomik' Book. The Summary should be 3-4 Pages of length beginning with a short overview of the chapter followed up with the relevant information. Please use LaTeX to write this summary and output your answer in a codeblock. Do not use any numbers to indicate where you got the information from and do not citate anything from the presentation. Please rewrite the sentences from the presentation. I will input this chapter to the main file so leave out the preamble as well as the begin document section. In addition, please use normal sections i.e. \\section{...} and not \\section*{...} and do not numberate the section titles."
|
|
echo "$prompt_text" | pbcopy
|
|
}
|
|
|
|
function PromptSR {
|
|
local prompt_text="Write a short summary in German of the Presentation to the [] supplementing the summary with content from [] from the [] Script. The Summary should be 3-4 Pages of length beginning with a short overview of the chapter followed up with the relevant information. Please use LaTeX to write this summary and output your answer in a codeblock. Do not use any numbers to indicate where you got the information from and do not citate anything from the presentation or the script. Please rewrite the sentences from the presentation. I will input this chapter to the main file so leave out the preamble as well as the begin document section. In addition, please use normal sections i.e. \\section{...} and not \\section*{...} and do not numberate the section titles."
|
|
echo "$prompt_text" | pbcopy
|
|
}
|
|
|
|
#######################
|
|
# Initialize Starship #
|
|
#######################
|
|
eval "$(starship init zsh)"
|
|
export STARSHIP_CONFIG=~/.config/starship/starship.toml
|
|
|
|
###############################################
|
|
# Setup fzf key bindings and fuzzy completion #
|
|
###############################################
|
|
eval "$(fzf --zsh)"
|
|
|
|
eval "$(/usr/libexec/path_helper)"
|
|
|
|
####################
|
|
# BAT (better cat) #
|
|
####################
|
|
export BAT_THEME=Dracula
|
|
|
|
###########
|
|
# Lazygit #
|
|
###########
|
|
alias lg="lazygit"
|
|
|
|
#######
|
|
# pip #
|
|
#######
|
|
export PATH="$PATH:/Users/jirayu/.local/bin"
|
|
|
|
#################
|
|
# Homebrew path #
|
|
#################
|
|
export PATH="$PATH:/opt/homebrew/bin"
|
|
|
|
############
|
|
# opencode #
|
|
############
|
|
export PATH=/Users/jirayu/.opencode/bin:$PATH
|
|
export PATH=$PATH:$HOME/go/bin
|
|
|
|
# >>> conda initialize >>>
|
|
# !! Contents within this block are managed by 'conda init' !!
|
|
__conda_setup="$('/opt/homebrew/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
|
if [ $? -eq 0 ]; then
|
|
eval "$__conda_setup"
|
|
else
|
|
if [ -f "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then
|
|
. "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh"
|
|
else
|
|
export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH"
|
|
fi
|
|
fi
|
|
unset __conda_setup
|
|
# <<< conda initialize <<<
|
|
|