Code Monkey home page Code Monkey logo

psdotfiles's People

Contributors

klauern avatar ralish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

psdotfiles's Issues

Unable to handle symlinks earlier in destination path hierarchy

For example, assume we're symlinking $HOME\.config\pip\pip.conf to $HOME\dotfiles\pip\pip.conf.

If $HOME\.config is a symlink to $HOME\config, then an exception is thrown indicating a directory symlink to an unexpected target was found. As the evaluated source path is further up the directory hierarchy than the target source path it should not indicate a failure. Instead, we should retry the operation on each additional possible level in the source path hierarchy until we've truly exhausted all options, at which point an appropriate exception should be thrown.

Consolidate user settings into a dictionary

The module permits several settings to be set globally via PowerShell variables. The currently supported variables can be found in Profile.sample.ps1. It'd be nice to move these into a single dictionary type. For example:

$PSDotFilesSettings = @{
    # Dotfiles directory path
    Path                      = (Join-Path -Path $HOME -ChildPath 'dotfiles')
    # Enable automatic detection of components
    Autodetect                = $true
    # Enable handling of intermediate destination symlinks
    AllowNestedSymlinks       = $true
    # Skip validation of metadata XML files against XSD schema
    SkipMetadataSchemaChecks  = $false
}

Not understanding Get-DotFiles

I don't quite understand what the Availability column, and why this doesn't behave similarly to stow:

C:\Users\klauer\dotfiles [arch ≡ +1 ~0 -0 !]
λ  Get-DotFiles

Directory Name Availability State
--------- ---- ------------ -----
bash           NoLogic      NotEvaluated
config         NoLogic      NotEvaluated
emacs          NoLogic      NotEvaluated
git       Git  Available    Installed
hg             NoLogic      NotEvaluated
npm            NoLogic      NotEvaluated
ruby           NoLogic      NotEvaluated
ssh            NoLogic      NotEvaluated
svn            NoLogic      NotEvaluated
tmux           NoLogic      NotEvaluated
utils          NoLogic      NotEvaluated
vim            NoLogic      NotEvaluated
X11            NoLogic      NotEvaluated
zsh            NoLogic      NotEvaluated

Personally, I don't know if it matters for me to have logic for particular components because linking them to my user home directory would effectively be a no-op if I didn't have a component that was useful in Windows. Is there something that Availability does that prevents me from having things like npm, ssh, svn, hg, emacs, etc., work just like stow, and naively link them?

Add support for optionally using hardlinks instead of symlinks

There are some edge cases where this would be very useful. For example, applications which watch a directory for file changes so they can automatically trigger some processing on file modifications, such as changes to a settings file. This is typically handled via FindFirstChangeNotification.

The catch is this function will only raise an event on changes to the symlink itself and not its target. Implementing watching of the target requires extra support which many applications do not implement. By using a hardlink instead of a symlink this issue is effectively worked-around as the normal filesystem semantics will apply.

GNU Stow repo compatibility

Just came across this. Was looking for dfm system that would allow me to use a central REPO across windows (PS primarily) and WSL / linux builds. I have read a bit about Stow, but was wondering the level of compatibility between this repo and Stow in terms of setting up the dotfiles repo.

Correctly handle directories with child AdditionalPath or RenamePath elements

Assume we're installing a component which contains at least one AdditionalPath or RenamePath element for a file inside a folder (i.e. not at the root of the component directory). If the destination directory does not exist we'll preference creating a directory symlink instead of a directory with individual file symlinks. However, in this scenario the AdditionalPath and RenamePath elements for files within this directory are not respected.

Automatic detection doesn't work with programs installed via Scoop

I installed putty and Windows Terminal via scoop. They don't come up when I run Get-InstalledPrograms so they are not auto-detected and the dotfiles are not installed.

Although I notice I'm a bit confused as I've also installed git and vscode via scoop and it detects them... but maybe that's because they were previously installed the normal way.

I guess the work-around is to manually specify them? I can't figure out how to do that. I tried the following:

$DotFilesAutodetect=$false
Get-DotFiles | ? Name -in putty, winterm | Install-DotFiles

Support PowerShell versions prior to v5

This will only be done if there's sufficient interest. We make heavy use of several features introduced in PowerShell v5 making backporting to older versions non-trivial. In particular, we'd need to re-implement:

  • Symlink handling (no native symlink support)
  • Class handling (no native support for classes)
  • Enum handling (no native support for enumerations)

If you're interested please signal as such via adding your "reaction". Please avoid commenting on the issue unless you have a contribution to the proposed support beyond simply wanting it to be added.

Implement test suite

This module is getting pretty complex with a pretty scary amount of configurable options via component metadata, and increasingly convoluted logic around the filesystem handling. It would be beneficial to implement a test suite so we can much more easily find regressions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.