Compare commits
3 Commits
cba2ca3b1c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 18cfd8b174 | |||
| ca7d4e3460 | |||
| 3bb192238c |
@@ -10,6 +10,7 @@ alias shutdown="systemctl poweroff"
|
|||||||
alias update-grub="sudo grub-mkconfig -o /etc/grub2-efi.cfg"
|
alias update-grub="sudo grub-mkconfig -o /etc/grub2-efi.cfg"
|
||||||
alias nvidia-smi-docker='sudo docker run --rm --gpus all --privileged nvidia/cuda:12.8.1-base-ubuntu24.04 nvidia-smi'
|
alias nvidia-smi-docker='sudo docker run --rm --gpus all --privileged nvidia/cuda:12.8.1-base-ubuntu24.04 nvidia-smi'
|
||||||
alias ncconnect='sudo docker exec -u www-data -it nextcloud-aio-nextcloud bash'
|
alias ncconnect='sudo docker exec -u www-data -it nextcloud-aio-nextcloud bash'
|
||||||
|
alias avante='nvim -c "lua vim.defer_fn(function()require(\"avante.api\").zen_mode()end, 100)"'
|
||||||
|
|
||||||
# Docker Shortcuts
|
# Docker Shortcuts
|
||||||
alias docker-up='sudo docker compose up -d'
|
alias docker-up='sudo docker compose up -d'
|
||||||
|
|||||||
@@ -11,36 +11,46 @@ return {
|
|||||||
---@type avante.Config
|
---@type avante.Config
|
||||||
opts = {
|
opts = {
|
||||||
instructions_file = 'avante.md',
|
instructions_file = 'avante.md',
|
||||||
provider = 'openai',
|
provider = 'claude',
|
||||||
auto_suggestions_provider = 'openai',
|
auto_suggestions_provider = 'claude',
|
||||||
providers = {
|
providers = {
|
||||||
claude = {
|
claude = {
|
||||||
endpoint = 'https://api.anthropic.com',
|
endpoint = 'https://api.anthropic.com',
|
||||||
model = 'claude-sonnet-4-20250514',
|
model = 'claude-sonnet-4-5-20250929',
|
||||||
timeout = 30000,
|
timeout = 30000,
|
||||||
extra_request_body = {
|
extra_request_body = {
|
||||||
temperature = 0.75,
|
temperature = 0.75,
|
||||||
max_tokens = 4096,
|
max_tokens = 20480,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
openai = {
|
openai = {
|
||||||
endpoint = 'https://api.openai.com/v1',
|
endpoint = 'https://api.openai.com/v1',
|
||||||
model = 'gpt-5',
|
model = 'gpt-5.2',
|
||||||
extra_request_body = {
|
extra_request_body = {
|
||||||
temperature = 1,
|
temperature = 1,
|
||||||
max_completion_tokens = 8192,
|
max_completion_tokens = 8192,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
acp_providers = {
|
||||||
|
["claude-code"] = {
|
||||||
|
command = "npx",
|
||||||
|
args = { "@zed-industries/claude-code-acp" },
|
||||||
|
env = {
|
||||||
|
NODE_NO_WARNINGS = "1",
|
||||||
|
ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
rag_service = {
|
rag_service = {
|
||||||
enabled = false,
|
enabled = true,
|
||||||
host_path = '/home/gib/Documents/Code',
|
host_path = '/home/gib/Documents/Code',
|
||||||
runner = 'docker',
|
runner = 'docker',
|
||||||
llm = {
|
llm = {
|
||||||
provider = 'openai',
|
provider = 'openai',
|
||||||
endpoint = 'https://api.openai.com/v1',
|
endpoint = 'https://api.openai.com/v1',
|
||||||
api_key = 'OPENAI_API_KEY',
|
api_key = 'OPENAI_API_KEY',
|
||||||
model = 'gpt-5',
|
model = 'gpt-5-mini',
|
||||||
extra = {
|
extra = {
|
||||||
temperature = 1,
|
temperature = 1,
|
||||||
max_tokens = 512,
|
max_tokens = 512,
|
||||||
@@ -73,11 +83,24 @@ return {
|
|||||||
auto_set_highlight_group = true,
|
auto_set_highlight_group = true,
|
||||||
auto_set_keymaps = true,
|
auto_set_keymaps = true,
|
||||||
auto_apply_diff_after_generation = false,
|
auto_apply_diff_after_generation = false,
|
||||||
support_paste_from_clipboard = false,
|
support_paste_from_clipboard = true,
|
||||||
minimize_diff = true,
|
minimize_diff = true,
|
||||||
enable_token_counting = true,
|
enable_token_counting = true,
|
||||||
auto_approve_tool_permissions = true,
|
auto_approve_tool_permissions = true,
|
||||||
},
|
},
|
||||||
|
prompt_logger = {
|
||||||
|
enabled = true,
|
||||||
|
log_dir = vim.fn.stdpath("cache") .. "/avante_prompts", -- directory where logs are saved
|
||||||
|
fortune_cookie_on_success = false, -- shows a random fortune after each logged prompt (requires `fortune` installed)
|
||||||
|
next_prompt = {
|
||||||
|
normal = "<C-n>", -- load the next (newer) prompt log in normal mode
|
||||||
|
insert = "<C-n>",
|
||||||
|
},
|
||||||
|
prev_prompt = {
|
||||||
|
normal = "<C-p>", -- load the previous (older) prompt log in normal mode
|
||||||
|
insert = "<C-p>",
|
||||||
|
},
|
||||||
|
},
|
||||||
mappings = {
|
mappings = {
|
||||||
--- @class AvanteConflictMappings
|
--- @class AvanteConflictMappings
|
||||||
diff = {
|
diff = {
|
||||||
@@ -120,31 +143,41 @@ return {
|
|||||||
close_from_input = nil,
|
close_from_input = nil,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
hints = { enabled = true },
|
selection = {
|
||||||
windows = {
|
|
||||||
---@type 'right' | 'left' | 'top' | 'bottom'
|
|
||||||
position = 'right',
|
|
||||||
wrap = true,
|
|
||||||
width = 35,
|
|
||||||
sidebar_header = {
|
|
||||||
enabled = true,
|
enabled = true,
|
||||||
align = 'center',
|
hint_display = 'delayed',
|
||||||
|
},
|
||||||
|
hints = { enabled = true },
|
||||||
|
|
||||||
|
windows = {
|
||||||
|
---@type "right" | "left" | "top" | "bottom"
|
||||||
|
position = "right", -- the position of the sidebar
|
||||||
|
wrap = true, -- similar to vim.o.wrap
|
||||||
|
width = 30, -- default % based on available width
|
||||||
|
sidebar_header = {
|
||||||
|
enabled = true, -- true, false to enable/disable the header
|
||||||
|
align = "center", -- left, center, right for title
|
||||||
rounded = true,
|
rounded = true,
|
||||||
},
|
},
|
||||||
|
spinner = {
|
||||||
|
editing = { "⡀", "⠄", "⠂", "⠁", "⠈", "⠐", "⠠", "⢀", "⣀", "⢄", "⢂", "⢁", "⢈", "⢐", "⢠", "⣠", "⢤", "⢢", "⢡", "⢨", "⢰", "⣰", "⢴", "⢲", "⢱", "⢸", "⣸", "⢼", "⢺", "⢹", "⣹", "⢽", "⢻", "⣻", "⢿", "⣿" },
|
||||||
|
generating = { "·", "✢", "✳", "∗", "✻", "✽" }, -- Spinner characters for the 'generating' state
|
||||||
|
thinking = { "🤯", "🙄" }, -- Spinner characters for the 'thinking' state
|
||||||
|
},
|
||||||
input = {
|
input = {
|
||||||
prefix = '> ',
|
prefix = "> ",
|
||||||
height = 8,
|
height = 8, -- Height of the input window in vertical layout
|
||||||
},
|
},
|
||||||
edit = {
|
edit = {
|
||||||
border = 'rounded',
|
border = "rounded",
|
||||||
start_insert = true,
|
start_insert = true, -- Start insert mode when opening the edit window
|
||||||
},
|
},
|
||||||
ask = {
|
ask = {
|
||||||
floating = false,
|
floating = false, -- Open the 'AvanteAsk' prompt in a floating window
|
||||||
start_insert = true,
|
start_insert = true, -- Start insert mode when opening the ask window
|
||||||
border = 'rounded',
|
border = "rounded",
|
||||||
---@type 'ours' | 'theirs'
|
---@type "ours" | "theirs"
|
||||||
focus_on_apply = 'ours',
|
focus_on_apply = "ours", -- which diff to focus after applying
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
highlights = {
|
highlights = {
|
||||||
@@ -161,8 +194,8 @@ return {
|
|||||||
override_timeoutlen = 500,
|
override_timeoutlen = 500,
|
||||||
},
|
},
|
||||||
suggestion = {
|
suggestion = {
|
||||||
debounce = 1000,
|
debounce = 600,
|
||||||
throttle = 1000,
|
throttle = 600,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
|||||||
@@ -7,27 +7,28 @@ exists() { command -v "$1" >/dev/null 2>&1; }
|
|||||||
# --- Defined Paths ---
|
# --- Defined Paths ---
|
||||||
PANAMA_PATH="$HOME/.local/share/Panama"
|
PANAMA_PATH="$HOME/.local/share/Panama"
|
||||||
|
|
||||||
echo -e "\n--- Installing RPM Fusion Free and Nonfree Repositories ---\n"
|
echo -e "\n--- Installing Repositories ---"
|
||||||
|
log "Installing RPM Fusion Free and Nonfree Repositories"
|
||||||
sudo dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm > /dev/null 2>&1
|
sudo dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm > /dev/null 2>&1
|
||||||
echo -e "\n--- Enabling Fedora Cisco OpenH264 Repository ---\n"
|
log "Enabling Fedora Cisco OpenH264 Repository"
|
||||||
sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1
|
sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1
|
||||||
echo -e "\n--- Installing RPM Fusion AppStream Metadata ---\n"
|
log "Installing RPM Fusion AppStream Metadata"
|
||||||
sudo dnf update @core -y > /dev/null 2>&1
|
sudo dnf update @core -y > /dev/null 2>&1
|
||||||
sudo dnf install -y rpmfusion-\*-appstream-data
|
sudo dnf install -y rpmfusion-\*-appstream-data > /dev/null 2>&1
|
||||||
|
log "Installing Terra Repository"
|
||||||
echo -e "\n--- Installing Terra Repository ---\n"
|
|
||||||
sudo dnf install -y --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release > /dev/null 2>&1
|
sudo dnf install -y --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release > /dev/null 2>&1
|
||||||
|
|
||||||
echo -e "\n--- Installing relevant packages ---\n"
|
echo -e "\n--- Installing relevant packages ---"
|
||||||
# --- Update all packages ---
|
log "Updating all packages. This may take a while"
|
||||||
log "Updating all packages..."
|
|
||||||
sudo dnf update -y --refresh > /dev/null 2>&1
|
sudo dnf update -y --refresh > /dev/null 2>&1
|
||||||
|
|
||||||
# --- Install all initial packages ---
|
# --- Install all initial packages ---
|
||||||
PACKAGES_FILE="$PANAMA_PATH/setup/packages/initial-packages"
|
PACKAGES_FILE="$PANAMA_PATH/setup/packages/initial-packages"
|
||||||
if [[ -f "$PACKAGES_FILE" ]]; then
|
if [[ -f "$PACKAGES_FILE" ]]; then
|
||||||
INITIAL_PACKAGES=$(tr "\n" " " <"$PACKAGES_FILE")
|
INITIAL_PACKAGES=$(tr "\n" " " <"$PACKAGES_FILE")
|
||||||
log "Installing $INITIAL_PACKAGES"
|
log "Installing Initial Packages"
|
||||||
|
echo -e "Includes the following packages:"
|
||||||
|
echo -e "$(<"$PACKAGES_FILE")"
|
||||||
sudo dnf install -y "$INITIAL_PACKAGES" > /dev/null 2>&1
|
sudo dnf install -y "$INITIAL_PACKAGES" > /dev/null 2>&1
|
||||||
log "Initial packages installed!"
|
log "Initial packages installed!"
|
||||||
else
|
else
|
||||||
@@ -37,7 +38,6 @@ fi
|
|||||||
# --- Install oh-my-posh if not already installed. ---
|
# --- Install oh-my-posh if not already installed. ---
|
||||||
LOCAL_BIN_PATH="$HOME/.local/bin"
|
LOCAL_BIN_PATH="$HOME/.local/bin"
|
||||||
mkdir -p "$LOCAL_BIN_PATH"
|
mkdir -p "$LOCAL_BIN_PATH"
|
||||||
|
|
||||||
if [[ -x "$LOCAL_BIN_PATH/oh-my-posh" ]]; then
|
if [[ -x "$LOCAL_BIN_PATH/oh-my-posh" ]]; then
|
||||||
log "oh-my-posh already installed at \"$LOCAL_BIN_PATH/oh-my-posh\""
|
log "oh-my-posh already installed at \"$LOCAL_BIN_PATH/oh-my-posh\""
|
||||||
else
|
else
|
||||||
@@ -49,7 +49,9 @@ fi
|
|||||||
DEV_FILE="$PANAMA_PATH/setup/packages/development-packages"
|
DEV_FILE="$PANAMA_PATH/setup/packages/development-packages"
|
||||||
if [[ -f "$DEV_FILE" ]]; then
|
if [[ -f "$DEV_FILE" ]]; then
|
||||||
DEV_PACKAGES=$(tr "\n" " " <"$DEV_FILE")
|
DEV_PACKAGES=$(tr "\n" " " <"$DEV_FILE")
|
||||||
log "Installing $DEV_PACKAGES"
|
log "Installing Development Packages. Mostly for Neovim."
|
||||||
|
echo -e "Includes the following packages:"
|
||||||
|
echo -e "$(<"$DEV_FILE")"
|
||||||
sudo dnf install -y $DEV_PACKAGES > /dev/null 2>&1
|
sudo dnf install -y $DEV_PACKAGES > /dev/null 2>&1
|
||||||
log "Development packages installed!"
|
log "Development packages installed!"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# --- Helper functions ---
|
||||||
|
log() { echo -e "\033[1;34m[INFO]\033[0m $*"; }
|
||||||
|
|
||||||
# Define paths as they have not been defined by new bashrc yet!
|
# Define paths as they have not been defined by new bashrc yet!
|
||||||
PANAMA_PATH="${PANAMA_PATH:-$HOME/.local/share/Panama}"
|
PANAMA_PATH="${PANAMA_PATH:-$HOME/.local/share/Panama}"
|
||||||
PANAMA_BASH="${PANAMA_BASH:-$PANAMA_PATH/config/bash}"
|
PANAMA_BASH="${PANAMA_BASH:-$PANAMA_PATH/config/bash}"
|
||||||
@@ -11,36 +14,39 @@ CONFIG="$HOME/.config"
|
|||||||
mkdir -p "$PANAMA_OLD"
|
mkdir -p "$PANAMA_OLD"
|
||||||
|
|
||||||
# --- Bashrc ---
|
# --- Bashrc ---
|
||||||
|
echo -e "\n--- Replacing .bashrc ---"
|
||||||
# Backup existing .bashrc if it's a regular file
|
# Backup existing .bashrc if it's a regular file
|
||||||
if [ -f "$HOME/.bashrc" ] && [ ! -L "$HOME/.bashrc" ]; then
|
if [ -f "$HOME/.bashrc" ] && [ ! -L "$HOME/.bashrc" ]; then
|
||||||
|
log "Backing up existing .bashrc"
|
||||||
mv "$HOME/.bashrc" "$PANAMA_OLD/.bashrc"
|
mv "$HOME/.bashrc" "$PANAMA_OLD/.bashrc"
|
||||||
fi
|
fi
|
||||||
# Remove old symlink if it exists and points somewhere else
|
# Remove old symlink if it exists and points somewhere else
|
||||||
if [ -L "$HOME/.bashrc" ]; then
|
if [ -L "$HOME/.bashrc" ]; then
|
||||||
|
log "Removing old .bashrc symlink"
|
||||||
rm "$HOME/.bashrc"
|
rm "$HOME/.bashrc"
|
||||||
fi
|
fi
|
||||||
# Symlink Panama .bashrc file to ~/.bashrc
|
# Symlink Panama .bashrc file to ~/.bashrc
|
||||||
|
log "Symlinking Panama .bashrc file to ~/.bashrc"
|
||||||
ln -s "$PANAMA_BASH/.bashrc" "$HOME/.bashrc"
|
ln -s "$PANAMA_BASH/.bashrc" "$HOME/.bashrc"
|
||||||
|
|
||||||
dirs=("espanso" "forge" "ghostty" "kitty" "nvim" "tmux")
|
dirs=("espanso" "forge" "ghostty" "kitty" "nvim" "tmux")
|
||||||
|
|
||||||
for dir in "${dirs[@]}"; do
|
for dir in "${dirs[@]}"; do
|
||||||
echo "--- Setting up $dir ---"
|
echo -e "\n--- Setting up $dir ---"
|
||||||
|
|
||||||
# Remove old symlink if it exists
|
# Remove old symlink if it exists
|
||||||
if [ -L "$CONFIG/$dir" ]; then
|
if [ -L "$CONFIG/$dir" ]; then
|
||||||
rm "$CONFIG/$dir"
|
rm "$CONFIG/$dir"
|
||||||
echo "Removed old symlink at $CONFIG/$dir"
|
log "Removed old symlink at $CONFIG/$dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Backup existing directory if it exists
|
# Backup existing directory if it exists
|
||||||
if [ -d "$CONFIG/$dir" ]; then
|
if [ -d "$CONFIG/$dir" ]; then
|
||||||
mv "$CONFIG/$dir" "$PANAMA_OLD/$dir"
|
mv "$CONFIG/$dir" "$PANAMA_OLD/$dir"
|
||||||
echo "Moved existing $dir config to $PANAMA_OLD/$dir"
|
log "Moved existing $dir config to $PANAMA_OLD/$dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create symlink
|
# Create symlink
|
||||||
ln -s "$PANAMA_DOT/$dir" "$CONFIG/$dir"
|
ln -s "$PANAMA_DOT/$dir" "$CONFIG/$dir"
|
||||||
echo "Linked $PANAMA_DOT/$dir → $CONFIG/$dir"
|
log "Linked $PANAMA_DOT/$dir → $CONFIG/$dir"
|
||||||
echo
|
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user