addet README content.

This commit is contained in:
pika 2025-01-07 00:19:53 +01:00
parent 2585c0102a
commit 49c9229771
3 changed files with 27 additions and 35 deletions

View file

@ -1,25 +1,3 @@
# ─< Helper functions >─────────────────────────────────────────────────────────────────
declare -a echo_messages
function echo_error() {
local message="\033[0;1;31m❌ ERROR:\033[0;31m\t${*}\033[0m"
echo -e "$message"
echo_messages+=("$message")
}
# Function to print all stored messages
function print_echo_messages() {
echo -e "\033[38;5;196mL\033[38;5;202mo\033[38;5;208mg\033[38;5;214m \033[38;5;220mo\033[38;5;226mu\033[38;5;118mt\033[38;5;46mp\033[38;5;48mu\033[38;5;51mt\033[38;5;45m:"
for msg in "${echo_messages[@]}"; do
echo -e "$msg"
done
}
# ─< Check if the given command exists silently >─────────────────────────────────────────
command_exists() {
command -v "$@" >/dev/null 2>&1
}
packages=( packages=(
"brave" "brave"
"docker" "docker"

9
.zshrc
View file

@ -78,13 +78,6 @@ check_root() {
fi fi
} }
git_installs() {
if [ -e "$HOME/.zsh/.install.sh" ]; then
echo_info "Git installs activated by '_install <package>'"
. "$HOME/.zsh/.install.sh"
fi
}
_init() { _init() {
if command_exists oh-my-posh; then if command_exists oh-my-posh; then
# eval "$(oh-my-posh init zsh --config 'https://git.k4li.de/dotfiles/oh-my-posh/raw/branch/main/amro.toml')" # eval "$(oh-my-posh init zsh --config 'https://git.k4li.de/dotfiles/oh-my-posh/raw/branch/main/amro.toml')"
@ -112,6 +105,7 @@ _sources() {
"aliases" "aliases"
"defaults" "defaults"
"plugins" "plugins"
"installs"
) )
for _s in "${sourceOptions[@]}"; do for _s in "${sourceOptions[@]}"; do
@ -166,7 +160,6 @@ main() {
_init _init
_sources _sources
_environment _environment
git_installs
_end _end
} }

View file

@ -1,8 +1,29 @@
# zsh # zsh
## installation ## installation
```bash
git clone https://git.k4li.de/zsh $HOME/.config/zsh This repository serves as a stow package for my other dotfiles, like [hyprdots](https://git,k4li.de/dotfiles/hyprdots.git).
ln -sf $HOME/.config/zsh/.zshrc $HOME/.zshrc
zsh Stow will, when ecexuted with the right setup (see [here](https://git.k4li.de/dotfiles/hyprdots/raw/branch/main/install.sh)), put the .zshrc at your `home_dir`, as well as the .zsh folder.
```
The config is split in 3 parts, the [.zshrc](), the [.zsh folder] and the [plugins]() folder.
### .zshrc
Obviously, this sources all files needet and have the most basic modifications, like fzf and oh-my-posh
### .zsh folder
this is the main config folder, the important files are the `.*.zsh` files.
- .aliases.zsh
- > The aliases get configured here. Like the git, or the docker aliases. Also the ls and other aliases are created and configurable here
- .plugins.zsh
- > This sources the plugins with just a normal loop, also you can add or disable plugins as you like, just comment the list or add another plugin to this. Keep in mind, that you will have to clone them properly to the plugins folder, but more on that later.
- .defaults.zsh
- > Here are the plain defaults, which are recommendet by community and mostly found in the world wide web
- .installs.zsh
- > This is just the function, for my own install scripts, to be ecexuted faster, with just `_install <package>` and it will automaticall put the url around, and `.sh | sh` to the end, installing the scripts easily.