Skip to content

refactor: modularize setup scripts and restore multi-distro support - #3

Merged
m24ih merged 13 commits into
mainfrom
refactor/scripts-modularization
Sep 8, 2026
Merged

m24ih merged 13 commits into
mainfrom
refactor/scripts-modularization

Conversation

@m24ih

@m24ih m24ih commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

This PR refactors and modularizes the dotfiles installation and setup scripts:

  • Scripts Modularization: Moved 13 setup and helper scripts from the repository root into a dedicated, flat scripts/ directory.
  • Root Cleanup: Preserved install.sh and stow_all.sh at root; updated .stow-local-ignore to prevent inadvertent stowing of scripts/.
  • Multi-Distro Support: Restored and polished distribution detection and installation branching across Arch/CachyOS, Fedora, and Debian/Ubuntu in install.sh, stow_all.sh, scripts/setup_services.sh, and scripts/setup_fonts.sh.
  • Dynamic Path Resolution: Updated scripts/install_flatpaks.sh to dynamically locate flat_packages.txt in the repository root.
  • On-Demand 1Password Module: Added 1password module to install.sh which runs strictly on-demand (./install.sh 1password) with sudo.
  • Documentation: Updated README.md, ssh/README.md, and vivaldi/README.md to reflect new scripts/ paths.

Copilot AI lite review requested due to automatic review settings September 8, 2026 11:47
@m24ih
m24ih merged commit 6273889 into main Sep 8, 2026
1 check passed
@m24ih
m24ih deleted the refactor/scripts-modularization branch September 8, 2026 11:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are confirmed functional and security issues in the updated scripts (missing stow package coverage, brittle JSON editing, overly broad SSH config changes, and distro-mismatched execution paths).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR restructures the dotfiles repo’s installation flow by moving helper/setup scripts into scripts/, updating entrypoints (install.sh, stow_all.sh) to support multiple distros, and refreshing documentation to match the new layout.

Changes:

  • Centralizes operational scripts under scripts/ and cleans up obsolete root-level helpers.
  • Refactors install.sh/stow_all.sh for distro-aware dependencies and modular execution (including an on-demand 1password module).
  • Updates READMEs and stow ignore rules to prevent accidental stowing of scripts/.
File summaries
File Description
vivaldi/README.md Updates script path reference to scripts/.
ssh/README.md Updates sshd setup script path reference to scripts/.
README.md Updates module table + script references; documents new modules.
install.sh Refactors distro branching; updates script paths; adds 1password module hook.
stow_all.sh Switches to explicit package list + auto-install stow by distro.
.stow-local-ignore Prevents stowing scripts/.
.gitignore Ignores .superpowers/ workspace directory.
scripts/install_flatpaks.sh Resolves repo root dynamically to find flat_packages.txt.
scripts/setup_fonts.sh Restores multi-distro font installation logic (Arch vs others).
scripts/setup_services.sh Restores multi-distro system/user service enabling lists.
scripts/setup_ufw.sh Adds Steam LAN transfer rules and updates description.
scripts/setup_warp.sh Adds WARP split-tunnel exclusions for LAN + Tailscale ranges.
scripts/setup_sshd.sh Adds sshd restriction drop-in install helper.
scripts/setup_npm.sh Adds npm global prefix configuration for non-sudo installs.
scripts/setup_keychron.sh Adds udev rules installer for Keychron K5 Max.
scripts/setup_fkeys.sh Adds hid_apple fnmode configuration helper.
scripts/setup_discord_proxy.sh Adds SSH SOCKS proxy wrapper + desktop entry + Discord config tweak.
scripts/setup_1password.sh Adds /etc/1password/custom_allowed_browsers generator.
scripts/switch_to_iwd.sh Adds NetworkManager backend switch helper (Arch/pacman-based).
scripts/vivaldi_middle_click.sh Simplifies to desktop entry flag injection for autoscroll.
docs/superpowers/specs/2026-09-08-scripts-refactor-design.md Adds design/spec for the refactor.
docs/superpowers/plans/2026-09-08-scripts-refactor.md Adds implementation plan and verification checklist.
antigravity/.gemini/antigravity-cli/settings.json Updates tool model + allowed path list.
setup_fonts.sh (deleted) Removes root-level fonts setup script (moved to scripts/).
setup_internet_monitor.sh (deleted) Removes obsolete internet monitor setup script.
switch_to_wpa_supplicant.sh (deleted) Removes obsolete NetworkManager backend switch script.
migrate_dotfiles.sh (deleted) Removes obsolete migration helper.
newpackages.txt (deleted) Removes large obsolete package list dump.
Review details
  • Files reviewed: 19/28 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread install.sh
Comment on lines 164 to 166
print_section "'switch_to_iwd.sh' script'i çalıştırılıyor..."
run_script "$DOTFILES_DIR/switch_to_iwd.sh" sudo
run_script "$DOTFILES_DIR/scripts/switch_to_iwd.sh" sudo
echo ":: Oyunlarda Jitter azaltmak icin iwd gecisi tamamlandı."
Comment thread scripts/setup_fonts.sh
Comment on lines +25 to +31
FONT_DIR="$HOME/.local/share/fonts"
mkdir -p "$FONT_DIR"
echo ":: JetBrains Mono Nerd Font GitHub'dan indiriliyor..."
TEMP_DIR=$(mktemp -d)
curl -fsSL -o "$TEMP_DIR/JetBrainsMono.tar.xz" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz"
tar -xf "$TEMP_DIR/JetBrainsMono.tar.xz" -C "$FONT_DIR"
rm -rf "$TEMP_DIR"
Comment thread stow_all.sh
Comment on lines +31 to +35
PACKAGES=(
btop
fastfetch
fish
ghostty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants