bevry / dorothy

🧙🏻‍♀️ Bring your dotfile commands and configuration to any shell. Sensible defaults and hundreds of commands preloaded. Supports Bash, Zsh, Fish, Nu, Xonsh, Elvish, Dash, KornShell, macOS, Linux, Windows.
Other
334 stars 22 forks source link

Question: Dorothy and Dotly integration? #217

Closed b9Joker108 closed 7 months ago

b9Joker108 commented 7 months ago

Dear Benjamin and to whomsoever else it may concern

This issue is further to this closed issue:

https://github.com/bevry/dorothy/issues/214

and regarding another dotfile framework and ecosystem, Dotly:

https://github.com/CodelyTV/dotly

I just came across Dorothy again, researching dotfiles management solutions. I had also previously starred Dorothy in GitHub, but haven't recently reviewed my starred projects, which I do periodically. As I had issues with my prior attempt at installing Dorothy in Termux (as per Issue 214), I kind of lost my momentum with it and failed in sticking to it, to realise a solution. In essence, I got distracted doing and progressing other things. It seems like, in my Termux and my various shells, on my tablet, that I am always reactive and putting out spotfires. I feel a dotfiles management solution, will go some way to mitigate this.

I actually, missed your detailed response to my prior issue (214), now closed, and only just now read it. I noted that you had gone to some pains to iterate Dorothy, in response. I thank you so much for your endeavour and for your code. I also note, that you just had surgery and are convalescing. I wish you the best with that, in order to heal. I truly hope you aren't in pain and haven't been significantly or severely debilitated, as a result. Life, I have found, is a matter of constantly 'rolling with the punches', as they say.

Very recently, I installed the Dotly dotfiles framework and ecosystem on my Termux, and the process was initially, profoundly traumatic:

https://github.com/CodelyTV/dotly/discussions/268

But, I am retrofitting my pre-Termux environment and Zsh shell (and .zshrc), which is my principal daily driver, in my host Termux environment, with the new Dotly framework and ecosystem. The process of integrating Dotly, and adapting to it and getting it to adapt to me, has just begun, and I have much yet to successfully implement and realise, in order to get it to work as designed.

That said, I still wish to utilise the Dorothy dotfiles framework and ecosystem as well, and in addition to Dotly dotfiles framework and ecosystem, to get the best of both worlds, and adapt both Dorothy and Dotly, to my own particular workflow and usecase. I call upon your wisdom to assist me to progress the synthesis, and push-the-envelope, with their extensibility, from the Dorothy end.

I am documenting all my Termux and shell learnings and troubleshooting experiences, and my impetus and rationale, in a book I am writing, that I mentioned to you previously, to inform others, in acquiring shell scripting and to become adept at Termux, and unlock the power of Android-*NIX granularity and extensibility. That work may potentially yield a significant uptake of Dorothy and extend the community. You have had significant recent difficulties and challenges, and no doubt, many other projects and occupations, since my initial issue and correspondence to your GitHub Dorothy project repository, that you most probably, do not remember, about my shell scripting project, and have had other things on your mind, due to your health.

When you have time, I would really appreciate your wisdom and input, if Dorothy could be effectively integrated with my Dotly installation in Termux. Not just for me personally, but also for the audience of my book and its project auspice. I appreciate in so doing, that the Dorothy/Dotly hybridisation, is something new, and potentially 'its own beast', and an impossibility for you to most probably visualise and pre-empt all the possible moving parts and complexities that may result. But, I would still really appreciate your wisdom and input, and to ascertain whether such an integration and hybridisation is possible or feasible, or even desirable or valuable.

I anticipate a significant part of this hybridisation is whether symlinks can be symlinked. Which, I do not know. As both Dorothy and Dotly, use symlinks to significant effect, to realise their dotfiles management system, framework and ecosystem. I am sure, too, there are many other factors and contingencies, that I am not aware of.

I really value the Dorothy project, because it is NIX shell agnostic, and natively supports a significant number of shells, out-of-the-box; whereas Dotly, initially, only supports two, Bash and Zsh, though Dotly is of course customisable and extensible. My written work, is initially only focusing on POSIX shell compliance, and the Bash and Zsh shell dialects, extensions and their extensibilities, and all of their shell scripting protocols and best-practices. But, anticipate extending the work to extensively cover as many NIX shells as possible that are installable natively in Termux, or in the PRoot-distro alias guest installations of GNU/Linux distributions, in Termux on Android: I currently regularly drive Debian, Arch, Ubuntu, Parrot and Kali Nethunter Rootless, each with a number of different users, all with a number of different shells. The complexity is profound. In future, I am working towards automatic synchronisation of the dotfiles ecosystems on all these different user accounts and their different shells. I don't even know if this is possible, but I feel it exciting to try. This setup and automation would be invaluable, for a number of reasons and use-cases.

In due course, I patiently anticipate your due consideration, and considered response. There is no rush.

Thanking you in anticipation Beauford

P. S. Have you considered enabling the 'Discussions' (and 'Wiki') functionality in the Dorothy GitHub repository? I feel they would offer significant value and enrichment, for the Dorothy community, and may allow you to focus on other things.

balupton commented 7 months ago

From a quick look, I don't see any reason why they should be incompatible. They have quite different approaches which means they shouldn't interfere with each other. Dorothy's install process only makes a single line modification to the appropriate zsh/bash rc files; it's only symlink modification is ensuring its own XDG setup is done correctly. If you do you use both, you would have to decide if you want to place your commands inside Dorothy's user configuration or inside Dotly's. To be honest, I'm not sure what the advantage would be of Dotly over Dorothy, besides more github stars.

balupton commented 7 months ago

I'll work to upload a more recent Dorothy presentation in the next few days.

Okay, done a quick export, will be uploaded to https://www.youtube.com/@balupton/videos perhaps in 5 hours. Subscribe ;-)

I'm off to sleep, will check back tomorrow :-)

b9Joker108 commented 7 months ago

Thank you so much for being so prompt with your response. I have been slowly making sure all the sources of truth, the true configuration directories and dotfiles, are located in the appropriate places in the Dotly file system: /data/data/com.termux/files/home/.dotfiles/ and symlinked to their ideal locations, as planned by their coders. It is really fiddly work, and easy to get wrong, well it is for me, and it is new to me. I have so far done Bash, Zsh, Nushell and Fish, and have a number of others to go. But, I still haven't translated, and meshed, the code and logic from the Dotly .zshrc and the Dotly .bashrc, with my pre-Dotly Bash and Zsh configurations. I am going to have to go even slower and be more careful with that: *lol*.

The intention is that the Dotly .dotfiles framework and ecosystem, holds all the sources of truth, and they can then be easily and regularly, git committed and pushed to my GitHub dotfiles repository. Then, they will be able to be git cloned in suite, on any new install, for example. The new install, will still need to be manually tweaked, but the process with be greatly automated, and a considerable win. Moreover, all the work of customisation, will be preserved if there are problems with the device or environment, for example. That gives me peace of mind.

Rather foolishly, I don't actually yet have a regular automated system backup, and I must really get to that, sooner rather than later. Though, after the horror, I went through with installing Dotly, thinking that my Zsh configuration, had been overwritten, and the more than two years solid work cusromising it, a few times every week, had been irrevocably lost. Also, my Termux package manager was broken, due to the total custom Dotly Path environment variable, being redefined, rather that being appended. To protect my Zsh config, I have set up a weekly copy of the current config, to be saved in a dedicated archive. This will be double-handling, when the regular automated git commit and push kicks in, but it is a start, and my first regularly automated script.

Also, my GitHub dotfiles repository, will eventually be a real kickstart, for the readers of my shell scripting roadmap. I will learn a great deal from both the Dorothy and Dotly frameworks, and they both seem to have a number of built-in scripts, functions and other facilities and amenities.

So, is it appropriate for Dorothy to be git committed and pushed, to the same GitHub dotfiles repository as Dotly? That's what I plan doing anyway. So the two dotfiles frameworks, are housed together. I also need to integrate aspects of GNU Stow. The method in my madness, is that eventually, I will be able to draw upon all the systems, and design my own.

After installing Dorothy, won't I need to manually translate or relocate, all the Dorothy configuration sources of truth, ie., configuration directories and dotfiles, to the appropriate locations within the Dotly .dotfiles directory, and resolve all of the ideal locations with a symlink? I am a real noob, and just can't envision, how that wouldn't be necessary. I am really confused, but also really relieved and excited, that you consider that Dorothy and Dotly, most likely will not conflict, with each other.

It is circa 5.00pm AEDT, and I am just going to have a look-see, at your YouTube channel. i think I have already subscribed, by memory. If not, I soon will have. I will venture installing Dorothy tomorrow. I truly hope it goes much more smoothly, than the Dotly install. I think I am the only one, or one of the very few, Termux users, that have installed Dotly. Are there many Termux users of Dorothy?

Before I go, I have a vignette for you. It is beautifully written:

https://bpb-ap-se2.wpmucdn.com/learn.stleonards.vic.edu.au/dist/9/92/files/2016/06/The-Pearl-John-Steinbeck.pdf

I hope you had a great sleep, and once again, thank you and your crew, for the code.

I hope you are well on the mend, and are well rested!

Cheers Beauford

balupton commented 7 months ago

So, Dorothy's user configuration would have to be its own git repository, seperate from Dotly. Dorothy validates/enforces that the user configuration is at the correct realpath location (~/.config/dorothy). If you can desire for symlink inside Dotly that targets Dorothy's user configuration, then that should work; but the reverse won't. It sounds like you see good value in using both, so I'll assist where I can.

I believe that @molleweide's dotfiles (dorothy user configuration) does configs for all sorts of apps, without using Dotly, in case his approach could be of interest.

For other uses of termux, I'm not sure; the user configs linked in the readme are the only public ones I know about; however, considering Dorothy has over 10 watchers, it means many use Dorothy privately without my awareness.

For the export of the CampJS talk, the export keeps failing. Not sure why. I'll post back once it successfully exports and is uploaded.

Re prior neglected point of GitHub Discussions, we use to have them on this repository but closed them down, as we aren't at the volume where it reduces effort. We do have a Discord community, the link is on the badge in the readme, which is used for chit chat, realtime support, and coworking.

balupton commented 7 months ago

The 2023 presentation is now live at: https://www.youtube.com/watch?v=EdoN9rQ2S4w

balupton commented 7 months ago

Going to close, please reopen if you encounter any incompatibilities between Dotly and Dorothy.