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

Feature: Allow dotfiles to target root #22

Open
RaphGL opened this issue Jun 7, 2023 · 1 comment
Open

Feature: Allow dotfiles to target root #22

RaphGL opened this issue Jun 7, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@RaphGL
Copy link
Owner

RaphGL commented Jun 7, 2023

While stow allows changing where to deploy dotfiles via flags tuckr does not, this makes so that one still needs stow to be installed on the system despite tuckr being as capable as it to track and manage dotfiles.

Root targeting should be implemented and allow users to manage global configuration from their home if they so wish.
Note: This has to take into account that when run as sudo the home path becomes the root's

Possible idiom for targeting root:

├── root
│   └── tuckrfiles
│       └── usr
│           └── local
│               └── etc
└── tuckrfiles
@RaphGL RaphGL added the enhancement New feature or request label Jun 7, 2023
@RaphGL
Copy link
Owner Author

RaphGL commented Sep 8, 2024

When targetting root, an easy way to mark a group as "root targeting" is by provide a sigil

@ seems to be a decent sigil option not used by any of the major shells
So groups that are targeting root could be used like so:

$ tuckr status
                                        
     ╭────────────┬───────────────╮     
     │ Symlinked  │ Not Symlinked │     
     ├────────────┼───────────────┤     
     │ alacritty  │ @pacman       │     
     │ bash       │               │     
     │ bspwm      │               │     
     │ zathura    │               │
     │ zsh        │               │     
     ╰────────────┴───────────────╯   

when using @ one has to be in running as root, tuckr knows that you're running as root by using system calls to know which user called sudo

$ sudo tuckr add @pacman

Globbing should ignore root targeting groups.
If root groups are used without root permissions an error should be emitted.

@RaphGL RaphGL added this to the 0.12.0 milestone Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant