diff --git a/oh-my-zsh/custom/example.zsh b/oh-my-zsh/custom/example.zsh new file mode 100644 index 0000000..c194f49 --- /dev/null +++ b/oh-my-zsh/custom/example.zsh @@ -0,0 +1,12 @@ +# Put files in this folder to add your own custom functionality. +# See: https://github.com/ohmyzsh/ohmyzsh/wiki/Customization +# +# Files in the custom/ directory will be: +# - loaded automatically by the init script, in alphabetical order +# - loaded last, after all built-ins in the lib/ directory, to override them +# - ignored by git by default +# +# Example: add custom/shortcuts.zsh for shortcuts to your local projects +# +# brainstormr=~/Projects/development/planetargon/brainstormr +# cd $brainstormr diff --git a/oh-my-zsh/custom/platformio.zsh b/oh-my-zsh/custom/platformio.zsh new file mode 100644 index 0000000..0295484 --- /dev/null +++ b/oh-my-zsh/custom/platformio.zsh @@ -0,0 +1,54 @@ +# PlatformIO Helper-Funktionen +# Findet das PlatformIO-Projektverzeichnis (wo platformio.ini liegt) +_pio_find_root() { + local dir="$PWD" + while [[ "$dir" != "/" ]]; do + if [[ -f "$dir/platformio.ini" ]]; then + echo "$dir" + return 0 + fi + dir="$(dirname "$dir")" + done + echo "Fehler: Kein PlatformIO-Projekt gefunden (platformio.ini fehlt)" >&2 + return 1 +} + +# Build +alias piob='_pio_build' +_pio_build() { + local root=$(_pio_find_root) || return 1 + echo "Building in: $root" + (cd "$root" && pio run) +} + +# Upload +alias piou='_pio_upload' +_pio_upload() { + local root=$(_pio_find_root) || return 1 + echo "Uploading from: $root" + (cd "$root" && pio run --target upload) +} + +# Monitor +alias piom='_pio_monitor' +_pio_monitor() { + local root=$(_pio_find_root) || return 1 + echo "Starting monitor from: $root" + (cd "$root" && pio device monitor) +} + +# Upload + Monitor (praktische Kombi) +alias pioum='_pio_upload_monitor' +_pio_upload_monitor() { + local root=$(_pio_find_root) || return 1 + echo "Upload & Monitor from: $root" + (cd "$root" && pio run --target upload && pio device monitor) +} + +# Clean +alias pioc='_pio_clean' +_pio_clean() { + local root=$(_pio_find_root) || return 1 + echo "Cleaning: $root" + (cd "$root" && pio run --target clean) +} diff --git a/oh-my-zsh/custom/plugins/example/example.plugin.zsh b/oh-my-zsh/custom/plugins/example/example.plugin.zsh new file mode 100644 index 0000000..83611fe --- /dev/null +++ b/oh-my-zsh/custom/plugins/example/example.plugin.zsh @@ -0,0 +1,3 @@ +# Add your own custom plugins in the custom/plugins directory. Plugins placed +# here will override ones with the same name in the main plugins directory. +# See: https://github.com/ohmyzsh/ohmyzsh/wiki/Customization#overriding-and-adding-plugins diff --git a/oh-my-zsh/custom/plugins/zsh-syntax-highlighting b/oh-my-zsh/custom/plugins/zsh-syntax-highlighting new file mode 160000 index 0000000..5eb677b --- /dev/null +++ b/oh-my-zsh/custom/plugins/zsh-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit 5eb677bb0fa9a3e60f0eff031dc13926e093df92 diff --git a/oh-my-zsh/custom/themes/example.zsh-theme b/oh-my-zsh/custom/themes/example.zsh-theme new file mode 100644 index 0000000..5551207 --- /dev/null +++ b/oh-my-zsh/custom/themes/example.zsh-theme @@ -0,0 +1,6 @@ +# Put your custom themes in this folder. +# See: https://github.com/ohmyzsh/ohmyzsh/wiki/Customization#overriding-and-adding-themes +# +# Example: + +PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% " diff --git a/oh-my-zsh/custom/themes/powerlevel10k b/oh-my-zsh/custom/themes/powerlevel10k new file mode 160000 index 0000000..36f3045 --- /dev/null +++ b/oh-my-zsh/custom/themes/powerlevel10k @@ -0,0 +1 @@ +Subproject commit 36f3045d69d1ba402db09d09eb12b42eebe0fa3b