mirror of
https://github.com/thesleepingsage/hypr-lens.git
synced 2026-06-03 04:04:41 +02:00
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:
@@ -30,6 +30,9 @@ qmlcache/
|
||||
# Claude Code / AI assistant
|
||||
.claude/
|
||||
|
||||
# Wiki (cloned separately for local editing)
|
||||
wiki/
|
||||
|
||||
# IDE / Editor
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
Executable
+50
@@ -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."
|
||||
Reference in New Issue
Block a user