chore: add dev-setup.sh for contributor workflow

Creates symlinks from install dirs to repo for live editing.
Also adds wiki/ to .gitignore for local wiki editing.
This commit is contained in:
DJ
2025-12-20 12:36:48 -05:00
parent e9f6a22c6e
commit 3446e3f619
2 changed files with 53 additions and 0 deletions
+3
View File
@@ -30,6 +30,9 @@ qmlcache/
# Claude Code / AI assistant
.claude/
# Wiki (cloned separately for local editing)
wiki/
# IDE / Editor
.vscode/
.idea/
Executable
+50
View File
@@ -0,0 +1,50 @@
#!/bin/bash
# hypr-lens Developer Setup
# Creates symlinks from install dirs to source for live editing
#
# Usage: ./dev-setup.sh
set -eu
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
QML_INSTALL_DIR="$HOME/.config/quickshell/hypr-lens"
SCRIPTS_INSTALL_DIR="$HOME/.local/share/hypr-lens/scripts"
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
info() { echo -e "${YELLOW}[DEV]${NC} $1"; }
success() { echo -e "${GREEN}[OK]${NC} $1"; }
echo "hypr-lens Developer Setup"
echo "========================="
echo ""
echo "This creates symlinks so edits in the repo are immediately reflected."
echo ""
for pair in \
"$QML_INSTALL_DIR:$SCRIPT_DIR/quickshell" \
"$SCRIPTS_INSTALL_DIR:$SCRIPT_DIR/scripts"; do
dest="${pair%%:*}"
source="${pair##*:}"
if [[ -L "$dest" ]]; then
info "Symlink already exists: $dest"
elif [[ -d "$dest" ]]; then
info "Replacing directory with symlink: $dest"
rm -rf "$dest"
mkdir -p "$(dirname "$dest")"
ln -s "$source" "$dest"
success "Symlinked: $dest$source"
else
mkdir -p "$(dirname "$dest")"
ln -s "$source" "$dest"
success "Symlinked: $dest$source"
fi
done
echo ""
success "Dev setup complete! Edits in repo are now live."