mirror of
https://github.com/theniceboy/.config.git
synced 2025-12-26 14:44:57 +08:00
deployment script
This commit is contained in:
parent
ecee3aedeb
commit
886e683ed0
4 changed files with 354 additions and 96 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -61,3 +61,7 @@ yazi/bookmark
|
|||
!/claude/settings.json
|
||||
!/claude/system-prompt.txt
|
||||
!/claude/scripts/
|
||||
!/claude/commands/
|
||||
|
||||
# Deploy script
|
||||
!/deploy.sh
|
||||
|
|
|
|||
149
README.md
149
README.md
|
|
@ -1,60 +1,105 @@
|
|||
# My config...
|
||||
# My Config
|
||||
|
||||
[中文版](./README_cn.md)
|
||||
|
||||
This config folder includes `i3` and `alacritty` config, however, I'm using [dwm](https://github.com/theniceboy/dwm) and [st](https://github.com/theniceboy/st) now.
|
||||
This config folder includes configurations for various development tools and applications.
|
||||
|
||||
BTW, my scripts are in [this repo](https://github.com/theniceboy/scripts).
|
||||
## Deploy
|
||||
|
||||
# Brew packages
|
||||
```
|
||||
# Building
|
||||
brew install automake gcc gdb jsdoc3 cmake gnu-getopt gnu-sed node go
|
||||
|
||||
# Utils
|
||||
brew install git git-delta git-flow rainbarf bat ccat wget tree fzf the_silver_searcher ripgrep fd
|
||||
|
||||
# Apps
|
||||
brew install tmux neovim jesseduffield/lazygit/lazygit yazi gh awscli tldr speedtest-cli ncdu neofetch onefetch bmon loc
|
||||
|
||||
# Yazi
|
||||
brew install poppler ffmpeg sevenzip jq starship imagemagick
|
||||
### Quick Setup
|
||||
Run the deployment script to install all tools and configure symlinks:
|
||||
```bash
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
# Important stuff:
|
||||
## Ranger
|
||||
use `pip install ueberzug` and `ranger-git`
|
||||
The script is idempotent - you can run it multiple times safely. It will:
|
||||
- Install/update Homebrew packages
|
||||
- Set up zsh configuration sourcing
|
||||
- Create configuration symlinks (tmux, claude)
|
||||
- Skip already installed packages
|
||||
|
||||
## mutt
|
||||
### Manual Homebrew Installation
|
||||
If you need to install Homebrew manually:
|
||||
```bash
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
```
|
||||
|
||||
## Apps
|
||||
|
||||
### Claude Code Voice Configuration
|
||||
|
||||
This config includes a directory-based voice system for Claude Code that uses macOS text-to-speech.
|
||||
|
||||
#### Voice Commands
|
||||
- `/voice-on` - Enable text-to-speech for current directory
|
||||
- `/voice-off` - Disable text-to-speech for current directory
|
||||
|
||||
#### Selecting and Downloading High Quality System Voices
|
||||
|
||||
For the best text-to-speech experience, download high-quality system voices:
|
||||
|
||||
1. **Open System Preferences** → **Accessibility** → **Spoken Content**
|
||||
2. **Click the info icon (ⓘ)** next to the "System Voice" dropdown
|
||||
3. **Search for "Siri"** to find the highest quality voices
|
||||
4. **Download Siri voices** - these are the premium, neural-powered voices
|
||||
5. **Select your preferred Siri voice** in the System Voice dropdown
|
||||
|
||||
**Recommended**: Siri voices provide the most natural speech quality but require downloading additional voice data.
|
||||
|
||||
#### Voice Database
|
||||
Voice settings are stored per-directory in `~/.claude/voice-db.json` and automatically created by the scripts.
|
||||
|
||||
### Other Applications
|
||||
- **tmux**: Terminal multiplexer with custom configuration
|
||||
- **neovim**: Modern text editor
|
||||
- **yazi**: Terminal file manager
|
||||
- **lazygit**: TUI for git operations
|
||||
|
||||
## Linux Related
|
||||
|
||||
<details>
|
||||
<summary>Legacy Configuration (Click to expand)</summary>
|
||||
|
||||
My scripts are in [this repo](https://github.com/theniceboy/scripts).
|
||||
|
||||
This folder includes `i3` and `alacritty` config, however, I'm using [dwm](https://github.com/theniceboy/dwm) and [st](https://github.com/theniceboy/st) now.
|
||||
|
||||
### Ranger
|
||||
Use `pip install ueberzug` and `ranger-git`
|
||||
|
||||
### Mutt Email Setup
|
||||
In `~/.gnupg/gpg-agent.conf`:
|
||||
```
|
||||
default-cache-ttl 34560000
|
||||
max-cache-ttl 34560000
|
||||
```
|
||||
If this doesn't work, try [pam-gnupg](https://github.com/cruegge/pam-gnupg)
|
||||
```
|
||||
|
||||
If this doesn't work, try [pam-gnupg](https://github.com/cruegge/pam-gnupg):
|
||||
```bash
|
||||
yay -S pam-gnupg-git
|
||||
```
|
||||
and in `/etc/pam.d/system-local-login` add:
|
||||
|
||||
And in `/etc/pam.d/system-local-login` add:
|
||||
```
|
||||
auth optional pam_gnupg.so
|
||||
session optional pam_gnupg.so
|
||||
```
|
||||
|
||||
## Input Methods
|
||||
### Input Methods
|
||||
Install: `fcitx` `fcitx-im` `fcitx-googlepinyin` `fcitx-configtool`
|
||||
|
||||
And in `/etc/X11/xinit/xinitrc`:
|
||||
```
|
||||
```bash
|
||||
export GTK_IM_MODULE=fcitx
|
||||
export QT_IM_MODULE=fcitx
|
||||
export XMODIFIERS="@im=fcitx"
|
||||
```
|
||||
|
||||
#### Fcitx users need to set the first input method to be Keyboard - layout
|
||||
**Note**: Fcitx users need to set the first input method to be Keyboard - layout
|
||||
|
||||
## fonts
|
||||
#### locale
|
||||
### Fonts
|
||||
|
||||
#### Locale Configuration
|
||||
In `locale.conf`:
|
||||
```
|
||||
LANG=en_US.UTF-8
|
||||
|
|
@ -69,48 +114,24 @@ LC_TELEPHONE=en_US.UTF-8
|
|||
LC_TIME=en_US.UTF-8
|
||||
```
|
||||
|
||||
#### My Font
|
||||
I use the `Source Code Pro` font and `nerd-fonts-source-code-pro`.
|
||||
#### Font Recommendations
|
||||
- **Main Font**: `Source Code Pro` and `nerd-fonts-source-code-pro`
|
||||
- **Noto Fonts**: Install `noto-fonts` (not `-all` - it's bloated). Check `/usr/share/fonts/noto`
|
||||
|
||||
#### About Noto
|
||||
Just install `noto-fonts` (not `-all`). It's already bloated. Check `/usr/share/fonts/noto`
|
||||
|
||||
#### Emoji
|
||||
```
|
||||
#### Emoji Fonts
|
||||
```bash
|
||||
yay -S ttf-linux-libertine ttf-inconsolata ttf-joypixels ttf-twemoji-color noto-fonts-emoji ttf-liberation ttf-droid
|
||||
```
|
||||
|
||||
#### Chinese
|
||||
```
|
||||
#### Chinese Fonts
|
||||
```bash
|
||||
yay -S wqy-bitmapfont wqy-microhei wqy-microhei-lite wqy-zenhei adobe-source-han-mono-cn-fonts adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts
|
||||
```
|
||||
|
||||
## gtk-theme
|
||||
I use `adapta-gtk-theme` and `arc-icon-theme`.
|
||||
### GTK Theme
|
||||
Using `adapta-gtk-theme` and `arc-icon-theme`.
|
||||
|
||||
## Claude Code Voice Configuration
|
||||
### Arch Packages
|
||||
See [my-packages.txt](https://github.com/theniceboy/.config/blob/master/my-packages.txt) for complete package list.
|
||||
|
||||
This config includes a directory-based voice system for Claude Code that uses macOS text-to-speech.
|
||||
|
||||
### Voice Commands
|
||||
- `/voice-on` - Enable text-to-speech for current directory
|
||||
- `/voice-off` - Disable text-to-speech for current directory
|
||||
|
||||
### Selecting and Downloading High Quality System Voices
|
||||
|
||||
For the best text-to-speech experience, download high-quality system voices:
|
||||
|
||||
1. **Open System Preferences** → **Accessibility** → **Spoken Content**
|
||||
2. **Click "System Voice"** dropdown → **Customize...**
|
||||
3. **Download premium voices** (these are much higher quality than default):
|
||||
- **English**: Alex (Enhanced), Samantha (Enhanced), Victoria (Enhanced)
|
||||
- **Other languages**: Download enhanced versions as needed
|
||||
4. **Select your preferred voice** in the System Voice dropdown
|
||||
|
||||
**Note**: Enhanced voices are 100-200MB each but provide significantly better speech quality than compact voices.
|
||||
|
||||
### Voice Database
|
||||
Voice settings are stored per-directory in `~/.claude/voice-db.json` and automatically created by the scripts.
|
||||
|
||||
## Arch Packages I Installed:
|
||||
See [my-packages.txt](https://github.com/theniceboy/.config/blob/master/my-packages.txt)
|
||||
</details>
|
||||
|
|
|
|||
124
README_cn.md
124
README_cn.md
|
|
@ -1,48 +1,108 @@
|
|||
# 我的配置文件...
|
||||
# 我的配置
|
||||
|
||||
[English Ver.](./README.md)
|
||||
|
||||
此份配置文件包含 `i3` 和 `alacritty` 的配置, 不管怎样, 我现在已在使用 [dwm](https://github.com/theniceboy/dwm) 和 [st](https://github.com/theniceboy/st)
|
||||
|
||||
顺便说一句, 我的脚本都在[此仓库中](https://github.com/theniceboy/scripts)
|
||||
此配置文件夹包含各种开发工具和应用程序的配置。
|
||||
|
||||
中文翻译: [KiteAB](https://github.com/KiteAB)
|
||||
|
||||
# 重要的东西:
|
||||
## Ranger
|
||||
## 部署
|
||||
|
||||
### 快速设置
|
||||
运行部署脚本来安装所有工具并配置符号链接:
|
||||
```bash
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
脚本具有幂等性 - 你可以多次安全地运行它。它将:
|
||||
- 安装/更新 Homebrew 包
|
||||
- 设置 zsh 配置源
|
||||
- 创建配置符号链接 (tmux, claude)
|
||||
- 跳过已安装的包
|
||||
|
||||
### 手动安装 Homebrew
|
||||
如果需要手动安装 Homebrew:
|
||||
```bash
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
```
|
||||
|
||||
## 应用程序
|
||||
|
||||
### Claude Code 语音配置
|
||||
|
||||
此配置包含一个基于目录的 Claude Code 语音系统,使用 macOS 文本转语音功能。
|
||||
|
||||
#### 语音命令
|
||||
- `/voice-on` - 为当前目录启用文本转语音
|
||||
- `/voice-off` - 为当前目录禁用文本转语音
|
||||
|
||||
#### 选择和下载高质量系统语音
|
||||
|
||||
为了获得最佳的文本转语音体验,请下载高质量的系统语音:
|
||||
|
||||
1. **打开系统偏好设置** → **辅助功能** → **朗读内容**
|
||||
2. **点击"系统语音"下拉菜单旁边的信息图标 (ⓘ)**
|
||||
3. **搜索"Siri"**以找到最高质量的语音
|
||||
4. **下载 Siri 语音** - 这些是基于神经网络的高级语音
|
||||
5. **在系统语音下拉菜单中选择你喜欢的 Siri 语音**
|
||||
|
||||
**推荐**: Siri 语音提供最自然的语音质量,但需要下载额外的语音数据。
|
||||
|
||||
#### 语音数据库
|
||||
语音设置按目录存储在 `~/.claude/voice-db.json` 中,由脚本自动创建。
|
||||
|
||||
### 其他应用程序
|
||||
- **tmux**: 带有自定义配置的终端复用器
|
||||
- **neovim**: 现代文本编辑器
|
||||
- **yazi**: 终端文件管理器
|
||||
- **lazygit**: Git 操作的 TUI
|
||||
|
||||
## Linux 相关
|
||||
|
||||
<details>
|
||||
<summary>传统配置(点击展开)</summary>
|
||||
|
||||
我的脚本在[此仓库中](https://github.com/theniceboy/scripts)。
|
||||
|
||||
此文件夹包含 `i3` 和 `alacritty` 配置,不过我现在使用 [dwm](https://github.com/theniceboy/dwm) 和 [st](https://github.com/theniceboy/st)。
|
||||
|
||||
### Ranger
|
||||
使用 `pip install ueberzug` 和 `ranger-git`
|
||||
|
||||
## mutt
|
||||
在 `~/.gnupg/gpg-agent.conf` 中:
|
||||
### Mutt 邮件设置
|
||||
在 `~/.gnupg/gpg-agent.conf` 中:
|
||||
```
|
||||
default-cache-ttl 34560000
|
||||
max-cache-ttl 34560000
|
||||
```
|
||||
如果它不能运行, 请尝试 [pam-gnupg](https://github.com/cruegge/pam-gnupg)
|
||||
```
|
||||
|
||||
如果这不起作用,请尝试 [pam-gnupg](https://github.com/cruegge/pam-gnupg):
|
||||
```bash
|
||||
yay -S pam-gnupg-git
|
||||
```
|
||||
并在 `/etc/pam.d/system-local-login` 中添加以下行:
|
||||
|
||||
并在 `/etc/pam.d/system-local-login` 中添加:
|
||||
```
|
||||
auth optional pam_gnupg.so
|
||||
session optional pam_gnupg.so
|
||||
```
|
||||
|
||||
## 输入法
|
||||
安装: `fcitx` `fcitx-im` `fcitx-googlepinyin` `fcitx-configtool`
|
||||
### 输入法
|
||||
安装:`fcitx` `fcitx-im` `fcitx-googlepinyin` `fcitx-configtool`
|
||||
|
||||
并编辑 `/etc/X11/xinit/xinitrc`:
|
||||
```
|
||||
并在 `/etc/X11/xinit/xinitrc` 中:
|
||||
```bash
|
||||
export GTK_IM_MODULE=fcitx
|
||||
export QT_IM_MODULE=fcitx
|
||||
export XMODIFIERS="@im=fcitx"
|
||||
```
|
||||
|
||||
#### Fcitx 用户需把第一输入法设置为键盘 - 布局
|
||||
**注意**: Fcitx 用户需要将第一输入法设置为键盘 - 布局
|
||||
|
||||
## 字体
|
||||
#### 本地化
|
||||
在 `locale.conf` 中:
|
||||
### 字体
|
||||
|
||||
#### 本地化配置
|
||||
在 `locale.conf` 中:
|
||||
```
|
||||
LANG=en_US.UTF-8
|
||||
LC_ADDRESS=en_US.UTF-8
|
||||
|
|
@ -56,24 +116,24 @@ LC_TELEPHONE=en_US.UTF-8
|
|||
LC_TIME=en_US.UTF-8
|
||||
```
|
||||
|
||||
#### 我的字体
|
||||
我使用 `Source Code Pro` 字体和 `nerd-fonts-source-code-pro`
|
||||
#### 字体推荐
|
||||
- **主要字体**: `Source Code Pro` 和 `nerd-fonts-source-code-pro`
|
||||
- **Noto 字体**: 安装 `noto-fonts`(不是 `-all` - 它很臃肿)。检查 `/usr/share/fonts/noto`
|
||||
|
||||
#### 关于 Noto
|
||||
只需要安装 `noto-fonts` (并非 `-all`), 它已经非常臃肿, 检查 `/usr/share/fonts/noto`
|
||||
|
||||
#### Emoji
|
||||
```
|
||||
#### Emoji 字体
|
||||
```bash
|
||||
yay -S ttf-linux-libertine ttf-inconsolata ttf-joypixels ttf-twemoji-color noto-fonts-emoji ttf-liberation ttf-droid
|
||||
```
|
||||
|
||||
#### 中文
|
||||
```
|
||||
#### 中文字体
|
||||
```bash
|
||||
yay -S wqy-bitmapfont wqy-microhei wqy-microhei-lite wqy-zenhei adobe-source-han-mono-cn-fonts adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts
|
||||
```
|
||||
|
||||
## GTK 主题
|
||||
我使用 `adapta-gtk-theme` 与 `arc-icon-theme`
|
||||
### GTK 主题
|
||||
使用 `adapta-gtk-theme` 和 `arc-icon-theme`。
|
||||
|
||||
## 我安装的 Arch 软件包:
|
||||
查看 [my-packages.txt](https://github.com/theniceboy/.config/blob/master/my-packages.txt)
|
||||
### Arch 软件包
|
||||
查看 [my-packages.txt](https://github.com/theniceboy/.config/blob/master/my-packages.txt) 获取完整软件包列表。
|
||||
|
||||
</details>
|
||||
173
deploy.sh
Executable file
173
deploy.sh
Executable file
|
|
@ -0,0 +1,173 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 Starting deployment script..."
|
||||
|
||||
# Check if brew is installed or try to find it
|
||||
if ! command -v brew &> /dev/null; then
|
||||
echo "⚠️ Homebrew not in PATH, checking common locations..."
|
||||
|
||||
# Try common Homebrew paths for macOS
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
for brew_path in "/opt/homebrew/bin/brew" "/usr/local/bin/brew"; do
|
||||
if [[ -x "$brew_path" ]]; then
|
||||
echo "🔧 Found Homebrew at $brew_path, setting up environment..."
|
||||
eval "$($brew_path shellenv)"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Check again after PATH update
|
||||
if ! command -v brew &> /dev/null; then
|
||||
echo "❌ Homebrew not found"
|
||||
echo "📦 Please install Homebrew first by running:"
|
||||
echo " /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""
|
||||
echo "After installation, make sure to run the commands it suggests to add brew to your PATH."
|
||||
echo "Then run this script again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "✅ Homebrew found"
|
||||
|
||||
# Install brew packages
|
||||
echo "📦 Checking brew packages..."
|
||||
|
||||
# Get list of installed packages
|
||||
installed_packages=$(brew list --formula -1)
|
||||
|
||||
# Function to install package if not already installed
|
||||
install_if_missing() {
|
||||
local package="$1"
|
||||
local display_name="${2:-$package}"
|
||||
|
||||
# Handle tap packages (contains /)
|
||||
if [[ "$package" == *"/"* ]]; then
|
||||
local package_name="${package##*/}" # Extract package name after last /
|
||||
if ! echo "$installed_packages" | grep -q "^${package_name}$"; then
|
||||
echo " 📦 Installing $display_name..."
|
||||
brew install "$package"
|
||||
fi
|
||||
else
|
||||
if ! echo "$installed_packages" | grep -q "^${package}$"; then
|
||||
echo " 📦 Installing $display_name..."
|
||||
brew install "$package"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# System utilities
|
||||
install_if_missing "htop" # Interactive process viewer
|
||||
install_if_missing "dust" # Disk usage analyzer
|
||||
install_if_missing "ncdu" # Disk usage analyzer with ncurses
|
||||
install_if_missing "fswatch" # File system monitoring
|
||||
install_if_missing "pipx" # Install Python apps in isolation
|
||||
|
||||
# macOS GNU utilities
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
install_if_missing "coreutils" # GNU core utilities (ls, cp, mv, etc.)
|
||||
install_if_missing "gnu-tar" # GNU tar archiver
|
||||
install_if_missing "gnu-getopt" # GNU command line option parsing
|
||||
install_if_missing "gnu-sed" # GNU stream editor
|
||||
fi
|
||||
|
||||
# Development tools
|
||||
install_if_missing "node" # Node.js JavaScript runtime
|
||||
install_if_missing "go" # Go programming language
|
||||
install_if_missing "gcc" # GNU Compiler Collection
|
||||
install_if_missing "gdb" # GNU debugger
|
||||
install_if_missing "automake" # Build automation tool
|
||||
install_if_missing "cmake" # Cross-platform build system
|
||||
install_if_missing "jsdoc3" # JavaScript documentation generator
|
||||
|
||||
# Text processing and search
|
||||
install_if_missing "ripgrep" # Fast text search (rg)
|
||||
install_if_missing "the_silver_searcher" # Fast text search (ag)
|
||||
install_if_missing "fd" # Fast find alternative
|
||||
install_if_missing "fzf" # Fuzzy finder
|
||||
install_if_missing "bat" # Better cat with syntax highlighting
|
||||
install_if_missing "ccat" # Colorized cat
|
||||
install_if_missing "tree" # Display directory trees
|
||||
install_if_missing "jq" # JSON processor
|
||||
|
||||
# File management
|
||||
install_if_missing "yazi" # Terminal file manager
|
||||
install_if_missing "sevenzip" # File archiver
|
||||
|
||||
# Git and version control
|
||||
install_if_missing "git" # Version control system
|
||||
install_if_missing "git-delta" # Better git diff viewer
|
||||
install_if_missing "git-flow" # Git branching model extensions
|
||||
install_if_missing "jesseduffield/lazygit/lazygit" "lazygit" # TUI for git
|
||||
install_if_missing "gh" # GitHub CLI
|
||||
|
||||
# Media and graphics
|
||||
install_if_missing "ffmpeg" # Media processing toolkit
|
||||
install_if_missing "imagemagick" # Image manipulation toolkit
|
||||
install_if_missing "poppler" # PDF rendering library
|
||||
install_if_missing "yt-dlp" # YouTube downloader
|
||||
|
||||
# Network and web
|
||||
install_if_missing "wget" # Web file downloader
|
||||
install_if_missing "speedtest-cli" # Internet speed test
|
||||
|
||||
# Terminal and shell
|
||||
install_if_missing "tmux" # Terminal multiplexer
|
||||
install_if_missing "neovim" # Modern Vim text editor
|
||||
install_if_missing "starship" # Cross-shell prompt
|
||||
install_if_missing "rainbarf" # CPU/RAM/battery stats for tmux
|
||||
install_if_missing "neofetch" # System information display
|
||||
install_if_missing "onefetch" # Git repository information
|
||||
install_if_missing "tldr" # Simplified man pages
|
||||
install_if_missing "bmon" # Bandwidth monitor
|
||||
install_if_missing "loc" # Lines of code counter
|
||||
|
||||
# Applications
|
||||
install_if_missing "awscli" # AWS command line interface
|
||||
install_if_missing "azure-cli" # Azure command line interface
|
||||
install_if_missing "terraform" # Infrastructure as code
|
||||
|
||||
echo "✅ All packages processed"
|
||||
|
||||
# Ensure zsh configuration is sourced
|
||||
echo "🔗 Setting up zsh configuration..."
|
||||
if [ ! -f "$HOME/.zshrc" ]; then
|
||||
echo "source ~/.config/zsh/zshrc" > "$HOME/.zshrc"
|
||||
echo "✅ Created ~/.zshrc with config source"
|
||||
elif ! grep -q "source ~/.config/zsh/zshrc" "$HOME/.zshrc"; then
|
||||
echo "source ~/.config/zsh/zshrc" >> "$HOME/.zshrc"
|
||||
echo "✅ Added config source to ~/.zshrc"
|
||||
else
|
||||
echo "✅ Zsh config source already exists in ~/.zshrc"
|
||||
fi
|
||||
|
||||
# Function to create symlinks
|
||||
create_symlink() {
|
||||
local target="$1"
|
||||
local link_name="$2"
|
||||
local display_name="$3"
|
||||
|
||||
echo "🔗 Setting up $display_name symlink..."
|
||||
|
||||
if [ ! -L "$link_name" ]; then
|
||||
if [ -e "$link_name" ]; then
|
||||
echo "⚠️ Backing up existing $link_name to ${link_name}.backup"
|
||||
mv "$link_name" "${link_name}.backup"
|
||||
fi
|
||||
ln -s "$target" "$link_name"
|
||||
echo "✅ Symlink created: $link_name -> $target"
|
||||
elif [ "$(readlink "$link_name")" = "$target" ]; then
|
||||
echo "✅ $display_name symlink already exists and is correct"
|
||||
else
|
||||
echo "⚠️ $link_name exists but points to $(readlink "$link_name")"
|
||||
echo " Expected: $target"
|
||||
fi
|
||||
}
|
||||
|
||||
# Create configuration symlinks
|
||||
create_symlink "$HOME/.config/.tmux.conf" "$HOME/.tmux.conf" "Tmux"
|
||||
create_symlink "$HOME/.config/claude" "$HOME/.claude" "Claude"
|
||||
|
||||
echo "🎉 Deployment complete!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue