Skip to content

Feature Request: Import dotfiles from arbitrary repos (Hyprland/themed dotfiles) #24

Description

@grave0x

Summary

Add the ability to import dotfiles from arbitrary GitHub repos into dwell, supporting the diverse structures found in popular Hyprland/themed dotfiles repositories.

Motivation

Users find dotfiles repos with unique themes and want to adopt parts of them. Each repo has a different layout:

Repo structures to support

Repo Structure
garuda-hyprdots Direct .config/ subdirs (ags/, alacritty/, btop/, cava/) — copy to ~/.config/
hyprzepyx config/, home-configs/, scripts/, deps-installer.sh
retrilzzy/dotfiles Configs/, Scripts/
Hyprland-Simple-Setup dotfiles/, dev/, Documents/, Wallpaper/ — also a Rust project
NeKoRoSHELL-DLux-Shell Quickshell config (shell.qml, components/, panels/)

Proposed design

dwell import <repo-url>

dwell import https://github.com/user/dotfiles              # Interactive import
dwell import https://github.com/user/dotfiles --all         # Import everything
dwell import https://github.com/user/dotfiles --dry-run     # Preview only
dwell import gh:user/dotfiles                               # Shorthand

Auto-detection logic

When cloning a repo, detect its structure:

  1. Direct .config/ style (garuda-hyprdots) — dirs like ags/, alacritty/, btop/ are treated as ~/.config/<name>/ — add each as dot_config/<name>/
  2. Home-relative style (hyprzepyx) — home-configs/ contains home-relative files — add via dwell add logic
  3. Configs/ dir style (retrilzzy) — Configs/ contains config directories — map to .config/
  4. Nested dotfiles/ dir (Hyprland-Simple-Setup) — dotfiles/ is the source — import from there
  5. App-specific config (NeKoRoSHELL) — quickshell config files — import to ~/.config/quickshell/

Interactive import flow

$ dwell import https://github.com/zepyxunderscore/hyprzepyx
→ Cloning hyprzepyx...
→ Detected structure: home-configs/ + config/ + scripts/
→ Found 23 config files, 5 scripts, 1 deps script
  [?] Import all? [Y/n] Y
  [?] Import scripts to ~/bin/? [Y/n] n
  [?] Run deps-installer.sh? [y/N] N
  ✓ Imported 23 files from hyprzepyx
  ✓ Generated .dwell/deps.toml
  ✓ Staged in git

Implementation notes

  • Each repo import creates a named "source" in .dwell/sources/ tracking the origin URL and date
  • Duplicate paths are detected and prompted for conflict resolution
  • Scripts/binaries are optionally imported to ~/bin/ and tracked in setup manifest
  • Deps scripts are scanned for package names and merged into deps.toml
  • Wallpapers/themes are detected and tracked separately (handled by dwell setup later)

Acceptance criteria

  • dwell import <url> detects repo structure and imports configs
  • Supports direct .config/ subdir layout (garuda-hyprdots)
  • Supports home-configs/ layout (hyprzepyx)
  • Supports Configs/ layout (retrilzzy)
  • Supports dotfiles/ subdir layout
  • Interactive conflict resolution for duplicate paths
  • --dry-run previews without importing
  • Git staged and committed after import
  • Deps parsed from deps scripts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions