From d09146d2c9b6825b78e6ebe87c01e060937e7432 Mon Sep 17 00:00:00 2001 From: Baerspektivo Date: Mon, 13 Oct 2025 10:15:50 +0200 Subject: [PATCH] feat: Removed .zsh and .zshrc --- .config/htop/htoprc | 53 +++++++++++++++++ .zsh/aliases.zsh | 23 -------- .zsh/functions.zsh | 4 -- .zsh/goto.zsh | 4 -- .zsh/kubernetes.zsh | 2 - .zsh/nvm.zsh | 28 --------- .zsh/ohmyzsh.zsh | 12 ---- .zsh/pnpm.zsh | 7 --- .zsh/ssh.zsh | 10 ---- .zsh/starship.zsh | 86 ---------------------------- .zsh/theme.zsh | 8 --- .zsh/theme/functions/environment.zsh | 20 ------- .zsh/theme/functions/git.zsh | 11 ---- .zsh/theme/functions/hg.zsh | 10 ---- .zsh/theme/functions/kubernetes.zsh | 9 --- .zsh/theme/prompts/main.zsh | 41 ------------- .zsh/zoxide.zsh | 1 - .zshrc | 27 --------- README.md | 8 +-- install.sh | 13 +++-- 20 files changed, 64 insertions(+), 313 deletions(-) create mode 100644 .config/htop/htoprc delete mode 100644 .zsh/aliases.zsh delete mode 100644 .zsh/functions.zsh delete mode 100644 .zsh/goto.zsh delete mode 100644 .zsh/kubernetes.zsh delete mode 100644 .zsh/nvm.zsh delete mode 100644 .zsh/ohmyzsh.zsh delete mode 100644 .zsh/pnpm.zsh delete mode 100644 .zsh/ssh.zsh delete mode 100644 .zsh/starship.zsh delete mode 100644 .zsh/theme.zsh delete mode 100644 .zsh/theme/functions/environment.zsh delete mode 100644 .zsh/theme/functions/git.zsh delete mode 100644 .zsh/theme/functions/hg.zsh delete mode 100644 .zsh/theme/functions/kubernetes.zsh delete mode 100644 .zsh/theme/prompts/main.zsh delete mode 100644 .zsh/zoxide.zsh delete mode 100644 .zshrc diff --git a/.config/htop/htoprc b/.config/htop/htoprc new file mode 100644 index 0000000..ed8f13f --- /dev/null +++ b/.config/htop/htoprc @@ -0,0 +1,53 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +htop_version=3.3.0 +config_reader_min_version=3 +fields=0 48 17 18 38 39 2 46 47 49 1 +hide_kernel_threads=1 +hide_userland_threads=0 +hide_running_in_container=0 +shadow_other_users=0 +show_thread_names=0 +show_program_path=1 +highlight_base_name=0 +highlight_deleted_exe=1 +shadow_distribution_path_prefix=0 +highlight_megabytes=1 +highlight_threads=1 +highlight_changes=0 +highlight_changes_delay_secs=5 +find_comm_in_cmdline=1 +strip_exe_from_cmdline=1 +show_merged_command=0 +header_margin=1 +screen_tabs=1 +detailed_cpu_time=0 +cpu_count_from_one=0 +show_cpu_usage=1 +show_cpu_frequency=0 +update_process_names=0 +account_guest_in_cpu_meter=0 +color_scheme=0 +enable_mouse=1 +delay=15 +hide_function_bar=0 +header_layout=two_50_50 +column_meters_0=LeftCPUs2 Memory Swap +column_meter_modes_0=1 1 1 +column_meters_1=RightCPUs2 Tasks LoadAverage Uptime +column_meter_modes_1=1 2 2 2 +tree_view=0 +sort_key=46 +tree_sort_key=0 +sort_direction=-1 +tree_sort_direction=1 +tree_view_always_by_pid=0 +all_branches_collapsed=0 +screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME Command +.sort_key=PERCENT_CPU +.tree_sort_key=PID +.tree_view_always_by_pid=0 +.tree_view=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 diff --git a/.zsh/aliases.zsh b/.zsh/aliases.zsh deleted file mode 100644 index 36f88c6..0000000 --- a/.zsh/aliases.zsh +++ /dev/null @@ -1,23 +0,0 @@ -# Alias -# --- -# -# mac OS shortcuts -alias code="open -a 'Visual Studio Code'" -alias kubi="open -a 'Lens'" - - -# ALIAS COMMANDS -alias ld="ls -lisaGh" -alias g="goto" -alias grep='grep --color' -alias vim=nvim -alias update-system="brew update && brew upgrade && npm update -g" -alias do-st="docker compose" -alias do-re="docker compose down && docker compose up -d" -alias hetzi="ssh root@128.140.71.88" -# alias qaserv="ssh root@195.201.17.47" -# alias qaserv="ssh qaserver" -alias qaserv="TERM=xterm-256color ssh root@195.201.17.47" -alias kc1='export KUBECONFIG=~/.kube/config' -alias kc2='export KUBECONFIG=~/.kube/mobilistics' -alias ram='vm_stat' diff --git a/.zsh/functions.zsh b/.zsh/functions.zsh deleted file mode 100644 index da72dc7..0000000 --- a/.zsh/functions.zsh +++ /dev/null @@ -1,4 +0,0 @@ -# Colormap -function colormap() { - for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done -} \ No newline at end of file diff --git a/.zsh/goto.zsh b/.zsh/goto.zsh deleted file mode 100644 index 7d6a08c..0000000 --- a/.zsh/goto.zsh +++ /dev/null @@ -1,4 +0,0 @@ -autoload -Uz compinit -compinit - -source $(brew --prefix)/etc/bash_completion.d/goto.sh diff --git a/.zsh/kubernetes.zsh b/.zsh/kubernetes.zsh deleted file mode 100644 index 5fce146..0000000 --- a/.zsh/kubernetes.zsh +++ /dev/null @@ -1,2 +0,0 @@ -export KUBECONFIG=~/.kube/config -export KUBECONFIG=~/.kube/mobilistics diff --git a/.zsh/nvm.zsh b/.zsh/nvm.zsh deleted file mode 100644 index 38da411..0000000 --- a/.zsh/nvm.zsh +++ /dev/null @@ -1,28 +0,0 @@ -export NVM_DIR="$HOME/.nvm" -[ -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 - -# Add pnpm global bin to PATH -export PATH="$NVM_DIR/versions/node/$(nvm current)/bin:$PATH" - -# Automatisches Laden der Node.js-Version -autoload -U add-zsh-hook -load-nvmrc() { - local node_version="$(nvm version)" - local nvmrc_path="$(nvm_find_nvmrc)" - - if [ -n "$nvmrc_path" ]; then - local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") - - if [ "$nvmrc_node_version" = "N/A" ]; then - nvm install - elif [ "$nvmrc_node_version" != "$node_version" ]; then - nvm use - fi - elif [ "$node_version" != "$(nvm version default)" ]; then - echo "Reverting to nvm default version" - nvm use default - fi -} -add-zsh-hook chpwd load-nvmrc -load-nvmrc diff --git a/.zsh/ohmyzsh.zsh b/.zsh/ohmyzsh.zsh deleted file mode 100644 index 4ecf4b9..0000000 --- a/.zsh/ohmyzsh.zsh +++ /dev/null @@ -1,12 +0,0 @@ -#Confi -export ZSH="$HOME/.oh-my-zsh" - -#Theme -# ZSH_THEME="bira" - -#plugins -plugins=(git kubectl docker npm pip sudo macos zsh-autosuggestions command-not-found zsh-syntax-highlighting 1password) - -#Source -source $ZSH/oh-my-zsh.sh - diff --git a/.zsh/pnpm.zsh b/.zsh/pnpm.zsh deleted file mode 100644 index 87aa6c3..0000000 --- a/.zsh/pnpm.zsh +++ /dev/null @@ -1,7 +0,0 @@ -# pnpm -export PNPM_HOME="/Users/r.kallinich/.nvm/versions/node/v20.15.0/bin" -case ":$PATH:" in - *":$PNPM_HOME:"*) ;; - *) export PATH="$PNPM_HOME:$PATH" ;; -esac -# pnpm end diff --git a/.zsh/ssh.zsh b/.zsh/ssh.zsh deleted file mode 100644 index 33e193b..0000000 --- a/.zsh/ssh.zsh +++ /dev/null @@ -1,10 +0,0 @@ -export "GPG_TTY=$(tty)" -export "SSH_AUTH_SOCK=${HOME}/.gnupg/S.gpg-agent.ssh" - -gpgconf --launch gpg-agent - -unset SSH_AGENT_PID -if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then -export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" -fi - diff --git a/.zsh/starship.zsh b/.zsh/starship.zsh deleted file mode 100644 index aee86c3..0000000 --- a/.zsh/starship.zsh +++ /dev/null @@ -1,86 +0,0 @@ -# find out which distribution we are running on -LFILE="/etc/*-release" -MFILE="/System/Library/CoreServices/SystemVersion.plist" -if [[ -f $LFILE ]]; then - _distro=$(awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }') -elif [[ -f $MFILE ]]; then - _distro="macos" - - # on mac os use the systemprofiler to determine the current model - _device=$(system_profiler SPHardwareDataType | awk '/Model Name/ {print $3,$4,$5,$6,$7}') - - case $_device in - *MacBook*) DEVICE="";; - *) DEVICE="";; - esac -fi - -# set an icon based on the distro -# make sure your font is compatible with https://github.com/lukas-w/font-logos -case $_distro in - *kali*) ICON="ﴣ";; - *arch*) ICON="";; - *debian*) ICON="";; - *raspbian*) ICON="";; - *ubuntu*) ICON="";; - *elementary*) ICON="";; - *fedora*) ICON="";; - *coreos*) ICON="";; - *gentoo*) ICON="";; - *mageia*) ICON="";; - *centos*) ICON="";; - *opensuse*|*tumbleweed*) ICON="";; - *sabayon*) ICON="";; - *slackware*) ICON="";; - *linuxmint*) ICON="";; - *alpine*) ICON="";; - *aosc*) ICON="";; - *nixos*) ICON="";; - *devuan*) ICON="";; - *manjaro*) ICON="";; - *rhel*) ICON="";; - *macos*) ICON="";; - *) ICON="";; -esac - -# Kubernetes integration -function update_kubernetes_context() { - if command -v kubectl &> /dev/null; then - KUBE_CTX=$(kubectl config current-context 2>/dev/null) - if [ $? -eq 0 ]; then - KUBE_NS=$(kubectl config view --minify --output 'jsonpath={..namespace}' 2>/dev/null) - export STARSHIP_KUBERNETES_CONTEXT="$KUBE_CTX" - [ -n "$KUBE_NS" ] && export STARSHIP_KUBERNETES_NAMESPACE="$KUBE_NS" - else - unset STARSHIP_KUBERNETES_CONTEXT - unset STARSHIP_KUBERNETES_NAMESPACE - fi - fi -} - -# Update kubernetes context on startup -update_kubernetes_context - -# Function to wrap kubectl and update context when needed -function kubectl() { - command kubectl "$@" - local exit_code=$? - - # Update context if the command was successful and changed the context or namespace - if [ $exit_code -eq 0 ] && [[ "$1" == "config" && ("$2" == "use-context" || "$2" == "set-context") ]]; then - update_kubernetes_context - fi - return $exit_code -} - -# Kubernetes aliases -alias k='kubectl' -alias kgp='kubectl get pods' -alias kgn='kubectl get nodes' -alias kgs='kubectl get services' -alias kgc='kubectl config get-contexts' -alias kuc='kubectl config use-context' -alias kns='kubectl config set-context --current --namespace' - -export STARSHIP_DISTRO="$ICON" -export STARSHIP_DEVICE="$DEVICE" diff --git a/.zsh/theme.zsh b/.zsh/theme.zsh deleted file mode 100644 index b05b1c6..0000000 --- a/.zsh/theme.zsh +++ /dev/null @@ -1,8 +0,0 @@ -# Basis-Einstellungen für das Theme -autoload -Uz colors && colors -setopt PROMPT_SUBST - -# Lade alle Theme-Komponenten -for theme_component (~/.zsh/theme/**/*.zsh); do - source $theme_component -done diff --git a/.zsh/theme/functions/environment.zsh b/.zsh/theme/functions/environment.zsh deleted file mode 100644 index 0cbae21..0000000 --- a/.zsh/theme/functions/environment.zsh +++ /dev/null @@ -1,20 +0,0 @@ -function ruby_prompt_info() { - if command -v rvm-prompt >/dev/null 2>&1; then - local ruby_version=$(rvm-prompt i v g) - if [[ -n "$ruby_version" ]]; then - echo "%F{red}‹${ruby_version}›%f" - fi - fi -} - -function virtualenv_prompt_info() { - if [[ -n "$VIRTUAL_ENV" ]]; then - echo "%F{green}‹${VIRTUAL_ENV:t}›%f" - fi -} - -function conda_prompt_info() { - if [[ -n "$CONDA_DEFAULT_ENV" ]]; then - echo "%F{green}‹${CONDA_DEFAULT_ENV}›%f" - fi -} diff --git a/.zsh/theme/functions/git.zsh b/.zsh/theme/functions/git.zsh deleted file mode 100644 index e669764..0000000 --- a/.zsh/theme/functions/git.zsh +++ /dev/null @@ -1,11 +0,0 @@ -function git_prompt_info() { - if git rev-parse --git-dir > /dev/null 2>&1; then - local ref=$(git symbolic-ref HEAD 2>/dev/null) - local branch=${ref#refs/heads/} - if [[ -n "$(git status --porcelain 2>/dev/null)" ]]; then - echo "%F{yellow}‹${branch}%F{red}●%F{yellow}›%f" - else - echo "%F{yellow}‹${branch}›%f" - fi - fi -} diff --git a/.zsh/theme/functions/hg.zsh b/.zsh/theme/functions/hg.zsh deleted file mode 100644 index ae4c75d..0000000 --- a/.zsh/theme/functions/hg.zsh +++ /dev/null @@ -1,10 +0,0 @@ -function hg_prompt_info() { - if hg root >/dev/null 2>&1; then - local branch=$(hg branch 2>/dev/null) - if [[ -n "$(hg status 2>/dev/null)" ]]; then - echo "%F{yellow}‹${branch}%F{red}●%F{yellow}›%f" - else - echo "%F{yellow}‹${branch}›%f" - fi - fi -} diff --git a/.zsh/theme/functions/kubernetes.zsh b/.zsh/theme/functions/kubernetes.zsh deleted file mode 100644 index 1fde615..0000000 --- a/.zsh/theme/functions/kubernetes.zsh +++ /dev/null @@ -1,9 +0,0 @@ -function get_kubectl_context() { - if (( $+commands[kubectl] )); then - local context=$(kubectl config current-context 2>/dev/null) - local namespace=$(kubectl config view --minify --output 'jsonpath={..namespace}' 2>/dev/null) - if [[ -n "$context" ]]; then - echo "%F{blue}⎈ $context:$namespace%f" - fi - fi -} diff --git a/.zsh/theme/prompts/main.zsh b/.zsh/theme/prompts/main.zsh deleted file mode 100644 index ce6eb2e..0000000 --- a/.zsh/theme/prompts/main.zsh +++ /dev/null @@ -1,41 +0,0 @@ -# Neue Funktionen für die Versionsinformationen -function get_node_version() { - if [[ -f package.json ]]; then - if [[ -f pnpm-lock.yaml ]]; then - echo "%F{magenta}‹pnpm $(pnpm --version)›%f " - elif [[ -f package-lock.json ]]; then - echo "%F{red}‹npm $(npm --version)›%f " - fi - fi -} - -function get_deno_version() { - if [[ -f deno.json || -f deno.jsonc ]]; then - echo "%F{green}‹deno $(deno --version | head -n1 | cut -d' ' -f2)›%f " - fi -} - -# Aktualisierte Prompt-Funktion -function set_prompt() { - if [[ -n "$SSH_CONNECTION" ]]; then - local user_host="%B%F{yellow}server%f%b" - else - local user_host="%B%F{green}local%f%b" - fi - local user_symbol='%(!.#.$)' - local current_dir="%B%F{blue}%~%f%b " - - local conda_info=$(conda_prompt_info) - local vcs_info="$(git_prompt_info)" - local ruby_info=$(ruby_prompt_info) - local venv_info=$(virtualenv_prompt_info) - local kube_info=$(get_kubectl_context) - local node_info=$(get_node_version) - local deno_info=$(get_deno_version) - - PS1="▲ ${conda_info}${user_host}${current_dir}${node_info}${deno_info}${ruby_info}${vcs_info}${venv_info}${kube_info} -△ %B${user_symbol}%b " - - RPROMPT="%B${return_code}%b" -} -precmd_functions+=(set_prompt) diff --git a/.zsh/zoxide.zsh b/.zsh/zoxide.zsh deleted file mode 100644 index b420ac3..0000000 --- a/.zsh/zoxide.zsh +++ /dev/null @@ -1 +0,0 @@ -eval "$(zoxide init --cmd cd zsh)" diff --git a/.zshrc b/.zshrc deleted file mode 100644 index d77ad66..0000000 --- a/.zshrc +++ /dev/null @@ -1,27 +0,0 @@ -export PATH="/opt/homebrew/bin:$PATH" -export PATH="$HOME/.cargo/bin:$PATH" -export NIX_PATH=$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels${NIX_PATH:+:$NIX_PATH} - -# config -PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}" - -export PATH -# [[ -f ~/.zsh/ohmyzsh.zsh ]] && source ~/.zsh/ohmyzsh.zsh -[[ -f ~/.zsh/starship.zsh ]] && source ~/.zsh/starship.zsh -[[ -f ~/.zsh/goto.zsh ]] && source ~/.zsh/goto.zsh -[[ -f ~/.zsh/nvm.zsh ]] && source ~/.zsh/nvm.zsh -[[ -f ~/.zsh/pnpm.zsh ]] && source ~/.zsh/pnpm.zsh -[[ -f ~/.zsh/zoxide.zsh ]] && source ~/.zsh/zoxide.zsh -[[ -f ~/.zsh/aliases.zsh ]] && source ~/.zsh/aliases.zsh -[[ -f ~/.zsh/ssh.zsh ]] && source ~/.zsh/ssh.zsh -[[ -f ~/.zsh/kubernetes.zsh ]] && source ~/.zsh/kubernetes.zsh -# [[ -f ~/.zsh/theme.zsh ]] && source ~/.zsh/theme.zsh - -eval "$(starship init zsh)" - -#loading neofetch -neofetch - - -# Load Angular CLI autocompletion. -source <(ng completion script) diff --git a/README.md b/README.md index 9d0ad65..3599f91 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ Meine persönliche Development-Umgebung optimiert für: - **Formatting**: Conform (Prettier, Black, gofumpt) ### System Monitoring -- **btop** - Ressourcen-Monitor +- **btop** - Ressourcen-Monitor (Primary) +- **htop** - Fallback Monitor (wenn btop abstürzt) - **neofetch** - System Info - **yabai** - Tiling Window Manager (macOS) @@ -83,12 +84,11 @@ dotfiles/ │ │ │ ├── core/ # Options, keymaps, lazy.nvim │ │ │ └── plugins/ # Plugin configs (modular!) │ │ └── init.lua # Entry point -│ ├── btop/ # System monitor config +│ ├── btop/ # System monitor config (primary) +│ ├── htop/ # System monitor fallback │ ├── neofetch/ # System info config │ ├── yabai/ # Window manager (macOS) │ └── starship.toml # Prompt config -├── .zsh/ # Zsh configs (optional) -├── .zshrc # Zsh config ├── install.sh # Automated setup └── README.md # This file ``` diff --git a/install.sh b/install.sh index 63e8386..aae827d 100644 --- a/install.sh +++ b/install.sh @@ -141,9 +141,9 @@ backup_configs() { [ -d ~/.config/nvim ] && cp -r ~/.config/nvim "$BACKUP_DIR/" [ -d ~/.config/neofetch ] && cp -r ~/.config/neofetch "$BACKUP_DIR/" [ -d ~/.config/btop ] && cp -r ~/.config/btop "$BACKUP_DIR/" + [ -d ~/.config/htop ] && cp -r ~/.config/htop "$BACKUP_DIR/" [ -d ~/.config/yabai ] && cp -r ~/.config/yabai "$BACKUP_DIR/" [ -f ~/.config/starship.toml ] && cp ~/.config/starship.toml "$BACKUP_DIR/" - [ -f ~/.zshrc ] && cp ~/.zshrc "$BACKUP_DIR/" log "Backup created: $BACKUP_DIR" } @@ -326,17 +326,18 @@ setup_other_configs() { [ -d "$DOTFILES_DIR/.config/btop/themes" ] && ln -sf "$DOTFILES_DIR/.config/btop/themes" ~/.config/btop/themes fi + # Htop (fallback wenn btop abstürzt) + if [ -d "$DOTFILES_DIR/.config/htop" ]; then + mkdir -p ~/.config/htop + ln -sf "$DOTFILES_DIR/.config/htop/htoprc" ~/.config/htop/htoprc + fi + # Yabai (macOS only) if [ "$OS" = "macos" ] && [ -d "$DOTFILES_DIR/.config/yabai" ]; then rm -rf ~/.config/yabai ln -sf "$DOTFILES_DIR/.config/yabai" ~/.config/yabai fi - # Zsh (if exists) - if [ -f "$DOTFILES_DIR/.zshrc" ]; then - ln -sf "$DOTFILES_DIR/.zshrc" ~/.zshrc - fi - log "Configurations symlinked!" }