Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How would you manage directories with both system-wide and user specific files? #18

Closed
ravexina opened this issue Jun 23, 2020 · 2 comments
Labels

Comments

@ravexina
Copy link

ravexina commented Jun 23, 2020

Hi,
How would you manage directories with both system-wide and user specific files?
A directory like xorg.

A solution might be:

$ pwd 
~/dotfiles
$ stow -t /etc -d xorg etc
$ stow -t ~/.config -d xorg .config

Not really pretty. Is there any better way to get around this?

@jeewangue
Copy link

I was wondering the exact same thing!

@xero xero added the question label Jul 2, 2023
@xero
Copy link
Owner

xero commented Sep 6, 2024

stow can't natively use subdirectories, but you can just cd and run stow from there.

here's an example for 2 different xorg directory trees:

$ tree ~/dots
~/dots
├── vim/
│   └── .config/
│       └── local/
│           └── vim/
│               └── vimrc
├── whatever/
│   └── .config/
│       └── local/
│           └── whatever/
│               └── thing
└── xorg/
    ├── hosts/
    │   └── etc/
    │       └── hosts
    └── local/
        └── .config/
            └── local/
                └── xorg.conf

$ stow vim whatever -t /home/user
$ cd xorg
$ stow hosts -t /
$ stow local -t /home/user

$ tree /
./
├── etc/
│   └── hosts -> ~dots/xorg/hosts/etc/hosts
└── home/
    └── user/
        └── .config/
            └── local/
                ├── vim -> ~dots/vim/.config/local/vim/
                ├── whatever -> ~dots/whatever/.config/local/whatever/
                └── xorg.conf -> ~dots/xorg/local/.config/local/xorg.conf

@xero xero pinned this issue Sep 6, 2024
@xero xero closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants