4 Commits

Author SHA1 Message Date
lachtan obecny
b3026487f0 Opravy z macos 2026-07-13 06:06:18 +02:00
lachtan obecny
a2441cf23b Claude settings 2026-07-12 18:28:24 +02:00
lachtan obecny
3505030c96 ollama pro claude 2026-07-08 21:05:41 +02:00
lachtan obecny
45072ddb91 Rozsireni git-prompt pro macos
Nekolik iteraci s pi agentem
2026-07-08 21:05:40 +02:00
8 changed files with 85 additions and 24 deletions

View File

@@ -1,4 +1,13 @@
{
"model": "sonnet",
"effortLevel": "high",
"permissions": {
"allow": [
"WebSearch",
"WebFetch",
"ReadFile"
]
},
"hooks": {
"PostToolUse": [
{
@@ -12,4 +21,4 @@
}
]
}
}
}

1
bashrc
View File

@@ -22,4 +22,5 @@ source_directory_sh "$HOME/.bashrc.d"
append_path "$LWS/bin"
append_path "$LWS/opt/bin"
set_system_paths
set_uniq_path

11
bin/zclaude Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -E -o errexit -o nounset -o pipefail
export ANTHROPIC_BASE_URL="http://nvidia.hell:11434"
export ANTHROPIC_AUTH_TOKEN="ollama"
export ANTHROPIC_DEFAULT_OPUS_MODEL="kimi-k2.7-code:cloud"
export ANTHROPIC_DEFAULT_SONNET_MODEL="glm-5.2:cloud"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="minimax-m3:cloud"
exec claude "$@"

View File

@@ -60,6 +60,12 @@ function append_path() {
fi
}
function append_path_to_end() {
local path="$1"
remove_path "$path"
append_path "$path"
}
function append_path_try() {
if [[ -e "$1" ]]; then
append_path "$1"
@@ -79,7 +85,14 @@ function prepend_path_try() {
}
function remove_path() {
PATH=$(path | grep -v "$1" | tr "\n" ":")
PATH=$(path | grep -v "^$1$" | tr "\n" ":")
}
function set_system_paths() {
append_path_to_end /usr/bin
append_path_to_end /bin
append_path_to_end /usr/sbin
append_path_to_end /sbin
}
function uniq_path() {

View File

@@ -1,12 +1,14 @@
# Terminal colors
LWS_RED=$(tput setaf 1)
LWS_GREEN=$(tput setaf 2)
LWS_CYAN=$(tput setaf 6)
LWS_COLOR_RESET=$(tput sgr0)
if [[ -n "${TERM:-}" ]] && can_run tput; then
# Terminal colors
LWS_RED=$(tput setaf 1)
LWS_GREEN=$(tput setaf 2)
LWS_CYAN=$(tput setaf 6)
LWS_COLOR_RESET=$(tput sgr0)
# Bash prompt escape sequences
LWS_PS1_USER='\u'
LWS_PS1_HOST='\h'
LWS_PS1_DIR='\w'
LWS_PS1_TYPE='\$'
LWS_PS1_USER_HOST="${LWS_GREEN}${LWS_PS1_USER}@${LWS_PS1_HOST}${LWS_COLOR_RESET}:${LWS_CYAN}${LWS_PS1_DIR}${LWS_COLOR_RESET}"
# Bash prompt escape sequences
LWS_PS1_USER='\u'
LWS_PS1_HOST='\h'
LWS_PS1_DIR='\w'
LWS_PS1_TYPE='\$'
LWS_PS1_USER_HOST="${LWS_GREEN}${LWS_PS1_USER}@${LWS_PS1_HOST}${LWS_COLOR_RESET}:${LWS_CYAN}${LWS_PS1_DIR}${LWS_COLOR_RESET}"
fi

View File

@@ -1,9 +1,11 @@
# Homebrew initialization
# Can set BREW_HOME in advance
xlog "Homebrew initialization"
xlog "Homebrew/Linuxbrew initialization"
BREW_LOCATIONS=(
"/opt/homebrew"
"/usr/local/Homebrew"
"$HOME/.local/share/linuxbrew"
"$HOME/.linuxbrew"
"/home/linuxbrew/.linuxbrew"
@@ -28,8 +30,8 @@ if [[ -e "$BREW" ]]; then
eval "$($BREW shellenv)"
PATH="$path_backup"
append_path "$HOMEBREW_PREFIX/bin"
append_path "$HOMEBREW_PREFIX/sbin"
prepend_path "$HOMEBREW_PREFIX/bin"
prepend_path "$HOMEBREW_PREFIX/sbin"
fi
unset BREW

View File

@@ -1,16 +1,39 @@
if [ -d "$HOME/.bash-git-prompt" ]; then
GIT_PROMPT_PATH="$HOME/.bash-git-prompt"
else
GIT_PROMPT_PATH="$LWS/opt/bash-git-prompt"
# shellcheck shell=bash
# Find gitprompt.sh across supported installation methods.
GIT_PROMPT_CANDIDATES=(
"$HOME/.bash-git-prompt/gitprompt.sh"
"$LWS/opt/bash-git-prompt/gitprompt.sh"
)
# Detect active Homebrew prefix and add its bash-git-prompt path.
# This covers macOS Apple Silicon/Intel, Linuxbrew and any custom prefix.
if can_run brew; then
git_prompt_brew_prefix=$(brew --prefix bash-git-prompt 2>/dev/null) || git_prompt_brew_prefix=""
if [[ -n "$git_prompt_brew_prefix" ]]; then
GIT_PROMPT_CANDIDATES+=("$git_prompt_brew_prefix/share/gitprompt.sh")
fi
fi
GIT_PROMPT_INIT="$GIT_PROMPT_PATH/gitprompt.sh"
GIT_PROMPT_INIT=""
for candidate in "${GIT_PROMPT_CANDIDATES[@]}"; do
if [[ -f "$candidate" ]]; then
GIT_PROMPT_INIT="$candidate"
break
fi
done
if [[ -n "$GIT_PROMPT_INIT" ]]; then
# __GIT_PROMPT_DIR is required so gitprompt.sh can find themes and gitstatus.sh
__GIT_PROMPT_DIR="$(dirname "$GIT_PROMPT_INIT")"
export __GIT_PROMPT_DIR
if [ -f "$GIT_PROMPT_INIT" ]; then
export GIT_PROMPT_PATH
GIT_PROMPT_ONLY_IN_REPO=1
GIT_PROMPT_USER_HOST="${LWS_PS1_USER_HOST}"
GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${GIT_PROMPT_USER_HOST}"
GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}"
source "$GIT_PROMPT_INIT"
fi
unset GIT_PROMPT_INIT git_prompt_brew_prefix

View File

@@ -1,4 +1,4 @@
nop "${SDKMAN_DIR:=$HOME/.sdkman}"
: "${SDKMAN_DIR:=$HOME/.sdkman}"
if [[ -d $SDKMAN_DIR ]]; then
export SDKMAN_DIR
source_try "$SDKMAN_DIR/bin/sdkman-init.sh"